]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxSP_NO_XP_THEME style to wxSplitterWindow to switch off
authorJulian Smart <julian@anthemion.co.uk>
Wed, 3 Mar 2004 20:44:37 +0000 (20:44 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 3 Mar 2004 20:44:37 +0000 (20:44 +0000)
theming (some applications look bad without 3D borders)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/latex/wx/splitter.tex
include/wx/splitter.h
samples/splitter/splitter.cpp
src/msw/renderer.cpp

index 2bbf054412ecac93a00a90159b59579084118b4c..3e46a9db91615562efef37778a9860ae490d5817 100644 (file)
@@ -77,8 +77,18 @@ OTHER CHANGES
 2.5.2
 -----
 
 2.5.2
 -----
 
+All:
+
+All (GUI):
+
+- wxHtmlWindow now delays image scaling until rendering,
+  resulting in much better display of scaled images
+
 wxMSW:
 wxMSW:
+
 - wxWindow::Freeze()/Thaw() can now be nested
 - wxWindow::Freeze()/Thaw() can now be nested
+- Added wxSP_NO_XP_THEME style to wxSplitterWindow to switch off
+  XP theming (some applications look bad without 3D borders)
 
 
 2.5.1
 
 
 2.5.1
index a76b73188b4bcba8248ec1f2f2ab2ba8dc62338b..71f0e82d58df237e48b155549478307141258033 100644 (file)
@@ -6,10 +6,6 @@ This class manages up to two subwindows. The current view can be
 split into two programmatically (perhaps from a menu command), and unsplit
 either programmatically or via the wxSplitterWindow user interface.
 
 split into two programmatically (perhaps from a menu command), and unsplit
 either programmatically or via the wxSplitterWindow user interface.
 
-Appropriate 3D shading for the Windows 95 user interface is an option -
-this is also recommended for GTK. Optionally, the sash can be made to
-look more like the native control under MacOS X.
-
 \wxheading{Window styles}
 
 \begin{twocollist}\itemsep=0pt
 \wxheading{Window styles}
 
 \begin{twocollist}\itemsep=0pt
@@ -18,6 +14,8 @@ look more like the native control under MacOS X.
 \twocolitem{\windowstyle{wxSP\_3DBORDER}}{Synonym for wxSP\_BORDER.}
 \twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a standard border.}
 \twocolitem{\windowstyle{wxSP\_NOBORDER}}{No border (default).}
 \twocolitem{\windowstyle{wxSP\_3DBORDER}}{Synonym for wxSP\_BORDER.}
 \twocolitem{\windowstyle{wxSP\_BORDER}}{Draws a standard border.}
 \twocolitem{\windowstyle{wxSP\_NOBORDER}}{No border (default).}
