]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/foldbar/foldpanelbar/foldtestpanel.cpp
Regenerated makefiles for 3rd-party lib change
[wxWidgets.git] / contrib / samples / foldbar / foldpanelbar / foldtestpanel.cpp
CommitLineData
957f5ab7
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: foldtestpanel.cpp
f857e441 3// Purpose:
957f5ab7 4// Author: Jorgen Bodde
f857e441
WS
5// Modified by:
6// Created: 18/06/2004
7// RCS-ID: $Id$
8// Copyright: (c) Jorgen Bodde
9// Licence: wxWindows licence
957f5ab7
VZ
10/////////////////////////////////////////////////////////////////////////////
11
12#if defined(__GNUG__) && !defined(__APPLE__)
13#pragma implementation "foldtestpanel.h"
14#endif
15
16// For compilers that support precompilation, includes "wx/wx.h".
17#include "wx/wxprec.h"
18
19#ifdef __BORLANDC__
20#pragma hdrstop
21#endif
22
23#ifndef WX_PRECOMP
24#include "wx/wx.h"
25#endif
26
27////@begin includes
28////@end includes
29
30#include "foldtestpanel.h"
31
32
33////@begin XPM images
34////@end XPM images
35
36/*!
37 * FoldTestPanel type definition
38 */
39
40IMPLEMENT_CLASS( FoldTestPanel, wxPanel )
41
42/*!
43 * FoldTestPanel event table definition
44 */
45BEGIN_EVENT_TABLE( FoldTestPanel, wxPanel )
46
47////@begin FoldTestPanel event table entries
48////@end FoldTestPanel event table entries
49
f857e441
WS
50 //EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
51 EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
957f5ab7
VZ
52
53
54END_EVENT_TABLE()
55
56/*!
57 * FoldTestPanel constructors
58 */
59
60FoldTestPanel::FoldTestPanel( )
61{
f857e441 62 delete _images;
957f5ab7
VZ
63}
64
65FoldTestPanel::FoldTestPanel( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
66{
67 Create(parent, id, caption, pos, size, style);
68}
69
70/*!
71 * FoldTestPanel creator
72 */
73
f857e441 74bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
957f5ab7
VZ
75{
76////@begin FoldTestPanel member initialisation
77 blaat = NULL;
78////@end FoldTestPanel member initialisation
79
80////@begin FoldTestPanel creation
81 SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
82 wxPanel::Create( parent, id, pos, size, style );
83
84 CreateControls();
85 GetSizer()->Fit(this);
86 GetSizer()->SetSizeHints(this);
87 Centre();
88////@end FoldTestPanel creation
f857e441 89 return true;
957f5ab7
VZ
90}
91
92/*!
93 * Control creation for FoldTestPanel
94 */
95
96void FoldTestPanel::CreateControls()
f857e441 97{
957f5ab7
VZ
98
99////@begin FoldTestPanel content construction
100
101 FoldTestPanel* item1 = this;
102
103 wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
104 blaat = item2;
105 item1->SetSizer(item2);
f857e441
WS
106 item1->SetAutoLayout(true);
107 /* wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL ); */
108 wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
957f5ab7
VZ
109 item2->Add(item3, 1, wxGROW|wxADJUST_MINSIZE, 5);
110 wxBoxSizer* item4 = new wxBoxSizer(wxVERTICAL);
111 item3->SetSizer(item4);
f857e441 112 item3->SetAutoLayout(true);
957f5ab7
VZ
113 wxString item5Strings[] = {
114 _("One"),
115 _("Two"),
116 _("Three")
117 };
118 wxChoice* item5 = new wxChoice( item3, ID_CHOICE, wxDefaultPosition, wxDefaultSize, 3, item5Strings, 0 );
119 item4->Add(item5, 0, wxGROW|wxALL, 5);
120 wxTextCtrl* item6 = new wxTextCtrl( item3, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
121 item4->Add(item6, 1, wxGROW|wxALL, 5);
122 wxRadioButton* item7 = new wxRadioButton( item3, ID_RADIOBUTTON, _("I like this"), wxDefaultPosition, wxDefaultSize, 0 );
f857e441 123 item7->SetValue(true);
957f5ab7
VZ
124 item4->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
125 wxRadioButton* item8 = new wxRadioButton( item3, ID_RADIOBUTTON1, _("I hate it"), wxDefaultPosition, wxDefaultSize, 0 );
f857e441 126 item8->SetValue(false);
957f5ab7
VZ
127 item4->Add(item8, 0, wxALIGN_LEFT|wxALL, 5);
128////@end FoldTestPanel content construction
129}
130
f857e441 131void FoldTestPanel::OnCaptionPanel(wxCaptionBarEvent &WXUNUSED(event))
957f5ab7 132{
f857e441 133 // TODO: What else
957f5ab7
VZ
134}
135
136/*!
137 * Should we show tooltips?
138 */
139
140bool FoldTestPanel::ShowToolTips()
141{
f857e441 142 return true;
957f5ab7
VZ
143}
144
145/*!
146 * Get bitmap resources
147 */
148
f857e441 149wxBitmap FoldTestPanel::GetBitmapResource( const wxString& WXUNUSED(name) )
957f5ab7
VZ
150{
151 // Bitmap retrieval
152////@begin FoldTestPanel bitmap retrieval
153 return wxNullBitmap;
154////@end FoldTestPanel bitmap retrieval
155}
156
157/*!
158 * Get icon resources
159 */
160
f857e441 161wxIcon FoldTestPanel::GetIconResource( const wxString& WXUNUSED(name) )
957f5ab7
VZ
162{
163 // Icon retrieval
164////@begin FoldTestPanel icon retrieval
165 return wxNullIcon;
166////@end FoldTestPanel icon retrieval
167}
168