From 565215b26a117edbbbb52d62c79ef0fc38d81c39 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 22 Jun 1998 22:27:14 +0000 Subject: [PATCH] Added wxCLIP_CHILDREN style (mainly for getting rid of flicker), other minor mods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 11 +++++++---- include/wx/generic/splitter.h | 2 +- include/wx/menuitem.h | 2 ++ include/wx/msw/setup.h | 2 +- include/wx/msw/statbr95.h | 4 ++-- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 0924a27fdb..3b77dd23c4 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -312,8 +312,11 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); // OBSOLETE - use wxNO_CTL3D instead #define wxNO_3D 0x00800000 // Override CTL3D or native 3D styles for children -#define wxOVERRIDE_KEY_TRANSLATIONS 0x00400000 - // TODO: do we need this??? (Motif only) +#define wxCLIP_CHILDREN 0x00400000 + // Clip children when painting, which reduces flicker in + // e.g. frames and splitter windows, but can't be used in + // a panel where a static box must be 'transparent' (panel + // paints the background for it) // Add this style to a panel to get tab traversal working // outside of dialogs. @@ -343,7 +346,7 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); #define wxDIALOG_MODAL 0x0020 #define wxDIALOG_MODELESS 0x0000 -#define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION) +#define wxDEFAULT_FRAME_STYLE (wxRESIZE_BORDER | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION | wxCLIP_CHILDREN) #if WXWIN_COMPATIBILITY #define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE @@ -541,7 +544,7 @@ typedef void (*wxFunction) (wxObject&, wxEvent&); * wxStatusBar95 flags */ -#define wxSB_SIZEGRIP 0x0002 +#define wxST_SIZEGRIP 0x0002 /* * GDI descriptions diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 0a41b11bdc..2502c0222e 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -58,7 +58,7 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow // Normal constructor wxSplitterWindow(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, const long style = wxSP_3D, const wxString& name = "splitter"); + const wxSize& size = wxDefaultSize, const long style = wxSP_3D|wxCLIP_CHILDREN, const wxString& name = "splitter"); ~wxSplitterWindow(void); // Gets the only or left/top pane diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h index 5de85d5e24..34178c67d1 100644 --- a/include/wx/menuitem.h +++ b/include/wx/menuitem.h @@ -16,6 +16,8 @@ // headers // ---------------------------------------------------------------------------- +#include "wx/setup.h" + // an exception to the general rule that a normal header doesn't include other // headers - only because ownerdrw.h is not always included and I don't want // to write #ifdef's everywhere... diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index 7007213758..2a3cf3da03 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -249,7 +249,7 @@ #define USE_PENWINDOWS 0 // Set to 1 to use PenWindows -#define USE_OWNER_DRAWN 1 +#define USE_OWNER_DRAWN 0 // Owner-drawn menus and listboxes #define USE_NATIVE_STATUSBAR 1 diff --git a/include/wx/msw/statbr95.h b/include/wx/msw/statbr95.h index a6a6acb4be..51006b6b85 100644 --- a/include/wx/msw/statbr95.h +++ b/include/wx/msw/statbr95.h @@ -21,10 +21,10 @@ class WXDLLEXPORT wxStatusBar95 : public wxStatusBar public: // ctors wxStatusBar95(); - wxStatusBar95(wxWindow *parent, wxWindowID id = -1, long style = wxSB_SIZEGRIP); + wxStatusBar95(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); // create status line - bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxSB_SIZEGRIP); + bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP); // a status line can have several (<256) fields numbered from 0 virtual void SetFieldsCount(int number = 1, const int *widths = NULL); -- 2.45.2