• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/amule/wxWidgets-2.8.12/contrib/samples/foldbar/foldpanelbar/
1/////////////////////////////////////////////////////////////////////////////
2// Name:        test.cpp
3// Purpose:
4// Author:      Jorgen Bodde
5// Modified by:
6// Created:     27/06/2004
7// RCS-ID:      $Id: test.cpp 35650 2005-09-23 12:56:45Z MR $
8// Copyright:   (c) Jorgen Bodde
9// Licence:     wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// For compilers that support precompilation, includes "wx/wx.h".
13#include "wx/wxprec.h"
14
15#ifdef __BORLANDC__
16#pragma hdrstop
17#endif
18
19#ifndef WX_PRECOMP
20#include "wx/wx.h"
21#endif
22
23////@begin includes
24////@end includes
25
26#include "test.h"
27
28////@begin XPM images
29////@end XPM images
30
31/*!
32 * TestTest type definition
33 */
34
35IMPLEMENT_CLASS( TestTest, wxDialog )
36
37/*!
38 * TestTest event table definition
39 */
40
41BEGIN_EVENT_TABLE( TestTest, wxDialog )
42
43////@begin TestTest event table entries
44////@end TestTest event table entries
45
46END_EVENT_TABLE()
47
48/*!
49 * TestTest constructors
50 */
51
52TestTest::TestTest( )
53{
54}
55
56TestTest::TestTest( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
57{
58    Create(parent, id, caption, pos, size, style);
59}
60
61/*!
62 * TestTest creator
63 */
64
65bool TestTest::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
66{
67////@begin TestTest member initialisation
68    blaat = NULL;
69    blaat = NULL;
70////@end TestTest member initialisation
71
72////@begin TestTest creation
73    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
74    wxDialog::Create( parent, id, caption, pos, size, style );
75
76    CreateControls();
77    GetSizer()->Fit(this);
78    GetSizer()->SetSizeHints(this);
79    Centre();
80////@end TestTest creation
81    return true;
82}
83
84/*!
85 * Control creation for TestTest
86 */
87
88void TestTest::CreateControls()
89{
90////@begin TestTest content construction
91
92    TestTest* item1 = this;
93
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);
116    blaat = item9;
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[] = {
125        _("One"),
126        _("Two"),
127        _("Three")
128    };
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);
149    blaat = item19;
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[] = {
158        _("One"),
159        _("Two"),
160        _("Three")
161    };
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
174}
175
176/*!
177 * Should we show tooltips?
178 */
179
180bool TestTest::ShowToolTips()
181{
182    return true;
183}
184
185/*!
186 * Get bitmap resources
187 */
188
189wxBitmap TestTest::GetBitmapResource( const wxString& WXUNUSED(name) )
190{
191    // Bitmap retrieval
192////@begin TestTest bitmap retrieval
193    return wxNullBitmap;
194////@end TestTest bitmap retrieval
195}
196
197/*!
198 * Get icon resources
199 */
200
201wxIcon TestTest::GetIconResource( const wxString& WXUNUSED(name) )
202{
203    // Icon retrieval
204////@begin TestTest icon retrieval
205    return wxNullIcon;
206////@end TestTest icon retrieval
207}
208