]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/tglbtn.h
move all appearace-related methods down to wxCalendarCtrlBase from wxGenericCalendarCtrl
[wxWidgets.git] / interface / tglbtn.h
index 27e10963e7d65078aa43fc6d03b638f5b494f7c1..0ee09cededa1062d941cbbe2e360da8c97e8352a 100644 (file)
@@ -1,75 +1,11 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        tglbtn.h
 /////////////////////////////////////////////////////////////////////////////
 // Name:        tglbtn.h
-// Purpose:     documentation for wxBitmapToggleButton class
+// Purpose:     interface of wxBitmapToggleButton
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-/**
-    @class wxBitmapToggleButton
-    @wxheader{tglbtn.h}
-
-    wxBitmapToggleButton is a wxToggleButton
-    that contains a bitmap instead of text.
-
-    This control emits an update UI event.
-
-    @beginEventTable
-    @event{EVT_TOGGLEBUTTON(id, func)}:
-           Handles a toggle button click event.
-    @endEventTable
-
-    @library{wxcore}
-    @category{ctrl}
-    @appearance{bitmaptogglebutton.png}
-*/
-class wxBitmapToggleButton : public wxControl
-{
-public:
-    //@{
-    /**
-        Constructor, creating and showing a toggle button with the bitmap @e label.
-        Internally calls Create().
-    */
-    wxBitmapToggleButton();
-    wxBitmapToggleButton(wxWindow* parent, wxWindowID id,
-                         const wxBitmap& label,
-                         const wxPoint& pos = wxDefaultPosition,
-                         const wxSize& size = wxDefaultSize,
-                         long style = 0,
-                         const wxValidator& val,
-                         const wxString& name = "checkBox");
-    //@}
-
-    /**
-        Create method for two-step construction.
-    */
-    bool Create(wxWindow* parent, wxWindowID id,
-                const wxBitmap& label,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                long style = 0,
-                const wxValidator& val,
-                const wxString& name = "checkBox");
-
-    /**
-        Gets the state of the toggle button.
-        
-        @returns Returns @true if it is pressed, @false otherwise.
-    */
-    bool GetValue();
-
-    /**
-        Sets the toggle button to the given state. This does not cause a
-        @c EVT_TOGGLEBUTTON event to be emitted.
-        
-        @param state
-            If @true, the button is pressed.
-    */
-    void SetValue(bool state);
-};
-
 
 /**
     @class wxToggleButton
 
 /**
     @class wxToggleButton
@@ -82,9 +18,9 @@ public:
     Since wxWidgets version 2.9.0 this control emits an update UI event.
 
     You can see wxToggleButton in action in the sixth page of the
     Since wxWidgets version 2.9.0 this control emits an update UI event.
 
     You can see wxToggleButton in action in the sixth page of the
-    controls sample.
+    controls() sample.
 
 
-    @beginEventTable
+    @beginEventTable{wxCommandEvent}
     @event{EVT_TOGGLEBUTTON(id, func)}:
            Handles a toggle button click event.
     @endEventTable
     @event{EVT_TOGGLEBUTTON(id, func)}:
            Handles a toggle button click event.
     @endEventTable
@@ -93,8 +29,7 @@ public:
     @category{ctrl}
     @appearance{togglebutton.png}
 
     @category{ctrl}
     @appearance{togglebutton.png}
 
-    @seealso
-    wxCheckBox, wxButton, wxBitmapToggleButton
+    @see wxCheckBox, wxButton, wxBitmapToggleButton
 */
 class wxToggleButton : public wxControl
 {
 */
 class wxToggleButton : public wxControl
 {
@@ -102,7 +37,7 @@ public:
     //@{
     /**
         Constructor, creating and showing a toggle button.
     //@{
     /**
         Constructor, creating and showing a toggle button.
-        
+
         @param parent
             Parent window. Must not be @NULL.
         @param id
         @param parent
             Parent window. Must not be @NULL.
         @param id
@@ -121,7 +56,7 @@ public:
             Window validator.
         @param name
             Window name.
             Window validator.
         @param name
             Window name.
-        
+
         @see Create(), wxValidator
     */
     wxToggleButton();
         @see Create(), wxValidator
     */
     wxToggleButton();
@@ -130,14 +65,14 @@ public:
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    long style = 0,
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    long style = 0,
-                   const wxValidator& val,
+                   const wxValidator& val = wxDefaultValidator,
                    const wxString& name = "checkBox");
     //@}
 
     /**
         Destructor, destroying the toggle button.
     */
                    const wxString& name = "checkBox");
     //@}
 
     /**
         Destructor, destroying the toggle button.
     */
-    ~wxToggleButton();
+    virtual ~wxToggleButton();
 
     /**
         Creates the toggle button for two-step construction. See wxToggleButton()
 
     /**
         Creates the toggle button for two-step construction. See wxToggleButton()
@@ -148,22 +83,88 @@ public:
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
-                const wxValidator& val,
+                const wxValidator& val = wxDefaultValidator,
                 const wxString& name = "checkBox");
 
     /**
         Gets the state of the toggle button.
                 const wxString& name = "checkBox");
 
     /**
         Gets the state of the toggle button.
-        
+
         @returns Returns @true if it is pressed, @false otherwise.
     */
         @returns Returns @true if it is pressed, @false otherwise.
     */
-    bool GetValue();
+    bool GetValue() const;
 
     /**
         Sets the toggle button to the given state. This does not cause a
         @c EVT_TOGGLEBUTTON event to be emitted.
 
     /**
         Sets the toggle button to the given state. This does not cause a
         @c EVT_TOGGLEBUTTON event to be emitted.
-        
+
         @param state
             If @true, the button is pressed.
     */
     void SetValue(bool state);
 };
         @param state
             If @true, the button is pressed.
     */
     void SetValue(bool state);
 };
+
+
+/**
+    @class wxBitmapToggleButton
+    @wxheader{tglbtn.h}
+
+    wxBitmapToggleButton is a wxToggleButton
+    that contains a bitmap instead of text.
+
+    This control emits an update UI event.
+
+    @beginEventTable{wxCommandEvent}
+    @event{EVT_TOGGLEBUTTON(id, func)}:
+           Handles a toggle button click event.
+    @endEventTable
+
+    @library{wxcore}
+    @category{ctrl}
+    @appearance{bitmaptogglebutton.png}
+*/
+class wxBitmapToggleButton : public wxControl
+{
+public:
+    //@{
+    /**
+        Constructor, creating and showing a toggle button with the bitmap @e label.
+        Internally calls Create().
+    */
+    wxBitmapToggleButton();
+    wxBitmapToggleButton(wxWindow* parent, wxWindowID id,
+                         const wxBitmap& label,
+                         const wxPoint& pos = wxDefaultPosition,
+                         const wxSize& size = wxDefaultSize,
+                         long style = 0,
+                         const wxValidator& val = wxDefaultValidator,
+                         const wxString& name = "checkBox");
+    //@}
+
+    /**
+        Create method for two-step construction.
+    */
+    bool Create(wxWindow* parent, wxWindowID id,
+                const wxBitmap& label,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = 0,
+                const wxValidator& val = wxDefaultValidator,
+                const wxString& name = "checkBox");
+
+    /**
+        Gets the state of the toggle button.
+
+        @returns Returns @true if it is pressed, @false otherwise.
+    */
+    virtual bool GetValue() const;
+
+    /**
+        Sets the toggle button to the given state. This does not cause a
+        @c EVT_TOGGLEBUTTON event to be emitted.
+
+        @param state
+            If @true, the button is pressed.
+    */
+    virtual void SetValue(bool state);
+};
+