]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/valgen.cpp
Correct the drawing of check tools with a drop down button in wxAuiToolBar.
[wxWidgets.git] / src / common / valgen.cpp
index 37cefb5e74435debbe15ef6b5e633e0427c05140..1172c888cb1df56b8a7525b225ff8dd5d050b2fd 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 
 #include "wx/spinctrl.h"
-#include "wx/datectrl.h"
+// #include "wx/datectrl.h" -- can't use it in this (core) file for now
 
 #if wxUSE_SPINBTN
     #include "wx/spinbutt.h"
@@ -146,7 +146,7 @@ bool wxGenericValidator::TransferToWindow(void)
             return true;
         }
     } else
-#if defined(__WXMAC__) || defined(__WXGTK20__)
+#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) )
     {
         wxBitmapToggleButton * pControl = (wxBitmapToggleButton *) m_validatorWindow;
@@ -416,6 +416,17 @@ bool wxGenericValidator::TransferFromWindow(void)
             return true;
         }
     } else
+#if (defined(__WXMAC__) || defined(__WXMSW__) || defined(__WXGTK20__)) && !defined(__WXUNIVERSAL__)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) )
+    {
+        wxBitmapToggleButton *pControl = (wxBitmapToggleButton *) m_validatorWindow;
+        if (m_pBool)
+        {
+            *m_pBool = pControl->GetValue() ;
+            return true;
+        }
+    } else
+#endif
 #endif
 
     // INT CONTROLS ***************************************