diff --git a/contrib/docs/latex/fl/body.tex b/contrib/docs/latex/fl/body.tex
index a900fd7dda..e2cb8e4c09 100644
--- a/contrib/docs/latex/fl/body.tex
+++ b/contrib/docs/latex/fl/body.tex
@@ -1,3 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 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}}%
@@ -109,53 +120,53 @@ user interface as illustrated in \helpref{What is FL?}{whatisfl}.
#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)
@@ -163,7 +174,7 @@ MyFrame::MyFrame(wxFrame *frame)
"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)
@@ -171,7 +182,7 @@ MyFrame::MyFrame(wxFrame *frame)
"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)
@@ -179,21 +190,21 @@ MyFrame::MyFrame(wxFrame *frame)
"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)
@@ -201,13 +212,13 @@ MyFrame::MyFrame(wxFrame *frame)
"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}
@@ -256,4 +267,3 @@ through the underlaying panes, docking itself in and out in real time.
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.
-
diff --git a/contrib/samples/deprecated/resource/dialog1.wxr b/contrib/samples/deprecated/resource/dialog1.wxr
index 4a48e75a46..e94249bc36 100644
--- a/contrib/samples/deprecated/resource/dialog1.wxr
+++ b/contrib/samples/deprecated/resource/dialog1.wxr
@@ -1,5 +1,5 @@
static char *dialog1 = "dialog(name = 'dialog1',\
- style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\
+ style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\
title = 'Test dialog box',\
id = 100,\
x = 10, y = 10, width = 210, height = 145,\
diff --git a/contrib/samples/fl/fl_demo1.cpp b/contrib/samples/fl/fl_demo1.cpp
index a647597089..5b568334f9 100644
--- a/contrib/samples/fl/fl_demo1.cpp
+++ b/contrib/samples/fl/fl_demo1.cpp
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
+// Name: fl_demo1.cpp
// Purpose: Contrib. demo
// Author: Aleksandras Gluchovas
// Modified by: Sebastian Haase (June 21, 2001)
@@ -124,7 +124,7 @@ MyFrame::MyFrame(wxFrame *frame)
: wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
- wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") )
{
mpClientWnd = CreateTextCtrl( _("Client window") );
diff --git a/contrib/samples/fl/fl_sample1.cpp b/contrib/samples/fl/fl_sample1.cpp
index a9a95d0b16..aaa5ae945b 100644
--- a/contrib/samples/fl/fl_sample1.cpp
+++ b/contrib/samples/fl/fl_sample1.cpp
@@ -107,7 +107,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
- wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") )
{
mpInternalFrm = (wxPanel*)this;
@@ -195,4 +195,3 @@ void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
Close(true);
}
-
diff --git a/contrib/samples/fl/fl_sample2.cpp b/contrib/samples/fl/fl_sample2.cpp
index b682647cd6..74c4ede313 100644
--- a/contrib/samples/fl/fl_sample2.cpp
+++ b/contrib/samples/fl/fl_sample2.cpp
@@ -108,7 +108,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
- wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") )
{
}
@@ -193,4 +193,3 @@ void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
Close(true);
}
-
diff --git a/contrib/samples/fl/fl_sample3.cpp b/contrib/samples/fl/fl_sample3.cpp
index 904dcb6deb..60816e9503 100644
--- a/contrib/samples/fl/fl_sample3.cpp
+++ b/contrib/samples/fl/fl_sample3.cpp
@@ -113,7 +113,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
- wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
+ wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") )
{
@@ -336,4 +336,3 @@ void MyFrame::OnButt2( wxCommandEvent& WXUNUSED(event) )
}
i++;
}
-
diff --git a/contrib/samples/ogl/studio/studio_resources.wxr b/contrib/samples/ogl/studio/studio_resources.wxr
index 51c9521bd5..b5b240a20a 100644
--- a/contrib/samples/ogl/studio/studio_resources.wxr
+++ b/contrib/samples/ogl/studio/studio_resources.wxr
@@ -172,7 +172,7 @@ static char *triangle = "dialog(name = 'triangle',\
control = [5112, wxTextCtrl, '1', '0', 'textctrl2', 227, 213, 40, 19, '1']).";
static char *shape_label_dialog = "dialog(name = 'shape_label_dialog',\
- style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\
+ style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\
title = 'Edit Shape Label',\
id = 6008,\
x = 10, y = 10, width = 190, height = 60,\
diff --git a/contrib/src/deprecated/resource.cpp b/contrib/src/deprecated/resource.cpp
index b8836dd8af..c3ba599219 100644
--- a/contrib/src/deprecated/resource.cpp
+++ b/contrib/src/deprecated/resource.cpp
@@ -25,30 +25,28 @@
#endif // VC++
#ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/setup.h"
-#include "wx/list.h"
-#include "wx/hash.h"
-#include "wx/gdicmn.h"
-#include "wx/utils.h"
-#include "wx/types.h"
-#include "wx/menu.h"
-#include "wx/stattext.h"
-#include "wx/button.h"
-#include "wx/bmpbuttn.h"
-#include "wx/radiobox.h"
-#include "wx/listbox.h"
-#include "wx/choice.h"
-#include "wx/checkbox.h"
-#include "wx/settings.h"
-#include "wx/slider.h"
-#include "wx/icon.h"
-#include "wx/statbox.h"
-#include "wx/statbmp.h"
-#include "wx/gauge.h"
-#include "wx/textctrl.h"
-#include "wx/msgdlg.h"
-#include "wx/intl.h"
+ #include "wx/list.h"
+ #include "wx/hash.h"
+ #include "wx/gdicmn.h"
+ #include "wx/utils.h"
+ #include "wx/types.h"
+ #include "wx/menu.h"
+ #include "wx/stattext.h"
+ #include "wx/button.h"
+ #include "wx/bmpbuttn.h"
+ #include "wx/radiobox.h"
+ #include "wx/listbox.h"
+ #include "wx/choice.h"
+ #include "wx/checkbox.h"
+ #include "wx/settings.h"
+ #include "wx/slider.h"
+ #include "wx/icon.h"
+ #include "wx/statbox.h"
+ #include "wx/statbmp.h"
+ #include "wx/gauge.h"
+ #include "wx/textctrl.h"
+ #include "wx/msgdlg.h"
+ #include "wx/intl.h"
#endif
#include "wx/treebase.h"
@@ -708,6 +706,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
}
dialogItem->SetStyle(windowStyle);
dialogItem->SetValue1(isModal);
+
+#if WXWIN_COMPATIBILITY_2_6
+
#ifdef __VMS
#pragma message disable CODCAUUNR
#endif
@@ -717,6 +718,8 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
#pragma message enable CODCAUUNR
#endif
+#endif // WXWIN_COMPATIBILITY_2_6
+
dialogItem->SetName(name);
dialogItem->SetTitle(title);
dialogItem->SetSize(x, y, width, height);
@@ -2199,8 +2202,10 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxTB_VERTICAL"), wxTB_VERTICAL},
{ wxT("wxTB_FLAT"), wxTB_FLAT},
+#if WXWIN_COMPATIBILITY_2_6
/* wxDialog */
{ wxT("wxDIALOG_MODAL"), wxDIALOG_MODAL },
+#endif // WXWIN_COMPATIBILITY_2_6
/* Generic */
{ wxT("wxVSCROLL"), wxVSCROLL },
@@ -2213,7 +2218,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxSDI"), 0},
{ wxT("wxMDI_PARENT"), 0},
{ wxT("wxMDI_CHILD"), 0},
- { wxT("wxTHICK_FRAME"), wxTHICK_FRAME},
+ { wxT("wxTHICK_FRAME"), wxRESIZE_BORDER},
{ wxT("wxRESIZE_BORDER"), wxRESIZE_BORDER},
{ wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU},
{ wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX},
@@ -2320,7 +2325,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxICON_MASK"), wxICON_MASK},
{ wxT("wxCENTRE"), wxCENTRE},
{ wxT("wxCENTER"), wxCENTRE},
+#if WXWIN_COMPATIBILITY_2_6
{ wxT("wxUSER_COLOURS"), wxUSER_COLOURS},
+#endif // WXWIN_COMPATIBILITY_2_6
{ wxT("wxVERTICAL_LABEL"), 0},
{ wxT("wxHORIZONTAL_LABEL"), 0},
@@ -3201,7 +3208,13 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
if (thisWindow->IsKindOf(CLASSINFO(wxDialog)))
{
wxDialog *dialogBox = (wxDialog *)thisWindow;
- long modalStyle = isModal ? wxDIALOG_MODAL : 0;
+ long modalStyle = isModal ?
+#if WXWIN_COMPATIBILITY_2_6
+ wxDIALOG_MODAL
+#else
+ 0
+#endif // WXWIN_COMPATIBILITY_2_6
+ : 0;
if (!dialogBox->Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
return false;
diff --git a/contrib/utils/convertrc/rc2wxr.cpp b/contrib/utils/convertrc/rc2wxr.cpp
index 4860f849c5..4a44fb84c8 100644
--- a/contrib/utils/convertrc/rc2wxr.cpp
+++ b/contrib/utils/convertrc/rc2wxr.cpp
@@ -153,7 +153,7 @@ wxFprintf(m_wxr,_T("static char *dialog%i = \"dialog(name = '%s',\\\n"),dlgid,dl
//be lazy about style for now. add it later
-wxFprintf(m_wxr,_T("style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\\\n"));
+wxFprintf(m_wxr,_T("style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\\\n"));
wxFprintf(m_wxr,_T("id = %i,\\\n"),dlgid);
//Record x,y,width,height
@@ -795,4 +795,3 @@ void rc2wxr::ParseCtrlButton(wxString label, wxString varname)
wxFprintf(m_wxr,_T("[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"));
}
}
-
diff --git a/contrib/utils/convertrc/wxr2xml.cpp b/contrib/utils/convertrc/wxr2xml.cpp
index cb5ecc7b3c..ff46932f3b 100644
--- a/contrib/utils/convertrc/wxr2xml.cpp
+++ b/contrib/utils/convertrc/wxr2xml.cpp
@@ -404,14 +404,16 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
if (restype == _T("wxDialog"))
{
- if (style & wxDIALOG_MODAL)
- s += _T("wxDIALOG_MODAL|");
if (style & wxDEFAULT_DIALOG_STYLE)
s += _T("wxDEFAULT_DIALOG_STYLE|");
+#if WXWIN_COMPATIBILITY_2_6
+ if (style & wxDIALOG_MODAL)
+ s += _T("wxDIALOG_MODAL|");
if (style & wxDIALOG_MODELESS)
s += _T("wxDIALOG_MODELESS|");
if (style & wxNO_3D)
s += _T("wxNO_3D|");
+#endif // WXWIN_COMPATIBILITY_2_6
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
@@ -420,8 +422,8 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
s += _T("wxSTAY_ON_TOP|");
if (style & wxCAPTION)
s += _T("wxCAPTION|");
- if (style & wxTHICK_FRAME)
- s += _T("wxTHICK_FRAME|");
+ if (style & wxRESIZE_BORDER)
+ s += _T("wxRESIZE_BORDER|");
if (style & wxRESIZE_BOX)
s += _T("wxRESIZE_BOX|");
if (style & wxRESIZE_BORDER)
@@ -436,8 +438,10 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
{
if (style & wxCLIP_CHILDREN)
s += _T("wxCLIP_CHILDREN|");
+#if WXWIN_COMPATIBILITY_2_6
if (style & wxNO_3D)
s += _T("wxNO_3D|");
+#endif // WXWIN_COMPATIBILITY_2_6
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
@@ -536,11 +540,10 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
s += _T("wxSB_VERTICAL|");
}
- int l;
- l = s.Length();
+ int l = s.length();
// No styles defined
if (l == 11)
- return _T("");
+ return wxEmptyString;
// Trim off last |
s = s.Truncate(l - 1);
@@ -603,7 +606,7 @@ void wxr2xml::ParseMenu(wxItemResource * res)
m_xmlfile.Write(_T(">\n"));
m_xmlfile.Write(_T("\t\t\t\t\n"));
- if (res->GetValue4() != _T(""))
+ if (!res->GetValue4().empty())
m_xmlfile.Write(_T("\t\t\t\t") + res->GetValue4() +
_T("\n"));
// Read in menu items and additional menus
@@ -621,7 +624,7 @@ void wxr2xml::ParseMenu(wxItemResource * res)
void wxr2xml::ParseMenuItem(wxItemResource * res)
{
// Get Menu Item or Separator
- if (res->GetTitle() == _T("")) {
+ if (res->GetTitle().empty()) {
m_xmlfile.Write(_T("\t\t\t