]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/univ/spinbutt.h
activating DrawRectangle optimization
[wxWidgets.git] / include / wx / univ / spinbutt.h
index f01bccb359b7f7f474f1c5319f17aec67e14e6b0..40a28c67a6a6779dc84973d036ac1297c2edf1b6 100644 (file)
@@ -6,16 +6,12 @@
 // Created:     21.01.01
 // RCS-ID:      $Id$
 // Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
 // Created:     21.01.01
 // RCS-ID:      $Id$
 // Copyright:   (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_UNIV_SPINBUTT_H_
 #define _WX_UNIV_SPINBUTT_H_
 
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_UNIV_SPINBUTT_H_
 #define _WX_UNIV_SPINBUTT_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "univspinbutt.h"
-#endif
-
 #include "wx/univ/scrarrow.h"
 
 // ----------------------------------------------------------------------------
 #include "wx/univ/scrarrow.h"
 
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 
 // actions supported by this control
 // ----------------------------------------------------------------------------
 
 // actions supported by this control
-#define wxACTION_SPIN_INC    _T("inc")
-#define wxACTION_SPIN_DEC    _T("dec")
+#define wxACTION_SPIN_INC    wxT("inc")
+#define wxACTION_SPIN_DEC    wxT("dec")
 
 
-class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase,
+class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase,
                                  public wxControlWithArrows
 {
 public:
     wxSpinButton();
     wxSpinButton(wxWindow *parent,
                                  public wxControlWithArrows
 {
 public:
     wxSpinButton();
     wxSpinButton(wxWindow *parent,
-                 wxWindowID id = -1,
+                 wxWindowID id = wxID_ANY,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
                  const wxString& name = wxSPIN_BUTTON_NAME);
 
     bool Create(wxWindow *parent,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
                  const wxString& name = wxSPIN_BUTTON_NAME);
 
     bool Create(wxWindow *parent,
-                wxWindowID id = -1,
+                wxWindowID id = wxID_ANY,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
@@ -57,27 +53,33 @@ public:
     virtual int GetArrowState(wxScrollArrows::Arrow arrow) const;
     virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set);
     virtual bool OnArrow(wxScrollArrows::Arrow arrow);
     virtual int GetArrowState(wxScrollArrows::Arrow arrow) const;
     virtual void SetArrowFlag(wxScrollArrows::Arrow arrow, int flag, bool set);
     virtual bool OnArrow(wxScrollArrows::Arrow arrow);
-    virtual wxScrollArrows::Arrow HitTest(const wxPoint& pt) const;
+    virtual wxScrollArrows::Arrow HitTestArrow(const wxPoint& pt) const;
 
     // for wxStdSpinButtonInputHandler
     const wxScrollArrows& GetArrows() { return m_arrows; }
 
 
     // for wxStdSpinButtonInputHandler
     const wxScrollArrows& GetArrows() { return m_arrows; }
 
+    virtual bool PerformAction(const wxControlAction& action,
+                               long numArg = 0,
+                               const wxString& strArg = wxEmptyString);
+
+    static wxInputHandler *GetStdInputHandler(wxInputHandler *handlerDef);
+    virtual wxInputHandler *DoGetStdInputHandler(wxInputHandler *handlerDef)
+    {
+        return GetStdInputHandler(handlerDef);
+    }
+
 protected:
     virtual wxSize DoGetBestClientSize() const;
     virtual void DoDraw(wxControlRenderer *renderer);
     virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
 
 protected:
     virtual wxSize DoGetBestClientSize() const;
     virtual void DoDraw(wxControlRenderer *renderer);
     virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
 
-    virtual bool PerformAction(const wxControlAction& action,
-                               long numArg = 0,
-                               const wxString& strArg = wxEmptyString);
-
     // the common part of all ctors
     void Init();
 
     // normalize the value to fit into min..max range
     int NormalizeValue(int value) const;
 
     // the common part of all ctors
     void Init();
 
     // normalize the value to fit into min..max range
     int NormalizeValue(int value) const;
 
-    // change the value by +1/-1 and send the event, return TRUE if value was
+    // change the value by +1/-1 and send the event, return true if value was
     // changed
     bool ChangeValue(int inc);
 
     // changed
     bool ChangeValue(int inc);
 
@@ -102,7 +104,7 @@ private:
 // wxStdScrollBarInputHandler) and processes keyboard events too
 // ----------------------------------------------------------------------------
 
 // wxStdScrollBarInputHandler) and processes keyboard events too
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxStdSpinButtonInputHandler : public wxStdInputHandler
+class WXDLLIMPEXP_CORE wxStdSpinButtonInputHandler : public wxStdInputHandler
 {
 public:
     wxStdSpinButtonInputHandler(wxInputHandler *inphand);
 {
 public:
     wxStdSpinButtonInputHandler(wxInputHandler *inphand);