class WXDLLIMPEXP_FWD_CORE wxSpinButton;
class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
-class wxSpinCtrlText; // wxTextCtrl used for the wxSpinCtrlGenericBase
+class wxSpinCtrlTextGeneric; // wxTextCtrl used for the wxSpinCtrlGenericBase
// The !wxUSE_SPINBTN version's GetValue() function conflicts with the
// wxTextCtrl's GetValue() and so you have to input a dummy int value.
// function ambiguity.
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxSpinCtrlGenericBase : public wxSpinCtrlBase
+class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxSpinCtrlBase
{
public:
wxSpinCtrlGenericBase() { Init(); }
// forward these functions to all subcontrols
virtual bool Enable(bool enable = true);
virtual bool Show(bool show = true);
- virtual bool Reparent(wxWindow *newParent);
+ virtual bool Reparent(wxWindowBase *newParent);
// get the subcontrols
wxTextCtrl *GetText() const { return m_textCtrl; }
void OnTextEnter(wxCommandEvent& event);
void OnTextChar(wxKeyEvent& event);
- friend class wxSpinCtrlText;
+ friend class wxSpinCtrlTextGeneric;
protected:
// override the base class virtuals involved into geometry calculations
#include "wx/textctrl.h"
-class WXDLLEXPORT wxSpinCtrlGenericBase : public wxTextCtrl
+class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxTextCtrl
{
public:
wxSpinCtrlGenericBase() : m_value(0), m_min(0), m_max(100),
}
// accessors
- int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue() + 0.5); }
- int GetMin() const { return int(m_min + 0.5); }
- int GetMax() const { return int(m_max + 0.5); }
- int GetIncrement() const { return int(m_increment + 0.5); }
+ int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return wxRound( DoGetValue() ); }
+ int GetMin() const { return wxRound( m_min ); }
+ int GetMax() const { return wxRound( m_max ); }
+ int GetIncrement() const { return wxRound( m_increment ); }
// operations
void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } // visibility problem w/ gcc