//-----------------------------------------------------------------------------
#ifndef SpinEditorDoubleH
#define SpinEditorDoubleH SpinEditorDoubleH
//-----------------------------------------------------------------------------

#include <wxPropGrid/Include/propgrid.h>
#include <wxPropGrid/Include/propdev.h>
#if wxPROPGRID_MINOR > 2
#	ifdef SWIG
		%import <wx/propgrid/editors.h>
#	else
#		include <wx/propgrid/editors.h>
#	endif
#endif

//------------------------------------------------------------------------------
class wxPGCustomSpinCtrlEditor : public wxPGTextCtrlEditor
//------------------------------------------------------------------------------
{
	wxPGCustomSpinCtrlEditor() : wxPGTextCtrlEditor() {}
	static wxPGCustomSpinCtrlEditor* m_pInstance;
public:
	// See below for short explanations of what these are suppposed to do.
#ifndef __WXPYTHON__
	virtual wxWindow*					CreateControls( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& sz, wxWindow** psecondary ) const;
#else
#	if wxPROPGRID_MINOR > 2
		virtual wxPGWindowList			CreateControls( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& sz ) const;
#	else
		virtual wxPGWindowPair			CreateControls( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& sz ) const;
#	endif
#endif
	virtual bool						CopyValueFromControl( wxPGProperty* property, wxWindow* wnd ) const;
	virtual wxPG_CONST_WXCHAR_PTR		GetName() const { return wxT("SpinCtrl"); }
#ifndef SWIG
	static wxPGCustomSpinCtrlEditor*	Instance();
#endif
	virtual void						SetValueToUnspecified( wxWindow* wnd ) const;
	virtual void						SetControlStringValue( wxWindow* wnd, const wxString& txt ) const;
	virtual bool						OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd, wxEvent& e ) const;
	virtual void						OnFocus( wxPGProperty* , wxWindow*  ) const {} // must overload the function from the base class!
	virtual void						UpdateControl( wxPGProperty* property, wxWindow* wnd ) const;
};

#endif // SpinEditorDoubleH
