Code::Blocks  SVN r11506
compileroptionsdlg.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef COMPILEROPTIONSDLG_H
7 #define COMPILEROPTIONSDLG_H
8 
9 #include <vector>
10 #include <wx/intl.h>
11 #include <wx/string.h>
12 #include "configurationpanel.h"
13 #include "compileroptions.h"
14 
15 class wxListBox;
16 class ScopeTreeData;
17 class cbProject;
18 class ProjectBuildTarget;
19 class CompilerGCC;
20 class wxSpinEvent;
21 class wxTreeEvent;
22 class wxCommandEvent;
23 class wxKeyEvent;
24 class wxPropertyGrid;
26 class wxUpdateUIEvent;
27 
29 {
30  public:
31  CompilerOptionsDlg(wxWindow* parent, CompilerGCC* compiler, cbProject* project = 0L, ProjectBuildTarget* target = 0L);
33 
34  virtual wxString GetTitle() const { return _("Global compiler settings"); }
35  virtual wxString GetBitmapBaseName() const { return _T("compiler"); }
36  virtual void OnApply();
37  virtual void OnCancel(){}
38  private:
40  {
44  };
45 
47  {
51  };
52  void TextToOptions();
53  void OptionsToText();
54  void DoFillCompilerSets(int compilerIdx);
56  void DoFillVars();
57  void DoFillOthers();
58  void DoFillOptions();
61  void DoFillTree();
62  void DoSaveOptions();
63  void DoLoadOptions();
65  void DoSaveVars();
67  void CompilerChanged();
68  void UpdateCompilerForTargets(int compilerIdx);
69  void AutoDetectCompiler();
73 
74  void OnRealApply(); // user clicked the "Apply" button (so not the Ok button !!!)
77  void OnCompilerChanged(wxCommandEvent& event);
78  void OnCategoryChanged(wxCommandEvent& event);
80  void OnAddDirClick(wxCommandEvent& event);
81  void OnEditDirClick(wxCommandEvent& event);
82  void OnRemoveDirClick(wxCommandEvent& event);
83  void OnClearDirClick(wxCommandEvent& event);
84  void OnCopyDirsClick(wxCommandEvent& event);
85  void OnAddVarClick(wxCommandEvent& event);
86  void OnEditVarClick(wxCommandEvent& event);
87  void OnRemoveVarClick(wxCommandEvent& event);
88  void OnClearVarClick(wxCommandEvent& event);
94  void OnAddLibClick(wxCommandEvent& event);
95  void OnEditLibClick(wxCommandEvent& event);
96  void OnRemoveLibClick(wxCommandEvent& event);
97  void OnClearLibClick(wxCommandEvent& event);
98  void OnCopyLibsClick(wxCommandEvent& event);
99  void OnMoveLibUpClick(wxCommandEvent& event);
100  void OnMoveLibDownClick(wxCommandEvent& event);
101  void OnMoveDirUpClick(wxCommandEvent& event);
102  void OnMoveDirDownClick(wxCommandEvent& event);
103  void OnMasterPathClick(wxCommandEvent& event);
104  void OnAutoDetectClick(wxCommandEvent& event);
106  void OnAdvancedClick(wxCommandEvent& event);
107  void OnAddExtraPathClick(wxCommandEvent& event);
111  void OnIgnoreAddClick(wxCommandEvent& event);
112  void OnIgnoreRemoveClick(wxCommandEvent& event);
113  void OnUpdateUI(wxUpdateUIEvent& event);
114  void OnDirty(wxCommandEvent& event); // some controls who change their value -> dirty
115  void OnMyCharHook(wxKeyEvent& event);
116  void OnFlagsPopup(wxPropertyGridEvent& event);
117  void OnFlagsPopupClick(wxCommandEvent& event);
119 
120  private:
131  bool m_bDirty;
133  std::vector<CustomVarAction> m_CustomVarActions;
135 
137  static int m_MenuOption;
138 
139  DECLARE_EVENT_TABLE()
140 };
141 
142 #endif // COMPILEROPTIONSDLG_H
void OnClearLibClick(wxCommandEvent &event)
void OnAddExtraPathClick(wxCommandEvent &event)
void UpdateCompilerForTargets(int compilerIdx)
void OnRemoveDirClick(wxCommandEvent &event)
virtual wxString GetTitle() const
void OnAddDirClick(wxCommandEvent &event)
CompileOptionsBase * GetVarsOwner()
std::vector< CustomVarAction > m_CustomVarActions
the actions carried out on the custom vars that need to be saved/applied
virtual wxString GetBitmapBaseName() const
void OnSetDefaultCompilerClick(wxCommandEvent &event)
wxString m_NewProjectOrTargetCompilerId
keeps track of the changes of compiler of the selected project/target
void OnEditLibClick(wxCommandEvent &event)
ProjectBuildTarget * m_pTarget
void OnEditExtraPathClick(wxCommandEvent &event)
void OnRemoveExtraPathClick(wxCommandEvent &event)
void OnCompilerChanged(wxCommandEvent &event)
void OnTreeSelectionChange(wxTreeEvent &event)
void OnClearVarClick(wxCommandEvent &event)
virtual void OnApply()
Called when the user chooses to apply the configuration.
wxArrayString m_ResourceCompilerOptions
void OnRemoveLibClick(wxCommandEvent &event)
#define _T(string)
wxArrayString m_LinkerOptions
void OnResetCompilerClick(wxCommandEvent &event)
void OnMoveDirUpClick(wxCommandEvent &event)
void OnMasterPathClick(wxCommandEvent &event)
void ProjectTargetCompilerAdjust()
checks if compiler changed for project/target and takes actions accordingly
void OnFlagsPopupClick(wxCommandEvent &event)
void OnEditVarClick(wxCommandEvent &event)
void OnClearExtraPathClick(wxCommandEvent &event)
CompilerOptions m_Options
void OnRemoveVarClick(wxCommandEvent &event)
void OnTreeSelectionChanging(wxTreeEvent &event)
void OnOptionChanged(wxPropertyGridEvent &event)
void DoFillCompilerSets(int compilerIdx)
void OnIgnoreAddClick(wxCommandEvent &event)
void OnMoveLibUpClick(wxCommandEvent &event)
Represents a Code::Blocks project.
Definition: cbproject.h:96
void OnMyCharHook(wxKeyEvent &event)
void OnAddCompilerClick(wxCommandEvent &event)
void OnClearDirClick(wxCommandEvent &event)
CompilerGCC * m_Compiler
void OnDirty(wxCommandEvent &event)
void OnRemoveCompilerClick(wxCommandEvent &event)
void OnAddLibClick(wxCommandEvent &event)
void OnAdvancedClick(wxCommandEvent &event)
This is a base class for all classes needing compilation parameters.
wxPropertyGrid * m_FlagsPG
void OnAddVarClick(wxCommandEvent &event)
void OnAutoDetectClick(wxCommandEvent &event)
const wxString & _(const wxString &string)
Base class for plugin configuration panels.
void OnSelectProgramClick(wxCommandEvent &event)
void OnEditDirClick(wxCommandEvent &event)
wxArrayString m_CompilerOptions
bool m_bDirty
true if a setting has changed since last save
void OnFlagsPopup(wxPropertyGridEvent &event)
void OnCopyDirsClick(wxCommandEvent &event)
void OnMoveLibDownClick(wxCommandEvent &event)
void OnCopyLibsClick(wxCommandEvent &event)
void OnOptionDoubleClick(wxPropertyGridEvent &event)
virtual void OnCancel()
Called when the user chooses to cancel the configuration.
void OnEditCompilerClick(wxCommandEvent &event)
Represents a Code::Blocks project build target.
void OnIgnoreRemoveClick(wxCommandEvent &event)
void OnUpdateUI(wxUpdateUIEvent &event)
wxArrayString m_LinkLibs
bool m_bFlagsDirty
true if a flag (not its value) has changed since last save
bool m_BuildingTree
flag to ignore tree changing events while building it
void OnMoveDirDownClick(wxCommandEvent &event)
CompilerOptionsDlg(wxWindow *parent, CompilerGCC *compiler, cbProject *project=0L, ProjectBuildTarget *target=0L)
void OnCategoryChanged(wxCommandEvent &event)