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:
Włodzimierz Skiba 2006-03-31 18:07:22 +00:00
parent ed177375b2
commit 1c067fe3c1
36 changed files with 243 additions and 232 deletions

View File

@ -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} \chapter{Introduction}\label{introduction}
\pagenumbering{arabic}% \pagenumbering{arabic}%
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
@ -109,10 +120,10 @@ user interface as illustrated in \helpref{What is FL?}{whatisfl}.
#include "wx/fl/dyntbarhnd.h" // control-bar dimension handler for it #include "wx/fl/dyntbarhnd.h" // control-bar dimension handler for it
MyFrame::MyFrame(wxFrame *frame) MyFrame::MyFrame(wxFrame *frame)
: wxFrame( frame, -1, "wxWindows 2.0 wxFrameLayout Test Application", wxDefaultPosition, : wxFrame( frame, wxID_ANY, "wxWindows 2.0 wxFrameLayout Test Application", wxDefaultPosition,
wxSize( 700, 500 ), wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION,
"freimas" ) "freimas" )
{ {
mpClientWnd = CreateTextCtrl( "Client window" ); mpClientWnd = CreateTextCtrl( "Client window" );
@ -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. 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 This flag is irelevant when {\it mRealTimeUpdatesOn} is FALSE, as the ghost-rect
does not do any docking until the drag finishes. does not do any docking until the drag finishes.

View File

@ -1,5 +1,5 @@
static char *dialog1 = "dialog(name = 'dialog1',\ 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',\ title = 'Test dialog box',\
id = 100,\ id = 100,\
x = 10, y = 10, width = 210, height = 145,\ x = 10, y = 10, width = 210, height = 145,\

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: No names yet. // Name: fl_demo1.cpp
// Purpose: Contrib. demo // Purpose: Contrib. demo
// Author: Aleksandras Gluchovas // Author: Aleksandras Gluchovas
// Modified by: Sebastian Haase (June 21, 2001) // 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, : wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
wxSize( 700, 500 ), wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") ) wxT("freimas") )
{ {
mpClientWnd = CreateTextCtrl( _("Client window") ); mpClientWnd = CreateTextCtrl( _("Client window") );

View File

@ -107,7 +107,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition, : wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ), wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") ) wxT("freimas") )
{ {
mpInternalFrm = (wxPanel*)this; mpInternalFrm = (wxPanel*)this;
@ -195,4 +195,3 @@ void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
Close(true); Close(true);
} }

View File

@ -108,7 +108,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition, : wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ), wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") ) wxT("freimas") )
{ {
} }
@ -193,4 +193,3 @@ void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) )
Close(true); Close(true);
} }

View File

@ -113,7 +113,7 @@ MyFrame::MyFrame( wxWindow* parent, const wxChar *title )
: wxFrame( parent, wxID_ANY, title, wxDefaultPosition, : wxFrame( parent, wxID_ANY, title, wxDefaultPosition,
wxSize( 700, 500 ), wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX,
wxT("freimas") ) wxT("freimas") )
{ {
@ -336,4 +336,3 @@ void MyFrame::OnButt2( wxCommandEvent& WXUNUSED(event) )
} }
i++; i++;
} }

View File

@ -172,7 +172,7 @@ static char *triangle = "dialog(name = 'triangle',\
control = [5112, wxTextCtrl, '1', '0', 'textctrl2', 227, 213, 40, 19, '1'])."; control = [5112, wxTextCtrl, '1', '0', 'textctrl2', 227, 213, 40, 19, '1']).";
static char *shape_label_dialog = "dialog(name = 'shape_label_dialog',\ 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',\ title = 'Edit Shape Label',\
id = 6008,\ id = 6008,\
x = 10, y = 10, width = 190, height = 60,\ x = 10, y = 10, width = 190, height = 60,\

View File

