Replace wxTINY_CAPTION_{HORIZ,VERT} with a single wxTINY_CAPTION.
These two styles were always equivalent so we can just as well replace them with a single one and stop wasting an extra bit. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
|||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
Create(parent, id, title, pos, size, style, name);
|
Create(parent, id, title, pos, size, style, name);
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION,
|
||||||
const wxString& name = wxFrameNameStr);
|
const wxString& name = wxFrameNameStr);
|
||||||
|
|
||||||
virtual void SetTitle( const wxString &title );
|
virtual void SetTitle( const wxString &title );
|
||||||
|
@@ -27,7 +27,7 @@ public:
|
|||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
|
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
// Use wxFrame constructor in absence of more specific code.
|
// Use wxFrame constructor in absence of more specific code.
|
||||||
|
@@ -27,7 +27,7 @@ public:
|
|||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION_HORIZ,
|
long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
// Use wxFrame constructor in absence of more specific code.
|
// Use wxFrame constructor in absence of more specific code.
|
||||||
|
@@ -48,7 +48,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
|
|||||||
| | | | | | | | | | \________________
|
| | | | | | | | | | \________________
|
||||||
| | | | | | | | | \___________________ wxRESIZE_BORDER
|
| | | | | | | | | \___________________ wxRESIZE_BORDER
|
||||||
| | | | | | | | \______________________ wxTINY_CAPTION_VERT
|
| | | | | | | | \______________________ wxTINY_CAPTION_VERT
|
||||||
| | | | | | | \_________________________ wxTINY_CAPTION_HORIZ
|
| | | | | | | \_________________________
|
||||||
| | | | | | \____________________________ wxMAXIMIZE_BOX
|
| | | | | | \____________________________ wxMAXIMIZE_BOX
|
||||||
| | | | | \_______________________________ wxMINIMIZE_BOX
|
| | | | | \_______________________________ wxMINIMIZE_BOX
|
||||||
| | | | \__________________________________ wxSYSTEM_MENU
|
| | | | \__________________________________ wxSYSTEM_MENU
|
||||||
@@ -74,10 +74,17 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
|
|||||||
#define wxSYSTEM_MENU 0x0800
|
#define wxSYSTEM_MENU 0x0800
|
||||||
#define wxMINIMIZE_BOX 0x0400
|
#define wxMINIMIZE_BOX 0x0400
|
||||||
#define wxMAXIMIZE_BOX 0x0200
|
#define wxMAXIMIZE_BOX 0x0200
|
||||||
#define wxTINY_CAPTION_HORIZ 0x0100
|
|
||||||
#define wxTINY_CAPTION_VERT 0x0080
|
#define wxTINY_CAPTION 0x0080 // clashes with wxNO_DEFAULT
|
||||||
#define wxRESIZE_BORDER 0x0040
|
#define wxRESIZE_BORDER 0x0040
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
// HORIZ and VERT styles are equivalent anyhow so don't use different names
|
||||||
|
// for them
|
||||||
|
#define wxTINY_CAPTION_HORIZ wxTINY_CAPTION
|
||||||
|
#define wxTINY_CAPTION_VERT wxTINY_CAPTION
|
||||||
|
#endif
|
||||||
|
|
||||||
#if WXWIN_COMPATIBILITY_2_6
|
#if WXWIN_COMPATIBILITY_2_6
|
||||||
|
|
||||||
// deprecated versions defined for compatibility reasons
|
// deprecated versions defined for compatibility reasons
|
||||||
|
@@ -27,7 +27,7 @@ public:
|
|||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
|
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION,
|
||||||
const wxString& name = wxFrameNameStr)
|
const wxString& name = wxFrameNameStr)
|
||||||
{
|
{
|
||||||
// Use wxFrame constructor in absence of more specific code.
|
// Use wxFrame constructor in absence of more specific code.
|
||||||
|
@@ -34,10 +34,6 @@
|
|||||||
Stay on top of other windows (Windows only).
|
Stay on top of other windows (Windows only).
|
||||||
@style{wxSYSTEM_MENU}
|
@style{wxSYSTEM_MENU}
|
||||||
Displays a system menu (Windows and Motif only).
|
Displays a system menu (Windows and Motif only).
|
||||||
@style{wxTINY_CAPTION_HORIZ}
|
|
||||||
This style is obsolete and not used any longer.
|
|
||||||
@style{wxTINY_CAPTION_VERT}
|
|
||||||
This style is obsolete and not used any longer.
|
|
||||||
@style{wxRESIZE_BORDER}
|
@style{wxRESIZE_BORDER}
|
||||||
Displays a resizeable border around the window.
|
Displays a resizeable border around the window.
|
||||||
@endStyleTable
|
@endStyleTable
|
||||||
|
@@ -88,8 +88,7 @@ static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *g
|
|||||||
|
|
||||||
if (!win->GetTitle().empty() &&
|
if (!win->GetTitle().empty() &&
|
||||||
((win->GetWindowStyle() & wxCAPTION) ||
|
((win->GetWindowStyle() & wxCAPTION) ||
|
||||||
(win->GetWindowStyle() & wxTINY_CAPTION_HORIZ) ||
|
(win->GetWindowStyle() & wxTINY_CAPTION)))
|
||||||
(win->GetWindowStyle() & wxTINY_CAPTION_VERT)))
|
|
||||||
{
|
{
|
||||||
wxClientDC dc(win);
|
wxClientDC dc(win);
|
||||||
dc.SetFont( *wxSMALL_FONT );
|
dc.SetFont( *wxSMALL_FONT );
|
||||||
@@ -134,8 +133,7 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU
|
|||||||
|
|
||||||
if (!win->GetTitle().empty() &&
|
if (!win->GetTitle().empty() &&
|
||||||
((win->GetWindowStyle() & wxCAPTION) ||
|
((win->GetWindowStyle() & wxCAPTION) ||
|
||||||
(win->GetWindowStyle() & wxTINY_CAPTION_HORIZ) ||
|
(win->GetWindowStyle() & wxTINY_CAPTION)))
|
||||||
(win->GetWindowStyle() & wxTINY_CAPTION_VERT)))
|
|
||||||
{
|
{
|
||||||
wxClientDC dc(win);
|
wxClientDC dc(win);
|
||||||
dc.SetFont( *wxSMALL_FONT );
|
dc.SetFont( *wxSMALL_FONT );
|
||||||
@@ -330,7 +328,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
{
|
{
|
||||||
style = style | wxCAPTION;
|
style = style | wxCAPTION;
|
||||||
|
|
||||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
if ((style & wxCAPTION) || (style & wxTINY_CAPTION))
|
||||||
m_miniTitle = 13;
|
m_miniTitle = 13;
|
||||||
|
|
||||||
m_miniEdge = 3;
|
m_miniEdge = 3;
|
||||||
@@ -348,7 +346,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((style & wxSYSTEM_MENU) &&
|
if ((style & wxSYSTEM_MENU) &&
|
||||||
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
((style & wxCAPTION) || (style & wxTINY_CAPTION)))
|
||||||
{
|
{
|
||||||
GdkBitmap *mask = NULL;
|
GdkBitmap *mask = NULL;
|
||||||
GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d
|
GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d
|
||||||
|
@@ -153,8 +153,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
|||||||
if( m_windowStyle & wxSYSTEM_MENU )
|
if( m_windowStyle & wxSYSTEM_MENU )
|
||||||
decor |= MWM_DECOR_MENU;
|
decor |= MWM_DECOR_MENU;
|
||||||
if( ( m_windowStyle & wxCAPTION ) ||
|
if( ( m_windowStyle & wxCAPTION ) ||
|
||||||
( m_windowStyle & wxTINY_CAPTION_HORIZ ) ||
|
( m_windowStyle & wxTINY_CAPTION) )
|
||||||
( m_windowStyle & wxTINY_CAPTION_VERT ) )
|
|
||||||
decor |= MWM_DECOR_TITLE;
|
decor |= MWM_DECOR_TITLE;
|
||||||
if( m_windowStyle & wxRESIZE_BORDER )
|
if( m_windowStyle & wxRESIZE_BORDER )
|
||||||
decor |= MWM_DECOR_BORDER;
|
decor |= MWM_DECOR_BORDER;
|
||||||
|
@@ -225,7 +225,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
|
|||||||
msflags |= WS_MAXIMIZE;
|
msflags |= WS_MAXIMIZE;
|
||||||
|
|
||||||
// Keep this here because it saves recoding this function in wxTinyFrame
|
// Keep this here because it saves recoding this function in wxTinyFrame
|
||||||
if ( style & (wxTINY_CAPTION_VERT | wxTINY_CAPTION_HORIZ) )
|
if ( style & wxTINY_CAPTION )
|
||||||
msflags |= WS_CAPTION;
|
msflags |= WS_CAPTION;
|
||||||
|
|
||||||
if ( exflags )
|
if ( exflags )
|
||||||
|
@@ -246,9 +246,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
|
|||||||
// Invalid for frame windows under PM
|
// Invalid for frame windows under PM
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lStyle & wxTINY_CAPTION_VERT)
|
if (lStyle & wxTINY_CAPTION)
|
||||||
lMsflags |= FCF_TASKLIST;
|
|
||||||
if (lStyle & wxTINY_CAPTION_HORIZ)
|
|
||||||
lMsflags |= FCF_TASKLIST;
|
lMsflags |= FCF_TASKLIST;
|
||||||
|
|
||||||
if ((lStyle & wxRESIZE_BORDER) == 0)
|
if ((lStyle & wxRESIZE_BORDER) == 0)
|
||||||
|
@@ -1229,7 +1229,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
if (
|
if (
|
||||||
( style & wxMINIMIZE_BOX ) || ( style & wxMAXIMIZE_BOX ) ||
|
( style & wxMINIMIZE_BOX ) || ( style & wxMAXIMIZE_BOX ) ||
|
||||||
( style & wxSYSTEM_MENU ) || ( style & wxCAPTION ) ||
|
( style & wxSYSTEM_MENU ) || ( style & wxCAPTION ) ||
|
||||||
( style &wxTINY_CAPTION_HORIZ) || ( style &wxTINY_CAPTION_VERT)
|
( style & wxTINY_CAPTION)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( ( style & wxSTAY_ON_TOP ) )
|
if ( ( style & wxSTAY_ON_TOP ) )
|
||||||
@@ -1237,7 +1237,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
|||||||
else
|
else
|
||||||
wclass = kFloatingWindowClass ;
|
wclass = kFloatingWindowClass ;
|
||||||
|
|
||||||
if ( ( style &wxTINY_CAPTION_VERT) )
|
if ( ( style & wxTINY_CAPTION) )
|
||||||
attr |= kWindowSideTitlebarAttribute ;
|
attr |= kWindowSideTitlebarAttribute ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -693,8 +693,7 @@ bool wxSetWMDecorations(Window w, long style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((style & wxCAPTION) ||
|
if ((style & wxCAPTION) ||
|
||||||
(style & wxTINY_CAPTION_HORIZ) ||
|
(style & wxTINY_CAPTION))
|
||||||
(style & wxTINY_CAPTION_VERT))
|
|
||||||
{
|
{
|
||||||
wmProp.props |= GR_WM_PROPS_CAPTION ;
|
wmProp.props |= GR_WM_PROPS_CAPTION ;
|
||||||
wmProp.flags |= GR_WM_FLAGS_PROPS ;
|
wmProp.flags |= GR_WM_FLAGS_PROPS ;
|
||||||
|
Reference in New Issue
Block a user