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 wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION_HORIZ,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
// Use wxFrame constructor in absence of more specific code.
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION_HORIZ,
|
||||
long style = wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
// Use wxFrame constructor in absence of more specific code.
|
||||
|
@@ -48,7 +48,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
|
||||
| | | | | | | | | | \________________
|
||||
| | | | | | | | | \___________________ wxRESIZE_BORDER
|
||||
| | | | | | | | \______________________ wxTINY_CAPTION_VERT
|
||||
| | | | | | | \_________________________ wxTINY_CAPTION_HORIZ
|
||||
| | | | | | | \_________________________
|
||||
| | | | | | \____________________________ wxMAXIMIZE_BOX
|
||||
| | | | | \_______________________________ wxMINIMIZE_BOX
|
||||
| | | | \__________________________________ wxSYSTEM_MENU
|
||||
@@ -74,10 +74,17 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
|
||||
#define wxSYSTEM_MENU 0x0800
|
||||
#define wxMINIMIZE_BOX 0x0400
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
// deprecated versions defined for compatibility reasons
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION_HORIZ,
|
||||
long style = wxDEFAULT_FRAME_STYLE|wxTINY_CAPTION,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
// Use wxFrame constructor in absence of more specific code.
|
||||
|
@@ -34,10 +34,6 @@
|
||||
Stay on top of other windows (Windows only).
|
||||
@style{wxSYSTEM_MENU}
|
||||
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}
|
||||
Displays a resizeable border around the window.
|
||||
@endStyleTable
|
||||
|
@@ -88,8 +88,7 @@ static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *g
|
||||
|
||||
if (!win->GetTitle().empty() &&
|
||||
((win->GetWindowStyle() & wxCAPTION) ||
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION_HORIZ) ||
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION_VERT)))
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION)))
|
||||
{
|
||||
wxClientDC dc(win);
|
||||
dc.SetFont( *wxSMALL_FONT );
|
||||
@@ -134,8 +133,7 @@ static void gtk_window_own_draw_callback( GtkWidget *widget, GdkRectangle *WXUNU
|
||||
|
||||
if (!win->GetTitle().empty() &&
|
||||
((win->GetWindowStyle() & wxCAPTION) ||
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION_HORIZ) ||
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION_VERT)))
|
||||
(win->GetWindowStyle() & wxTINY_CAPTION)))
|
||||
{
|
||||
wxClientDC dc(win);
|
||||
dc.SetFont( *wxSMALL_FONT );
|
||||
@@ -330,7 +328,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
||||
{
|
||||
style = style | wxCAPTION;
|
||||
|
||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION))
|
||||
m_miniTitle = 13;
|
||||
|
||||
m_miniEdge = 3;
|
||||
@@ -348,7 +346,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
||||
}
|
||||
|
||||
if ((style & wxSYSTEM_MENU) &&
|
||||
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
|
||||
((style & wxCAPTION) || (style & wxTINY_CAPTION)))
|
||||
{
|
||||
GdkBitmap *mask = NULL;
|
||||
GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d
|
||||
|
@@ -153,8 +153,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
||||
if( m_windowStyle & wxSYSTEM_MENU )
|
||||
decor |= MWM_DECOR_MENU;
|
||||
if( ( m_windowStyle & wxCAPTION ) ||
|
||||
( m_windowStyle & wxTINY_CAPTION_HORIZ ) ||
|
||||
( m_windowStyle & wxTINY_CAPTION_VERT ) )
|
||||
( m_windowStyle & wxTINY_CAPTION) )
|
||||
decor |= MWM_DECOR_TITLE;
|
||||
if( m_windowStyle & wxRESIZE_BORDER )
|
||||
decor |= MWM_DECOR_BORDER;
|
||||
|
@@ -225,7 +225,7 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
|
||||
msflags |= WS_MAXIMIZE;
|
||||
|
||||
// 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;
|
||||
|
||||
if ( exflags )
|
||||
|
@@ -246,9 +246,7 @@ WXDWORD wxTopLevelWindowOS2::OS2GetStyle(
|
||||
// Invalid for frame windows under PM
|
||||
}
|
||||
|
||||
if (lStyle & wxTINY_CAPTION_VERT)
|
||||
lMsflags |= FCF_TASKLIST;
|
||||
if (lStyle & wxTINY_CAPTION_HORIZ)
|
||||
if (lStyle & wxTINY_CAPTION)
|
||||
lMsflags |= FCF_TASKLIST;
|
||||
|
||||
if ((lStyle & wxRESIZE_BORDER) == 0)
|
||||
|
@@ -1229,7 +1229,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
||||
if (
|
||||
( style & wxMINIMIZE_BOX ) || ( style & wxMAXIMIZE_BOX ) ||
|
||||
( style & wxSYSTEM_MENU ) || ( style & wxCAPTION ) ||
|
||||
( style &wxTINY_CAPTION_HORIZ) || ( style &wxTINY_CAPTION_VERT)
|
||||
( style & wxTINY_CAPTION)
|
||||
)
|
||||
{
|
||||
if ( ( style & wxSTAY_ON_TOP ) )
|
||||
@@ -1237,7 +1237,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
|
||||
else
|
||||
wclass = kFloatingWindowClass ;
|
||||
|
||||
if ( ( style &wxTINY_CAPTION_VERT) )
|
||||
if ( ( style & wxTINY_CAPTION) )
|
||||
attr |= kWindowSideTitlebarAttribute ;
|
||||
}
|
||||
else
|
||||
|
@@ -693,8 +693,7 @@ bool wxSetWMDecorations(Window w, long style)
|
||||
}
|
||||
|
||||
if ((style & wxCAPTION) ||
|
||||
(style & wxTINY_CAPTION_HORIZ) ||
|
||||
(style & wxTINY_CAPTION_VERT))
|
||||
(style & wxTINY_CAPTION))
|
||||
{
|
||||
wmProp.props |= GR_WM_PROPS_CAPTION ;
|
||||
wmProp.flags |= GR_WM_FLAGS_PROPS ;
|
||||
|
Reference in New Issue
Block a user