@ -25,30 +25,28 @@
#endif // VC++ #endif // VC++
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/defs.h" #include "wx/list.h"
#include "wx/setup.h" #include "wx/hash.h"
#include "wx/list.h" #include "wx/gdicmn.h"
#include "wx/hash.h" #include "wx/utils.h"
#include "wx/gdicmn.h" #include "wx/types.h"
#include "wx/utils.h" #include "wx/menu.h"
#include "wx/types.h" #include "wx/stattext.h"
#include "wx/menu.h" #include "wx/button.h"
#include "wx/stattext.h" #include "wx/bmpbuttn.h"
#include "wx/button.h" #include "wx/radiobox.h"
#include "wx/bmpbuttn.h" #include "wx/listbox.h"
#include "wx/radiobox.h" #include "wx/choice.h"
#include "wx/listbox.h" #include "wx/checkbox.h"
#include "wx/choice.h" #include "wx/settings.h"
#include "wx/checkbox.h" #include "wx/slider.h"
#include "wx/settings.h" #include "wx/icon.h"
#include "wx/slider.h" #include "wx/statbox.h"
#include "wx/icon.h" #include "wx/statbmp.h"
#include "wx/statbox.h" #include "wx/gauge.h"
#include "wx/statbmp.h" #include "wx/textctrl.h"
#include "wx/gauge.h" #include "wx/msgdlg.h"
#include "wx/textctrl.h" #include "wx/intl.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
#endif #endif
#include "wx/treebase.h" #include "wx/treebase.h"
@ -708,6 +706,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
} }
dialogItem->SetStyle(windowStyle); dialogItem->SetStyle(windowStyle);
dialogItem->SetValue1(isModal); dialogItem->SetValue1(isModal);
#if WXWIN_COMPATIBILITY_2_6
#ifdef __VMS #ifdef __VMS
#pragma message disable CODCAUUNR #pragma message disable CODCAUUNR
#endif #endif
@ -717,6 +718,8 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, wxExpr *expr,
#pragma message enable CODCAUUNR #pragma message enable CODCAUUNR
#endif #endif
#endif // WXWIN_COMPATIBILITY_2_6
dialogItem->SetName(name); dialogItem->SetName(name);
dialogItem->SetTitle(title); dialogItem->SetTitle(title);
dialogItem->SetSize(x, y, width, height); dialogItem->SetSize(x, y, width, height);
@ -2199,8 +2202,10 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxTB_VERTICAL"), wxTB_VERTICAL}, { wxT("wxTB_VERTICAL"), wxTB_VERTICAL},
{ wxT("wxTB_FLAT"), wxTB_FLAT}, { wxT("wxTB_FLAT"), wxTB_FLAT},
#if WXWIN_COMPATIBILITY_2_6
/* wxDialog */ /* wxDialog */
{ wxT("wxDIALOG_MODAL"), wxDIALOG_MODAL }, { wxT("wxDIALOG_MODAL"), wxDIALOG_MODAL },
#endif // WXWIN_COMPATIBILITY_2_6
/* Generic */ /* Generic */
{ wxT("wxVSCROLL"), wxVSCROLL }, { wxT("wxVSCROLL"), wxVSCROLL },
@ -2213,7 +2218,7 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxSDI"), 0}, { wxT("wxSDI"), 0},
{ wxT("wxMDI_PARENT"), 0}, { wxT("wxMDI_PARENT"), 0},
{ wxT("wxMDI_CHILD"), 0}, { wxT("wxMDI_CHILD"), 0},
{ wxT("wxTHICK_FRAME"), wxTHICK_FRAME}, { wxT("wxTHICK_FRAME"), wxRESIZE_BORDER},
{ wxT("wxRESIZE_BORDER"), wxRESIZE_BORDER}, { wxT("wxRESIZE_BORDER"), wxRESIZE_BORDER},
{ wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU}, { wxT("wxSYSTEM_MENU"), wxSYSTEM_MENU},
{ wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX}, { wxT("wxMINIMIZE_BOX"), wxMINIMIZE_BOX},
@ -2320,7 +2325,9 @@ static wxResourceBitListStruct wxResourceBitListTable[] =
{ wxT("wxICON_MASK"), wxICON_MASK}, { wxT("wxICON_MASK"), wxICON_MASK},
{ wxT("wxCENTRE"), wxCENTRE}, { wxT("wxCENTRE"), wxCENTRE},
{ wxT("wxCENTER"), wxCENTRE}, { wxT("wxCENTER"), wxCENTRE},
#if WXWIN_COMPATIBILITY_2_6
{ wxT("wxUSER_COLOURS"), wxUSER_COLOURS}, { wxT("wxUSER_COLOURS"), wxUSER_COLOURS},
#endif // WXWIN_COMPATIBILITY_2_6
{ wxT("wxVERTICAL_LABEL"), 0}, { wxT("wxVERTICAL_LABEL"), 0},
{ wxT("wxHORIZONTAL_LABEL"), 0}, { wxT("wxHORIZONTAL_LABEL"), 0},
@ -3201,7 +3208,13 @@ bool wxLoadFromResource(wxWindow* thisWindow, wxWindow *parent, const wxString&
if (thisWindow->IsKindOf(CLASSINFO(wxDialog))) if (thisWindow->IsKindOf(CLASSINFO(wxDialog)))
{ {
wxDialog *dialogBox = (wxDialog *)thisWindow; 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)) if (!dialogBox->Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height), theWindowStyle|modalStyle, name))
return false; return false;

View File

@ -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 //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); wxFprintf(m_wxr,_T("id = %i,\\\n"),dlgid);
//Record x,y,width,height //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")); wxFprintf(m_wxr,_T("[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"));
} }
} }

View File

