1
//////////////////////////////////////////////////////////////////////////////
2
//////////////////////////////////////////////////////////////////////////////
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : testclassbasedlg.cpp
7
// -------------------------------------------------------------------------
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
23
//////////////////////////////////////////////////////////////////////////////
24
//////////////////////////////////////////////////////////////////////////////
26
1
///////////////////////////////////////////////////////////////////////////
27
// C++ code generated with wxFormBuilder (version Apr 16 2008)
2
// C++ code generated with wxFormBuilder (version Mar 19 2008)
28
3
// http://www.wxformbuilder.org/
30
5
// PLEASE DO "NOT" EDIT THIS FILE!
47
22
fgSizer1->SetFlexibleDirection( wxBOTH );
48
23
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
50
m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("Class name:"), wxDefaultPosition, wxDefaultSize, 0 );
25
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Class name:"), wxDefaultPosition, wxDefaultSize, 0 );
51
26
m_staticText1->Wrap( -1 );
52
27
fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
54
29
m_textCtrlClassName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
55
30
fgSizer1->Add( m_textCtrlClassName, 0, wxALL|wxEXPAND, 5 );
57
m_buttonClass = new wxButton( this, wxID_ANY, wxT("..."), wxDefaultPosition, wxDefaultSize, 0 );
32
m_buttonClass = new wxButton( this, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, 0 );
58
33
fgSizer1->Add( m_buttonClass, 0, wxALL, 5 );
60
m_buttonRefresh = new wxButton( this, wxID_ANY, wxT("&Show Functions..."), wxDefaultPosition, wxDefaultSize, 0 );
35
m_buttonRefresh = new wxButton( this, wxID_ANY, _("&Show Functions..."), wxDefaultPosition, wxDefaultSize, 0 );
61
36
fgSizer1->Add( m_buttonRefresh, 0, wxALL, 5 );
63
38
bSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
68
43
fgSizer2->SetFlexibleDirection( wxBOTH );
69
44
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
71
m_checkBox1 = new wxCheckBox( this, wxID_ANY, wxT("Enter output file name:"), wxDefaultPosition, wxDefaultSize, 0 );
73
fgSizer2->Add( m_checkBox1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
46
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Fixture name (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
47
m_staticText4->Wrap( -1 );
48
fgSizer2->Add( m_staticText4, 0, wxALL, 5 );
50
m_textCtrlFixtureName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
51
fgSizer2->Add( m_textCtrlFixtureName, 0, wxALL|wxEXPAND, 5 );
53
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Output file name (optional):"), wxDefaultPosition, wxDefaultSize, 0 );
54
m_staticText3->Wrap( -1 );
55
fgSizer2->Add( m_staticText3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
75
57
m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
58
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") );
76
60
fgSizer2->Add( m_textCtrlFileName, 0, wxALL|wxEXPAND, 5 );
78
m_checkBoxUseFixture = new wxCheckBox( this, wxID_ANY, wxT("Use fixture test"), wxDefaultPosition, wxDefaultSize, 0 );
80
fgSizer2->Add( m_checkBoxUseFixture, 0, wxALL, 5 );
82
m_textCtrlFixtureName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
83
m_textCtrlFixtureName->Enable( false );
85
fgSizer2->Add( m_textCtrlFixtureName, 0, wxALL|wxEXPAND, 5 );
62
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Project to whom these unit tests should be added to:"), wxDefaultPosition, wxDefaultSize, 0 );
63
m_staticText5->Wrap( -1 );
64
fgSizer2->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
66
wxArrayString m_choiceProjectsChoices;
67
m_choiceProjects = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceProjectsChoices, 0 );
68
m_choiceProjects->SetSelection( 0 );
69
fgSizer2->Add( m_choiceProjects, 0, wxALL|wxEXPAND, 5 );
87
71
bSizer1->Add( fgSizer2, 0, wxEXPAND, 5 );
89
m_staticText6 = new wxStaticText( this, wxID_ANY, wxT("Functions to test:"), wxDefaultPosition, wxDefaultSize, 0 );
73
m_staticText6 = new wxStaticText( this, wxID_ANY, _("Functions to test:"), wxDefaultPosition, wxDefaultSize, 0 );
90
74
m_staticText6->Wrap( -1 );
91
75
bSizer1->Add( m_staticText6, 0, wxALL, 5 );
100
84
wxBoxSizer* bSizer6;
101
85
bSizer6 = new wxBoxSizer( wxVERTICAL );
103
m_buttonCheckAll = new wxButton( this, wxID_ANY, wxT("Check &All"), wxDefaultPosition, wxDefaultSize, 0 );
87
m_buttonCheckAll = new wxButton( this, wxID_ANY, _("Check &All"), wxDefaultPosition, wxDefaultSize, 0 );
104
88
bSizer6->Add( m_buttonCheckAll, 0, wxALL, 5 );
106
m_buttonUnCheckAll = new wxButton( this, wxID_ANY, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
90
m_buttonUnCheckAll = new wxButton( this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
107
91
bSizer6->Add( m_buttonUnCheckAll, 0, wxALL, 5 );
109
93
bSizer5->Add( bSizer6, 0, wxEXPAND, 5 );
116
100
wxBoxSizer* bSizer4;
117
101
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
119
m_buttonCreate = new wxButton( this, wxID_OK, wxT("&Create"), wxDefaultPosition, wxDefaultSize, 0 );
103
m_buttonCreate = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
120
104
m_buttonCreate->SetDefault();
121
105
bSizer4->Add( m_buttonCreate, 0, wxALL, 5 );
123
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
107
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
124
108
bSizer4->Add( m_buttonCancel, 0, wxALL, 5 );
126
110
bSizer1->Add( bSizer4, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
128
112
this->SetSizer( bSizer1 );
114
bSizer1->Fit( this );
131
116
this->Centre( wxBOTH );
133
118
// Connect Events
134
m_textCtrlClassName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TestClassBaseDlg::OnClassNameTyped ), NULL, this );
135
119
m_buttonClass->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnShowClassListDialog ), NULL, this );
136
120
m_buttonRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnRefreshFunctions ), NULL, this );
137
121
m_buttonRefresh->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( TestClassBaseDlg::OnRefreshButtonUI ), NULL, this );
138
m_checkBox1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseActiveEditor ), NULL, this );
139
m_checkBoxUseFixture->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseFixture ), NULL, this );
140
122
m_buttonCheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnCheckAll ), NULL, this );
141
123
m_buttonUnCheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUnCheckAll ), NULL, this );
142
124
m_buttonCreate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnButtonOk ), NULL, this );
145
127
TestClassBaseDlg::~TestClassBaseDlg()
147
129
// Disconnect Events
148
m_textCtrlClassName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( TestClassBaseDlg::OnClassNameTyped ), NULL, this );
149
130
m_buttonClass->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnShowClassListDialog ), NULL, this );
150
131
m_buttonRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnRefreshFunctions ), NULL, this );
151
132
m_buttonRefresh->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( TestClassBaseDlg::OnRefreshButtonUI ), NULL, this );
152
m_checkBox1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseActiveEditor ), NULL, this );
153
m_checkBoxUseFixture->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUseFixture ), NULL, this );
154
133
m_buttonCheckAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnCheckAll ), NULL, this );
155
134
m_buttonUnCheckAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnUnCheckAll ), NULL, this );
156
135
m_buttonCreate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TestClassBaseDlg::OnButtonOk ), NULL, this );