1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Jorgen Bodde
8 // Copyright: (c) Jorgen Bodde
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx/wx.h".
13 #include "wx/wxprec.h"
32 * TestTest type definition
35 IMPLEMENT_CLASS( TestTest
, wxDialog
)
38 * TestTest event table definition
41 BEGIN_EVENT_TABLE( TestTest
, wxDialog
)
43 ////@begin TestTest event table entries
44 ////@end TestTest event table entries
49 * TestTest constructors
56 TestTest::TestTest( wxWindow
* parent
, wxWindowID id
, const wxString
& caption
, const wxPoint
& pos
, const wxSize
& size
, long style
)
58 Create(parent
, id
, caption
, pos
, size
, style
);
65 bool TestTest::Create( wxWindow
* parent
, wxWindowID id
, const wxString
& caption
, const wxPoint
& pos
, const wxSize
& size
, long style
)
67 ////@begin TestTest member initialisation
70 ////@end TestTest member initialisation
72 ////@begin TestTest creation
73 SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS
);
74 wxDialog::Create( parent
, id
, caption
, pos
, size
, style
);
77 GetSizer()->Fit(this);
78 GetSizer()->SetSizeHints(this);
80 ////@end TestTest creation
85 * Control creation for TestTest
88 void TestTest::CreateControls()
90 ////@begin TestTest content construction
92 TestTest
* item1
= this;
94 wxFlexGridSizer
* item2
= new wxFlexGridSizer(2, 1, 0, 0);
95 item2
->AddGrowableRow(0);
96 item2
->AddGrowableCol(0);
97 item1
->SetSizer(item2
);
98 item1
->SetAutoLayout(true);
99 wxPanel
* item3
= new wxPanel( item1
, ID_PANEL7
, wxDefaultPosition
, wxSize(100, 50), wxNO_BORDER
|wxTAB_TRAVERSAL
);
100 item2
->Add(item3
, 1, wxGROW
|wxGROW
|wxADJUST_MINSIZE
, 5);
101 wxBoxSizer
* item4
= new wxBoxSizer(wxVERTICAL
);
102 item3
->SetSizer(item4
);
103 item3
->SetAutoLayout(true);
104 wxPanel
* item5
= new wxPanel( item3
, ID_PANEL6
, wxDefaultPosition
, wxSize(100, 80), wxSUNKEN_BORDER
|wxNO_FULL_REPAINT_ON_RESIZE
|wxTAB_TRAVERSAL
);
105 item4
->Add(item5
, 1, wxGROW
|wxALL
|wxADJUST_MINSIZE
, 5);
106 wxFlexGridSizer
* item6
= new wxFlexGridSizer(2, 1, 0, 0);
107 item6
->AddGrowableRow(1);
108 item6
->AddGrowableCol(0);
109 item5
->SetSizer(item6
);
110 item5
->SetAutoLayout(true);
111 wxStaticText
* item7
= new wxStaticText( item5
, wxID_STATIC
, _("Static text"), wxDefaultPosition
, wxDefaultSize
, 0 );
112 item6
->Add(item7
, 0, wxALIGN_CENTER_HORIZONTAL
|wxGROW
|wxALL
|wxADJUST_MINSIZE
, 5);
113 wxPanel
* item8
= new wxPanel( item5
, ID_PANEL3
, wxDefaultPosition
, wxSize(100, 80), wxSUNKEN_BORDER
|wxTAB_TRAVERSAL
);
114 item6
->Add(item8
, 1, wxGROW
|wxGROW
|wxALL
, 5);
115 wxBoxSizer
* item9
= new wxBoxSizer(wxVERTICAL
);
117 item8
->SetSizer(item9
);
118 item8
->SetAutoLayout(true);
119 wxPanel
* item10
= new wxPanel( item8
, ID_PANEL
, wxDefaultPosition
, wxDefaultSize
, wxNO_BORDER
|wxFULL_REPAINT_ON_RESIZE
|wxTAB_TRAVERSAL
);
120 item9
->Add(item10
, 1, wxGROW
, 5);
121 wxBoxSizer
* item11
= new wxBoxSizer(wxVERTICAL
);
122 item10
->SetSizer(item11
);
123 item10
->SetAutoLayout(true);
124 wxString item12Strings
[] = {
129 wxChoice
* item12
= new wxChoice( item10
, ID_CHOICE
, wxDefaultPosition
, wxDefaultSize
, 3, item12Strings
, 0 );
130 item11
->Add(item12
, 0, wxGROW
|wxALL
, 5);
131 wxRadioButton
* item13
= new wxRadioButton( item10
, ID_RADIOBUTTON
, _("I like this"), wxDefaultPosition
, wxDefaultSize
, 0 );
132 item13
->SetValue(true);
133 item11
->Add(item13
, 0, wxALIGN_LEFT
|wxALL
, 5);
134 wxRadioButton
* item14
= new wxRadioButton( item10
, ID_RADIOBUTTON1
, _("I hate it"), wxDefaultPosition
, wxDefaultSize
, 0 );
135 item14
->SetValue(false);
136 item11
->Add(item14
, 0, wxALIGN_LEFT
|wxALL
, 5);
137 wxPanel
* item15
= new wxPanel( item3
, ID_PANEL2
, wxDefaultPosition
, wxSize(100, 80), wxSUNKEN_BORDER
|wxNO_FULL_REPAINT_ON_RESIZE
|wxTAB_TRAVERSAL
);
138 item4
->Add(item15
, 1, wxGROW
|wxALL
|wxADJUST_MINSIZE
, 5);
139 wxFlexGridSizer
* item16
= new wxFlexGridSizer(2, 1, 0, 0);
140 item16
->AddGrowableRow(1);
141 item16
->AddGrowableCol(0);
142 item15
->SetSizer(item16
);
143 item15
->SetAutoLayout(true);
144 wxStaticText
* item17
= new wxStaticText( item15
, wxID_STATIC
, _("Static text"), wxDefaultPosition
, wxDefaultSize
, 0 );
145 item16
->Add(item17
, 0, wxALIGN_CENTER_HORIZONTAL
|wxGROW
|wxALL
|wxADJUST_MINSIZE
|wxFIXED_MINSIZE
, 5);
146 wxPanel
* item18
= new wxPanel( item15
, ID_PANEL4
, wxDefaultPosition
, wxSize(100, 80), wxSUNKEN_BORDER
|wxTAB_TRAVERSAL
);
147 item16
->Add(item18
, 0, wxGROW
|wxGROW
|wxALL
, 5);
148 wxBoxSizer
* item19
= new wxBoxSizer(wxVERTICAL
);
150 item18
->SetSizer(item19
);
151 item18
->SetAutoLayout(true);
152 wxPanel
* item20
= new wxPanel( item18
, ID_PANEL5
, wxDefaultPosition
, wxDefaultSize
, wxNO_BORDER
|wxFULL_REPAINT_ON_RESIZE
|wxTAB_TRAVERSAL
);
153 item19
->Add(item20
, 1, wxGROW
, 5);
154 wxBoxSizer
* item21
= new wxBoxSizer(wxVERTICAL
);
155 item20
->SetSizer(item21
);
156 item20
->SetAutoLayout(true);
157 wxString item22Strings
[] = {
162 wxChoice
* item22
= new wxChoice( item20
, ID_CHOICE1
, wxDefaultPosition
, wxDefaultSize
, 3, item22Strings
, 0 );
163 item21
->Add(item22
, 0, wxGROW
|wxALL
, 5);
164 wxRadioButton
* item23
= new wxRadioButton( item20
, ID_RADIOBUTTON2
, _("I like this"), wxDefaultPosition
, wxDefaultSize
, 0 );
165 item23
->SetValue(true);
166 item21
->Add(item23
, 0, wxALIGN_LEFT
|wxALL
, 5);
167 wxRadioButton
* item24
= new wxRadioButton( item20
, ID_RADIOBUTTON3
, _("I hate it"), wxDefaultPosition
, wxDefaultSize
, 0 );
168 item24
->SetValue(false);
169 item21
->Add(item24
, 0, wxALIGN_LEFT
|wxALL
, 5);
170 wxPanel
* item25
= new wxPanel( item1
, ID_PANEL1
, wxDefaultPosition
, wxSize(100, 20), wxNO_BORDER
|wxTAB_TRAVERSAL
);
171 item25
->SetBackgroundColour(wxColour(98, 98, 98));
172 item2
->Add(item25
, 0, wxGROW
|wxGROW
|wxFIXED_MINSIZE
, 5);
173 ////@end TestTest content construction
177 * Should we show tooltips?
180 bool TestTest::ShowToolTips()
186 * Get bitmap resources
189 wxBitmap
TestTest::GetBitmapResource( const wxString
& WXUNUSED(name
) )
192 ////@begin TestTest bitmap retrieval
194 ////@end TestTest bitmap retrieval
201 wxIcon
TestTest::GetIconResource( const wxString
& WXUNUSED(name
) )
204 ////@begin TestTest icon retrieval
206 ////@end TestTest icon retrieval