]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/button.h
Change from IsOK to IsOk to match everything else
[wxWidgets.git] / include / wx / msw / button.h
index 5caf45782a1f2c23d8a3f13845bc53f63d9c7225..b2b1d7060a76da6dc9f4c2bdc20a7a0817614ce3 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _WX_BUTTON_H_
 #define _WX_BUTTON_H_
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma interface "button.h"
 #endif
 
@@ -35,6 +35,27 @@ public:
     {
         Create(parent, id, label, pos, size, style, validator, name);
     }
+    
+    wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock,
+           const wxString& descriptiveLabel = wxEmptyString,
+           const wxPoint& pos = wxDefaultPosition,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxButtonNameStr)
+    {
+        Create(parent, id, stock, descriptiveLabel, pos, style, validator, name);
+    }
+  
+    bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock,
+           const wxString& descriptiveLabel = wxEmptyString,
+           const wxPoint& pos = wxDefaultPosition,
+           long style = 0,
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxButtonNameStr)
+    {
+        return CreateStock(parent, id, stock, descriptiveLabel,
+                           pos, style, validator, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -51,9 +72,15 @@ public:
 
     // implementation from now on
     virtual void Command(wxCommandEvent& event);
-    virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+    virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
     virtual bool MSWCommand(WXUINT param, WXWORD id);
 
+    virtual void ApplyParentThemeBackground(const wxColour& bg)
+    {
+        // avoide switching into owner-drawn mode
+        wxControl::SetBackgroundColour(bg);
+    }
+    
 #ifdef __WIN32__
     // coloured buttons support
     virtual bool SetBackgroundColour(const wxColour &colour);
@@ -81,7 +108,7 @@ protected:
     virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const ;
 
 private:
-    DECLARE_DYNAMIC_CLASS(wxButton)
+    DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)
 };
 
 #endif