Full headers, Unicode markup, whitespaces, wxID_ANY, wxDefaultCoord conventions applied with some warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: FoldPanelBarTest.cpp
|
||||
// Purpose: FoldPanelBarTest Test application
|
||||
// Created: 06/18/04
|
||||
// Name: foldpanelbartest.cpp
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 18/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -18,8 +21,8 @@
|
||||
|
||||
enum
|
||||
{
|
||||
ID_COLLAPSEME = 10000,
|
||||
ID_EXPANDME
|
||||
ID_COLLAPSEME = 10000,
|
||||
ID_EXPANDME
|
||||
};
|
||||
|
||||
#include "wx/foldbar/foldpanelbar.h"
|
||||
@@ -58,14 +61,14 @@ private:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
|
||||
// extra handlers for the bar, to show how it works
|
||||
// extra handlers for the bar, to show how it works
|
||||
|
||||
void OnCollapseMe(wxCommandEvent &event);
|
||||
void OnExpandMe(wxCommandEvent &event);
|
||||
void OnCollapseMe(wxCommandEvent &event);
|
||||
void OnExpandMe(wxCommandEvent &event);
|
||||
|
||||
private:
|
||||
wxMenuBar *CreateMenuBar();
|
||||
wxFoldPanelBar *_pnl;
|
||||
wxMenuBar *CreateMenuBar();
|
||||
wxFoldPanelBar *_pnl;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
@@ -89,8 +92,8 @@ enum
|
||||
BEGIN_EVENT_TABLE(MyAppFrame, wxFrame)
|
||||
EVT_MENU(FoldPanelBarTest_Quit, MyAppFrame::OnQuit)
|
||||
EVT_MENU(FoldPanelBarTest_About, MyAppFrame::OnAbout)
|
||||
EVT_BUTTON(ID_COLLAPSEME, MyAppFrame::OnCollapseMe)
|
||||
EVT_BUTTON(ID_EXPANDME, MyAppFrame::OnExpandMe)
|
||||
EVT_BUTTON(ID_COLLAPSEME, MyAppFrame::OnCollapseMe)
|
||||
EVT_BUTTON(ID_EXPANDME, MyAppFrame::OnExpandMe)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
@@ -108,10 +111,10 @@ bool MyApp::OnInit()
|
||||
MyAppFrame *frame = new MyAppFrame(_T("FoldPanelBarTest wxWindows Test Application"),
|
||||
wxPoint(50, 50), wxSize(200, 500));
|
||||
|
||||
SetTopWindow(frame);
|
||||
SetTopWindow(frame);
|
||||
|
||||
frame->Show(TRUE);
|
||||
return TRUE;
|
||||
frame->Show(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -119,7 +122,7 @@ bool MyApp::OnInit()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
MyAppFrame::MyAppFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
|
||||
: wxFrame(NULL, -1, title, pos, size, style)
|
||||
: wxFrame(NULL, wxID_ANY, title, pos, size, style)
|
||||
{
|
||||
SetIcon(wxICON(mondrian));
|
||||
|
||||
@@ -128,53 +131,51 @@ MyAppFrame::MyAppFrame(const wxString& title, const wxPoint& pos, const wxSize&
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_T("Welcome to wxWindows!"));
|
||||
|
||||
_pnl = new wxFoldPanelBar(this, -1, wxDefaultPosition, wxDefaultSize, wxFPB_DEFAULT_STYLE, wxFPB_COLLAPSE_TO_BOTTOM);
|
||||
|
||||
wxFoldPanel item = _pnl->AddFoldPanel("Test me", false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_COLLAPSEME, "Collapse Me"));
|
||||
_pnl = new wxFoldPanelBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFPB_DEFAULT_STYLE, wxFPB_COLLAPSE_TO_BOTTOM);
|
||||
|
||||
item = _pnl->AddFoldPanel("Test me too!", true);
|
||||
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_EXPANDME, "Expand first one"));
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
_pnl->AddFoldPanelWindow(item, new FoldTestPanel(item.GetParent(), -1));
|
||||
wxFoldPanel item = _pnl->AddFoldPanel(_T("Test me"), false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_COLLAPSEME, _T("Collapse Me")));
|
||||
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
item = _pnl->AddFoldPanel(_T("Test me too!"), true);
|
||||
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_EXPANDME, _T("Expand first one")));
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
_pnl->AddFoldPanelWindow(item, new FoldTestPanel(item.GetParent(), wxID_ANY));
|
||||
|
||||
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), -1, "Comment"), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
|
||||
item = _pnl->AddFoldPanel("Some opinions ...", false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "I like this"));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "And also this"));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "And gimme this too"));
|
||||
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), wxID_ANY, _T("Comment")), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
|
||||
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "Check this too if you like"));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "What about this"));
|
||||
item = _pnl->AddFoldPanel(_T("Some opinions ..."), false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), wxID_ANY, _T("I like this")));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), wxID_ANY, _T("And also this")));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), wxID_ANY, _T("And gimme this too")));
|
||||
|
||||
_pnl->AddFoldPanelSeperator(item);
|
||||
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), wxID_ANY, _T("Check this too if you like")));
|
||||
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), wxID_ANY, _T("What about this")));
|
||||
|
||||
|
||||
item = _pnl->AddFoldPanel("Choose one ...", false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxStaticText(item.GetParent(), -1, "Enter your comment"));
|
||||
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), -1, "Comment"), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
|
||||
item = _pnl->AddFoldPanel(_T("Choose one ..."), false);
|
||||
_pnl->AddFoldPanelWindow(item, new wxStaticText(item.GetParent(), wxID_ANY, _T("Enter your comment")));
|
||||
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), wxID_ANY, _T("Comment")), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
|
||||
|
||||
}
|
||||
|
||||
wxMenuBar *MyAppFrame::CreateMenuBar()
|
||||
{
|
||||
wxMenuBar *value = 0;
|
||||
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
menuFile->Append(FoldPanelBarTest_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
|
||||
|
||||
wxMenu *helpMenu = new wxMenu;
|
||||
helpMenu->Append(FoldPanelBarTest_About, _T("&About...\tF1"), _T("Show about dialog"));
|
||||
|
||||
value = new wxMenuBar();
|
||||
wxMenuBar *value = new wxMenuBar();
|
||||
value->Append(menuFile, _T("&File"));
|
||||
value->Append(helpMenu, _T("&Help"));
|
||||
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
// event handlers
|
||||
|
||||
@@ -182,8 +183,8 @@ wxMenuBar *MyAppFrame::CreateMenuBar()
|
||||
|
||||
void MyAppFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// TRUE is to force the frame to close
|
||||
Close(TRUE);
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
}
|
||||
|
||||
void MyAppFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -195,14 +196,14 @@ void MyAppFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
wxMessageBox(msg, _T("About FoldPanelBarTest"), wxOK | wxICON_INFORMATION, this);
|
||||
}
|
||||
|
||||
void MyAppFrame::OnCollapseMe(wxCommandEvent &event)
|
||||
void MyAppFrame::OnCollapseMe(wxCommandEvent &WXUNUSED(event))
|
||||
{
|
||||
wxFoldPanel item = _pnl->Item(0);
|
||||
_pnl->Collapse(item);
|
||||
wxFoldPanel item = _pnl->Item(0);
|
||||
_pnl->Collapse(item);
|
||||
}
|
||||
|
||||
void MyAppFrame::OnExpandMe(wxCommandEvent &event)
|
||||
void MyAppFrame::OnExpandMe(wxCommandEvent &WXUNUSED(event))
|
||||
{
|
||||
_pnl->Expand(_pnl->Item(0));
|
||||
_pnl->Collapse(_pnl->Item(1));
|
||||
_pnl->Expand(_pnl->Item(0));
|
||||
_pnl->Collapse(_pnl->Item(1));
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
mondrian ICON "mondrian.ico"
|
||||
mondrian ICON "sample.ico"
|
||||
|
||||
#define FOLDPANELBARTEST_QUIT 1
|
||||
#define FOLDPANELBARTEST_ABOUT 102
|
||||
#define FOLDPANELBARTEST_QUIT 1
|
||||
#define FOLDPANELBARTEST_ABOUT 102
|
||||
|
||||
#include "wx/msw/wx.rc"
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: foldtestpanel.cpp
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/18/04 22:37:15
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 18/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
@@ -47,8 +47,8 @@ BEGIN_EVENT_TABLE( FoldTestPanel, wxPanel )
|
||||
////@begin FoldTestPanel event table entries
|
||||
////@end FoldTestPanel event table entries
|
||||
|
||||
//EVT_CAPTIONBAR(-1, FoldTestPanel::OnCaptionPanel)
|
||||
EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
|
||||
//EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
|
||||
EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
|
||||
|
||||
|
||||
END_EVENT_TABLE()
|
||||
@@ -59,7 +59,7 @@ END_EVENT_TABLE()
|
||||
|
||||
FoldTestPanel::FoldTestPanel( )
|
||||
{
|
||||
delete _images;
|
||||
delete _images;
|
||||
}
|
||||
|
||||
FoldTestPanel::FoldTestPanel( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||
@@ -71,7 +71,7 @@ FoldTestPanel::FoldTestPanel( wxWindow* parent, wxWindowID id, const wxString& c
|
||||
* FoldTestPanel creator
|
||||
*/
|
||||
|
||||
bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||
bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
|
||||
{
|
||||
////@begin FoldTestPanel member initialisation
|
||||
blaat = NULL;
|
||||
@@ -86,7 +86,7 @@ bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& cap
|
||||
GetSizer()->SetSizeHints(this);
|
||||
Centre();
|
||||
////@end FoldTestPanel creation
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -94,7 +94,7 @@ bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& cap
|
||||
*/
|
||||
|
||||
void FoldTestPanel::CreateControls()
|
||||
{
|
||||
{
|
||||
|
||||
////@begin FoldTestPanel content construction
|
||||
|
||||
@@ -103,13 +103,13 @@ void FoldTestPanel::CreateControls()
|
||||
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
|
||||
blaat = item2;
|
||||
item1->SetSizer(item2);
|
||||
item1->SetAutoLayout(TRUE);
|
||||
/* wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL ); */
|
||||
wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
|
||||
item1->SetAutoLayout(true);
|
||||
/* wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL ); */
|
||||
wxPanel* item3 = new wxPanel( item1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL );
|
||||
item2->Add(item3, 1, wxGROW|wxADJUST_MINSIZE, 5);
|
||||
wxBoxSizer* item4 = new wxBoxSizer(wxVERTICAL);
|
||||
item3->SetSizer(item4);
|
||||
item3->SetAutoLayout(TRUE);
|
||||
item3->SetAutoLayout(true);
|
||||
wxString item5Strings[] = {
|
||||
_("One"),
|
||||
_("Two"),
|
||||
@@ -120,17 +120,17 @@ void FoldTestPanel::CreateControls()
|
||||
wxTextCtrl* item6 = new wxTextCtrl( item3, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
|
||||
item4->Add(item6, 1, wxGROW|wxALL, 5);
|
||||
wxRadioButton* item7 = new wxRadioButton( item3, ID_RADIOBUTTON, _("I like this"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item7->SetValue(TRUE);
|
||||
item7->SetValue(true);
|
||||
item4->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
wxRadioButton* item8 = new wxRadioButton( item3, ID_RADIOBUTTON1, _("I hate it"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item8->SetValue(FALSE);
|
||||
item8->SetValue(false);
|
||||
item4->Add(item8, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
////@end FoldTestPanel content construction
|
||||
}
|
||||
|
||||
void FoldTestPanel::OnCaptionPanel(wxCaptionBarEvent &event)
|
||||
void FoldTestPanel::OnCaptionPanel(wxCaptionBarEvent &WXUNUSED(event))
|
||||
{
|
||||
// TODO: What else
|
||||
// TODO: What else
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -139,14 +139,14 @@ void FoldTestPanel::OnCaptionPanel(wxCaptionBarEvent &event)
|
||||
|
||||
bool FoldTestPanel::ShowToolTips()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap FoldTestPanel::GetBitmapResource( const wxString& name )
|
||||
wxBitmap FoldTestPanel::GetBitmapResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin FoldTestPanel bitmap retrieval
|
||||
@@ -158,7 +158,7 @@ wxBitmap FoldTestPanel::GetBitmapResource( const wxString& name )
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon FoldTestPanel::GetIconResource( const wxString& name )
|
||||
wxIcon FoldTestPanel::GetIconResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin FoldTestPanel icon retrieval
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: foldtestpanel.h
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/18/04 22:37:15
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 18/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _FOLDTESTPANEL_H_
|
||||
@@ -67,15 +67,15 @@ class wxBoxSizer;
|
||||
*/
|
||||
|
||||
class FoldTestPanel: public wxPanel
|
||||
{
|
||||
{
|
||||
DECLARE_CLASS( FoldTestPanel )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
private:
|
||||
wxImageList *_images;
|
||||
wxRect _oldsize;
|
||||
wxImageList *_images;
|
||||
wxRect _oldsize;
|
||||
|
||||
void OnCaptionPanel(wxCaptionBarEvent &event);
|
||||
void OnCaptionPanel(wxCaptionBarEvent &event);
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: layouttest.cpp
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/25/04 19:48:57
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 25/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
@@ -66,7 +66,7 @@ LayoutTest::LayoutTest( wxWindow* parent, wxWindowID id, const wxString& caption
|
||||
* LayoutTest creator
|
||||
*/
|
||||
|
||||
bool LayoutTest::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||
bool LayoutTest::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
|
||||
{
|
||||
////@begin LayoutTest member initialisation
|
||||
////@end LayoutTest member initialisation
|
||||
@@ -80,7 +80,7 @@ bool LayoutTest::Create( wxWindow* parent, wxWindowID id, const wxString& captio
|
||||
GetSizer()->SetSizeHints(this);
|
||||
Centre();
|
||||
////@end LayoutTest creation
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -88,14 +88,14 @@ bool LayoutTest::Create( wxWindow* parent, wxWindowID id, const wxString& captio
|
||||
*/
|
||||
|
||||
void LayoutTest::CreateControls()
|
||||
{
|
||||
{
|
||||
////@begin LayoutTest content construction
|
||||
|
||||
LayoutTest* item1 = this;
|
||||
|
||||
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
|
||||
item1->SetSizer(item2);
|
||||
item1->SetAutoLayout(TRUE);
|
||||
item1->SetAutoLayout(true);
|
||||
wxStaticText* item3 = new wxStaticText( item1, wxID_STATIC, _("lbaaaaaa"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item3->SetBackgroundColour(wxColour(139, 139, 139));
|
||||
item2->Add(item3, 0, wxGROW|wxALL|wxADJUST_MINSIZE, 5);
|
||||
@@ -103,7 +103,7 @@ void LayoutTest::CreateControls()
|
||||
item2->Add(item4, 0, wxGROW, 5);
|
||||
wxBoxSizer* item5 = new wxBoxSizer(wxVERTICAL);
|
||||
item4->SetSizer(item5);
|
||||
item4->SetAutoLayout(TRUE);
|
||||
item4->SetAutoLayout(true);
|
||||
wxStaticText* item6 = new wxStaticText( item4, wxID_STATIC, _("Static text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item5->Add(item6, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
|
||||
wxButton* item7 = new wxButton( item4, ID_BUTTON, _("Button"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
@@ -117,14 +117,14 @@ void LayoutTest::CreateControls()
|
||||
|
||||
bool LayoutTest::ShowToolTips()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap LayoutTest::GetBitmapResource( const wxString& name )
|
||||
wxBitmap LayoutTest::GetBitmapResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin LayoutTest bitmap retrieval
|
||||
@@ -136,7 +136,7 @@ wxBitmap LayoutTest::GetBitmapResource( const wxString& name )
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon LayoutTest::GetIconResource( const wxString& name )
|
||||
wxIcon LayoutTest::GetIconResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin LayoutTest icon retrieval
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: layouttest.h
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/25/04 19:48:57
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 25/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _LAYOUTTEST_H_
|
||||
@@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
class LayoutTest: public wxPanel
|
||||
{
|
||||
{
|
||||
DECLARE_CLASS( LayoutTest )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.cpp
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/27/04 13:34:20
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 27/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
@@ -82,7 +82,7 @@ bool TestTest::Create( wxWindow* parent, wxWindowID id, const wxString& caption,
|
||||
GetSizer()->SetSizeHints(this);
|
||||
Centre();
|
||||
////@end TestTest creation
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -90,7 +90,7 @@ bool TestTest::Create( wxWindow* parent, wxWindowID id, const wxString& caption,
|
||||
*/
|
||||
|
||||
void TestTest::CreateControls()
|
||||
{
|
||||
{
|
||||
////@begin TestTest content construction
|
||||
|
||||
TestTest* item1 = this;
|
||||
@@ -99,19 +99,19 @@ void TestTest::CreateControls()
|
||||
item2->AddGrowableRow(0);
|
||||
item2->AddGrowableCol(0);
|
||||
item1->SetSizer(item2);
|
||||
item1->SetAutoLayout(TRUE);
|
||||
item1->SetAutoLayout(true);
|
||||
wxPanel* item3 = new wxPanel( item1, ID_PANEL7, wxDefaultPosition, wxSize(100, 50), wxNO_BORDER|wxTAB_TRAVERSAL );
|
||||
item2->Add(item3, 1, wxGROW|wxGROW|wxADJUST_MINSIZE, 5);
|
||||
wxBoxSizer* item4 = new wxBoxSizer(wxVERTICAL);
|
||||
item3->SetSizer(item4);
|
||||
item3->SetAutoLayout(TRUE);
|
||||
item3->SetAutoLayout(true);
|
||||
wxPanel* item5 = new wxPanel( item3, ID_PANEL6, wxDefaultPosition, wxSize(100, 80), wxSUNKEN_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
item4->Add(item5, 1, wxGROW|wxALL|wxADJUST_MINSIZE, 5);
|
||||
wxFlexGridSizer* item6 = new wxFlexGridSizer(2, 1, 0, 0);
|
||||
item6->AddGrowableRow(1);
|
||||
item6->AddGrowableCol(0);
|
||||
item5->SetSizer(item6);
|
||||
item5->SetAutoLayout(TRUE);
|
||||
item5->SetAutoLayout(true);
|
||||
wxStaticText* item7 = new wxStaticText( item5, wxID_STATIC, _("Static text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item6->Add(item7, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL|wxADJUST_MINSIZE, 5);
|
||||
wxPanel* item8 = new wxPanel( item5, ID_PANEL3, wxDefaultPosition, wxSize(100, 80), wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
||||
@@ -119,12 +119,12 @@ void TestTest::CreateControls()
|
||||
wxBoxSizer* item9 = new wxBoxSizer(wxVERTICAL);
|
||||
blaat = item9;
|
||||
item8->SetSizer(item9);
|
||||
item8->SetAutoLayout(TRUE);
|
||||
item8->SetAutoLayout(true);
|
||||
wxPanel* item10 = new wxPanel( item8, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
item9->Add(item10, 1, wxGROW, 5);
|
||||
wxBoxSizer* item11 = new wxBoxSizer(wxVERTICAL);
|
||||
item10->SetSizer(item11);
|
||||
item10->SetAutoLayout(TRUE);
|
||||
item10->SetAutoLayout(true);
|
||||
wxString item12Strings[] = {
|
||||
_("One"),
|
||||
_("Two"),
|
||||
@@ -133,10 +133,10 @@ void TestTest::CreateControls()
|
||||
wxChoice* item12 = new wxChoice( item10, ID_CHOICE, wxDefaultPosition, wxDefaultSize, 3, item12Strings, 0 );
|
||||
item11->Add(item12, 0, wxGROW|wxALL, 5);
|
||||
wxRadioButton* item13 = new wxRadioButton( item10, ID_RADIOBUTTON, _("I like this"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item13->SetValue(TRUE);
|
||||
item13->SetValue(true);
|
||||
item11->Add(item13, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
wxRadioButton* item14 = new wxRadioButton( item10, ID_RADIOBUTTON1, _("I hate it"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item14->SetValue(FALSE);
|
||||
item14->SetValue(false);
|
||||
item11->Add(item14, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
wxPanel* item15 = new wxPanel( item3, ID_PANEL2, wxDefaultPosition, wxSize(100, 80), wxSUNKEN_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
item4->Add(item15, 1, wxGROW|wxALL|wxADJUST_MINSIZE, 5);
|
||||
@@ -144,7 +144,7 @@ void TestTest::CreateControls()
|
||||
item16->AddGrowableRow(1);
|
||||
item16->AddGrowableCol(0);
|
||||
item15->SetSizer(item16);
|
||||
item15->SetAutoLayout(TRUE);
|
||||
item15->SetAutoLayout(true);
|
||||
wxStaticText* item17 = new wxStaticText( item15, wxID_STATIC, _("Static text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item16->Add(item17, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL|wxADJUST_MINSIZE|wxFIXED_MINSIZE, 5);
|
||||
wxPanel* item18 = new wxPanel( item15, ID_PANEL4, wxDefaultPosition, wxSize(100, 80), wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
||||
@@ -152,12 +152,12 @@ void TestTest::CreateControls()
|
||||
wxBoxSizer* item19 = new wxBoxSizer(wxVERTICAL);
|
||||
blaat = item19;
|
||||
item18->SetSizer(item19);
|
||||
item18->SetAutoLayout(TRUE);
|
||||
item18->SetAutoLayout(true);
|
||||
wxPanel* item20 = new wxPanel( item18, ID_PANEL5, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
|
||||
item19->Add(item20, 1, wxGROW, 5);
|
||||
wxBoxSizer* item21 = new wxBoxSizer(wxVERTICAL);
|
||||
item20->SetSizer(item21);
|
||||
item20->SetAutoLayout(TRUE);
|
||||
item20->SetAutoLayout(true);
|
||||
wxString item22Strings[] = {
|
||||
_("One"),
|
||||
_("Two"),
|
||||
@@ -166,10 +166,10 @@ void TestTest::CreateControls()
|
||||
wxChoice* item22 = new wxChoice( item20, ID_CHOICE1, wxDefaultPosition, wxDefaultSize, 3, item22Strings, 0 );
|
||||
item21->Add(item22, 0, wxGROW|wxALL, 5);
|
||||
wxRadioButton* item23 = new wxRadioButton( item20, ID_RADIOBUTTON2, _("I like this"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item23->SetValue(TRUE);
|
||||
item23->SetValue(true);
|
||||
item21->Add(item23, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
wxRadioButton* item24 = new wxRadioButton( item20, ID_RADIOBUTTON3, _("I hate it"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
item24->SetValue(FALSE);
|
||||
item24->SetValue(false);
|
||||
item21->Add(item24, 0, wxALIGN_LEFT|wxALL, 5);
|
||||
wxPanel* item25 = new wxPanel( item1, ID_PANEL1, wxDefaultPosition, wxSize(100, 20), wxNO_BORDER|wxTAB_TRAVERSAL );
|
||||
item25->SetBackgroundColour(wxColour(98, 98, 98));
|
||||
@@ -183,14 +183,14 @@ void TestTest::CreateControls()
|
||||
|
||||
bool TestTest::ShowToolTips()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap TestTest::GetBitmapResource( const wxString& name )
|
||||
wxBitmap TestTest::GetBitmapResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
////@begin TestTest bitmap retrieval
|
||||
@@ -202,7 +202,7 @@ wxBitmap TestTest::GetBitmapResource( const wxString& name )
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon TestTest::GetIconResource( const wxString& name )
|
||||
wxIcon TestTest::GetIconResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Icon retrieval
|
||||
////@begin TestTest icon retrieval
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.h
|
||||
// Purpose:
|
||||
// Purpose:
|
||||
// Author: Jorgen Bodde
|
||||
// Modified by:
|
||||
// Created: 06/27/04 13:34:20
|
||||
// RCS-ID:
|
||||
// Copyright:
|
||||
// Licence:
|
||||
// Modified by:
|
||||
// Created: 27/06/2004
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jorgen Bodde
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _TEST_H_
|
||||
@@ -74,7 +74,7 @@ class wxBoxSizer;
|
||||
*/
|
||||
|
||||
class TestTest: public wxDialog
|
||||
{
|
||||
{
|
||||
DECLARE_CLASS( TestTest )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
|
Reference in New Issue
Block a user