Removed every usage of obsolete wxTLW flags. 2.6 compatibility markup for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ed177375b2
commit
1c067fe3c1
@ -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.
|
||||
|
||||
|
@ -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,\
|
||||
|
@ -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") );
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
|
||||
|
@ -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,\
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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<label>")
|
||||
+ FixMenuString(res->GetTitle()) + _T("</label>\n"));
|
||||
if (res->GetValue4() != _T(""))
|
||||
if (!res->GetValue4().empty())
|
||||
m_xmlfile.Write(_T("\t\t\t\t<help>") + res->GetValue4() +
|
||||
_T("</help>\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<object class=\"separator\"/>\n"));
|
||||
} else {
|
||||
m_xmlfile.Write(_T("\t\t\t\t<object class=\"wxMenuItem\" "));
|
||||
@ -631,7 +634,7 @@ void wxr2xml::ParseMenuItem(wxItemResource * res)
|
||||
m_xmlfile.Write(_T(">\n"));
|
||||
m_xmlfile.Write(_T("\t\t\t<label>")
|
||||
+ FixMenuString(res->GetTitle()) + _T("</label>\n"));
|
||||
if (res->GetValue4() != _T(""))
|
||||
if (!res->GetValue4().empty())
|
||||
m_xmlfile.Write(_T("\t\t\t<help>") +
|
||||
res->GetValue4() + _T("</help>\n"));
|
||||
if (res->GetValue2())
|
||||
|
@ -1,3 +1,14 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: tstyles.tex
|
||||
%% Purpose: Window styles documenation
|
||||
%% Author: wxWidgets Team
|
||||
%% Modified by:
|
||||
%% Created:
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) wxWidgets Team
|
||||
%% License: wxWindows license
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{Window styles}\label{windowstyles}
|
||||
|
||||
Window styles are used to specify alternative behaviour and appearances for windows, when they are
|
||||
@ -5,10 +16,9 @@ created. The symbols are defined in such a way that they can be combined in a `b
|
||||
C++ {\it bitwise-or} operator. For example:
|
||||
|
||||
\begin{verbatim}
|
||||
wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME
|
||||
wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER
|
||||
\end{verbatim}
|
||||
|
||||
For the window styles specific to each window class, please see the documentation
|
||||
for the window. Most windows can use the generic styles listed for \helpref{wxWindow}{wxwindow} in
|
||||
addition to their own styles.
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2002/12/15
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: David Elliott
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -33,18 +33,19 @@ class WXDLLEXPORT wxDialog : public wxDialogBase, protected wxCocoaNSPanel
|
||||
public:
|
||||
wxDialog() { Init(); }
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// Constructor with a modal flag, but no window id - the old convention
|
||||
wxDialog(wxWindow *parent,
|
||||
const wxString& title, bool modal,
|
||||
int x = -1, int y= -1, int width = 500, int height = 500,
|
||||
const wxString& title, bool WXUNUSED(modal),
|
||||
int x = wxDefaultCoord, int y= wxDefaultCoord, int width = 500, int height = 500,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString& name = wxDialogNameStr)
|
||||
{
|
||||
Init();
|
||||
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
|
||||
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height),
|
||||
style | modalStyle, name);
|
||||
Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height),
|
||||
style, name);
|
||||
}
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
wxDialog(wxWindow *parent, wxWindowID winid,
|
||||
@ -87,7 +88,7 @@ public:
|
||||
virtual bool IsModal() const { return m_isModal; }
|
||||
bool m_isModal;
|
||||
|
||||
// For now, same as Show(TRUE) but returns return code
|
||||
// For now, same as Show(true) but returns return code
|
||||
virtual int ShowModal();
|
||||
|
||||
// may be called to terminate the dialog with the given return code
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dialog.h
|
||||
// Name: wx/motif/dialog.h
|
||||
// Purpose: wxDialog class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -22,7 +22,6 @@ class WXDLLEXPORT wxDialog : public wxDialogBase
|
||||
public:
|
||||
wxDialog();
|
||||
|
||||
// Constructor with no modal flag - the new convention.
|
||||
wxDialog(wxWindow *parent, wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@ -51,7 +50,7 @@ public:
|
||||
void SetModal(bool flag);
|
||||
|
||||
virtual bool IsModal() const
|
||||
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
{ return m_modalShowing; }
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal(int retCode);
|
||||
|
@ -44,15 +44,19 @@ class WXDLLEXPORT wxTopLevelWindowBase;
|
||||
#define wxTINY_CAPTION_VERT 0x0080
|
||||
#define wxRESIZE_BORDER 0x0040
|
||||
|
||||
// deprecated versions defined for compatibility reasons
|
||||
#define wxRESIZE_BOX wxMAXIMIZE_BOX
|
||||
#define wxTHICK_FRAME wxRESIZE_BORDER
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
// obsolete styles, unused any more
|
||||
#define wxDIALOG_MODAL 0
|
||||
#define wxDIALOG_MODELESS 0
|
||||
#define wxNO_3D 0
|
||||
#define wxUSER_COLOURS 0
|
||||
// deprecated versions defined for compatibility reasons
|
||||
#define wxRESIZE_BOX wxMAXIMIZE_BOX
|
||||
#define wxTHICK_FRAME wxRESIZE_BORDER
|
||||
|
||||
// obsolete styles, unused any more
|
||||
#define wxDIALOG_MODAL 0
|
||||
#define wxDIALOG_MODELESS 0
|
||||
#define wxNO_3D 0
|
||||
#define wxUSER_COLOURS 0
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
// default style
|
||||
//
|
||||
|
@ -984,7 +984,7 @@ DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int
|
||||
wxLB_HSCROLL | wxLB_ALWAYS_SB );
|
||||
|
||||
#if wxUSE_LOG
|
||||
m_ctrlLog = new wxTextCtrl(this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
|
||||
m_ctrlLog = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxTE_READONLY |
|
||||
wxSUNKEN_BORDER );
|
||||
|
||||
@ -1160,7 +1160,7 @@ void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
|
||||
void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
|
||||
{
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
if ( !m_strText.IsEmpty() )
|
||||
if ( !m_strText.empty() )
|
||||
{
|
||||
// start drag operation
|
||||
wxTextDataObject textData(m_strText);
|
||||
@ -1231,9 +1231,9 @@ void DnDFrame::OnCopyBitmap(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
// PNG support is not always compiled in under Windows, so use BMP there
|
||||
#if wxUSE_LIBPNG
|
||||
wxFileDialog dialog(this, _T("Open a PNG file"), _T(""), _T(""), _T("PNG files (*.png)|*.png"), 0);
|
||||
wxFileDialog dialog(this, _T("Open a PNG file"), wxEmptyString, wxEmptyString, _T("PNG files (*.png)|*.png"), 0);
|
||||
#else
|
||||
wxFileDialog dialog(this, _T("Open a BMP file"), _T(""), _T(""), _T("BMP files (*.bmp)|*.bmp"), 0);
|
||||
wxFileDialog dialog(this, _T("Open a BMP file"), wxEmptyString, wxEmptyString, _T("BMP files (*.bmp)|*.bmp"), 0);
|
||||
#endif
|
||||
|
||||
if (dialog.ShowModal() != wxID_OK)
|
||||
@ -1242,7 +1242,7 @@ void DnDFrame::OnCopyBitmap(wxCommandEvent& WXUNUSED(event))
|
||||
return;
|
||||
}
|
||||
|
||||
if (dialog.GetPath().IsEmpty())
|
||||
if (dialog.GetPath().empty())
|
||||
{
|
||||
wxLogMessage( _T("Returned empty string.") );
|
||||
return;
|
||||
@ -1375,7 +1375,7 @@ void DnDFrame::OnPasteMetafile(wxCommandEvent& WXUNUSED(event))
|
||||
void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
wxFileDialog dialog(this, _T("Select a file to copy"), _T(""), _T(""),
|
||||
wxFileDialog dialog(this, _T("Select a file to copy"), wxEmptyString, wxEmptyString,
|
||||
_T("All files (*.*)|*.*"), 0);
|
||||
|
||||
wxArrayString filenames;
|
||||
@ -1407,7 +1407,7 @@ void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
|
||||
else
|
||||
{
|
||||
wxLogStatus(this, wxT("%d file%s copied to the clipboard"),
|
||||
count, count == 1 ? wxT("") : wxT("s"));
|
||||
count, count == 1 ? wxEmptyString : wxEmptyString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1509,7 +1509,7 @@ bool DnDFile::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames)
|
||||
DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
|
||||
:wxDialog( parent, 6001, wxT("Choose Shape"), wxPoint( 10, 10 ),
|
||||
wxSize( 40, 40 ),
|
||||
wxDEFAULT_DIALOG_STYLE | wxRAISED_BORDER | wxTHICK_FRAME )
|
||||
wxDEFAULT_DIALOG_STYLE | wxRAISED_BORDER | wxRESIZE_BORDER )
|
||||
{
|
||||
m_shape = shape;
|
||||
wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -80,16 +80,6 @@ events. Windows only.
|
||||
</TD></TR>
|
||||
|
||||
|
||||
<TR><TD VALIGN=TOP>
|
||||
<B>wxNO_3D</B>
|
||||
</TD>
|
||||
|
||||
<TD VALIGN=TOP>
|
||||
Prevents the children of this window taking on 3D styles, even though
|
||||
the application-wide policy is for 3D controls. Windows only.
|
||||
</TD></TR>
|
||||
|
||||
|
||||
<TR><TD VALIGN=TOP>
|
||||
<B>wxTAB_TRAVERSAL</B>
|
||||
</TD>
|
||||
|
@ -39,7 +39,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
|
||||
: wxFrame(parent, wxID_ANY, wxT("Busy"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
#if defined(__WXX11__)
|
||||
wxTHICK_FRAME
|
||||
wxRESIZE_BORDER
|
||||
#else
|
||||
wxSIMPLE_BORDER
|
||||
#endif
|
||||
|
@ -296,7 +296,7 @@ wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt)
|
||||
dbgrpt.GetReportName().c_str()),
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxTHICK_FRAME),
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
||||
m_dbgrpt(dbgrpt)
|
||||
{
|
||||
// upper part of the dialog: explanatory message
|
||||
|
@ -83,7 +83,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
|
||||
long style,
|
||||
const wxPoint& pos)
|
||||
: wxDialog(parent, wxID_ANY, caption, pos, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL),
|
||||
wxDEFAULT_DIALOG_STYLE),
|
||||
m_value(value)
|
||||
{
|
||||
m_dialogStyle = style;
|
||||
|
@ -69,12 +69,12 @@ extern wxList wxPendingDelete;
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow)
|
||||
EVT_BUTTON(wxID_OK, wxDialog::OnOK)
|
||||
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
|
||||
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
|
||||
EVT_CHAR_HOOK(wxDialog::OnCharHook)
|
||||
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
|
||||
EVT_CLOSE(wxDialog::OnCloseWindow)
|
||||
EVT_BUTTON(wxID_OK, wxDialog::OnOK)
|
||||
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
|
||||
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
|
||||
EVT_CHAR_HOOK(wxDialog::OnCharHook)
|
||||
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
|
||||
EVT_CLOSE(wxDialog::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
@ -319,8 +319,6 @@ bool wxDialog::Show( bool show )
|
||||
// Shows a dialog modally, returning a return code
|
||||
int wxDialog::ShowModal()
|
||||
{
|
||||
m_windowStyle |= wxDIALOG_MODAL;
|
||||
|
||||
Show(true);
|
||||
|
||||
// after the event loop ran, the widget might already have been destroyed
|
||||
|
@ -154,7 +154,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
||||
( m_windowStyle & wxTINY_CAPTION_HORIZ ) ||
|
||||
( m_windowStyle & wxTINY_CAPTION_VERT ) )
|
||||
decor |= MWM_DECOR_TITLE;
|
||||
if( m_windowStyle & wxTHICK_FRAME )
|
||||
if( m_windowStyle & wxRESIZE_BORDER )
|
||||
decor |= MWM_DECOR_BORDER;
|
||||
if( m_windowStyle & wxMINIMIZE_BOX )
|
||||
decor |= MWM_DECOR_MINIMIZE;
|
||||
@ -423,4 +423,3 @@ void wxTLWEventHandler( Widget wid,
|
||||
|
||||
*continueToDispatch = True;
|
||||
}
|
||||
|
||||
|
@ -83,10 +83,14 @@ wxBEGIN_FLAGS( wxDialogStyle )
|
||||
wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY)
|
||||
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
|
||||
wxFLAGS_MEMBER(wxCAPTION)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxTHICK_FRAME)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxSYSTEM_MENU)
|
||||
wxFLAGS_MEMBER(wxRESIZE_BORDER)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxRESIZE_BOX)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxCLOSE_BOX)
|
||||
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
|
||||
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
|
||||
@ -604,4 +608,3 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -115,10 +115,14 @@ wxBEGIN_FLAGS( wxFrameStyle )
|
||||
// frame styles
|
||||
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
|
||||
wxFLAGS_MEMBER(wxCAPTION)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxTHICK_FRAME)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxSYSTEM_MENU)
|
||||
wxFLAGS_MEMBER(wxRESIZE_BORDER)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxRESIZE_BOX)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxCLOSE_BOX)
|
||||
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
|
||||
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
|
||||
|
@ -752,7 +752,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
||||
msflags |= WS_MINIMIZEBOX;
|
||||
if (style & wxMAXIMIZE_BOX)
|
||||
msflags |= WS_MAXIMIZEBOX;
|
||||
if (style & wxTHICK_FRAME)
|
||||
if (style & wxRESIZE_BORDER)
|
||||
msflags |= WS_THICKFRAME;
|
||||
if (style & wxSYSTEM_MENU)
|
||||
msflags |= WS_SYSMENU;
|
||||
|
@ -2043,73 +2043,33 @@ void wxDC::SetBrush(
|
||||
}
|
||||
} // end of wxDC::SetBrush
|
||||
|
||||
void wxDC::SetBackground(
|
||||
const wxBrush& rBrush
|
||||
)
|
||||
void wxDC::SetBackground(const wxBrush& rBrush)
|
||||
{
|
||||
m_backgroundBrush = rBrush;
|
||||
if (!m_backgroundBrush.Ok())
|
||||
return;
|
||||
if (m_pCanvas)
|
||||
{
|
||||
bool bCustomColours = true;
|
||||
|
||||
//
|
||||
// If we haven't specified wxUSER_COLOURS, don't allow the panel/dialog box to
|
||||
// change background colours from the control-panel specified colours.
|
||||
//
|
||||
if (m_pCanvas->IsKindOf(CLASSINFO(wxWindow)) &&
|
||||
((m_pCanvas->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS))
|
||||
bCustomColours = false;
|
||||
if (bCustomColours)
|
||||
{
|
||||
if (m_backgroundBrush.GetStyle()==wxTRANSPARENT)
|
||||
{
|
||||
m_pCanvas->SetTransparent(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Setting the background brush of a DC
|
||||
// doesn't affect the window background colour. However,
|
||||
// I'm leaving in the transparency setting because it's needed by
|
||||
// various controls (e.g. wxStaticText) to determine whether to draw
|
||||
// transparently or not. TODO: maybe this should be a new function
|
||||
// wxWindow::SetTransparency(). Should that apply to the child itself, or the
|
||||
// parent?
|
||||
// m_canvas->SetBackgroundColour(m_backgroundBrush.GetColour());
|
||||
//
|
||||
m_pCanvas->SetTransparent(false);
|
||||
}
|
||||
}
|
||||
if (m_backgroundBrush.Ok())
|
||||
{
|
||||
(void)::GpiSetBackColor((HPS)m_hPS, m_backgroundBrush.GetColour().GetPixel());
|
||||
}
|
||||
COLORREF vNewColor = m_backgroundBrush.GetColour().GetPixel();
|
||||
(void)::GpiSetBackColor((HPS)m_hPS, (LONG)vNewColor);
|
||||
} // end of wxDC::SetBackground
|
||||
|
||||
void wxDC::SetBackgroundMode(
|
||||
int nMode
|
||||
)
|
||||
void wxDC::SetBackgroundMode(int nMode)
|
||||
{
|
||||
m_backgroundMode = nMode;
|
||||
} // end of wxDC::SetBackgroundMode
|
||||
|
||||
void wxDC::SetLogicalFunction(
|
||||
int nFunction
|
||||
)
|
||||
void wxDC::SetLogicalFunction(int nFunction)
|
||||
{
|
||||
m_logicalFunction = nFunction;
|
||||
SetRop((WXHDC)m_hDC);
|
||||
} // wxDC::SetLogicalFunction
|
||||
|
||||
void wxDC::SetRop(
|
||||
WXHDC hDC
|
||||
)
|
||||
void wxDC::SetRop(WXHDC hDC)
|
||||
{
|
||||
if (!hDC || m_logicalFunction < 0)
|
||||
return;
|
||||
|
||||
LONG lCRop;
|
||||
LONG lCRop;
|
||||
switch (m_logicalFunction)
|
||||
{
|
||||
case wxXOR:
|
||||
|
@ -234,7 +234,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
|
||||
lMsflags |= FCF_MINBUTTON;
|
||||
if (lStyle & wxMAXIMIZE_BOX)
|
||||
lMsflags |= FCF_MAXBUTTON;
|
||||
if (lStyle & wxTHICK_FRAME)
|
||||
if (lStyle & wxRESIZE_BORDER)
|
||||
lMsflags |= FCF_DLGBORDER;
|
||||
if (lStyle & wxSYSTEM_MENU)
|
||||
lMsflags |= FCF_SYSMENU;
|
||||
@ -250,7 +250,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
|
||||
if (lStyle & wxTINY_CAPTION_HORIZ)
|
||||
lMsflags |= FCF_TASKLIST;
|
||||
|
||||
if ((lStyle & wxTHICK_FRAME) == 0)
|
||||
if ((lStyle & wxRESIZE_BORDER) == 0)
|
||||
lMsflags |= FCF_BORDER;
|
||||
if (lStyle & wxFRAME_TOOL_WINDOW)
|
||||
*pdwExflags = kFrameToolWindow;
|
||||
|
@ -71,10 +71,14 @@ wxBEGIN_FLAGS( wxDialogStyle )
|
||||
wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY)
|
||||
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
|
||||
wxFLAGS_MEMBER(wxCAPTION)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxTHICK_FRAME)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxSYSTEM_MENU)
|
||||
wxFLAGS_MEMBER(wxRESIZE_BORDER)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxRESIZE_BOX)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxCLOSE_BOX)
|
||||
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
|
||||
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
|
||||
|
@ -106,10 +106,14 @@ wxBEGIN_FLAGS( wxFrameStyle )
|
||||
// frame styles
|
||||
wxFLAGS_MEMBER(wxSTAY_ON_TOP)
|
||||
wxFLAGS_MEMBER(wxCAPTION)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxTHICK_FRAME)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxSYSTEM_MENU)
|
||||
wxFLAGS_MEMBER(wxRESIZE_BORDER)
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxRESIZE_BOX)
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
wxFLAGS_MEMBER(wxCLOSE_BOX)
|
||||
wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
|
||||
wxFLAGS_MEMBER(wxMINIMIZE_BOX)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: topluniv.cpp
|
||||
// Name: src/univ/topluniv.cpp
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
||||
@ -21,8 +21,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/settings.h"
|
||||
@ -76,8 +74,8 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
|
||||
|
||||
if ( ms_drawDecorations == -1 )
|
||||
{
|
||||
ms_drawDecorations =
|
||||
!wxSystemSettings::HasFeature(wxSYS_CAN_DRAW_FRAME_DECORATIONS)
|
||||
ms_drawDecorations =
|
||||
!wxSystemSettings::HasFeature(wxSYS_CAN_DRAW_FRAME_DECORATIONS)
|
||||
|| wxGetEnv(wxT("WXDECOR"), NULL);
|
||||
// FIXME -- wxUniv should provide a way to force non-native decorations!
|
||||
// $WXDECOR is just a hack in absence of better wxUniv solution
|
||||
@ -96,7 +94,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
|
||||
exstyleOrig = GetExtraStyle();
|
||||
style &= ~(wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
|
||||
wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW |
|
||||
wxTHICK_FRAME);
|
||||
wxRESIZE_BORDER);
|
||||
style |= wxSIMPLE_BORDER;
|
||||
SetExtraStyle(exstyleOrig &
|
||||
~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP));
|
||||
@ -161,7 +159,7 @@ long wxTopLevelWindow::GetDecorationsStyle() const
|
||||
}
|
||||
if ( (m_windowStyle & (wxSIMPLE_BORDER | wxNO_BORDER)) == 0 )
|
||||
style |= wxTOPLEVEL_BORDER;
|
||||
if ( m_windowStyle & (wxRESIZE_BORDER | wxTHICK_FRAME) )
|
||||
if ( m_windowStyle & (wxRESIZE_BORDER | wxRESIZE_BORDER) )
|
||||
style |= wxTOPLEVEL_RESIZEABLE;
|
||||
|
||||
if ( IsMaximized() )
|
||||
@ -350,14 +348,10 @@ static bool wxGetResizingCursor(long hitTestResult, wxCursor& cursor)
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
#if 0
|
||||
// not rachable due to earlier return
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -381,7 +375,7 @@ class wxInteractiveMoveHandler : public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
wxInteractiveMoveHandler(wxInteractiveMoveData& data) : m_data(data) {}
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
void OnMouseMove(wxMouseEvent& event);
|
||||
@ -400,7 +394,7 @@ BEGIN_EVENT_TABLE(wxInteractiveMoveHandler, wxEvtHandler)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
static inline LINKAGEMODE
|
||||
static inline LINKAGEMODE
|
||||
void wxApplyResize(wxInteractiveMoveData& data, const wxPoint& diff)
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_W )
|
||||
@ -421,7 +415,7 @@ void wxApplyResize(wxInteractiveMoveData& data, const wxPoint& diff)
|
||||
{
|
||||
data.m_rect.height += diff.y;
|
||||
}
|
||||
|
||||
|
||||
if ( data.m_minSize.x != wxDefaultCoord && data.m_rect.width < data.m_minSize.x )
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_W )
|
||||
@ -481,7 +475,7 @@ void wxInteractiveMoveHandler::OnMouseDown(wxMouseEvent& WXUNUSED(event))
|
||||
void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
wxPoint diff(wxDefaultCoord,wxDefaultCoord);
|
||||
|
||||
|
||||
switch ( event.GetKeyCode() )
|
||||
{
|
||||
case WXK_UP: diff = wxPoint(0, -16); break;
|
||||
@ -496,7 +490,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
m_data.m_evtLoop->Exit();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( diff.x != wxDefaultCoord )
|
||||
{
|
||||
if ( m_data.m_flags & wxINTERACTIVE_WAIT_FOR_INPUT )
|
||||
@ -510,14 +504,14 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
|
||||
if ( m_data.m_flags & wxINTERACTIVE_MOVE )
|
||||
{
|
||||
m_data.m_pos = m_data.m_window->GetPosition() +
|
||||
m_data.m_pos = m_data.m_window->GetPosition() +
|
||||
wxPoint(m_data.m_window->GetSize().x/2, 8);
|
||||
}
|
||||
}
|
||||
|
||||
wxPoint warp;
|
||||
bool changeCur = false;
|
||||
|
||||
|
||||
if ( m_data.m_flags & wxINTERACTIVE_MOVE )
|
||||
{
|
||||
m_data.m_rect.Offset(diff);
|
||||
@ -526,7 +520,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
}
|
||||
else /* wxINTERACTIVE_RESIZE */
|
||||
{
|
||||
if ( !(m_data.m_flags &
|
||||
if ( !(m_data.m_flags &
|
||||
(wxINTERACTIVE_RESIZE_N | wxINTERACTIVE_RESIZE_S)) )
|
||||
{
|
||||
if ( diff.y < 0 )
|
||||
@ -543,7 +537,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
changeCur = true;
|
||||
}
|
||||
}
|
||||
if ( !(m_data.m_flags &
|
||||
if ( !(m_data.m_flags &
|
||||
(wxINTERACTIVE_RESIZE_W | wxINTERACTIVE_RESIZE_E)) )
|
||||
{
|
||||
if ( diff.x < 0 )
|
||||
@ -608,17 +602,17 @@ void wxTopLevelWindow::InteractiveMove(int flags)
|
||||
wxASSERT_MSG( !((flags & wxINTERACTIVE_MOVE) && (flags & wxINTERACTIVE_RESIZE)),
|
||||
wxT("can't move and resize window at the same time") );
|
||||
|
||||
wxASSERT_MSG( !(flags & wxINTERACTIVE_RESIZE) ||
|
||||
(flags & wxINTERACTIVE_WAIT_FOR_INPUT) ||
|
||||
wxASSERT_MSG( !(flags & wxINTERACTIVE_RESIZE) ||
|
||||
(flags & wxINTERACTIVE_WAIT_FOR_INPUT) ||
|
||||
(flags & wxINTERACTIVE_RESIZE_DIR),
|
||||
wxT("direction of resizing not specified") );
|
||||
|
||||
wxInteractiveMoveData data;
|
||||
wxEventLoop loop;
|
||||
|
||||
|
||||
SetFocus();
|
||||
|
||||
#ifndef __WXGTK__
|
||||
#ifndef __WXGTK__
|
||||
if ( flags & wxINTERACTIVE_WAIT_FOR_INPUT )
|
||||
{
|
||||
wxCursor sizingCursor(wxCURSOR_SIZING);
|
||||
@ -754,7 +748,7 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action,
|
||||
void wxTopLevelWindow::OnSystemMenu(wxCommandEvent& event)
|
||||
{
|
||||
bool ret = true;
|
||||
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
case wxID_CLOSE_FRAME:
|
||||
@ -783,7 +777,7 @@ void wxTopLevelWindow::OnSystemMenu(wxCommandEvent& event)
|
||||
default:
|
||||
ret = false;
|
||||
}
|
||||
|
||||
|
||||
if ( !ret )
|
||||
event.Skip();
|
||||
}
|
||||
|
@ -696,10 +696,10 @@ bool wxSetWMDecorations(Window w, long style)
|
||||
// The default dialog style doesn't include any kind
|
||||
// of border, which is a bit odd. Anyway, inclusion
|
||||
// of a caption surely implies a border.
|
||||
style |= wxTHICK_FRAME;
|
||||
style |= wxRESIZE_BORDER;
|
||||
}
|
||||
|
||||
if (style & wxTHICK_FRAME)
|
||||
if (style & wxRESIZE_BORDER)
|
||||
{
|
||||
wmProp.props |= GR_WM_PROPS_APPFRAME ;
|
||||
wmProp.flags |= GR_WM_FLAGS_PROPS ;
|
||||
@ -721,7 +721,7 @@ bool wxSetWMDecorations(Window w, long style)
|
||||
wmProp.flags |= GR_WM_FLAGS_PROPS ;
|
||||
}
|
||||
|
||||
if (((style & wxBORDER) != wxBORDER) && ((style & wxTHICK_FRAME) != wxTHICK_FRAME)
|
||||
if (((style & wxBORDER) != wxBORDER) && ((style & wxRESIZE_BORDER) != wxRESIZE_BORDER)
|
||||
&& ((style & wxRESIZE_BORDER) != wxRESIZE_BORDER))
|
||||
{
|
||||
wmProp.props |= GR_WM_PROPS_NODECORATE ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_dlg.cpp
|
||||
// Name: src/xrc/xh_dlg.cpp
|
||||
// Purpose: XRC resource for dialogs
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
@ -30,16 +30,11 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxSTAY_ON_TOP);
|
||||
XRC_ADD_STYLE(wxCAPTION);
|
||||
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
|
||||
XRC_ADD_STYLE(wxTHICK_FRAME);
|
||||
XRC_ADD_STYLE(wxSYSTEM_MENU);
|
||||
XRC_ADD_STYLE(wxRESIZE_BORDER);
|
||||
XRC_ADD_STYLE(wxRESIZE_BOX);
|
||||
XRC_ADD_STYLE(wxCLOSE_BOX);
|
||||
XRC_ADD_STYLE(wxDIALOG_MODAL);
|
||||
XRC_ADD_STYLE(wxDIALOG_MODELESS);
|
||||
XRC_ADD_STYLE(wxDIALOG_NO_PARENT);
|
||||
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
XRC_ADD_STYLE(wxDIALOG_EX_METAL);
|
||||
@ -48,6 +43,14 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxFRAME_SHAPED);
|
||||
XRC_ADD_STYLE(wxDIALOG_EX_CONTEXTHELP);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxDIALOG_MODAL);
|
||||
XRC_ADD_STYLE(wxTHICK_FRAME);
|
||||
XRC_ADD_STYLE(wxRESIZE_BOX);
|
||||
XRC_ADD_STYLE(wxDIALOG_MODELESS);
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_frame.cpp
|
||||
// Name: src/xrc/xh_frame.cpp
|
||||
// Purpose: XRC resource for dialogs
|
||||
// Author: Vaclav Slavik & Aleks.
|
||||
// Created: 2000/03/05
|
||||
@ -31,10 +31,14 @@ wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxCAPTION);
|
||||
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
|
||||
XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE);
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTHICK_FRAME);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxSYSTEM_MENU);
|
||||
XRC_ADD_STYLE(wxRESIZE_BORDER);
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxRESIZE_BOX);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxCLOSE_BOX);
|
||||
|
||||
XRC_ADD_STYLE(wxFRAME_NO_TASKBAR);
|
||||
@ -45,7 +49,9 @@ wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxMINIMIZE_BOX);
|
||||
XRC_ADD_STYLE(wxSTAY_ON_TOP);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
XRC_ADD_STYLE(wxFRAME_EX_METAL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_mdi.cpp
|
||||
// Name: src/xrc/xh_mdi.cpp
|
||||
// Purpose: XRC resource for dialogs
|
||||
// Author: David M. Falkinder & Vaclav Slavik
|
||||
// Created: 14/02/2005
|
||||
@ -31,10 +31,14 @@ wxMdiXmlHandler::wxMdiXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxCAPTION);
|
||||
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
|
||||
XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE);
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTHICK_FRAME);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxSYSTEM_MENU);
|
||||
XRC_ADD_STYLE(wxRESIZE_BORDER);
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxRESIZE_BOX);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxCLOSE_BOX);
|
||||
|
||||
XRC_ADD_STYLE(wxFRAME_NO_TASKBAR);
|
||||
@ -45,7 +49,9 @@ wxMdiXmlHandler::wxMdiXmlHandler() : wxXmlResourceHandler()
|
||||
XRC_ADD_STYLE(wxMINIMIZE_BOX);
|
||||
XRC_ADD_STYLE(wxSTAY_ON_TOP);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
XRC_ADD_STYLE(wxFRAME_EX_METAL);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_panel.cpp
|
||||
// Name: src/xrc/xh_panel.cpp
|
||||
// Purpose: XRC resource for panels
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
@ -19,16 +19,18 @@
|
||||
|
||||
#include "wx/xrc/xh_panel.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/frame.h" // to get wxNO_3D
|
||||
#include "wx/frame.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler()
|
||||
{
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
|
||||
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_scwin.cpp
|
||||
// Name: src/xrc/xh_scwin.cpp
|
||||
// Purpose: XRC resource for wxScrolledWindow
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2002/10/18
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "wx/xrc/xh_scwin.h"
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/frame.h" // to get wxNO_3D
|
||||
#include "wx/frame.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
@ -30,7 +30,9 @@ wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
|
||||
XRC_ADD_STYLE(wxVSCROLL);
|
||||
|
||||
// wxPanel styles
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxNO_3D);
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
|
||||
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_sizer.cpp
|
||||
// Name: src/xrc/xh_sizer.cpp
|
||||
// Purpose: XRC resource for wxBoxSizer
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/21
|
||||
@ -235,7 +235,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
|
||||
sizer->Fit(m_parentAsWindow);
|
||||
m_node = nd;
|
||||
|
||||
if (m_parentAsWindow->GetWindowStyle() & (wxRESIZE_BOX | wxRESIZE_BORDER))
|
||||
if (m_parentAsWindow->GetWindowStyle() & (wxMAXIMIZE_BOX | wxRESIZE_BORDER))
|
||||
sizer->SetSizeHints(m_parentAsWindow);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user