@ -404,14 +404,16 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
if (restype == _T("wxDialog")) if (restype == _T("wxDialog"))
{ {
if (style & wxDIALOG_MODAL)
s += _T("wxDIALOG_MODAL|");
if (style & wxDEFAULT_DIALOG_STYLE) if (style & wxDEFAULT_DIALOG_STYLE)
s += _T("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) if (style & wxDIALOG_MODELESS)
s += _T("wxDIALOG_MODELESS|"); s += _T("wxDIALOG_MODELESS|");
if (style & wxNO_3D) if (style & wxNO_3D)
s += _T("wxNO_3D|"); s += _T("wxNO_3D|");
#endif // WXWIN_COMPATIBILITY_2_6
if (style & wxTAB_TRAVERSAL) if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|"); s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY) if (style & wxWS_EX_VALIDATE_RECURSIVELY)
@ -420,8 +422,8 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
s += _T("wxSTAY_ON_TOP|"); s += _T("wxSTAY_ON_TOP|");
if (style & wxCAPTION) if (style & wxCAPTION)
s += _T("wxCAPTION|"); s += _T("wxCAPTION|");
if (style & wxTHICK_FRAME) if (style & wxRESIZE_BORDER)
s += _T("wxTHICK_FRAME|"); s += _T("wxRESIZE_BORDER|");
if (style & wxRESIZE_BOX) if (style & wxRESIZE_BOX)
s += _T("wxRESIZE_BOX|"); s += _T("wxRESIZE_BOX|");
if (style & wxRESIZE_BORDER) if (style & wxRESIZE_BORDER)
@ -436,8 +438,10 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
{ {
if (style & wxCLIP_CHILDREN) if (style & wxCLIP_CHILDREN)
s += _T("wxCLIP_CHILDREN|"); s += _T("wxCLIP_CHILDREN|");
#if WXWIN_COMPATIBILITY_2_6
if (style & wxNO_3D) if (style & wxNO_3D)
s += _T("wxNO_3D|"); s += _T("wxNO_3D|");
#endif // WXWIN_COMPATIBILITY_2_6
if (style & wxTAB_TRAVERSAL) if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|"); s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY) if (style & wxWS_EX_VALIDATE_RECURSIVELY)
@ -536,11 +540,10 @@ wxString wxr2xml::GetStyles(wxItemResource * res)
s += _T("wxSB_VERTICAL|"); s += _T("wxSB_VERTICAL|");
} }
int l; int l = s.length();
l = s.Length();
// No styles defined // No styles defined
if (l == 11) if (l == 11)
return _T(""); return wxEmptyString;
// Trim off last | // Trim off last |
s = s.Truncate(l - 1); s = s.Truncate(l - 1);
@ -603,7 +606,7 @@ void wxr2xml::ParseMenu(wxItemResource * res)
m_xmlfile.Write(_T(">\n")); m_xmlfile.Write(_T(">\n"));
m_xmlfile.Write(_T("\t\t\t\t<label>") m_xmlfile.Write(_T("\t\t\t\t<label>")
+ FixMenuString(res->GetTitle()) + _T("</label>\n")); + 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() + m_xmlfile.Write(_T("\t\t\t\t<help>") + res->GetValue4() +
_T("</help>\n")); _T("</help>\n"));
// Read in menu items and additional menus // Read in menu items and additional menus
@ -621,7 +624,7 @@ void wxr2xml::ParseMenu(wxItemResource * res)
void wxr2xml::ParseMenuItem(wxItemResource * res) void wxr2xml::ParseMenuItem(wxItemResource * res)
{ {
// Get Menu Item or Separator // Get Menu Item or Separator
if (res->GetTitle() == _T("")) { if (res->GetTitle().empty()) {
m_xmlfile.Write(_T("\t\t\t<object class=\"separator\"/>\n")); m_xmlfile.Write(_T("\t\t\t<object class=\"separator\"/>\n"));
} else { } else {
m_xmlfile.Write(_T("\t\t\t\t<object class=\"wxMenuItem\" ")); 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(">\n"));
m_xmlfile.Write(_T("\t\t\t<label>") m_xmlfile.Write(_T("\t\t\t<label>")
+ FixMenuString(res->GetTitle()) + _T("</label>\n")); + FixMenuString(res->GetTitle()) + _T("</label>\n"));
if (res->GetValue4() != _T("")) if (!res->GetValue4().empty())
m_xmlfile.Write(_T("\t\t\t<help>") + m_xmlfile.Write(_T("\t\t\t<help>") +
res->GetValue4() + _T("</help>\n")); res->GetValue4() + _T("</help>\n"));
if (res->GetValue2()) if (res->GetValue2())

View File

@ -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} \section{Window styles}\label{windowstyles}
Window styles are used to specify alternative behaviour and appearances for windows, when they are 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: C++ {\it bitwise-or} operator. For example:
\begin{verbatim} \begin{verbatim}
wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER
\end{verbatim} \end{verbatim}
For the window styles specific to each window class, please see the documentation 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 for the window. Most windows can use the generic styles listed for \helpref{wxWindow}{wxwindow} in
addition to their own styles. addition to their own styles.

View File

@ -4,7 +4,7 @@
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2002/12/15 // Created: 2002/12/15
// RCS-ID: $Id: // RCS-ID: $Id$
// Copyright: David Elliott // Copyright: David Elliott
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -33,18 +33,19 @@ class WXDLLEXPORT wxDialog : public wxDialogBase, protected wxCocoaNSPanel
public: public:
wxDialog() { Init(); } wxDialog() { Init(); }
#if WXWIN_COMPATIBILITY_2_6
// Constructor with a modal flag, but no window id - the old convention // Constructor with a modal flag, but no window id - the old convention
wxDialog(wxWindow *parent, wxDialog(wxWindow *parent,
const wxString& title, bool modal, const wxString& title, bool WXUNUSED(modal),
int x = -1, int y= -1, int width = 500, int height = 500, int x = wxDefaultCoord, int y= wxDefaultCoord, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE, long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr) const wxString& name = wxDialogNameStr)
{ {
Init(); Init();
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ; Create(parent, wxID_ANY, title, wxPoint(x, y), wxSize(width, height),
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style, name);
style | modalStyle, name);
} }
#endif // WXWIN_COMPATIBILITY_2_6
// Constructor with no modal flag - the new convention. // Constructor with no modal flag - the new convention.
wxDialog(wxWindow *parent, wxWindowID winid, wxDialog(wxWindow *parent, wxWindowID winid,
@ -87,7 +88,7 @@ public:
virtual bool IsModal() const { return m_isModal; } virtual bool IsModal() const { return m_isModal; }
bool 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(); virtual int ShowModal();
// may be called to terminate the dialog with the given return code // may be called to terminate the dialog with the given return code

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog.h // Name: wx/motif/dialog.h
// Purpose: wxDialog class // Purpose: wxDialog class
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -22,7 +22,6 @@ class WXDLLEXPORT wxDialog : public wxDialogBase
public: public:
wxDialog(); wxDialog();
// Constructor with no modal flag - the new convention.
wxDialog(wxWindow *parent, wxWindowID id, wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
@ -51,7 +50,7 @@ public:
void SetModal(bool flag); void SetModal(bool flag);
virtual bool IsModal() const virtual bool IsModal() const
{ return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } { return m_modalShowing; }
virtual int ShowModal(); virtual int ShowModal();
virtual void EndModal(int retCode); virtual void EndModal(int retCode);

View File

@ -44,15 +44,19 @@ class WXDLLEXPORT wxTopLevelWindowBase;
#define wxTINY_CAPTION_VERT 0x0080 #define wxTINY_CAPTION_VERT 0x0080
#define wxRESIZE_BORDER 0x0040 #define wxRESIZE_BORDER 0x0040
// deprecated versions defined for compatibility reasons #if WXWIN_COMPATIBILITY_2_6
#define wxRESIZE_BOX wxMAXIMIZE_BOX
#define wxTHICK_FRAME wxRESIZE_BORDER
// obsolete styles, unused any more // deprecated versions defined for compatibility reasons
#define wxDIALOG_MODAL 0 #define wxRESIZE_BOX wxMAXIMIZE_BOX
#define wxDIALOG_MODELESS 0 #define wxTHICK_FRAME wxRESIZE_BORDER
#define wxNO_3D 0
#define wxUSER_COLOURS 0 // 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 // default style
// //

View File

@ -984,7 +984,7 @@ DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int
wxLB_HSCROLL | wxLB_ALWAYS_SB ); wxLB_HSCROLL | wxLB_ALWAYS_SB );
#if wxUSE_LOG #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 | wxTE_MULTILINE | wxTE_READONLY |
wxSUNKEN_BORDER ); wxSUNKEN_BORDER );
@ -1160,7 +1160,7 @@ void DnDFrame::OnLogClear(wxCommandEvent& /* event */ )
void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) ) void DnDFrame::OnLeftDown(wxMouseEvent &WXUNUSED(event) )
{ {
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP
if ( !m_strText.IsEmpty() ) if ( !m_strText.empty() )
{ {
// start drag operation // start drag operation
wxTextDataObject textData(m_strText); 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 // PNG support is not always compiled in under Windows, so use BMP there
#if wxUSE_LIBPNG #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 #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 #endif
if (dialog.ShowModal() != wxID_OK) if (dialog.ShowModal() != wxID_OK)
@ -1242,7 +1242,7 @@ void DnDFrame::OnCopyBitmap(wxCommandEvent& WXUNUSED(event))
return; return;
} }
if (dialog.GetPath().IsEmpty()) if (dialog.GetPath().empty())
{ {
wxLogMessage( _T("Returned empty string.") ); wxLogMessage( _T("Returned empty string.") );
return; return;
@ -1375,7 +1375,7 @@ void DnDFrame::OnPasteMetafile(wxCommandEvent& WXUNUSED(event))
void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event)) void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
{ {
#ifdef __WXMSW__ #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); _T("All files (*.*)|*.*"), 0);
wxArrayString filenames; wxArrayString filenames;
@ -1407,7 +1407,7 @@ void DnDFrame::OnCopyFiles(wxCommandEvent& WXUNUSED(event))
else else
{ {
wxLogStatus(this, wxT("%d file%s copied to the clipboard"), 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) DnDShapeDialog::DnDShapeDialog(wxFrame *parent, DnDShape *shape)
:wxDialog( parent, 6001, wxT("Choose Shape"), wxPoint( 10, 10 ), :wxDialog( parent, 6001, wxT("Choose Shape"), wxPoint( 10, 10 ),
wxSize( 40, 40 ), wxSize( 40, 40 ),
wxDEFAULT_DIALOG_STYLE | wxRAISED_BORDER | wxTHICK_FRAME ) wxDEFAULT_DIALOG_STYLE | wxRAISED_BORDER | wxRESIZE_BORDER )
{ {
m_shape = shape; m_shape = shape;
wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* topSizer = new wxBoxSizer( wxVERTICAL );

View File

@ -80,16 +80,6 @@ events. Windows only.
</TD></TR> </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> <TR><TD VALIGN=TOP>
<B>wxTAB_TRAVERSAL</B> <B>wxTAB_TRAVERSAL</B>
</TD> </TD>

View File

@ -39,7 +39,7 @@ wxInfoFrame::wxInfoFrame(wxWindow *parent, const wxString& message)
: wxFrame(parent, wxID_ANY, wxT("Busy"), : wxFrame(parent, wxID_ANY, wxT("Busy"),
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
#if defined(__WXX11__) #if defined(__WXX11__)
wxTHICK_FRAME wxRESIZE_BORDER
#else #else
wxSIMPLE_BORDER wxSIMPLE_BORDER
#endif #endif

View File

@ -296,7 +296,7 @@ wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt)
dbgrpt.GetReportName().c_str()), dbgrpt.GetReportName().c_str()),
wxDefaultPosition, wxDefaultPosition,
wxDefaultSize, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxTHICK_FRAME), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
m_dbgrpt(dbgrpt) m_dbgrpt(dbgrpt)
{ {
// upper part of the dialog: explanatory message // upper part of the dialog: explanatory message

View File

@ -83,7 +83,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
long style, long style,
const wxPoint& pos) const wxPoint& pos)
: wxDialog(parent, wxID_ANY, caption, pos, wxDefaultSize, : wxDialog(parent, wxID_ANY, caption, pos, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL), wxDEFAULT_DIALOG_STYLE),
m_value(value) m_value(value)
{ {
m_dialogStyle = style; m_dialogStyle = style;

View File

@ -69,12 +69,12 @@ extern wxList wxPendingDelete;
IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow)
BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow) BEGIN_EVENT_TABLE(wxDialog, wxTopLevelWindow)
EVT_BUTTON(wxID_OK, wxDialog::OnOK) EVT_BUTTON(wxID_OK, wxDialog::OnOK)
EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) EVT_BUTTON(wxID_APPLY, wxDialog::OnApply)
EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel)
EVT_CHAR_HOOK(wxDialog::OnCharHook) EVT_CHAR_HOOK(wxDialog::OnCharHook)
EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged)
EVT_CLOSE(wxDialog::OnCloseWindow) EVT_CLOSE(wxDialog::OnCloseWindow)
END_EVENT_TABLE() END_EVENT_TABLE()
@ -319,8 +319,6 @@ bool wxDialog::Show( bool show )
// Shows a dialog modally, returning a return code // Shows a dialog modally, returning a return code
int wxDialog::ShowModal() int wxDialog::ShowModal()
{ {
m_windowStyle |= wxDIALOG_MODAL;
Show(true); Show(true);
// after the event loop ran, the widget might already have been destroyed // after the event loop ran, the widget might already have been destroyed

View File

@ -154,7 +154,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
( m_windowStyle & wxTINY_CAPTION_HORIZ ) || ( m_windowStyle & wxTINY_CAPTION_HORIZ ) ||
( m_windowStyle & wxTINY_CAPTION_VERT ) ) ( m_windowStyle & wxTINY_CAPTION_VERT ) )
decor |= MWM_DECOR_TITLE; decor |= MWM_DECOR_TITLE;
if( m_windowStyle & wxTHICK_FRAME ) if( m_windowStyle & wxRESIZE_BORDER )
decor |= MWM_DECOR_BORDER; decor |= MWM_DECOR_BORDER;
if( m_windowStyle & wxMINIMIZE_BOX ) if( m_windowStyle & wxMINIMIZE_BOX )
decor |= MWM_DECOR_MINIMIZE; decor |= MWM_DECOR_MINIMIZE;
@ -423,4 +423,3 @@ void wxTLWEventHandler( Widget wid,
*continueToDispatch = True; *continueToDispatch = True;
} }

View File

@ -83,10 +83,14 @@ wxBEGIN_FLAGS( wxDialogStyle )
wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY) wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY)
wxFLAGS_MEMBER(wxSTAY_ON_TOP) wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION) wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME) wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU) wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER) wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX) wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX) wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX) wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX) wxFLAGS_MEMBER(wxMINIMIZE_BOX)
@ -604,4 +608,3 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar
return rc; return rc;
} }

