File: editorsettingsdockingwindowsbase.cpp

package info (click to toggle)
codelite 6.1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 48,992 kB
  • ctags: 43,502
  • sloc: cpp: 334,263; ansic: 18,441; xml: 4,713; yacc: 2,653; lex: 2,449; python: 1,188; sh: 385; makefile: 40
file content (220 lines) | stat: -rw-r--r-- 15,703 bytes parent folder | download
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: editor_options_docking_windows.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "editorsettingsdockingwindowsbase.h"


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

static bool bBitmapLoaded = false;


EditorSettingsDockingWindowsBase::EditorSettingsDockingWindowsBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterKZwxilInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Output Pane:")), wxVERTICAL);
    
    mainSizer->Add(sbSizer1, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxHideOutputPaneOnClick = new wxCheckBox(this, wxID_ANY, _("When user clicks inside an editor, hide the output pane -- unless it's one of:"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneOnClick->SetValue(true);
    m_checkBoxHideOutputPaneOnClick->SetToolTip(_("When e.g. you compile your project, or use 'Find in Files', the Output Pane opens to show the results. If this box is ticked, it will automatically close as soon as you click in the editor."));
    
    sbSizer1->Add(m_checkBoxHideOutputPaneOnClick, 0, wxALL|wxEXPAND, 5);
    
    wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 4, 0, 0);
    fgSizer1->SetFlexibleDirection( wxBOTH );
    fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
    
    sbSizer1->Add(fgSizer1, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT, 20);
    
    m_checkBoxHideOutputPaneNotIfBuild = new wxCheckBox(this, wxID_ANY, _("Build"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfBuild->SetValue(false);
    m_checkBoxHideOutputPaneNotIfBuild->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing e.g. you may not want it to close while you correct one of many build errors."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfBuild, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfSearch = new wxCheckBox(this, wxID_ANY, _("Search"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfSearch->SetValue(false);
    m_checkBoxHideOutputPaneNotIfSearch->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfSearch, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfReplace = new wxCheckBox(this, wxID_ANY, _("Replace"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfReplace->SetValue(false);
    m_checkBoxHideOutputPaneNotIfReplace->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfReplace, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfReferences = new wxCheckBox(this, wxID_ANY, _("References"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfReferences->SetValue(false);
    m_checkBoxHideOutputPaneNotIfReferences->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfReferences, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfOutput = new wxCheckBox(this, wxID_ANY, _("Output"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfOutput->SetValue(false);
    m_checkBoxHideOutputPaneNotIfOutput->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfOutput, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfTrace = new wxCheckBox(this, wxID_ANY, _("Trace"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfTrace->SetValue(false);
    m_checkBoxHideOutputPaneNotIfTrace->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfTrace, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfTasks = new wxCheckBox(this, wxID_ANY, _("Tasks"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfTasks->SetValue(false);
    m_checkBoxHideOutputPaneNotIfTasks->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfTasks, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfBuildQ = new wxCheckBox(this, wxID_ANY, _("BuildQ"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfBuildQ->SetValue(false);
    m_checkBoxHideOutputPaneNotIfBuildQ->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfBuildQ, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfCppCheck = new wxCheckBox(this, wxID_ANY, _("CppCheck"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfCppCheck->SetValue(false);
    m_checkBoxHideOutputPaneNotIfCppCheck->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfCppCheck, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfSvn = new wxCheckBox(this, wxID_ANY, _("Subversion"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfSvn->SetValue(false);
    m_checkBoxHideOutputPaneNotIfSvn->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfSvn, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfCscope = new wxCheckBox(this, wxID_ANY, _("CScope"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfCscope->SetValue(false);
    m_checkBoxHideOutputPaneNotIfCscope->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfCscope, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfGit = new wxCheckBox(this, wxID_ANY, _("Git"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfGit->SetValue(false);
    m_checkBoxHideOutputPaneNotIfGit->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfGit, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfDebug = new wxCheckBox(this, wxID_ANY, _("Debug"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfDebug->SetValue(true);
    m_checkBoxHideOutputPaneNotIfDebug->SetToolTip(_("Don't automatically close the Debugger Pane on an editor click if this tab is showing. You probably don't want it to close whenever you set a breakpoint, for example."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfDebug, 0, wxALL, 5);
    
    m_checkBoxHideOutputPaneNotIfMemCheck = new wxCheckBox(this, wxID_ANY, _("MemCheck"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxHideOutputPaneNotIfMemCheck->SetValue(true);
    m_checkBoxHideOutputPaneNotIfMemCheck->SetToolTip(_("Don't automatically close the Output Pane on an editor click if this tab is showing."));
    
    fgSizer1->Add(m_checkBoxHideOutputPaneNotIfMemCheck, 0, wxALL, 5);
    
    m_checkBoxDontFoldSearchResults = new wxCheckBox(this, wxID_ANY, _("Don't automatically fold Search results"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxDontFoldSearchResults->SetValue(false);
    m_checkBoxDontFoldSearchResults->SetToolTip(_("By default, all but the first results of 'Search' are automatically folded; you have to click on each subsequent file to see its contained matches. Tick this box to prevent this.\nYou can still fold and unfold results with the button in the output pane toolbar."));
    
    sbSizer1->Add(m_checkBoxDontFoldSearchResults, 0, wxALL, 5);
    
    wxStaticBoxSizer* sbSizer2 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Find Bar:")), wxVERTICAL);
    
    mainSizer->Add(sbSizer2, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxFindBarAtBottom = new wxCheckBox(this, wxID_ANY, _("Place the find bar at the bottom"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxFindBarAtBottom->SetValue(false);
    
    sbSizer2->Add(m_checkBoxFindBarAtBottom, 0, wxALL|wxEXPAND, 5);
    
    wxStaticBoxSizer* sbSizer11 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Debug Pane:")), wxVERTICAL);
    
    mainSizer->Add(sbSizer11, 0, wxALL|wxEXPAND, 5);
    
    m_checkBoxShowDebugOnRun = new wxCheckBox(this, wxID_ANY, _("Show 'Debug' tab on starting the debugger"), wxDefaultPosition, wxSize(-1, -1), 0);
    m_checkBoxShowDebugOnRun->SetValue(true);
    m_checkBoxShowDebugOnRun->SetToolTip(_("When starting the debugger, if the Debug tab is not visible, checking this will make it visible"));
    
    sbSizer11->Add(m_checkBoxShowDebugOnRun, 0, wxALL, 5);
    
    wxBoxSizer* bSizer2 = new wxBoxSizer(wxHORIZONTAL);
    
    mainSizer->Add(bSizer2, 0, wxEXPAND, 5);
    
    wxArrayString m_radioBoxHintArr;
    m_radioBoxHintArr.Add(wxT("Transparent hint"));
    m_radioBoxHintArr.Add(wxT("Rectangle hint"));
    m_radioBoxHintArr.Add(wxT("Venetian blinds hints"));
    m_radioBoxHint = new wxRadioBox(this, wxID_ANY, _("Docking Style:"), wxDefaultPosition, wxSize(-1, -1), m_radioBoxHintArr, 1, wxRA_SPECIFY_COLS);
    m_radioBoxHint->SetSelection(0);
    
    bSizer2->Add(m_radioBoxHint, 1, wxALL|wxEXPAND, 5);
    
    wxArrayString m_radioBoxTabControlStyleArr;
    m_radioBoxTabControlStyleArr.Add(wxT("Glossy"));
    m_radioBoxTabControlStyleArr.Add(wxT("Curved"));
    m_radioBoxTabControlStyle = new wxRadioBox(this, wxID_ANY, _("Tab Control Style:"), wxDefaultPosition, wxSize(-1, -1), m_radioBoxTabControlStyleArr, 1, wxRA_SPECIFY_COLS);
    m_radioBoxTabControlStyle->SetSelection(0);
    
    bSizer2->Add(m_radioBoxTabControlStyle, 1, wxALL|wxEXPAND, 5);
    
    m_checkBoxHideCaptions = new wxCheckBox(this, wxID_ANY, _("Hide Docking Windows captions"), wxDefaultPosition, wxSize(-1,-1), 0);
    m_checkBoxHideCaptions->SetValue(false);
    
    mainSizer->Add(m_checkBoxHideCaptions, 0, wxALL, 5);
    
    SetSizeHints(-1,-1);
    if ( GetSizer() ) {
         GetSizer()->Fit(this);
    }
    Centre(wxBOTH);
    // Connect events
    m_checkBoxHideOutputPaneNotIfBuild->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfSearch->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfReplace->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfReferences->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfOutput->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfTrace->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfTasks->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfBuildQ->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfCppCheck->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfSvn->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfCscope->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfGit->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfDebug->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfMemCheck->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    
}

EditorSettingsDockingWindowsBase::~EditorSettingsDockingWindowsBase()
{
    m_checkBoxHideOutputPaneNotIfBuild->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfSearch->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfReplace->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfReferences->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfOutput->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfTrace->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfTasks->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfBuildQ->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfCppCheck->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfSvn->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfCscope->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfGit->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfDebug->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    m_checkBoxHideOutputPaneNotIfMemCheck->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsDockingWindowsBase::OnHideOutputPaneNotIfDebugUI), NULL, this);
    
}