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
|
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: editor_options_folding.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "editorsettingsfoldingbase.h"
// Declare the bitmap loading function
extern void wxCE476InitBitmapResources();
static bool bBitmapLoaded = false;
EditorSettingsFoldingBase::EditorSettingsFoldingBase(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);
wxCE476InitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(mainSizer);
m_displayMargin = new wxCheckBox(this, wxID_ANY, _("Display Folding Margin"), wxDefaultPosition, wxSize(-1, -1), 0);
m_displayMargin->SetValue(true);
mainSizer->Add(m_displayMargin, 0, wxALL|wxEXPAND, 5);
wxStaticBoxSizer* sbSizer1 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, wxT("")), wxVERTICAL);
mainSizer->Add(sbSizer1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5);
wxArrayString m_foldStyleArr;
m_foldStyle = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_foldStyleArr, 0);
m_foldStyle->SetToolTip(_("Select the folding style"));
sbSizer1->Add(m_foldStyle, 0, wxALL|wxEXPAND, 5);
wxFlexGridSizer* fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer1->AddGrowableCol(0);
fgSizer1->AddGrowableCol(1);
sbSizer1->Add(fgSizer1, 0, wxLEFT|wxRIGHT|wxEXPAND, 5);
m_underlineFolded = new wxCheckBox(this, wxID_ANY, _("Underline Folded Line"), wxDefaultPosition, wxSize(-1, -1), 0);
m_underlineFolded->SetValue(true);
fgSizer1->Add(m_underlineFolded, 0, wxALL|wxEXPAND, 5);
m_foldElse = new wxCheckBox(this, wxID_ANY, _("Fold At Else"), wxDefaultPosition, wxSize(-1, -1), 0);
m_foldElse->SetValue(false);
fgSizer1->Add(m_foldElse, 0, wxALL|wxEXPAND, 5);
m_foldPreprocessors = new wxCheckBox(this, wxID_ANY, _("Fold Preprocessors"), wxDefaultPosition, wxSize(-1, -1), 0);
m_foldPreprocessors->SetValue(false);
fgSizer1->Add(m_foldPreprocessors, 0, wxALL|wxEXPAND, 5);
m_foldCompact = new wxCheckBox(this, wxID_ANY, _("Fold Compact"), wxDefaultPosition, wxSize(-1, -1), 0);
m_foldCompact->SetValue(false);
fgSizer1->Add(m_foldCompact, 0, wxALL|wxEXPAND, 5);
m_checkBoxHighlightFolding = new wxCheckBox(this, wxID_ANY, _("Highlight Active Fold Block"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxHighlightFolding->SetValue(false);
m_checkBoxHighlightFolding->SetToolTip(_("Allows enabling/disabling the highlight folding block when it is selected. (i.e. block that contains the caret)"));
fgSizer1->Add(m_checkBoxHighlightFolding, 0, wxALL, 5);
SetName(wxT("EditorSettingsFoldingBase"));
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
CentreOnParent(wxBOTH);
// Connect events
m_foldStyle->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_underlineFolded->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldElse->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldPreprocessors->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldCompact->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_checkBoxHighlightFolding->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
}
EditorSettingsFoldingBase::~EditorSettingsFoldingBase()
{
m_foldStyle->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_underlineFolded->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldElse->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldPreprocessors->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_foldCompact->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
m_checkBoxHighlightFolding->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EditorSettingsFoldingBase::OnFoldingMarginUI), NULL, this);
}
|