]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/univ/button.h
removed const operator[]s (should fix 1162115)
[wxWidgets.git] / include / wx / univ / button.h
index fcc95e74b6a7c47f12f3cc556204ad1b3218f130..68a56beb8e8bd5ad0e5fed4337aea830634ea083 100644 (file)
@@ -36,29 +36,39 @@ class WXDLLEXPORT wxInputHandler;
 class WXDLLEXPORT wxButton : public wxButtonBase
 {
 public:
-    wxButton();
+    wxButton() { Init(); }
     wxButton(wxWindow *parent,
              wxWindowID id,
              const wxBitmap& bitmap,
-             const wxString& label,
+             const wxString& label = wxEmptyString,
              const wxPoint& pos = wxDefaultPosition,
              const wxSize& size = wxDefaultSize,
              long style = 0,
              const wxValidator& validator = wxDefaultValidator,
-             const wxString& name = wxButtonNameStr);
+             const wxString& name = wxButtonNameStr)
+    {
+        Init();
 
+        Create(parent, id, bitmap, label, pos, size, style, validator, name);
+    }
+    
     wxButton(wxWindow *parent,
              wxWindowID id,
-             const wxString& label,
+             const wxString& label = wxEmptyString,
              const wxPoint& pos = wxDefaultPosition,
              const wxSize& size = wxDefaultSize,
              long style = 0,
              const wxValidator& validator = wxDefaultValidator,
-             const wxString& name = wxButtonNameStr);
+             const wxString& name = wxButtonNameStr)
+    {
+        Init();
+
+        Create(parent, id, label, pos, size, style, validator, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
-                const wxString& label,
+                const wxString& label = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
@@ -68,11 +78,11 @@ public:
         return Create(parent, id, wxNullBitmap, label,
                       pos, size, style, validator, name);
     }
-
+    
     bool Create(wxWindow *parent,
                 wxWindowID id,
                 const wxBitmap& bitmap,
-                const wxString& label,
+                const wxString& label = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
@@ -103,7 +113,7 @@ protected:
     virtual bool DoDrawBackground(wxDC& dc);
     virtual void DoDraw(wxControlRenderer *renderer);
 
-    virtual bool CanBeHighlighted() const { return TRUE; }
+    virtual bool CanBeHighlighted() const { return true; }
 
     // common part of all ctors
     void Init();