Code::Blocks  SVN r11506
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CompilerOptionsDlg Class Reference

#include <compileroptionsdlg.h>

Inheritance diagram for CompilerOptionsDlg:
Collaboration diagram for CompilerOptionsDlg:

Classes

struct  CustomVarAction
 

Public Member Functions

 CompilerOptionsDlg (wxWindow *parent, CompilerGCC *compiler, cbProject *project=0L, ProjectBuildTarget *target=0L)
 
 ~CompilerOptionsDlg ()
 
virtual wxString GetTitle () const
 
virtual wxString GetBitmapBaseName () const
 
virtual void OnApply ()
 Called when the user chooses to apply the configuration. More...
 
virtual void OnCancel ()
 Called when the user chooses to cancel the configuration. More...
 
- Public Member Functions inherited from cbConfigurationPanel
 cbConfigurationPanel ()
 
 ~cbConfigurationPanel () override
 
void SetParentDialog (wxWindow *dialog)
 Sets the panel's parent dialog. More...
 
wxWindowSetParentDialog ()
 Gets the panel's parent dialog. More...
 
int cbMessageBox (const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
 Call global cbMessageBox with m_parentDialog as parent window when no parent window specified. More...
 

Private Types

enum  CustomVarActionType { CVA_Add, CVA_Edit, CVA_Remove }
 

Private Member Functions

void TextToOptions ()
 
void OptionsToText ()
 
void DoFillCompilerSets (int compilerIdx)
 
void DoFillCompilerPrograms ()
 
void DoFillVars ()
 
void DoFillOthers ()
 
void DoFillOptions ()
 
void DoFillCompilerDependentSettings ()
 
void DoSaveCompilerDependentSettings ()
 
void DoFillTree ()
 
void DoSaveOptions ()
 
void DoLoadOptions ()
 
void DoSaveCompilerPrograms ()
 
void DoSaveVars ()
 
void DoSaveCompilerDefinition ()
 
void CompilerChanged ()
 
void UpdateCompilerForTargets (int compilerIdx)
 
void AutoDetectCompiler ()
 
wxListBoxGetDirsListBox ()
 
CompileOptionsBaseGetVarsOwner ()
 
void ProjectTargetCompilerAdjust ()
 checks if compiler changed for project/target and takes actions accordingly More...
 
void OnRealApply ()
 
void OnTreeSelectionChange (wxTreeEvent &event)
 
void OnTreeSelectionChanging (wxTreeEvent &event)
 
void OnCompilerChanged (wxCommandEvent &event)
 
void OnCategoryChanged (wxCommandEvent &event)
 
void OnOptionChanged (wxPropertyGridEvent &event)
 
void OnAddDirClick (wxCommandEvent &event)
 
void OnEditDirClick (wxCommandEvent &event)
 
void OnRemoveDirClick (wxCommandEvent &event)
 
void OnClearDirClick (wxCommandEvent &event)
 
void OnCopyDirsClick (wxCommandEvent &event)
 
void OnAddVarClick (wxCommandEvent &event)
 
void OnEditVarClick (wxCommandEvent &event)
 
void OnRemoveVarClick (wxCommandEvent &event)
 
void OnClearVarClick (wxCommandEvent &event)
 
void OnSetDefaultCompilerClick (wxCommandEvent &event)
 
void OnAddCompilerClick (wxCommandEvent &event)
 
void OnEditCompilerClick (wxCommandEvent &event)
 
void OnRemoveCompilerClick (wxCommandEvent &event)
 
void OnResetCompilerClick (wxCommandEvent &event)
 
void OnAddLibClick (wxCommandEvent &event)
 
void OnEditLibClick (wxCommandEvent &event)
 
void OnRemoveLibClick (wxCommandEvent &event)
 
void OnClearLibClick (wxCommandEvent &event)
 
void OnCopyLibsClick (wxCommandEvent &event)
 
void OnMoveLibUpClick (wxCommandEvent &event)
 
void OnMoveLibDownClick (wxCommandEvent &event)
 
void OnMoveDirUpClick (wxCommandEvent &event)
 
void OnMoveDirDownClick (wxCommandEvent &event)
 
void OnMasterPathClick (wxCommandEvent &event)
 
void OnAutoDetectClick (wxCommandEvent &event)
 
void OnSelectProgramClick (wxCommandEvent &event)
 
void OnAdvancedClick (wxCommandEvent &event)
 
void OnAddExtraPathClick (wxCommandEvent &event)
 
void OnEditExtraPathClick (wxCommandEvent &event)
 
void OnRemoveExtraPathClick (wxCommandEvent &event)
 
void OnClearExtraPathClick (wxCommandEvent &event)
 
void OnIgnoreAddClick (wxCommandEvent &event)
 
void OnIgnoreRemoveClick (wxCommandEvent &event)
 
void OnUpdateUI (wxUpdateUIEvent &event)
 
void OnDirty (wxCommandEvent &event)
 
void OnMyCharHook (wxKeyEvent &event)
 
void OnFlagsPopup (wxPropertyGridEvent &event)
 
void OnFlagsPopupClick (wxCommandEvent &event)
 
void OnOptionDoubleClick (wxPropertyGridEvent &event)
 

Private Attributes

wxPropertyGridm_FlagsPG
 
CompilerGCCm_Compiler
 
CompilerOptions m_Options
 
wxArrayString m_LinkerOptions
 
wxArrayString m_LinkLibs
 
wxArrayString m_CompilerOptions
 
wxArrayString m_ResourceCompilerOptions
 
int m_CurrentCompilerIdx
 
cbProjectm_pProject
 
ProjectBuildTargetm_pTarget
 
bool m_bDirty
 true if a setting has changed since last save More...
 
bool m_bFlagsDirty
 true if a flag (not its value) has changed since last save More...
 
std::vector< CustomVarActionm_CustomVarActions
 the actions carried out on the custom vars that need to be saved/applied More...
 
wxString m_NewProjectOrTargetCompilerId
 keeps track of the changes of compiler of the selected project/target More...
 
bool m_BuildingTree
 flag to ignore tree changing events while building it More...
 

Static Private Attributes

static int m_MenuOption = -1
 

Detailed Description

Definition at line 28 of file compileroptionsdlg.h.


Class Documentation

◆ CompilerOptionsDlg::CustomVarAction

struct CompilerOptionsDlg::CustomVarAction

Definition at line 46 of file compileroptionsdlg.h.

Collaboration diagram for CompilerOptionsDlg::CustomVarAction:
Class Members
CustomVarActionType m_Action
wxString m_Key
wxString m_KeyValue

Member Enumeration Documentation

◆ CustomVarActionType

Enumerator
CVA_Add 
CVA_Edit 
CVA_Remove 

Definition at line 39 of file compileroptionsdlg.h.

Constructor & Destructor Documentation

◆ CompilerOptionsDlg()

CompilerOptionsDlg::CompilerOptionsDlg ( wxWindow parent,
CompilerGCC compiler,
cbProject project = 0L,
ProjectBuildTarget target = 0L 
)

◆ ~CompilerOptionsDlg()

CompilerOptionsDlg::~CompilerOptionsDlg ( )

Definition at line 392 of file compileroptionsdlg.cpp.

Member Function Documentation

◆ AutoDetectCompiler()

void CompilerOptionsDlg::AutoDetectCompiler ( )
private

◆ CompilerChanged()

void CompilerOptionsDlg::CompilerChanged ( )
private

◆ DoFillCompilerDependentSettings()

void CompilerOptionsDlg::DoFillCompilerDependentSettings ( )
private

◆ DoFillCompilerPrograms()

void CompilerOptionsDlg::DoFillCompilerPrograms ( )
private

◆ DoFillCompilerSets()

void CompilerOptionsDlg::DoFillCompilerSets ( int  compilerIdx)
private

◆ DoFillOptions()

void CompilerOptionsDlg::DoFillOptions ( )
private

◆ DoFillOthers()

void CompilerOptionsDlg::DoFillOthers ( )
private

◆ DoFillTree()

void CompilerOptionsDlg::DoFillTree ( )
private

◆ DoFillVars()

void CompilerOptionsDlg::DoFillVars ( )
private

◆ DoLoadOptions()

void CompilerOptionsDlg::DoLoadOptions ( )
private

◆ DoSaveCompilerDefinition()

void CompilerOptionsDlg::DoSaveCompilerDefinition ( )
private

Definition at line 1163 of file compileroptionsdlg.cpp.

References wxXmlNode::AddAttribute(), wxXmlNode::AddChild(), CompOption::additionalLibs, CompilerPrograms::C, CompOption::category, CompOption::checkAgainst, CompOption::checkMessage, clogFull, clogNone, clogSimple, cltError, cltInfo, cltNormal, cltWarning, CompilerPrograms::CPP, ctCompileObjectCmd, ctCompileResourceCmd, ctCount, ctGenDependenciesCmd, ctLinkConsoleExeCmd, ctLinkDynamicCmd, ctLinkExeCmd, ctLinkNativeCmd, ctLinkStaticCmd, CompilerPrograms::DBGconfig, DEFAULT_ARRAY_SEP, CompilerSwitches::defaultLogging, CompilerSwitches::defines, wxString::EndsWith(), CompOption::exclusive, CompilerSwitches::forceCompilerUseQuotes, CompilerSwitches::forceFwdSlashes, CompilerSwitches::forceLinkerUseQuotes, wxString::Format(), CompilerSwitches::genericSwitch, Compiler::GetCommandToolsVector(), CompilerFactory::GetCompiler(), Compiler::GetCOnlyFlags(), CompilerOptions::GetCount(), Compiler::GetCPPOnlyFlags(), ConfigManager::GetFolder(), Compiler::GetID(), wxXmlNode::GetNext(), CompilerOptions::GetOption(), Compiler::GetPrograms(), Compiler::GetRegExArray(), GetStringFromArray(), Compiler::GetSwitches(), CompilerSwitches::includeDirs, CompilerSwitches::includeDirSeparator, wxString::IsEmpty(), CompilerPrograms::LD, CompilerPrograms::LIB, CompilerSwitches::libDirs, CompilerSwitches::libDirSeparator, CompilerSwitches::libExtension, CompilerSwitches::libPrefix, CompilerSwitches::linkerNeedsLibExtension, CompilerSwitches::linkerNeedsLibPrefix, CompilerSwitches::linkerNeedsPathResolved, CompilerSwitches::linkLibs, CompilerSwitches::logging, ParserConsts::lt, m_CurrentCompilerIdx, m_Options, CompilerPrograms::MAKE, CompOption::name, CompilerSwitches::needDependencies, CompilerSwitches::objectExtension, CompilerSwitches::objectSeparator, CompOption::option, CompilerSwitches::PCHExtension, wxString::Replace(), wxXmlDocument::Save(), sdDataUser, wxXmlNode::SetNext(), Compiler::SetOptions(), wxXmlDocument::SetRoot(), wxXmlDocument::SetVersion(), CompilerSwitches::statusSuccess, CompOption::supersedes, CompilerSwitches::supportsPCH, wxString::Trim(), CompilerSwitches::Use83Paths, CompilerSwitches::UseFlatObjects, CompilerSwitches::UseFullSourcePaths, CompilerPrograms::WINDRES, wxDirExists(), wxEmptyString, wxMkdir(), wxT, wxXML_CDATA_SECTION_NODE, and wxXML_ELEMENT_NODE.

Referenced by DoSaveCompilerDependentSettings().

◆ DoSaveCompilerDependentSettings()

void CompilerOptionsDlg::DoSaveCompilerDependentSettings ( )
private

◆ DoSaveCompilerPrograms()

void CompilerOptionsDlg::DoSaveCompilerPrograms ( )
private

◆ DoSaveOptions()

void CompilerOptionsDlg::DoSaveOptions ( )
private

◆ DoSaveVars()

void CompilerOptionsDlg::DoSaveVars ( )
private

◆ GetBitmapBaseName()

virtual wxString CompilerOptionsDlg::GetBitmapBaseName ( ) const
inlinevirtual
Returns
the panel's bitmap base name. You must supply two bitmaps: <basename>.png and <basename>-off.png...

Implements cbConfigurationPanel.

Definition at line 35 of file compileroptionsdlg.h.

References _T, and OnApply().

◆ GetDirsListBox()

wxListBox * CompilerOptionsDlg::GetDirsListBox ( )
private

◆ GetTitle()

virtual wxString CompilerOptionsDlg::GetTitle ( ) const
inlinevirtual
Returns
the panel's title.

Implements cbConfigurationPanel.

Definition at line 34 of file compileroptionsdlg.h.

References _().

◆ GetVarsOwner()

CompileOptionsBase * CompilerOptionsDlg::GetVarsOwner ( )
private

◆ OnAddCompilerClick()

void CompilerOptionsDlg::OnAddCompilerClick ( wxCommandEvent event)
private

◆ OnAddDirClick()

void CompilerOptionsDlg::OnAddDirClick ( wxCommandEvent event)
private

◆ OnAddExtraPathClick()

void CompilerOptionsDlg::OnAddExtraPathClick ( wxCommandEvent event)
private

◆ OnAddLibClick()

void CompilerOptionsDlg::OnAddLibClick ( wxCommandEvent event)
private

◆ OnAddVarClick()

void CompilerOptionsDlg::OnAddVarClick ( wxCommandEvent event)
private

◆ OnAdvancedClick()

void CompilerOptionsDlg::OnAdvancedClick ( wxCommandEvent event)
private

◆ OnApply()

void CompilerOptionsDlg::OnApply ( )
virtual

◆ OnAutoDetectClick()

void CompilerOptionsDlg::OnAutoDetectClick ( wxCommandEvent event)
private

Definition at line 2609 of file compileroptionsdlg.cpp.

References AutoDetectCompiler().

◆ OnCancel()

virtual void CompilerOptionsDlg::OnCancel ( )
inlinevirtual

Called when the user chooses to cancel the configuration.

Implements cbConfigurationPanel.

Definition at line 37 of file compileroptionsdlg.h.

◆ OnCategoryChanged()

void CompilerOptionsDlg::OnCategoryChanged ( wxCommandEvent event)
private

Definition at line 1740 of file compileroptionsdlg.cpp.

References DoFillOptions().

◆ OnClearDirClick()

void CompilerOptionsDlg::OnClearDirClick ( wxCommandEvent event)
private

◆ OnClearExtraPathClick()

void CompilerOptionsDlg::OnClearExtraPathClick ( wxCommandEvent event)
private

◆ OnClearLibClick()

void CompilerOptionsDlg::OnClearLibClick ( wxCommandEvent event)
private

◆ OnClearVarClick()

void CompilerOptionsDlg::OnClearVarClick ( wxCommandEvent event)
private

◆ OnCompilerChanged()

void CompilerOptionsDlg::OnCompilerChanged ( wxCommandEvent event)
private

◆ OnCopyDirsClick()

void CompilerOptionsDlg::OnCopyDirsClick ( wxCommandEvent event)
private

◆ OnCopyLibsClick()

void CompilerOptionsDlg::OnCopyLibsClick ( wxCommandEvent event)
private

◆ OnDirty()

void CompilerOptionsDlg::OnDirty ( wxCommandEvent event)
private

Definition at line 1422 of file compileroptionsdlg.cpp.

References m_bDirty.

◆ OnEditCompilerClick()

void CompilerOptionsDlg::OnEditCompilerClick ( wxCommandEvent event)
private

◆ OnEditDirClick()

void CompilerOptionsDlg::OnEditDirClick ( wxCommandEvent event)
private

◆ OnEditExtraPathClick()

void CompilerOptionsDlg::OnEditExtraPathClick ( wxCommandEvent event)
private

◆ OnEditLibClick()

void CompilerOptionsDlg::OnEditLibClick ( wxCommandEvent event)
private

◆ OnEditVarClick()

void CompilerOptionsDlg::OnEditVarClick ( wxCommandEvent event)
private

◆ OnFlagsPopup()

void CompilerOptionsDlg::OnFlagsPopup ( wxPropertyGridEvent event)
private

◆ OnFlagsPopupClick()

void CompilerOptionsDlg::OnFlagsPopupClick ( wxCommandEvent event)
private

Definition at line 3116 of file compileroptionsdlg.cpp.

References m_MenuOption.

Referenced by OnFlagsPopup().

◆ OnIgnoreAddClick()

void CompilerOptionsDlg::OnIgnoreAddClick ( wxCommandEvent event)
private

Definition at line 2457 of file compileroptionsdlg.cpp.

References wxString::Len(), m_bDirty, and wxNOT_FOUND.

◆ OnIgnoreRemoveClick()

void CompilerOptionsDlg::OnIgnoreRemoveClick ( wxCommandEvent event)
private

Definition at line 2471 of file compileroptionsdlg.cpp.

References m_bDirty, and wxNOT_FOUND.

◆ OnMasterPathClick()

void CompilerOptionsDlg::OnMasterPathClick ( wxCommandEvent event)
private

Definition at line 2597 of file compileroptionsdlg.cpp.

References _(), ChooseDirectory(), wxString::IsEmpty(), and m_bDirty.

◆ OnMoveDirDownClick()

void CompilerOptionsDlg::OnMoveDirDownClick ( wxCommandEvent event)
private

Definition at line 2570 of file compileroptionsdlg.cpp.

References GetDirsListBox(), and m_bDirty.

◆ OnMoveDirUpClick()

void CompilerOptionsDlg::OnMoveDirUpClick ( wxCommandEvent event)
private

Definition at line 2545 of file compileroptionsdlg.cpp.

References GetDirsListBox(), and m_bDirty.

◆ OnMoveLibDownClick()

void CompilerOptionsDlg::OnMoveLibDownClick ( wxCommandEvent event)
private

Definition at line 2514 of file compileroptionsdlg.cpp.

References m_bDirty.

◆ OnMoveLibUpClick()

void CompilerOptionsDlg::OnMoveLibUpClick ( wxCommandEvent event)
private

Definition at line 2485 of file compileroptionsdlg.cpp.

References m_bDirty.

◆ OnMyCharHook()

void CompilerOptionsDlg::OnMyCharHook ( wxKeyEvent event)
private

◆ OnOptionChanged()

void CompilerOptionsDlg::OnOptionChanged ( wxPropertyGridEvent event)
private

◆ OnOptionDoubleClick()

void CompilerOptionsDlg::OnOptionDoubleClick ( wxPropertyGridEvent event)
private

◆ OnRealApply()

void CompilerOptionsDlg::OnRealApply ( )
private

◆ OnRemoveCompilerClick()

void CompilerOptionsDlg::OnRemoveCompilerClick ( wxCommandEvent event)
private

◆ OnRemoveDirClick()

void CompilerOptionsDlg::OnRemoveDirClick ( wxCommandEvent event)
private

◆ OnRemoveExtraPathClick()

void CompilerOptionsDlg::OnRemoveExtraPathClick ( wxCommandEvent event)
private

Definition at line 2435 of file compileroptionsdlg.cpp.

References m_bDirty.

◆ OnRemoveLibClick()

void CompilerOptionsDlg::OnRemoveLibClick ( wxCommandEvent event)
private

◆ OnRemoveVarClick()

void CompilerOptionsDlg::OnRemoveVarClick ( wxCommandEvent event)
private

◆ OnResetCompilerClick()

void CompilerOptionsDlg::OnResetCompilerClick ( wxCommandEvent event)
private

◆ OnSelectProgramClick()

void CompilerOptionsDlg::OnSelectProgramClick ( wxCommandEvent event)
private

◆ OnSetDefaultCompilerClick()

void CompilerOptionsDlg::OnSetDefaultCompilerClick ( wxCommandEvent event)
private

◆ OnTreeSelectionChange()

void CompilerOptionsDlg::OnTreeSelectionChange ( wxTreeEvent event)
private

◆ OnTreeSelectionChanging()

void CompilerOptionsDlg::OnTreeSelectionChanging ( wxTreeEvent event)
private

◆ OnUpdateUI()

void CompilerOptionsDlg::OnUpdateUI ( wxUpdateUIEvent event)
private

◆ OptionsToText()

void CompilerOptionsDlg::OptionsToText ( )
private

◆ ProjectTargetCompilerAdjust()

void CompilerOptionsDlg::ProjectTargetCompilerAdjust ( )
private

◆ TextToOptions()

void CompilerOptionsDlg::TextToOptions ( )
private

◆ UpdateCompilerForTargets()

void CompilerOptionsDlg::UpdateCompilerForTargets ( int  compilerIdx)
private

Member Data Documentation

◆ m_bDirty

bool CompilerOptionsDlg::m_bDirty
private

◆ m_bFlagsDirty

bool CompilerOptionsDlg::m_bFlagsDirty
private

true if a flag (not its value) has changed since last save

Definition at line 132 of file compileroptionsdlg.h.

Referenced by DoFillCompilerDependentSettings(), DoSaveCompilerDependentSettings(), OnCompilerChanged(), OnFlagsPopup(), and OnTreeSelectionChanging().

◆ m_BuildingTree

bool CompilerOptionsDlg::m_BuildingTree
private

flag to ignore tree changing events while building it

Definition at line 136 of file compileroptionsdlg.h.

Referenced by DoFillTree(), OnTreeSelectionChange(), and OnTreeSelectionChanging().

◆ m_Compiler

CompilerGCC* CompilerOptionsDlg::m_Compiler
private

Definition at line 122 of file compileroptionsdlg.h.

Referenced by OnApply().

◆ m_CompilerOptions

wxArrayString CompilerOptionsDlg::m_CompilerOptions
private

Definition at line 126 of file compileroptionsdlg.h.

Referenced by DoLoadOptions(), DoSaveOptions(), OptionsToText(), and TextToOptions().

◆ m_CurrentCompilerIdx

int CompilerOptionsDlg::m_CurrentCompilerIdx
private

◆ m_CustomVarActions

std::vector<CustomVarAction> CompilerOptionsDlg::m_CustomVarActions
private

the actions carried out on the custom vars that need to be saved/applied

Definition at line 133 of file compileroptionsdlg.h.

Referenced by DoSaveVars(), OnAddVarClick(), OnClearVarClick(), OnEditVarClick(), and OnRemoveVarClick().

◆ m_FlagsPG

wxPropertyGrid* CompilerOptionsDlg::m_FlagsPG
private

◆ m_LinkerOptions

wxArrayString CompilerOptionsDlg::m_LinkerOptions
private

Definition at line 124 of file compileroptionsdlg.h.

Referenced by DoLoadOptions(), DoSaveOptions(), OptionsToText(), and TextToOptions().

◆ m_LinkLibs

wxArrayString CompilerOptionsDlg::m_LinkLibs
private

Definition at line 125 of file compileroptionsdlg.h.

Referenced by DoLoadOptions(), DoSaveOptions(), OptionsToText(), and TextToOptions().

◆ m_MenuOption

int CompilerOptionsDlg::m_MenuOption = -1
staticprivate

Definition at line 137 of file compileroptionsdlg.h.

Referenced by OnFlagsPopup(), OnFlagsPopupClick(), and OnMyCharHook().

◆ m_NewProjectOrTargetCompilerId

wxString CompilerOptionsDlg::m_NewProjectOrTargetCompilerId
private

keeps track of the changes of compiler of the selected project/target

Definition at line 134 of file compileroptionsdlg.h.

Referenced by CompilerChanged(), and ProjectTargetCompilerAdjust().

◆ m_Options

CompilerOptions CompilerOptionsDlg::m_Options
private

◆ m_pProject

cbProject* CompilerOptionsDlg::m_pProject
private

◆ m_pTarget

ProjectBuildTarget* CompilerOptionsDlg::m_pTarget
private

◆ m_ResourceCompilerOptions

wxArrayString CompilerOptionsDlg::m_ResourceCompilerOptions
private

Definition at line 127 of file compileroptionsdlg.h.

Referenced by DoLoadOptions(), and DoSaveOptions().


The documentation for this class was generated from the following files: