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
|
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: NewClassTestBase.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "testclassbasedlg.h"
// Declare the bitmap loading function
extern void wxC7CCBInitBitmapResources();
static bool bBitmapLoaded = false;
TestClassBaseDlg::TestClassBaseDlg(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);
wxC7CCBInitBitmapResources();
bBitmapLoaded = true;
}
wxBoxSizer* bSizer1 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(bSizer1);
wxFlexGridSizer* fgSizer2 = new wxFlexGridSizer(0, 3, 0, 0);
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
fgSizer2->AddGrowableCol(1);
bSizer1->Add(fgSizer2, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
m_staticText16 = new wxStaticText(this, wxID_ANY, _("Class Name:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
fgSizer2->Add(m_staticText16, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
m_textCtrlClassName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
m_textCtrlClassName->SetFocus();
#if wxVERSION_NUMBER >= 3000
m_textCtrlClassName->SetHint(_("Class Name..."));
#endif
fgSizer2->Add(m_textCtrlClassName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
m_buttonClass = new wxButton(this, wxID_ANY, _("..."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBU_EXACTFIT);
m_buttonClass->SetToolTip(_("Select the class to test from a list of classes"));
fgSizer2->Add(m_buttonClass, 0, wxALL, WXC_FROM_DIP(5));
m_staticText4 = new wxStaticText(this, wxID_ANY, _("Fixture (optional):"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
fgSizer2->Add(m_staticText4, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
m_textCtrlFixtureName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
m_textCtrlFixtureName->SetHint(wxT(""));
#endif
fgSizer2->Add(m_textCtrlFixtureName, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
m_staticText3 = new wxStaticText(this, wxID_ANY, _("Output file (optional):"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
fgSizer2->Add(m_staticText3, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
m_textCtrlFileName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
m_textCtrlFileName->SetToolTip(_("The name of the file of which CodeLite will generate the test code.\nWhen left empty, CodeLite will use the first available source file in target project"));
#if wxVERSION_NUMBER >= 3000
m_textCtrlFileName->SetHint(wxT(""));
#endif
fgSizer2->Add(m_textCtrlFileName, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
m_staticText5 = new wxStaticText(this, wxID_ANY, _("UnitTest++ Project:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
fgSizer2->Add(m_staticText5, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
wxArrayString m_choiceProjectsArr;
m_choiceProjects = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceProjectsArr, 0);
fgSizer2->Add(m_choiceProjects, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
fgSizer2->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
m_staticText6 = new wxStaticText(this, wxID_ANY, _("Functions to test:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
bSizer1->Add(m_staticText6, 0, wxALL, WXC_FROM_DIP(5));
wxBoxSizer* bSizer5 = new wxBoxSizer(wxHORIZONTAL);
bSizer1->Add(bSizer5, 1, wxEXPAND, WXC_FROM_DIP(5));
wxArrayString m_checkListMethodsArr;
m_checkListMethods = new wxCheckListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_checkListMethodsArr, 0);
bSizer5->Add(m_checkListMethods, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
wxBoxSizer* bSizer6 = new wxBoxSizer(wxVERTICAL);
bSizer5->Add(bSizer6, 0, wxEXPAND, WXC_FROM_DIP(5));
m_buttonCheckAll = new wxButton(this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
bSizer6->Add(m_buttonCheckAll, 0, wxALL, WXC_FROM_DIP(5));
m_buttonUnCheckAll = new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
bSizer6->Add(m_buttonUnCheckAll, 0, wxALL, WXC_FROM_DIP(5));
m_stdBtnSizer2 = new wxStdDialogButtonSizer();
bSizer1->Add(m_stdBtnSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));
m_button4 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
m_button4->SetDefault();
m_stdBtnSizer2->AddButton(m_button4);
m_button6 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
m_stdBtnSizer2->AddButton(m_button6);
m_stdBtnSizer2->Realize();
SetName(wxT("TestClassBaseDlg"));
SetSize(-1,-1);
if (GetSizer()) {
GetSizer()->Fit(this);
}
if(GetParent()) {
CentreOnParent(wxBOTH);
} else {
CentreOnScreen(wxBOTH);
}
#if wxVERSION_NUMBER >= 2900
if(!wxPersistenceManager::Get().Find(this)) {
wxPersistenceManager::Get().RegisterAndRestore(this);
} else {
wxPersistenceManager::Get().Restore(this);
}
#endif
// Connect events
m_textCtrlClassName->Connect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(TestClassBaseDlg::OnClassNameUpdated), NULL, this);
m_buttonClass->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnShowClassListDialog), NULL, this);
m_buttonCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnCheckAll), NULL, this);
m_buttonUnCheckAll->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnUnCheckAll), NULL, this);
m_button4->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnButtonOk), NULL, this);
}
TestClassBaseDlg::~TestClassBaseDlg()
{
m_textCtrlClassName->Disconnect(wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler(TestClassBaseDlg::OnClassNameUpdated), NULL, this);
m_buttonClass->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnShowClassListDialog), NULL, this);
m_buttonCheckAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnCheckAll), NULL, this);
m_buttonUnCheckAll->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnUnCheckAll), NULL, this);
m_button4->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TestClassBaseDlg::OnButtonOk), NULL, this);
}
|