+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: body.tex
+%% Purpose: FL documenation
+%% Author: wxWidgets Team
+%% Modified by:
+%% Created:
+%% RCS-ID: $Id$
+%% Copyright: (c) wxWidgets Team
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\chapter{Introduction}\label{introduction}
\pagenumbering{arabic}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
Other features: the splitter bar shows a dotted thick line as
it's dragged. Single-clicking on a row handle minimizes it to
a horizontal tab which is given its own narrow row. This allows
-the user to temporarily hide a row whilst allowing quick access
+the user to temporarily hide a row while allowing quick access
to it when required.
A close button (x) hides a bar completely. You can get it back again
#include "wx/fl/dyntbarhnd.h" // control-bar dimension handler for it
MyFrame::MyFrame(wxFrame *frame)
- : 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, "wxWindows 2.0 wxFrameLayout Test Application", wxDefaultPosition,
+ wxSize( 700, 500 ),
+ wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION,
"freimas" )
{
mpClientWnd = CreateTextCtrl( "Client window" );
-
+
mpLayout = new wxFrameLayout( this, mpClientWnd );
-
+
mpLayout->SetUpdatesManager( new cbGCUpdatesMgr() );
-
+
// setup plugins for testing
mpLayout->PushDefaultPlugins();
-
+
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 ) );
-
+
// drop in some bars
- cbDimInfo sizes0( 200,45, // when docked horizontally
- 200,85, // when docked vertically
- 175,35, // when floated
+ 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)
- );
-
- cbDimInfo sizes1( 150,35, // when docked horizontally
- 150,85, // when docked vertically
- 175,35, // when floated
+ );
+
+ 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)
- );
-
- cbDimInfo sizes2( 175,45, // when docked horizontally
- 175,37, // when docked vertically
- 170,35, // when floated
+ );
+
+ cbDimInfo sizes2( 175,45, // when docked horizontally
+ 175,37, // when docked vertically
+ 170,35, // when floated
TRUE, // the bar is not fixed-size
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)
"InfoViewer1", // name for reference in customization pop-ups
TRUE
);
-
+
mpLayout->AddBar( CreateTextCtrl("Bye"), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
1, // insert into 0th row (vert. position)
"InfoViewer2", // name for reference in customization pop-ups
TRUE
);
-
+
mpLayout->AddBar( CreateTextCtrl("Fixed0"), // bar window
sizes1, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
"ToolBar1", // name for reference in customization pop-ups
TRUE
);
-
+
wxDynamicToolBar* pToolBar = new wxDynamicToolBar();
-
+
pToolBar->Create( this, -1 );
-
+
// 1001-1006 ids of command events fired by added tool-buttons
-
+
pToolBar->AddTool( 1001, BMP_DIR "new.bmp" );
pToolBar->AddTool( 1002, BMP_DIR "open.bmp" );
pToolBar->AddTool( 1003, BMP_DIR "save.bmp" );
-
+
pToolBar->AddTool( 1004, BMP_DIR "cut.bmp" );
pToolBar->AddTool( 1005, BMP_DIR "copy.bmp" );
- pToolBar->AddTool( 1006, BMP_DIR "paste.bmp" );
-
+ pToolBar->AddTool( 1006, BMP_DIR "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)
"ToolBar2", // name for reference in customization pop-ups
FALSE
);
-
+
mpLayout->EnableFloating( TRUE ); // off, thinking about wxGtk...
}
MyFrame::~MyFrame()
{
- if ( mpLayout)
+ if ( mpLayout)
delete mpLayout; // should be destroyed manually
}
\end{verbatim}
Otherwise the stationary bars would be pushed around messing up the composition permanently.
This flag is irelevant when {\it mRealTimeUpdatesOn} is FALSE, as the ghost-rect
does not do any docking until the drag finishes.
-