Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

compileroptionsdlg.h

/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 * http://www.gnu.org/licenses/gpl-3.0.html
 */

#ifndef COMPILEROPTIONSDLG_H
#define COMPILEROPTIONSDLG_H

#include <vector>
#include <wx/intl.h>
#include <wx/string.h>
#include "configurationpanel.h"
#include "compileroptions.h"

class wxListBox;
class ScopeTreeData;
class cbProject;
class ProjectBuildTarget;
class CompilerGCC;
class wxSpinEvent;
class wxTreeEvent;
class wxCommandEvent;
class wxKeyEvent;
class wxUpdateUIEvent;

00026 class CompilerOptionsDlg : public cbConfigurationPanel
{
    public:
        CompilerOptionsDlg(wxWindow* parent, CompilerGCC* compiler, cbProject* project = 0L, ProjectBuildTarget* target = 0L);
        ~CompilerOptionsDlg();

00032         virtual wxString GetTitle() const { return _("Global compiler settings"); }
00033         virtual wxString GetBitmapBaseName() const { return _T("compiler"); }
        virtual void OnApply();
00035         virtual void OnCancel(){}
    private:
        enum CustomVarActionType
        {
            CVA_Add,
            CVA_Edit,
            CVA_Remove
        };

00044         struct CustomVarAction
        {
            CustomVarActionType m_Action;
            wxString            m_Key;
            wxString            m_KeyValue;
        };
        void TextToOptions();
        void OptionsToText();
        void DoFillCompilerSets(int compilerIdx);
        void DoFillCompilerPrograms();
        void DoFillVars();
        void DoFillOthers();
        void DoFillCategories();
        void DoFillOptions();
        void DoFillCompilerDependentSettings();
        void DoSaveCompilerDependentSettings();
        void DoFillTree();
        void DoSaveOptions();
        void DoLoadOptions();
        void DoSaveCompilerPrograms();
        void DoSaveVars();
        void CompilerChanged();
        void UpdateCompilerForTargets(int compilerIdx);
        void AutoDetectCompiler();
        wxListBox* GetDirsListBox();
        CompileOptionsBase* GetVarsOwner();
        void ProjectTargetCompilerAdjust(); //!< checks if compiler changed for project/target and takes actions accordingly

        void OnRealApply(); // user clicked the "Apply" button (so not the Ok button !!!)
        void OnTreeSelectionChange(wxTreeEvent& event);
        void OnTreeSelectionChanging(wxTreeEvent& event);
        void OnCompilerChanged(wxCommandEvent& event);
        void OnCategoryChanged(wxCommandEvent& event);
        void OnOptionToggled(wxCommandEvent& 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(wxSpinEvent& event);
        void OnMoveLibDownClick(wxSpinEvent& event);
        void OnMoveDirUpClick(wxSpinEvent& event);
        void OnMoveDirDownClick(wxSpinEvent& 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); // some controls who change their value -> dirty
        void OnMyCharHook(wxKeyEvent& event);

        CompilerGCC* m_Compiler;
        CompilerOptions m_Options;
        wxArrayString m_LinkerOptions;
        wxArrayString m_LinkLibs;
        wxArrayString m_CompilerOptions;
        int m_CurrentCompilerIdx;
        cbProject* m_pProject;
        ProjectBuildTarget* m_pTarget;
00123         bool m_bDirty;                    //!< true if a setting has changed since last save
00124         std::vector<CustomVarAction>    m_CustomVarActions; //!< the actions carried out on the custom vars that need to be saved/applied
00125         wxString m_NewProjectOrTargetCompilerId; //!< keeps track of the changes of compiler of the selected project/target

00127         bool m_BuildingTree; //!< flag to ignore tree changing events while building it

        DECLARE_EVENT_TABLE()
};

#endif // COMPILEROPTIONSDLG_H

Generated by  Doxygen 1.6.0   Back to index