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
|
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2014 The CodeLite Team
// file name : setters_getters.cpp
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "setters_getters.h"
// Declare the bitmap loading function
extern void wxC8861InitBitmapResources();
static bool bBitmapLoaded = false;
SettersGettersBaseDlg::SettersGettersBaseDlg(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);
wxC8861InitBitmapResources();
bBitmapLoaded = true;
}
bSizer1 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(bSizer1);
bSizer3 = new wxBoxSizer(wxVERTICAL);
bSizer1->Add(bSizer3, 1, wxALL|wxEXPAND, 5);
m_banner6 = new wxBannerWindow(this, wxID_ANY, wxTOP, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME);
m_banner6->SetBitmap(wxNullBitmap);
m_banner6->SetText(_("Generate Setters / Getters"), _("Select the functions to generate from the list below"));
m_banner6->SetGradient(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION), wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
m_banner6->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_CAPTIONTEXT));
bSizer3->Add(m_banner6, 0, wxALL|wxEXPAND, 5);
bSizer4 = new wxBoxSizer(wxHORIZONTAL);
bSizer3->Add(bSizer4, 1, wxEXPAND, 5);
m_dataview = new wxDataViewCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(450,-1), wxDV_VERT_RULES|wxDV_ROW_LINES|wxDV_SINGLE);
m_dataviewModel = new SettersGettersModel;
m_dataviewModel->SetColCount( 2 );
m_dataview->AssociateModel(m_dataviewModel.get() );
bSizer4->Add(m_dataview, 1, wxALL|wxEXPAND, 5);
m_dataview->AppendIconTextColumn(_("Name"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_INERT, 400, wxALIGN_LEFT);
m_dataview->AppendToggleColumn(_("?"), m_dataview->GetColumnCount(), wxDATAVIEW_CELL_ACTIVATABLE, -2, wxALIGN_LEFT);
bSizer5 = new wxBoxSizer(wxVERTICAL);
bSizer4->Add(bSizer5, 0, wxEXPAND, 5);
m_buttonCheckAll = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonCheckAll->SetDefault();
bSizer5->Add(m_buttonCheckAll, 0, wxALL|wxEXPAND, 5);
m_buttonUncheckAll = new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer5->Add(m_buttonUncheckAll, 0, wxALL|wxEXPAND, 5);
m_checkStartWithUppercase = new wxCheckBox(this, wxID_ANY, _("Function name starts with an upper case letter"), wxDefaultPosition, wxSize(-1, -1), 0);
m_checkStartWithUppercase->SetValue(false);
bSizer3->Add(m_checkStartWithUppercase, 0, wxALL, 5);
m_checkBoxForamtFileWhenDone = new wxCheckBox(this, wxID_ANY, _("Format the file when done"), wxDefaultPosition, wxSize(-1,-1), 0);
m_checkBoxForamtFileWhenDone->SetValue(false);
bSizer3->Add(m_checkBoxForamtFileWhenDone, 0, wxALL, 5);
bSizer2 = new wxBoxSizer(wxHORIZONTAL);
bSizer1->Add(bSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5);
m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0);
m_buttonOK->SetDefault();
bSizer2->Add(m_buttonOK, 0, wxALL, 5);
m_buttonCancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0);
bSizer2->Add(m_buttonCancel, 0, wxALL, 5);
SetSizeHints(-1,-1);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
Centre();
// Connect events
m_dataview->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler(SettersGettersBaseDlg::OnValueChanged), NULL, this);
m_buttonCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnCheckAll), NULL, this);
m_buttonUncheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnUncheckAll), NULL, this);
m_checkStartWithUppercase->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnCheckStartWithUpperCase), NULL, this);
}
SettersGettersBaseDlg::~SettersGettersBaseDlg()
{
m_dataview->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler(SettersGettersBaseDlg::OnValueChanged), NULL, this);
m_buttonCheckAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnCheckAll), NULL, this);
m_buttonUncheckAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnUncheckAll), NULL, this);
m_checkStartWithUppercase->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SettersGettersBaseDlg::OnCheckStartWithUpperCase), NULL, this);
}
|