File: wxcrafter.cpp

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (168 lines) | stat: -rw-r--r-- 8,509 bytes parent folder | download | duplicates (2)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: wxcrafter.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "wxcrafter.h"


// Declare the bitmap loading function
extern void wxC94E6InitBitmapResources();

static bool bBitmapLoaded = false;


TweaksSettingsDlgBase::TweaksSettingsDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC94E6InitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer2);
    
    m_checkBoxEnableTweaks = new wxCheckBox(this, wxID_ANY, _("Enable Tweaks"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxEnableTweaks->SetValue(false);
    
    boxSizer2->Add(m_checkBoxEnableTweaks, 0, wxALL, 5);
    
    m_notebook12 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(400,-1), wxBK_DEFAULT);
    m_notebook12->SetName(wxT("m_notebook12"));
    
    boxSizer2->Add(m_notebook12, 1, wxALL|wxEXPAND, 5);
    
    m_tabEditorTabsColours = new wxPanel(m_notebook12, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebook12->AddPage(m_tabEditorTabsColours, _("Editor Tabs"), true);
    
    wxBoxSizer* boxSizer126 = new wxBoxSizer(wxVERTICAL);
    m_tabEditorTabsColours->SetSizer(boxSizer126);
    
    m_banner136 = new wxBannerWindow(m_tabEditorTabsColours, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    m_banner136->SetBitmap(wxNullBitmap);
    m_banner136->SetText(_("Configure Editor Tab Colours"), _("Customize your editor tab colours globally or per project"));
    m_banner136->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK), wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_banner136->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
    
    boxSizer126->Add(m_banner136, 0, wxALL|wxEXPAND, 5);
    
    wxArrayString m_pgMgrTabColoursArr;
    wxUnusedVar(m_pgMgrTabColoursArr);
    wxArrayInt m_pgMgrTabColoursIntArr;
    wxUnusedVar(m_pgMgrTabColoursIntArr);
    m_pgMgrTabColours = new wxPropertyGridManager(m_tabEditorTabsColours, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
    
    boxSizer126->Add(m_pgMgrTabColours, 1, wxALL|wxEXPAND, 5);
    
    m_pgProp114 = m_pgMgrTabColours->Append(  new wxPropertyCategory( _("Global Tab Colours") ) );
    m_pgProp114->SetHelpString(wxT(""));
    
    m_pgPropGlobalTabBG = m_pgMgrTabColours->AppendIn( m_pgProp114,  new wxSystemColourProperty( _("Tab Label Background Colour")) );
    m_pgPropGlobalTabBG->SetValueToUnspecified();
    m_pgPropGlobalTabBG->SetHelpString(wxT(""));
    
    m_pgPropGlobalTabFG = m_pgMgrTabColours->AppendIn( m_pgProp114,  new wxSystemColourProperty( _("Tab Label Text Colour")) );
    m_pgPropGlobalTabFG->SetValueToUnspecified();
    m_pgPropGlobalTabFG->SetHelpString(wxT(""));
    
    m_pgPropProjectsColours = m_pgMgrTabColours->Append(  new wxPropertyCategory( _("Tab Colours Per Project") ) );
    m_pgPropProjectsColours->SetHelpString(wxT(""));
    
    wxBoxSizer* boxSizer122 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer126->Add(boxSizer122, 0, wxEXPAND, 5);
    
    m_button124 = new wxButton(m_tabEditorTabsColours, wxID_CLEAR, _("&Reset colours"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button124->SetToolTip(_("Reset colours"));
    
    boxSizer122->Add(m_button124, 0, wxALL|wxEXPAND, 5);
    
    m_tabProjectIcons = new wxPanel(m_notebook12, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
    m_notebook12->AddPage(m_tabProjectIcons, _("Images"), false);
    
    wxBoxSizer* boxSizer241 = new wxBoxSizer(wxVERTICAL);
    m_tabProjectIcons->SetSizer(boxSizer241);
    
    m_banner138 = new wxBannerWindow(m_tabProjectIcons, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
    m_banner138->SetBitmap(wxNullBitmap);
    m_banner138->SetText(_("Configure Project Images"), _("Set a different image for a every project in the workspace"));
    m_banner138->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK), wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
    m_banner138->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
    
    boxSizer241->Add(m_banner138, 0, wxALL|wxEXPAND, 5);
    
    wxArrayString m_pgMgrArr;
    wxUnusedVar(m_pgMgrArr);
    wxArrayInt m_pgMgrIntArr;
    wxUnusedVar(m_pgMgrIntArr);
    m_pgMgr = new wxPropertyGridManager(m_tabProjectIcons, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
    
    boxSizer241->Add(m_pgMgr, 1, wxALL|wxEXPAND, 5);
    
    m_pgPropProjects = m_pgMgr->Append(  new wxPropertyCategory( _("Projects") ) );
    m_pgPropProjects->SetHelpString(wxT(""));
    
    wxBoxSizer* boxSizer4 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer2->Add(boxSizer4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
    
    m_button8 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0);
    
    boxSizer4->Add(m_button8, 0, wxALL, 5);
    
    m_button88 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_button88->SetDefault();
    m_button88->SetFocus();
    
    boxSizer4->Add(m_button88, 0, wxALL, 5);
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_notebook12)){
        wxPersistenceManager::Get().RegisterAndRestore(m_notebook12);
    } else {
        wxPersistenceManager::Get().Restore(m_notebook12);
    }
    #endif
    
    SetName(wxT("TweaksSettingsDlgBase"));
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    CentreOnParent(wxBOTH);
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_checkBoxEnableTweaks->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(TweaksSettingsDlgBase::OnEnableTweaks), NULL, this);
    m_checkBoxEnableTweaks->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableTweaksCheckboxUI), NULL, this);
    m_notebook12->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableTweaksUI), NULL, this);
    m_banner136->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableColoursTableUI), NULL, this);
    m_pgMgrTabColours->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TweaksSettingsDlgBase::OnColourChanged), NULL, this);
    m_pgMgrTabColours->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableColoursTableUI), NULL, this);
    m_button124->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TweaksSettingsDlgBase::OnResetColours), NULL, this);
    m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TweaksSettingsDlgBase::OnImageSelected), NULL, this);
    
}

TweaksSettingsDlgBase::~TweaksSettingsDlgBase()
{
    m_checkBoxEnableTweaks->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(TweaksSettingsDlgBase::OnEnableTweaks), NULL, this);
    m_checkBoxEnableTweaks->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableTweaksCheckboxUI), NULL, this);
    m_notebook12->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableTweaksUI), NULL, this);
    m_banner136->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableColoursTableUI), NULL, this);
    m_pgMgrTabColours->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TweaksSettingsDlgBase::OnColourChanged), NULL, this);
    m_pgMgrTabColours->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TweaksSettingsDlgBase::OnEnableColoursTableUI), NULL, this);
    m_button124->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TweaksSettingsDlgBase::OnResetColours), NULL, this);
    m_pgMgr->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(TweaksSettingsDlgBase::OnImageSelected), NULL, this);
    
}