View File

@ -115,10 +115,14 @@ wxBEGIN_FLAGS( wxFrameStyle )
// frame styles // frame styles
wxFLAGS_MEMBER(wxSTAY_ON_TOP) wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION) wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME) wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU) wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER) wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX) wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX) wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX) wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX) wxFLAGS_MEMBER(wxMINIMIZE_BOX)

View File

@ -752,7 +752,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
msflags |= WS_MINIMIZEBOX; msflags |= WS_MINIMIZEBOX;
if (style & wxMAXIMIZE_BOX) if (style & wxMAXIMIZE_BOX)
msflags |= WS_MAXIMIZEBOX; msflags |= WS_MAXIMIZEBOX;
if (style & wxTHICK_FRAME) if (style & wxRESIZE_BORDER)
msflags |= WS_THICKFRAME; msflags |= WS_THICKFRAME;
if (style & wxSYSTEM_MENU) if (style & wxSYSTEM_MENU)
msflags |= WS_SYSMENU; msflags |= WS_SYSMENU;

View File

@ -2043,73 +2043,33 @@ void wxDC::SetBrush(
} }
} // end of wxDC::SetBrush } // end of wxDC::SetBrush
void wxDC::SetBackground( void wxDC::SetBackground(const wxBrush& rBrush)
const wxBrush& rBrush
)
{ {
m_backgroundBrush = rBrush; m_backgroundBrush = rBrush;
if (!m_backgroundBrush.Ok())
return;
if (m_pCanvas)
{
bool bCustomColours = true;
// if (m_backgroundBrush.Ok())
// If we haven't specified wxUSER_COLOURS, don't allow the panel/dialog box to {
// change background colours from the control-panel specified colours. (void)::GpiSetBackColor((HPS)m_hPS, m_backgroundBrush.GetColour().GetPixel());
//
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);
}
}
} }
COLORREF vNewColor = m_backgroundBrush.GetColour().GetPixel();
(void)::GpiSetBackColor((HPS)m_hPS, (LONG)vNewColor);
} // end of wxDC::SetBackground } // end of wxDC::SetBackground
void wxDC::SetBackgroundMode( void wxDC::SetBackgroundMode(int nMode)
int nMode
)
{ {
m_backgroundMode = nMode; m_backgroundMode = nMode;
} // end of wxDC::SetBackgroundMode } // end of wxDC::SetBackgroundMode
void wxDC::SetLogicalFunction( void wxDC::SetLogicalFunction(int nFunction)
int nFunction
)
{ {
m_logicalFunction = nFunction; m_logicalFunction = nFunction;
SetRop((WXHDC)m_hDC); SetRop((WXHDC)m_hDC);
} // wxDC::SetLogicalFunction } // wxDC::SetLogicalFunction
void wxDC::SetRop( void wxDC::SetRop(WXHDC hDC)
WXHDC hDC
)
{ {
if (!hDC || m_logicalFunction < 0) if (!hDC || m_logicalFunction < 0)
return; return;
LONG lCRop; LONG lCRop;
switch (m_logicalFunction) switch (m_logicalFunction)
{ {
case wxXOR: case wxXOR:

View File

@ -234,7 +234,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
lMsflags |= FCF_MINBUTTON; lMsflags |= FCF_MINBUTTON;
if (lStyle & wxMAXIMIZE_BOX) if (lStyle & wxMAXIMIZE_BOX)
lMsflags |= FCF_MAXBUTTON; lMsflags |= FCF_MAXBUTTON;
if (lStyle & wxTHICK_FRAME) if (lStyle & wxRESIZE_BORDER)
lMsflags |= FCF_DLGBORDER; lMsflags |= FCF_DLGBORDER;
if (lStyle & wxSYSTEM_MENU) if (lStyle & wxSYSTEM_MENU)
lMsflags |= FCF_SYSMENU; lMsflags |= FCF_SYSMENU;
@ -250,7 +250,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
if (lStyle & wxTINY_CAPTION_HORIZ) if (lStyle & wxTINY_CAPTION_HORIZ)
lMsflags |= FCF_TASKLIST; lMsflags |= FCF_TASKLIST;
if ((lStyle & wxTHICK_FRAME) == 0) if ((lStyle & wxRESIZE_BORDER) == 0)
lMsflags |= FCF_BORDER; lMsflags |= FCF_BORDER;
if (lStyle & wxFRAME_TOOL_WINDOW) if (lStyle & wxFRAME_TOOL_WINDOW)
*pdwExflags = kFrameToolWindow; *pdwExflags = kFrameToolWindow;

View File

@ -71,10 +71,14 @@ wxBEGIN_FLAGS( wxDialogStyle )
wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY) wxFLAGS_MEMBER(wxWS_EX_VALIDATE_RECURSIVELY)
wxFLAGS_MEMBER(wxSTAY_ON_TOP) wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION) wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME) wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU) wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER) wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX) wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX) wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX) wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX) wxFLAGS_MEMBER(wxMINIMIZE_BOX)

