]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/motif/checkbox.h
wxMDIChildFrame::Maximize() should have default value for its argument just as wxFram...
[wxWidgets.git] / include / wx / motif / checkbox.h
index 8032731221e088673942d4e906102a9c78fa4336..3dd762c3cc2137aa1b706dfcbad12ab2df0a43bb 100644 (file)
 #ifndef _WX_CHECKBOX_H_
 #define _WX_CHECKBOX_H_
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma interface "checkbox.h"
 #endif
 
-#include "wx/control.h"
-
-WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
-
 // Checkbox item (single checkbox)
 class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
 {
     DECLARE_DYNAMIC_CLASS(wxCheckBox)
         
 public:
-    inline wxCheckBox() { }
+    inline wxCheckBox() { Init(); }
     inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
         const wxPoint& pos = wxDefaultPosition,
         const wxSize& size = wxDefaultSize, long style = 0,
         const wxValidator& validator = wxDefaultValidator,
         const wxString& name = wxCheckBoxNameStr)
     {
+        Init();
+
         Create(parent, id, label, pos, size, style, validator, name);
     }
     
@@ -47,6 +45,21 @@ public:
     
     // Implementation
     virtual void ChangeBackgroundColour();
+private:
+    // common part of all constructors
+    void Init()
+    {
+        m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
+    }
+
+    virtual void DoSet3StateValue(wxCheckBoxState state);
+
+    virtual wxCheckBoxState DoGet3StateValue() const;
+
+    // public for the callback
+public:
+    // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
+    wxEventType m_evtType;
 };
 
 #endif