]> git.saurik.com Git - wxWidgets.git/commitdiff
Toolbars shouldn't have themed borders
authorJulian Smart <julian@anthemion.co.uk>
Thu, 9 Aug 2007 15:05:56 +0000 (15:05 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 9 Aug 2007 15:05:56 +0000 (15:05 +0000)
Made it easier to switch off theme borders in wxWindow if necessary

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

include/wx/msw/control.h
include/wx/msw/tbar95.h
src/msw/control.cpp
src/msw/window.cpp

index a8ee1e5075ab6726037b576dae4bffa226d6191e..503d0db28c7b7c9fea332661d6272852fb8e29c4 100644 (file)
@@ -71,6 +71,9 @@ public:
     // default style for the control include WS_TABSTOP if it AcceptsFocus()
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
+    // choose the default border for this window
+    virtual wxBorder GetDefaultBorder() const;
+
 protected:
     // return default best size (doesn't really make any sense, override this)
     virtual wxSize DoGetBestSize() const;
index ec80d8d95684dcd6d47446750adf13ee8c4e6312..92fcfd7bcd76d82b5dee6e113aefcce0fe2515e8 100644 (file)
@@ -78,6 +78,9 @@ public:
 
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
 
+    // returns true if the platform should explicitly apply a theme border
+    virtual bool CanApplyThemeBorder() const { return false; }
+
 protected:
     // common part of all ctors
     void Init();
index 272ef5b7017da5544344821d5cc811f2162fb757..857cc3325be5a15c89d68dc1081766b5a4db71b0 100644 (file)
@@ -243,6 +243,11 @@ wxSize wxControl::DoGetBestSize() const
     return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
 }
 
+wxBorder wxControl::GetDefaultBorder() const
+{
+       return GetDefaultBorderForControl();
+}
+
 // This is a helper for all wxControls made with UPDOWN native control.
 // In wxMSW it was only wxSpinCtrl derived from wxSpinButton but in
 // WinCE of Smartphones this happens also for native wxTextCtrl,
index 99bb37b398eac7a24c7f5ee99c11676516df9fa1..2632c1f73040c188ce7e3b8ce1d262884e38534d 100644 (file)
@@ -1286,11 +1286,6 @@ void wxWindowMSW::MSWUpdateStyle(long flagsOld, long exflagsOld)
     }
 }
 
-wxBorder wxWindowMSW::GetDefaultBorder() const
-{
-       return GetDefaultBorderForControl();
-}
-
 wxBorder wxWindowMSW::GetDefaultBorderForControl() const
 {
     // we want to automatically give controls a sunken style (confusingly,
@@ -1312,6 +1307,11 @@ wxBorder wxWindowMSW::GetDefaultBorderForControl() const
 #endif
 }
 
+wxBorder wxWindowMSW::GetDefaultBorder() const
+{
+       return GetDefaultBorderForControl();
+}
+
 WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
 {
     // translate common wxWidgets styles to Windows ones