2004-08-03 07:18:36 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: foldtestpanel.cpp
|
2004-08-03 10:39:09 -04:00
|
|
|
// Purpose:
|
2004-08-03 07:18:36 -04:00
|
|
|
// Author: Jorgen Bodde
|
2004-12-10 07:01:04 -05:00
|
|
|
// Modified by: ABX - 19/12/2004 : possibility of horizontal orientation
|
|
|
|
// : wxWidgets coding standards
|
2004-08-03 10:39:09 -04:00
|
|
|
// Created: 18/06/2004
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Jorgen Bodde
|
|
|
|
// Licence: wxWindows licence
|
2004-08-03 07:18:36 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// For compilers that support precompilation, includes "wx/wx.h".
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
|
|
|
|
#ifdef __BORLANDC__
|
2004-12-10 07:01:04 -05:00
|
|
|
#pragma hdrstop
|
2004-08-03 07:18:36 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WX_PRECOMP
|
|
|
|
#include "wx/wx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
////@begin includes
|
|
|
|
////@end includes
|
|
|
|
|
|
|
|
#include "foldtestpanel.h"
|
|
|
|
|
|
|
|
|
|
|
|
////@begin XPM images
|
|
|
|
////@end XPM images
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* FoldTestPanel type definition
|
|
|
|
*/
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS( FoldTestPanel, wxPanel )
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* FoldTestPanel event table definition
|
|
|
|
*/
|
|
|
|
BEGIN_EVENT_TABLE( FoldTestPanel, wxPanel )
|
|
|
|
|
|
|
|
////@begin FoldTestPanel event table entries
|
|
|
|
////@end FoldTestPanel event table entries
|
|
|
|
|
2004-08-03 10:39:09 -04:00
|
|
|
//EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
|
|
|
|
EVT_CAPTIONBAR(wxID_ANY, FoldTestPanel::OnCaptionPanel)
|
2004-08-03 07:18:36 -04:00
|
|
|
|
|
|
|
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* FoldTestPanel constructors
|
|
|
|
*/
|
|
|
|
|
|
|
|
FoldTestPanel::FoldTestPanel( )
|
|
|
|
{
|
2004-12-10 07:01:04 -05:00
|
|
|
delete m_images;
|
2004-08-03 07:18:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
FoldTestPanel::FoldTestPanel( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
|
|
|
{
|
|
|
|
Create(parent, id, caption, pos, size, style);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* FoldTestPanel creator
|
|
|
|
*/
|
|
|
|
|
2004-08-03 10:39:09 -04:00
|
|
|
bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
|
2004-08-03 07:18:36 -04:00
|
|
|
{
|
|
|
|
////@begin FoldTestPanel member initialisation
|
|
|
|
blaat = NULL;
|
|
|
|
////@end FoldTestPanel member initialisation
|
|
|
|
|
|
|
|
////@begin FoldTestPanel creation
|
|
|
|
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
|
|
|
|
wxPanel::Create( parent, id, pos, size, style );
|
|
|
|
|
|
|
|
CreateControls();
|
|
|
|
GetSizer()->Fit(this);
|
|
|
|
GetSizer()->SetSizeHints(this);
|
|
|
|
Centre();
|
|
|
|
////@end FoldTestPanel creation
|
2004-08-03 10:39:09 -04:00
|
|
|
return true;
|
2004-08-03 07:18:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control creation for FoldTestPanel
|
|
|
|
*/
|
|
|
|
|
|
|
|
void FoldTestPanel::CreateControls()
|
2004-08-03 10:39:09 -04:00
|
|
|
{
|
2004-08-03 07:18:36 -04:00
|
|
|
|
|
|
|
////@begin FoldTestPanel content construction
|
|
|
|
|
|
|
|
FoldTestPanel* item1 = this;
|
|
|
|
|
|
|
|
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
|
|
|
|
blaat = item2;
|
|
|
|
item1->SetSizer(item2);
|
2004-08-03 10:39:09 -04:00
|
|
|
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 );
|
2004-08-03 07:18:36 -04:00
|
|
|
item2->Add(item3, 1, wxGROW|wxADJUST_MINSIZE, 5);
|
|
|
|
wxBoxSizer* item4 = new wxBoxSizer(wxVERTICAL);
|
|
|
|
item3->SetSizer(item4);
|
2004-08-03 10:39:09 -04:00
|
|
|
item3->SetAutoLayout(true);
|
2004-08-03 07:18:36 -04:00
|
|
|
wxString item5Strings[] = {
|
|
|
|
_("One"),
|
|
|
|
_("Two"),
|
|
|
|
_("Three")
|
|
|
|
};
|
|
|
|
wxChoice* item5 = new wxChoice( item3, ID_CHOICE, wxDefaultPosition, wxDefaultSize, 3, item5Strings, 0 );
|
|
|
|
item4->Add(item5, 0, wxGROW|wxALL, 5);
|
|
|
|
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 );
|
2004-08-03 10:39:09 -04:00
|
|
|
item7->SetValue(true);
|
2004-08-03 07:18:36 -04:00
|
|
|
item4->Add(item7, 0, wxALIGN_LEFT|wxALL, 5);
|
|
|
|
wxRadioButton* item8 = new wxRadioButton( item3, ID_RADIOBUTTON1, _("I hate it"), wxDefaultPosition, wxDefaultSize, 0 );
|
2004-08-03 10:39:09 -04:00
|
|
|
item8->SetValue(false);
|
2004-08-03 07:18:36 -04:00
|
|
|
item4->Add(item8, 0, wxALIGN_LEFT|wxALL, 5);
|
|
|
|
////@end FoldTestPanel content construction
|
|
|
|
}
|
|
|
|
|
2004-08-03 10:39:09 -04:00
|
|
|
void FoldTestPanel::OnCaptionPanel(wxCaptionBarEvent &WXUNUSED(event))
|
2004-08-03 07:18:36 -04:00
|
|
|
{
|
2004-08-03 10:39:09 -04:00
|
|
|
// TODO: What else
|
2004-08-03 07:18:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Should we show tooltips?
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool FoldTestPanel::ShowToolTips()
|
|
|
|
{
|
2004-08-03 10:39:09 -04:00
|
|
|
return true;
|
2004-08-03 07:18:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Get bitmap resources
|
|
|
|
*/
|
|
|
|
|
2004-08-03 10:39:09 -04:00
|
|
|
wxBitmap FoldTestPanel::GetBitmapResource( const wxString& WXUNUSED(name) )
|
2004-08-03 07:18:36 -04:00
|
|
|
{
|
|
|
|
// Bitmap retrieval
|
|
|
|
////@begin FoldTestPanel bitmap retrieval
|
|
|
|
return wxNullBitmap;
|
|
|
|
////@end FoldTestPanel bitmap retrieval
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Get icon resources
|
|
|
|
*/
|
|
|
|
|
2004-08-03 10:39:09 -04:00
|
|
|
wxIcon FoldTestPanel::GetIconResource( const wxString& WXUNUSED(name) )
|
2004-08-03 07:18:36 -04:00
|
|
|
{
|
|
|
|
// Icon retrieval
|
|
|
|
////@begin FoldTestPanel icon retrieval
|
|
|
|
return wxNullIcon;
|
|
|
|
////@end FoldTestPanel icon retrieval
|
|
|
|
}
|
|
|
|
|