View File

@ -106,10 +106,14 @@ wxBEGIN_FLAGS( wxFrameStyle )
// frame styles // frame styles
wxFLAGS_MEMBER(wxSTAY_ON_TOP) wxFLAGS_MEMBER(wxSTAY_ON_TOP)
wxFLAGS_MEMBER(wxCAPTION) wxFLAGS_MEMBER(wxCAPTION)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxTHICK_FRAME) wxFLAGS_MEMBER(wxTHICK_FRAME)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxSYSTEM_MENU) wxFLAGS_MEMBER(wxSYSTEM_MENU)
wxFLAGS_MEMBER(wxRESIZE_BORDER) wxFLAGS_MEMBER(wxRESIZE_BORDER)
#if WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxRESIZE_BOX) wxFLAGS_MEMBER(wxRESIZE_BOX)
#endif // WXWIN_COMPATIBILITY_2_6
wxFLAGS_MEMBER(wxCLOSE_BOX) wxFLAGS_MEMBER(wxCLOSE_BOX)
wxFLAGS_MEMBER(wxMAXIMIZE_BOX) wxFLAGS_MEMBER(wxMAXIMIZE_BOX)
wxFLAGS_MEMBER(wxMINIMIZE_BOX) wxFLAGS_MEMBER(wxMINIMIZE_BOX)

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: topluniv.cpp // Name: src/univ/topluniv.cpp
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Id: $Id$ // Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
@ -21,8 +21,6 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/defs.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/settings.h" #include "wx/settings.h"
@ -96,7 +94,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
exstyleOrig = GetExtraStyle(); exstyleOrig = GetExtraStyle();
style &= ~(wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | style &= ~(wxCAPTION | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW | wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW |
wxTHICK_FRAME); wxRESIZE_BORDER);
style |= wxSIMPLE_BORDER; style |= wxSIMPLE_BORDER;
SetExtraStyle(exstyleOrig & SetExtraStyle(exstyleOrig &
~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP)); ~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP));
@ -161,7 +159,7 @@ long wxTopLevelWindow::GetDecorationsStyle() const
} }
if ( (m_windowStyle & (wxSIMPLE_BORDER | wxNO_BORDER)) == 0 ) if ( (m_windowStyle & (wxSIMPLE_BORDER | wxNO_BORDER)) == 0 )
style |= wxTOPLEVEL_BORDER; style |= wxTOPLEVEL_BORDER;
if ( m_windowStyle & (wxRESIZE_BORDER | wxTHICK_FRAME) ) if ( m_windowStyle & (wxRESIZE_BORDER | wxRESIZE_BORDER) )
style |= wxTOPLEVEL_RESIZEABLE; style |= wxTOPLEVEL_RESIZEABLE;
if ( IsMaximized() ) if ( IsMaximized() )
@ -350,10 +348,6 @@ static bool wxGetResizingCursor(long hitTestResult, wxCursor& cursor)
break; break;
default: default:
return false; return false;
#if 0
// not rachable due to earlier return
break;
#endif
} }
return true; return true;
} }

