// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by: Sebastian Haase (June 21, 2001)
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by: Sebastian Haase (June 21, 2001)
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
file_menu->Append( NEW_TEST_LOAD, _("&Load layouts") );
file_menu->Append( NEW_TEST_SAVE, _("&Store layouts") );
file_menu->Append( NEW_TEST_EXIT, _("E&xit") );
file_menu->Append( NEW_TEST_LOAD, _("&Load layouts") );
file_menu->Append( NEW_TEST_SAVE, _("&Store layouts") );
file_menu->Append( NEW_TEST_EXIT, _("E&xit") );
wxMessageBox(_("Hello, this demo has a bunch of yet-not-fixed-bugs and missing functionality\n\
The ONLY purpose is to demonstrate self-layouting toolbars,\nflat-bitmapped-buttons and 2-new FL-plugins \
(cbRowDragPlugin & cbBarHintsPlugin)\n\n\
BTW, disabled images and label-text are rendered at run-time") );
wxMessageBox(_("Hello, this demo has a bunch of yet-not-fixed-bugs and missing functionality\n\
The ONLY purpose is to demonstrate self-layouting toolbars,\nflat-bitmapped-buttons and 2-new FL-plugins \
(cbRowDragPlugin & cbBarHintsPlugin)\n\n\
BTW, disabled images and label-text are rendered at run-time") );
- wxTextCtrl* pCtrl =
-
- new wxTextCtrl( this, -1, value,
+ wxTextCtrl* pCtrl =
+
+ new wxTextCtrl( this, wxID_ANY, value,
wxDefaultPosition, wxSize(0,0), wxTE_MULTILINE );
wxDefaultPosition, wxSize(0,0), wxTE_MULTILINE );
- : wxFrame( frame, -1, _("wxWindows 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
- wxSize( 700, 500 ),
- wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
- wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
+ : wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
+ wxSize( 700, 500 ),
+ wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
#if defined(__WXGTK__) || defined(__WXX11__)
cbCommonPaneProperties props;
mpLayout->GetPaneProperties( props );
#if defined(__WXGTK__) || defined(__WXX11__)
cbCommonPaneProperties props;
mpLayout->GetPaneProperties( props );
// this is now default...
//mpLayout->SetMargins( 1,1,1,1 ); // gaps for vertical/horizontal/right/left panes
// this is now default...
//mpLayout->SetMargins( 1,1,1,1 ); // gaps for vertical/horizontal/right/left panes
mpLayout->AddPlugin( CLASSINFO( cbBarHintsPlugin ) ); // fancy "X"es and bevel for bars
mpLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbRowDragPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbAntiflickerPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbSimpleCustomizationPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbBarHintsPlugin ) ); // fancy "X"es and bevel for bars
mpLayout->AddPlugin( CLASSINFO( cbHintAnimationPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbRowDragPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbAntiflickerPlugin ) );
mpLayout->AddPlugin( CLASSINFO( cbSimpleCustomizationPlugin ) );
- cbDimInfo sizes0( 200,45, // when docked horizontally
- 200,85, // when docked vertically
- 175,35, // when floated
- FALSE, // the bar is not fixed-size
+ cbDimInfo sizes0( 200,45, // when docked horizontally
+ 200,85, // when docked vertically
+ 175,35, // when floated
+ false, // the bar is not fixed-size
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
- );
-
- cbDimInfo sizes1( 150,35, // when docked horizontally
- 150,85, // when docked vertically
- 175,35, // when floated
- TRUE, // the bar is not fixed-size
+ );
+
+ cbDimInfo sizes1( 150,35, // when docked horizontally
+ 150,85, // when docked vertically
+ 175,35, // when floated
+ true, // the bar is not fixed-size
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
- );
-
- cbDimInfo sizes2( 195,35, // when docked horizontally
- 185,37, // when docked vertically
- 195,35, // when floated
- TRUE, // the bar is not fixed-size
+ );
+
+ cbDimInfo sizes2( 195,35, // when docked horizontally
+ 185,37, // when docked vertically
+ 195,35, // when floated
+ true, // the bar is not fixed-size
4, // vertical gap (bar border)
4, // horizontal gap (bar border)
new cbDynToolBarDimHandler()
4, // vertical gap (bar border)
4, // horizontal gap (bar border)
new cbDynToolBarDimHandler()
mpLayout->AddBar( CreateTextCtrl(_("Hello")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("InfoViewer1"), // name to refer in customization pop-ups
mpLayout->AddBar( CreateTextCtrl(_("Hello")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("InfoViewer1"), // name to refer in customization pop-ups
mpLayout->AddBar( CreateTextCtrl(_("Bye")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
1, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("InfoViewer2"), // name to refer in customization pop-ups
mpLayout->AddBar( CreateTextCtrl(_("Bye")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
1, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("InfoViewer2"), // name to refer in customization pop-ups
mpLayout->AddBar( CreateTextCtrl(_("Fixed0")), // bar window
sizes1, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("ToolBar1"), // name to refer in customization pop-ups
mpLayout->AddBar( CreateTextCtrl(_("Fixed0")), // bar window
sizes1, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
_("ToolBar1"), // name to refer in customization pop-ups
// 1001-1006 ids of command events fired by added tool-buttons
pToolBar->AddTool( 1001, wxString(wxT(BMP_DIR)) + wxT("new.bmp") );
pToolBar->AddSeparator();
pToolBar->AddTool( 1002, wxString(wxT(BMP_DIR)) + wxT("open.bmp") );
pToolBar->AddTool( 1003, wxString(wxT(BMP_DIR)) + wxT("save.bmp") );
// 1001-1006 ids of command events fired by added tool-buttons
pToolBar->AddTool( 1001, wxString(wxT(BMP_DIR)) + wxT("new.bmp") );
pToolBar->AddSeparator();
pToolBar->AddTool( 1002, wxString(wxT(BMP_DIR)) + wxT("open.bmp") );
pToolBar->AddTool( 1003, wxString(wxT(BMP_DIR)) + wxT("save.bmp") );
pToolBar->AddTool( 1004, wxString(wxT(BMP_DIR)) + wxT("cut.bmp") );
pToolBar->AddTool( 1005, wxString(wxT(BMP_DIR)) + wxT("copy.bmp") );
pToolBar->AddTool( 1006, wxString(wxT(BMP_DIR)) + wxT("paste.bmp") );
pToolBar->AddTool( 1004, wxString(wxT(BMP_DIR)) + wxT("cut.bmp") );
pToolBar->AddTool( 1005, wxString(wxT(BMP_DIR)) + wxT("copy.bmp") );
pToolBar->AddTool( 1006, wxString(wxT(BMP_DIR)) + wxT("paste.bmp") );
mpLayout->AddBar( pToolBar, // bar window (can be NULL)
sizes2, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
wxT("ToolBar2"), // name to refer in customization pop-ups
mpLayout->AddBar( pToolBar, // bar window (can be NULL)
sizes2, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
wxT("ToolBar2"), // name to refer in customization pop-ups
wxStaticLine::DoSetSize(x, y, width, height, sizeFlags);
}
wxStaticLine::DoSetSize(x, y, width, height, sizeFlags);
}