X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdb5436554c910fe850db1470514ee83ded76db3..fe8b03618ae0a511bf76e85565b3d43b68e99cd5:/src/palmos/checkbox.cpp

diff --git a/src/palmos/checkbox.cpp b/src/palmos/checkbox.cpp
index 77f06f5409..1e1d14d925 100644
--- a/src/palmos/checkbox.cpp
+++ b/src/palmos/checkbox.cpp
@@ -17,10 +17,6 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "checkbox.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -30,13 +26,16 @@
 
 #if wxUSE_CHECKBOX
 
+#include "wx/checkbox.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/checkbox.h"
     #include "wx/brush.h"
     #include "wx/dcscreen.h"
     #include "wx/settings.h"
 #endif
 
+#include <Control.h>
+
 // ============================================================================
 // implementation
 // ============================================================================
@@ -106,8 +105,10 @@ bool wxCheckBox::Create(wxWindow *parent,
                         const wxValidator& validator,
                         const wxString& name)
 {
-    wxControl::PalmCreateControl(checkboxCtl, parent, id, label, pos, size);
-    return true;
+    if(!wxControl::Create(parent, id, pos, size, style, validator, name))
+        return false;
+
+    return wxControl::PalmCreateControl(checkboxCtl, label, pos, size);
 }
 
 wxSize wxCheckBox::DoGetBestSize() const
@@ -117,11 +118,20 @@ wxSize wxCheckBox::DoGetBestSize() const
 
 void wxCheckBox::SetValue(bool val)
 {
+    SetBoolValue(val);
 }
 
 bool wxCheckBox::GetValue() const
 {
-    return false;
+    return GetBoolValue();
+}
+
+bool wxCheckBox::SendClickEvent()
+{
+    wxCommandEvent event(wxEVT_COMMAND_CHECKBOX_CLICKED, GetId());
+    event.SetInt(GetValue());
+    event.SetEventObject(this);
+    return ProcessCommand(event);
 }
 
 void wxCheckBox::Command(wxCommandEvent& event)