View File

@ -696,10 +696,10 @@ bool wxSetWMDecorations(Window w, long style)
// The default dialog style doesn't include any kind // The default dialog style doesn't include any kind
// of border, which is a bit odd. Anyway, inclusion // of border, which is a bit odd. Anyway, inclusion
// of a caption surely implies a border. // 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.props |= GR_WM_PROPS_APPFRAME ;
wmProp.flags |= GR_WM_FLAGS_PROPS ; wmProp.flags |= GR_WM_FLAGS_PROPS ;
@ -721,7 +721,7 @@ bool wxSetWMDecorations(Window w, long style)
wmProp.flags |= GR_WM_FLAGS_PROPS ; 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)) && ((style & wxRESIZE_BORDER) != wxRESIZE_BORDER))
{ {
wmProp.props |= GR_WM_PROPS_NODECORATE ; wmProp.props |= GR_WM_PROPS_NODECORATE ;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_dlg.cpp // Name: src/xrc/xh_dlg.cpp
// Purpose: XRC resource for dialogs // Purpose: XRC resource for dialogs
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Created: 2000/03/05 // Created: 2000/03/05
@ -30,16 +30,11 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxSTAY_ON_TOP); XRC_ADD_STYLE(wxSTAY_ON_TOP);
XRC_ADD_STYLE(wxCAPTION); XRC_ADD_STYLE(wxCAPTION);
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE); XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
XRC_ADD_STYLE(wxTHICK_FRAME);
XRC_ADD_STYLE(wxSYSTEM_MENU); XRC_ADD_STYLE(wxSYSTEM_MENU);
XRC_ADD_STYLE(wxRESIZE_BORDER); XRC_ADD_STYLE(wxRESIZE_BORDER);
XRC_ADD_STYLE(wxRESIZE_BOX);
XRC_ADD_STYLE(wxCLOSE_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(wxDIALOG_NO_PARENT);
XRC_ADD_STYLE(wxNO_3D);
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
XRC_ADD_STYLE(wxDIALOG_EX_METAL); XRC_ADD_STYLE(wxDIALOG_EX_METAL);
@ -48,6 +43,14 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxFRAME_SHAPED); XRC_ADD_STYLE(wxFRAME_SHAPED);
XRC_ADD_STYLE(wxDIALOG_EX_CONTEXTHELP); 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(); AddWindowStyles();
} }

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_frame.cpp // Name: src/xrc/xh_frame.cpp
// Purpose: XRC resource for dialogs // Purpose: XRC resource for dialogs
// Author: Vaclav Slavik & Aleks. // Author: Vaclav Slavik & Aleks.
// Created: 2000/03/05 // Created: 2000/03/05
@ -31,10 +31,14 @@ wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxCAPTION); XRC_ADD_STYLE(wxCAPTION);
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE); XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE); XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTHICK_FRAME); XRC_ADD_STYLE(wxTHICK_FRAME);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxSYSTEM_MENU); XRC_ADD_STYLE(wxSYSTEM_MENU);
XRC_ADD_STYLE(wxRESIZE_BORDER); XRC_ADD_STYLE(wxRESIZE_BORDER);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxRESIZE_BOX); XRC_ADD_STYLE(wxRESIZE_BOX);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxCLOSE_BOX); XRC_ADD_STYLE(wxCLOSE_BOX);
XRC_ADD_STYLE(wxFRAME_NO_TASKBAR); XRC_ADD_STYLE(wxFRAME_NO_TASKBAR);
@ -45,7 +49,9 @@ wxFrameXmlHandler::wxFrameXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxMINIMIZE_BOX); XRC_ADD_STYLE(wxMINIMIZE_BOX);
XRC_ADD_STYLE(wxSTAY_ON_TOP); XRC_ADD_STYLE(wxSTAY_ON_TOP);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxNO_3D); XRC_ADD_STYLE(wxNO_3D);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
XRC_ADD_STYLE(wxFRAME_EX_METAL); XRC_ADD_STYLE(wxFRAME_EX_METAL);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_mdi.cpp // Name: src/xrc/xh_mdi.cpp
// Purpose: XRC resource for dialogs // Purpose: XRC resource for dialogs
// Author: David M. Falkinder & Vaclav Slavik // Author: David M. Falkinder & Vaclav Slavik
// Created: 14/02/2005 // Created: 14/02/2005
@ -31,10 +31,14 @@ wxMdiXmlHandler::wxMdiXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxCAPTION); XRC_ADD_STYLE(wxCAPTION);
XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE); XRC_ADD_STYLE(wxDEFAULT_DIALOG_STYLE);
XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE); XRC_ADD_STYLE(wxDEFAULT_FRAME_STYLE);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTHICK_FRAME); XRC_ADD_STYLE(wxTHICK_FRAME);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxSYSTEM_MENU); XRC_ADD_STYLE(wxSYSTEM_MENU);
XRC_ADD_STYLE(wxRESIZE_BORDER); XRC_ADD_STYLE(wxRESIZE_BORDER);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxRESIZE_BOX); XRC_ADD_STYLE(wxRESIZE_BOX);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxCLOSE_BOX); XRC_ADD_STYLE(wxCLOSE_BOX);
XRC_ADD_STYLE(wxFRAME_NO_TASKBAR); XRC_ADD_STYLE(wxFRAME_NO_TASKBAR);
@ -45,7 +49,9 @@ wxMdiXmlHandler::wxMdiXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxMINIMIZE_BOX); XRC_ADD_STYLE(wxMINIMIZE_BOX);
XRC_ADD_STYLE(wxSTAY_ON_TOP); XRC_ADD_STYLE(wxSTAY_ON_TOP);
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxNO_3D); XRC_ADD_STYLE(wxNO_3D);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
XRC_ADD_STYLE(wxFRAME_EX_METAL); XRC_ADD_STYLE(wxFRAME_EX_METAL);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_panel.cpp // Name: src/xrc/xh_panel.cpp
// Purpose: XRC resource for panels // Purpose: XRC resource for panels
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Created: 2000/03/05 // Created: 2000/03/05
@ -19,13 +19,15 @@
#include "wx/xrc/xh_panel.h" #include "wx/xrc/xh_panel.h"
#include "wx/panel.h" #include "wx/panel.h"
#include "wx/frame.h" // to get wxNO_3D #include "wx/frame.h"
IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler)
wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler() wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler()
{ {
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxNO_3D); XRC_ADD_STYLE(wxNO_3D);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_scwin.cpp // Name: src/xrc/xh_scwin.cpp
// Purpose: XRC resource for wxScrolledWindow // Purpose: XRC resource for wxScrolledWindow
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Created: 2002/10/18 // Created: 2002/10/18
@ -19,7 +19,7 @@
#include "wx/xrc/xh_scwin.h" #include "wx/xrc/xh_scwin.h"
#include "wx/scrolwin.h" #include "wx/scrolwin.h"
#include "wx/frame.h" // to get wxNO_3D #include "wx/frame.h"
IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler) IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler)
@ -30,7 +30,9 @@ wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
XRC_ADD_STYLE(wxVSCROLL); XRC_ADD_STYLE(wxVSCROLL);
// wxPanel styles // wxPanel styles
#if WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxNO_3D); XRC_ADD_STYLE(wxNO_3D);
#endif // WXWIN_COMPATIBILITY_2_6
XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: xh_sizer.cpp // Name: src/xrc/xh_sizer.cpp
// Purpose: XRC resource for wxBoxSizer // Purpose: XRC resource for wxBoxSizer
// Author: Vaclav Slavik // Author: Vaclav Slavik
// Created: 2000/03/21 // Created: 2000/03/21
@ -235,7 +235,7 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
sizer->Fit(m_parentAsWindow); sizer->Fit(m_parentAsWindow);
m_node = nd; m_node = nd;
if (m_parentAsWindow->GetWindowStyle() & (wxRESIZE_BOX | wxRESIZE_BORDER)) if (m_parentAsWindow->GetWindowStyle() & (wxMAXIMIZE_BOX | wxRESIZE_BORDER))
sizer->SetSizeHints(m_parentAsWindow); sizer->SetSizeHints(m_parentAsWindow);
} }