]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/valgen.cpp
fixed incorrect use of wxVector<> in wxXRC
[wxWidgets.git] / src / common / valgen.cpp
index 46c0a4cbb7902c92566e7901132e8fcb2e9d7b7f..d9de2dea7b8579014bae031bdf8d893dca20968c 100644 (file)
@@ -19,9 +19,9 @@
 #if wxUSE_VALIDATORS
 
 #ifndef WX_PRECOMP
+    #include "wx/dynarray.h"
     #include "wx/utils.h"
     #include "wx/intl.h"
-    #include "wx/dynarray.h"
     #include "wx/choice.h"
     #include "wx/combobox.h"
     #include "wx/radiobox.h"
     #include "wx/button.h"
     #include "wx/listbox.h"
     #include "wx/slider.h"
+    #include "wx/checklst.h"
 #endif
 
 #include "wx/spinctrl.h"
 
 #if wxUSE_SPINBTN
-  #include "wx/spinbutt.h"
-#endif
-#if wxUSE_CHECKLISTBOX
-  #include "wx/checklst.h"
+    #include "wx/spinbutt.h"
 #endif
 #if wxUSE_TOGGLEBTN
-  #include "wx/tglbtn.h"
+    #include "wx/tglbtn.h"
 #endif
 
 #include "wx/valgen.h"
@@ -123,6 +121,7 @@ bool wxGenericValidator::TransferToWindow(void)
         }
     } else
 #endif
+
 #if wxUSE_TOGGLEBTN
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxToggleButton)) )
     {
@@ -133,6 +132,17 @@ bool wxGenericValidator::TransferToWindow(void)
             return true;
         }
     } else
+#if defined(__WXMAC__) || defined(__WXGTK20__)
+    if (m_validatorWindow->IsKindOf(CLASSINFO(wxBitmapToggleButton)) )
+    {
+        wxBitmapToggleButton * pControl = (wxBitmapToggleButton *) m_validatorWindow;
+        if (m_pBool)
+        {
+            pControl->SetValue(*m_pBool);
+            return true;
+        }
+    } else
+#endif
 #endif
 
     // int controls