]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/btncmn.cpp
implement button support for pre-XP systems (or with themes disabled); using only...
[wxWidgets.git] / src / common / btncmn.cpp
index 92e8103586835e02ac7252b1a99b5424a0b685c6..670dceacdf4963615f7a08578f2aa0a9b8b106d2 100644 (file)
@@ -23,6 +23,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_BUTTON
+
 #ifndef WX_PRECOMP
     #include "wx/button.h"
     #include "wx/toplevel.h"
@@ -42,3 +44,16 @@ wxWindow *wxButtonBase::SetDefault()
     return tlw->SetDefaultItem(this);
 }
 
+void wxButtonBase::SetBitmapPosition(wxDirection dir)
+{
+    wxASSERT_MSG( !(dir & ~wxDIRECTION_MASK), "non-direction flag used" );
+    wxASSERT_MSG( !!(dir & wxLEFT) +
+                    !!(dir & wxRIGHT) +
+                      !!(dir & wxTOP) +
+                       !!(dir & wxBOTTOM) == 1,
+                   "exactly one direction flag must be set" );
+
+    DoSetBitmapPosition(dir);
+
+}
+#endif // wxUSE_BUTTON