| 1 |
////////////////////////////////////////////////////////////////////// |
| 2 |
// This file was auto-generated by codelite's wxCrafter Plugin |
| 3 |
// wxCrafter project file: codeformatterdlg.wxcp |
| 4 |
// Do not modify this file by hand! |
| 5 |
////////////////////////////////////////////////////////////////////// |
| 6 |
|
| 7 |
#include "codeformatterdlgbase.h" |
| 8 |
|
| 9 |
#include "PHPFormatterBuffer.h" |
| 10 |
|
| 11 |
// Declare the bitmap loading function |
| 12 |
extern void wxCrafterGgLOZbInitBitmapResources(); |
| 13 |
|
| 14 |
static bool bBitmapLoaded = false; |
| 15 |
|
| 16 |
CodeFormatterBaseDlg::CodeFormatterBaseDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, |
| 17 |
const wxSize& size, long style) |
| 18 |
: wxDialog(parent, id, title, pos, size, style) |
| 19 |
{ |
| 20 |
if(!bBitmapLoaded) { |
| 21 |
// We need to initialise the default bitmap handler |
| 22 |
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); |
| 23 |
wxCrafterGgLOZbInitBitmapResources(); |
| 24 |
bBitmapLoaded = true; |
| 25 |
} |
| 26 |
|
| 27 |
wxBoxSizer* bSizerMain = new wxBoxSizer(wxVERTICAL); |
| 28 |
this->SetSizer(bSizerMain); |
| 29 |
|
| 30 |
m_mainPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL); |
| 31 |
|
| 32 |
bSizerMain->Add(m_mainPanel, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 33 |
|
| 34 |
wxBoxSizer* boxSizer359 = new wxBoxSizer(wxVERTICAL); |
| 35 |
m_mainPanel->SetSizer(boxSizer359); |
| 36 |
|
| 37 |
wxBoxSizer* boxSizer360 = new wxBoxSizer(wxHORIZONTAL); |
| 38 |
|
| 39 |
boxSizer359->Add(boxSizer360, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 40 |
|
| 41 |
m_dvListCtrl = |
| 42 |
new clThemedOrderedListCtrl(m_mainPanel, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1, -1)), |
| 43 |
wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_SINGLE); |
| 44 |
|
| 45 |
boxSizer360->Add(m_dvListCtrl, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5)); |
| 46 |
|
| 47 |
m_dvListCtrl->AppendTextColumn(_("name"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT, 0); |
| 48 |
boxSizerFormatter = new wxBoxSizer(wxVERTICAL); |
| 49 |
|
| 50 |
boxSizer360->Add(boxSizerFormatter, 3, wxEXPAND, WXC_FROM_DIP(5)); |
| 51 |
|
| 52 |
wxBoxSizer* boxSizer371 = new wxBoxSizer(wxHORIZONTAL); |
| 53 |
|
| 54 |
boxSizer359->Add(boxSizer371, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5)); |
| 55 |
|
| 56 |
m_button_ok = |
| 57 |
new wxButton(m_mainPanel, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(m_mainPanel, wxSize(-1, -1)), 0); |
| 58 |
m_button_ok->SetDefault(); |
| 59 |
|
| 60 |
boxSizer371->Add(m_button_ok, 0, wxALL, WXC_FROM_DIP(5)); |
| 61 |
|
| 62 |
m_button_cancel = new wxButton(m_mainPanel, wxID_CANCEL, _("Cancel"), wxDefaultPosition, |
| 63 |
wxDLG_UNIT(m_mainPanel, wxSize(-1, -1)), 0); |
| 64 |
|
| 65 |
boxSizer371->Add(m_button_cancel, 0, wxALL, WXC_FROM_DIP(5)); |
| 66 |
|
| 67 |
m_button_revert = new wxButton(m_mainPanel, wxID_REVERT, _("Defaults"), wxDefaultPosition, |
| 68 |
wxDLG_UNIT(m_mainPanel, wxSize(-1, -1)), 0); |
| 69 |
m_button_revert->SetToolTip(_("Revert all changes and load factory defaults")); |
| 70 |
|
| 71 |
boxSizer371->Add(m_button_revert, 0, wxALL, WXC_FROM_DIP(5)); |
| 72 |
|
| 73 |
SetName(wxT("CodeFormatterBaseDlg")); |
| 74 |
SetSize(wxDLG_UNIT(this, wxSize(-1, -1))); |
| 75 |
if(GetSizer()) { |
| 76 |
GetSizer()->Fit(this); |
| 77 |
} |
| 78 |
if(GetParent()) { |
| 79 |
CentreOnParent(wxBOTH); |
| 80 |
} else { |
| 81 |
CentreOnScreen(wxBOTH); |
| 82 |
} |
| 83 |
if(!wxPersistenceManager::Get().Find(this)) { |
| 84 |
wxPersistenceManager::Get().RegisterAndRestore(this); |
| 85 |
} else { |
| 86 |
wxPersistenceManager::Get().Restore(this); |
| 87 |
} |
| 88 |
// Connect events |
| 89 |
m_dvListCtrl->Bind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &CodeFormatterBaseDlg::OnSelectionChanged, this); |
| 90 |
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeFormatterBaseDlg::OnOK, this); |
| 91 |
m_button_revert->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeFormatterBaseDlg::OnRevert, this); |
| 92 |
} |
| 93 |
|
| 94 |
CodeFormatterBaseDlg::~CodeFormatterBaseDlg() |
| 95 |
{ |
| 96 |
m_dvListCtrl->Unbind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &CodeFormatterBaseDlg::OnSelectionChanged, this); |
| 97 |
m_button_ok->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeFormatterBaseDlg::OnOK, this); |
| 98 |
m_button_revert->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeFormatterBaseDlg::OnRevert, this); |
| 99 |
} |