]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/foldbar/foldpanelbar/layouttest.cpp
Fix previous change in case somebody is still using
[wxWidgets.git] / contrib / samples / foldbar / foldpanelbar / layouttest.cpp
CommitLineData
957f5ab7
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: layouttest.cpp
f857e441 3// Purpose:
957f5ab7 4// Author: Jorgen Bodde
f857e441
WS
5// Modified by:
6// Created: 25/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 "layouttest.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 "layouttest.h"
31
32////@begin XPM images
33////@end XPM images
34
35/*!
36 * LayoutTest type definition
37 */
38
39IMPLEMENT_CLASS( LayoutTest, wxPanel )
40
41/*!
42 * LayoutTest event table definition
43 */
44
45BEGIN_EVENT_TABLE( LayoutTest, wxPanel )
46
47////@begin LayoutTest event table entries
48////@end LayoutTest event table entries
49
50END_EVENT_TABLE()
51
52/*!
53 * LayoutTest constructors
54 */
55
56LayoutTest::LayoutTest( )
57{
58}
59
60LayoutTest::LayoutTest( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
61{
62 Create(parent, id, caption, pos, size, style);
63}
64
65/*!
66 * LayoutTest creator
67 */
68
f857e441 69bool LayoutTest::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
957f5ab7
VZ
70{
71////@begin LayoutTest member initialisation
72////@end LayoutTest member initialisation
73
74////@begin LayoutTest creation
75 SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
76 wxPanel::Create( parent, id, pos, size, style );
77
78 CreateControls();
79 GetSizer()->Fit(this);
80 GetSizer()->SetSizeHints(this);
81 Centre();
82////@end LayoutTest creation
f857e441 83 return true;
957f5ab7
VZ
84}
85
86/*!
87 * Control creation for LayoutTest
88 */
89
90void LayoutTest::CreateControls()
f857e441 91{
957f5ab7
VZ
92////@begin LayoutTest content construction
93
94 LayoutTest* item1 = this;
95
96 wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
97 item1->SetSizer(item2);
f857e441 98 item1->SetAutoLayout(true);
957f5ab7
VZ
99 wxStaticText* item3 = new wxStaticText( item1, wxID_STATIC, _("lbaaaaaa"), wxDefaultPosition, wxDefaultSize, 0 );
100 item3->SetBackgroundColour(wxColour(139, 139, 139));
101 item2->Add(item3, 0, wxGROW|wxALL|wxADJUST_MINSIZE, 5);
102 wxPanel* item4 = new wxPanel( item1, ID_PANEL1, wxDefaultPosition, wxSize(100, 80), wxTAB_TRAVERSAL );
103 item2->Add(item4, 0, wxGROW, 5);
104 wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
105 item4->SetSizer(item5);
f857e441 106 item4->SetAutoLayout(true);
957f5ab7
VZ
107 wxStaticText* item6 = new wxStaticText( item4, wxID_STATIC, _("Static text"), wxDefaultPosition, wxDefaultSize, 0 );
108 item5->Add(item6, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
109 wxButton* item7 = new wxButton( item4, ID_BUTTON, _("Button"), wxDefaultPosition, wxDefaultSize, 0 );
110 item5->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
111////@end LayoutTest content construction
112}
113
114/*!
115 * Should we show tooltips?
116 */
117
118bool LayoutTest::ShowToolTips()
119{
f857e441 120 return true;
957f5ab7
VZ
121}
122
123/*!
124 * Get bitmap resources
125 */
126
f857e441 127wxBitmap LayoutTest::GetBitmapResource( const wxString& WXUNUSED(name) )
957f5ab7
VZ
128{
129 // Bitmap retrieval
130////@begin LayoutTest bitmap retrieval
131 return wxNullBitmap;
132////@end LayoutTest bitmap retrieval
133}
134
135/*!
136 * Get icon resources
137 */
138
f857e441 139wxIcon LayoutTest::GetIconResource( const wxString& WXUNUSED(name) )
957f5ab7
VZ
140{
141 // Icon retrieval
142////@begin LayoutTest icon retrieval
143 return wxNullIcon;
144////@end LayoutTest icon retrieval
145}