]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/btncmn.cpp
Add support for MSW unique volume names to wxFileName.
[wxWidgets.git] / src / common / btncmn.cpp
index 92e8103586835e02ac7252b1a99b5424a0b685c6..c0a943189bf2e3ae780499a0904ee48d1df163c5 100644 (file)
@@ -23,6 +23,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_BUTTON
+
 #ifndef WX_PRECOMP
     #include "wx/button.h"
     #include "wx/toplevel.h"
@@ -37,8 +39,21 @@ wxWindow *wxButtonBase::SetDefault()
     wxTopLevelWindow * const
         tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
 
-    wxCHECK_MSG( tlw, NULL, _T("button without top level window?") );
+    wxCHECK_MSG( tlw, NULL, wxT("button without top level window?") );
 
     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