-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddonDialog.h
More file actions
70 lines (58 loc) · 1.77 KB
/
AddonDialog.h
File metadata and controls
70 lines (58 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef ADDONDIALOGH
#define ADDONDIALOGH
#include <wx/wx.h>
#include <wx/window.h>
#include <wx/dialog.h>
#include <wx/string.h>
#include <wx/utils.h>
#include <wx/filepicker.h>
#include <wx/dir.h>
#include <wx/filefn.h>
//#include <cbplugin.h> // for "class cbToolPlugin"
#include <logmanager.h>
#include <configmanager.h>
#include <vector>
#include "cbproject.h"
#include "projectmanager.h"
#include "ProjectAnalyzer.h"
enum {
OF_DIR_BUTTON = 2048
,OF_OK_BUTTON
,OF_CANCEL_BUTTON
};
struct AddonFile {
wxString name;
wxString addon_dir;
wxString install_file;
};
class AddonDialog : public wxDialog{
public:
AddonDialog(wxWindow* pParent, wxWindowID nID, const wxString& sTitle);
~AddonDialog();
void showOFDirDialog();
void onOFDirButtonClick(wxCommandEvent & WXUNUSED(oEv));
void onOkButtonClick(wxCommandEvent & WXUNUSED(oEv));
void onCancelButtonClick(wxCommandEvent & WXUNUSED(oEv));
void setOFDir(wxString sDir);
std::vector<AddonFile> findAddons(wxString inDir);
std::vector<AddonFile> getFoundAddons();
std::vector<AddonFile> getSelectedAddons(); // gets the checked addons
std::vector<AddonFile> getNewSelectedAddons(); // get the addons which have been added 'this time'
std::vector<AddonFile> getDeselectedAddons();
std::vector<AddonFile> getAddonsUsedInCurrentProject();
std::vector<AddonFile> getPreviouslySelectedAddons();
wxString getAddonInstallFile(wxString sForAddon);
private:
wxWindow* parent_win;
wxTextCtrl* of_dir_txt;
wxButton* of_dir_btn;
wxButton* of_ok_btn;
wxButton* of_cancel_btn;
wxStaticBox* of_dir_box;
wxStaticBox* of_addon_box;
wxCheckListBox* of_addons_list;
wxString of_dir;
std::vector<AddonFile> addons; // addons found with an install script.
std::vector<AddonFile> prev_selected_addons;
};
#endif