+\twocolitem{\windowstyle{wxSP\_NO\_XP\_THEME}}{Under Windows XP, switches off the attempt to draw the
+splitter using Windows XP theming, so the borders and sash will take on the pre-XP look.}
 \twocolitem{\windowstyle{wxSP\_PERMIT\_UNSPLIT}}{Always allow to
 unsplit, even with the minimum pane size other than zero.}
 \twocolitem{\windowstyle{wxSP\_LIVE\_UPDATE}}{Don't draw XOR line but resize the child windows immediately.}
 \twocolitem{\windowstyle{wxSP\_PERMIT\_UNSPLIT}}{Always allow to
 unsplit, even with the minimum pane size other than zero.}
 \twocolitem{\windowstyle{wxSP\_LIVE\_UPDATE}}{Don't draw XOR line but resize the child windows immediately.}
index c087846a7aa601f0fb17de966eea2afbd1071748..0858064c69fddfb252a853e45ae6236d48d526e2 100644 (file)
@@ -13,6 +13,7 @@
 #define wxSP_LIVE_UPDATE      0x0080
 #define wxSP_3DSASH           0x0100
 #define wxSP_3DBORDER         0x0200
 #define wxSP_LIVE_UPDATE      0x0080
 #define wxSP_3DSASH           0x0100
 #define wxSP_3DBORDER         0x0200
+#define wxSP_NO_XP_THEME      0x0400
 #define wxSP_BORDER           wxSP_3DBORDER
 #define wxSP_3D               (wxSP_3DBORDER | wxSP_3DSASH)
 
 #define wxSP_BORDER           wxSP_3DBORDER
 #define wxSP_3D               (wxSP_3DBORDER | wxSP_3DSASH)
 
index c869422b91e4f4e2650b9fdc41d0138fa5fa2fee..c50441b75f6b3da2947c320f44f79436901637fb 100644 (file)
@@ -356,7 +356,8 @@ END_EVENT_TABLE()
 MySplitterWindow::MySplitterWindow(wxFrame *parent)
                 : wxSplitterWindow(parent, -1,
                                    wxDefaultPosition, wxDefaultSize,
 MySplitterWindow::MySplitterWindow(wxFrame *parent)
                 : wxSplitterWindow(parent, -1,
                                    wxDefaultPosition, wxDefaultSize,
-                                   0x700| wxSP_LIVE_UPDATE | wxCLIP_CHILDREN)
+                                   wxSP_3D | wxSP_LIVE_UPDATE |
+                                   wxCLIP_CHILDREN /* | wxSP_NO_XP_THEME */ )
 {
     m_frame = parent;
 }
 {
     m_frame = parent;
 }
index 313865986ceddfb36942ef4b5c8cf60e5c7584cd..d4c36549f859fe9be01424d5c8da4ce77d757798 100644 (file)
@@ -30,8 +30,8 @@
     #include "wx/dc.h"
 #endif //WX_PRECOMP
 
     #include "wx/dc.h"
 #endif //WX_PRECOMP
 
+#include "wx/splitter.h"
 #include "wx/renderer.h"
 #include "wx/renderer.h"
-
 #include "wx/msw/uxtheme.h"
 
 // ----------------------------------------------------------------------------
 #include "wx/msw/uxtheme.h"
 
 // ----------------------------------------------------------------------------
@@ -116,17 +116,24 @@ wxRendererNative& wxRendererXP::Get()
 static const wxCoord SASH_WIDTH = 4;
 
 wxSplitterRenderParams
 static const wxCoord SASH_WIDTH = 4;
 
 wxSplitterRenderParams
-wxRendererXP::GetSplitterParams(const wxWindow * WXUNUSED(win))
+wxRendererXP::GetSplitterParams(const wxWindow * win)
 {
 {
-    return wxSplitterRenderParams(SASH_WIDTH, 0, false);
+    if (win->GetWindowStyle() & wxSP_NO_XP_THEME)
+        return m_rendererNative.GetSplitterParams(win);
+    else
+        return wxSplitterRenderParams(SASH_WIDTH, 0, false);
 }
 
 void
 }
 
 void
-wxRendererXP::DrawSplitterBorder(wxWindow * WXUNUSED(win),
-                                 wxDC& WXUNUSED(dc),
-                                 const wxRect& WXUNUSED(rect),
-                                 int WXUNUSED(flags))
+wxRendererXP::DrawSplitterBorder(wxWindow * win,
+                                 wxDC& dc,
+                                 const wxRect& rect,
+                                 int flags)
 {
 {
+    if (win->GetWindowStyle() & wxSP_NO_XP_THEME)
+    {
+        m_rendererNative.DrawSplitterBorder(win, dc, rect, flags);
+    }
 }
 
 void
 }
 
 void
@@ -135,8 +142,15 @@ wxRendererXP::DrawSplitterSash(wxWindow *win,
                                const wxSize& size,
                                wxCoord position,
                                wxOrientation orient,
                                const wxSize& size,
                                wxCoord position,
                                wxOrientation orient,
-                               int WXUNUSED(flags))
+                               int flags)
 {
 {
+    if (win->GetWindowStyle() & wxSP_NO_XP_THEME)
+    {
+        m_rendererNative.DrawSplitterSash(
+                   win, dc, size, position, orient, flags);
+        return;
+    }
+    
     // I don't know if it is correct to use the rebar background for the
     // splitter but it least this works ok in the default theme
     wxUxThemeHandle hTheme(win, L"REBAR");
     // I don't know if it is correct to use the rebar background for the
     // splitter but it least this works ok in the default theme
     wxUxThemeHandle hTheme(win, L"REBAR");