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