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:
Włodzimierz Skiba
2004-08-03 14:39:09 +00:00
parent 8fa4d6b87b
commit f857e441bf
11 changed files with 713 additions and 702 deletions

View File

@@ -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
/////////////////////////////////////////////////////////////////////////////
@@ -110,8 +113,8 @@ bool MyApp::OnInit()
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,48 +131,46 @@ 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);
_pnl = new wxFoldPanelBar(this, wxID_ANY, 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"));
wxFoldPanel item = _pnl->AddFoldPanel(_T("Test me"), false);
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_COLLAPSEME, _T("Collapse Me")));
item = _pnl->AddFoldPanel("Test me too!", true);
_pnl->AddFoldPanelWindow(item, new wxButton(item.GetParent(), ID_EXPANDME, "Expand first one"));
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(), -1));
_pnl->AddFoldPanelWindow(item, new FoldTestPanel(item.GetParent(), wxID_ANY));
_pnl->AddFoldPanelSeperator(item);
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), -1, "Comment"), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
_pnl->AddFoldPanelWindow(item, new wxTextCtrl(item.GetParent(), wxID_ANY, _T("Comment")), wxFPB_ALIGN_WIDTH, wxFPB_DEFAULT_YSPACING, 20);
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"));
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(), -1, "Check this too if you like"));
_pnl->AddFoldPanelWindow(item, new wxCheckBox(item.GetParent(), -1, "What about this"));
_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"));
@@ -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,13 +196,13 @@ 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);
}
void MyAppFrame::OnExpandMe(wxCommandEvent &event)
void MyAppFrame::OnExpandMe(wxCommandEvent &WXUNUSED(event))
{
_pnl->Expand(_pnl->Item(0));
_pnl->Collapse(_pnl->Item(1));

View File

@@ -1,4 +1,6 @@
mondrian ICON "mondrian.ico"
mondrian ICON "sample.ico"
#define FOLDPANELBARTEST_QUIT 1
#define FOLDPANELBARTEST_ABOUT 102
#include "wx/msw/wx.rc"

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/18/04 22:37:15
// RCS-ID:
// Copyright:
// Licence:
// Created: 18/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(__APPLE__)
@@ -47,7 +47,7 @@ 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)
@@ -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;
}
/*!
@@ -103,13 +103,13 @@ void FoldTestPanel::CreateControls()
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
blaat = item2;
item1->SetSizer(item2);
item1->SetAutoLayout(TRUE);
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,15 +120,15 @@ 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
}
@@ -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

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/18/04 22:37:15
// RCS-ID:
// Copyright:
// Licence:
// Created: 18/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _FOLDTESTPANEL_H_

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/25/04 19:48:57
// RCS-ID:
// Copyright:
// Licence:
// 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;
}
/*!
@@ -95,7 +95,7 @@ void LayoutTest::CreateControls()
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

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/25/04 19:48:57
// RCS-ID:
// Copyright:
// Licence:
// Created: 25/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _LAYOUTTEST_H_

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/27/04 13:34:20
// RCS-ID:
// Copyright:
// Licence:
// 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;
}
/*!
@@ -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

View File

@@ -3,10 +3,10 @@
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 06/27/04 13:34:20
// RCS-ID:
// Copyright:
// Licence:
// Created: 27/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _TEST_H_

View File

@@ -3,8 +3,8 @@
// Purpose: wxCaptionBar class belonging to the wxFoldPanel (but can be used independent)
// Author: Jorgen Bodde
// Modified by:
// Created: June 18, 2004
// RCS-ID:
// Created: 18/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -1,8 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wxFoldPanelBar.cpp
// Author: XX
// Created: Tuesday, June 22, 2004 20:40:00
// Copyright: XX
// Name: foldpanelbar.cpp
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 22/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
@@ -26,7 +30,7 @@ IMPLEMENT_CLASS( wxFoldPanelBar, wxPanel )
BEGIN_EVENT_TABLE(wxFoldPanelBar,wxPanel)
EVT_SIZE(wxFoldPanelBar::OnSizePanel)
//EVT_PAINT(wxFoldPanelBar::OnPaint)
EVT_CAPTIONBAR(-1, wxFoldPanelBar::OnPressCaption)
EVT_CAPTIONBAR(wxID_ANY, wxFoldPanelBar::OnPressCaption)
END_EVENT_TABLE()
wxFoldPanelBar::wxFoldPanelBar()
@@ -56,12 +60,12 @@ void wxFoldPanelBar::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos
// the fold panel area
_foldPanel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL);
_foldPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL);
// the extra area for some icons / context menu etc
#if 0
_bottomPanel = new wxPanel(this, -1, wxDefaultPosition, wxSize(-1,22), wxNO_BORDER|wxTAB_TRAVERSAL);
_bottomPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(wxDefaultCoord,22), wxNO_BORDER|wxTAB_TRAVERSAL);
_bottomPanel->SetBackgroundColour(*wxWHITE);
#endif
@@ -326,14 +330,14 @@ wxRect wxFoldPanelBar::RepositionCollapsedToBottom()
int wxFoldPanelBar::GetPanelsHeight(int &collapsed, int &expanded)
{
int value = 0, offset = 0;
int value = 0;
// assumed here that all the panels that are expanded
// are positioned after eachother from 0,0 to end.
for(size_t j = 0; j < _panels.GetCount(); j++)
{
offset = _panels.Item(j)->GetPanelHeight();
int offset = _panels.Item(j)->GetPanelHeight();
value += offset;
if(_panels.Item(j)->IsExpanded())
expanded += offset;

View File

@@ -1,8 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wxFoldPanelItem.cpp
// Author: XX
// Created: Tuesday, June 22, 2004 21:01:02
// Copyright: XX
// Name: foldpanelitem.cpp
// Purpose:
// Author: Jorgen Bodde
// Modified by:
// Created: 22/06/2004
// RCS-ID: $Id$
// Copyright: (c) Jorgen Bodde
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx/wx.h".
@@ -24,7 +28,7 @@ WX_DEFINE_OBJARRAY(wxFoldWindowItemArray);
IMPLEMENT_CLASS( wxFoldPanelItem, wxPanel )
BEGIN_EVENT_TABLE(wxFoldPanelItem,wxPanel)
EVT_CAPTIONBAR(-1, wxFoldPanelItem::OnPressCaption)
EVT_CAPTIONBAR(wxID_ANY, wxFoldPanelItem::OnPressCaption)
EVT_PAINT(wxFoldPanelItem::OnPaint)
//EVT_SIZE(wxFoldPanelItem::OnSize)
END_EVENT_TABLE()
@@ -40,11 +44,11 @@ wxFoldPanelItem::wxFoldPanelItem( wxWindow *parent, const wxString &caption, wxI
{
wxCHECK2(parent, return);
wxPanel::Create(parent, -1);
wxPanel::Create(parent, wxID_ANY);
// create the caption bar, in collapsed or expanded state
_captionBar = new wxCaptionBar(this, caption, icons, -1, style, wxPoint(0,0));
_captionBar = new wxCaptionBar(this, caption, icons, wxID_ANY, style, wxPoint(0,0));
//_captionBar->SetBoldFont();
if(collapsedInitially)
@@ -67,7 +71,7 @@ void wxFoldPanelItem::AddWindow(wxWindow *window, int flags, int ySpacing, int l
wxFoldWindowItem *wi = new wxFoldWindowItem(window, flags, ySpacing, leftSpacing, rightSpacing);
_items.Add(wi);
window->SetSize(leftSpacing, _yLastInsertPos + ySpacing, -1, -1, wxSIZE_USE_EXISTING);
window->SetSize(leftSpacing, _yLastInsertPos + ySpacing, wxDefaultCoord, wxDefaultCoord, wxSIZE_USE_EXISTING);
_yLastInsertPos += wi->GetWindowHeight();
ResizePanel();
@@ -115,7 +119,7 @@ void wxFoldPanelItem::OnSize(wxSizeEvent &event)
//wxRect rect = GetRect();
//wxSize size(0,-1);
//wxSize size(0,wxDefaultCoord);
//size.SetWidth(rect.GetWidth());
//_captionBar->SetSize(size);
@@ -129,7 +133,7 @@ int wxFoldPanelItem::Reposition(int y)
Freeze();
SetSize(-1, y, -1, -1, wxSIZE_USE_EXISTING);
SetSize(wxDefaultCoord, y, wxDefaultCoord, wxDefaultCoord, wxSIZE_USE_EXISTING);
_yPos = y;
Thaw();
@@ -165,7 +169,7 @@ void wxFoldPanelItem::ResizePanel()
size.SetWidth(pnlsize.GetWidth());
// resize caption bar
_captionBar->SetSize(wxSize(size.GetWidth(), -1));
_captionBar->SetSize(wxSize(size.GetWidth(), wxDefaultCoord));
// resize the panel
SetSize(size);