1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: spinbutt.h
|
|
|
|
// Purpose: wxSpinButton class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-07-23 17:03:02 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_SPINBUTT_H_
|
|
|
|
#define _WX_SPINBUTT_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-10-10 19:28:07 -04:00
|
|
|
#pragma interface "spinbutt.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
#include "wx/event.h"
|
|
|
|
|
|
|
|
#if defined(__WIN95__)
|
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
1999-01-31 18:28:58 -05:00
|
|
|
public:
|
1999-10-10 19:28:07 -04:00
|
|
|
// construction
|
1999-07-23 19:41:45 -04:00
|
|
|
wxSpinButton() { }
|
1999-05-13 17:21:04 -04:00
|
|
|
|
1999-01-31 18:28:58 -05:00
|
|
|
wxSpinButton(wxWindow *parent,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
|
|
|
const wxString& name = "wxSpinButton")
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
1999-05-13 17:21:04 -04:00
|
|
|
|
1999-01-31 18:28:58 -05:00
|
|
|
virtual ~wxSpinButton();
|
1999-05-13 17:21:04 -04:00
|
|
|
|
1999-01-31 18:28:58 -05:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1999-05-13 17:21:04 -04:00
|
|
|
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
1999-01-31 18:28:58 -05:00
|
|
|
const wxString& name = "wxSpinButton");
|
1999-05-13 17:21:04 -04:00
|
|
|
|
|
|
|
|
1999-07-28 17:01:04 -04:00
|
|
|
// accessors
|
1999-07-23 17:03:02 -04:00
|
|
|
virtual int GetValue() const;
|
|
|
|
virtual void SetValue(int val);
|
|
|
|
virtual void SetRange(int minVal, int maxVal);
|
1999-05-13 17:21:04 -04:00
|
|
|
|
1999-07-28 17:01:04 -04:00
|
|
|
// implementation
|
1999-01-31 18:28:58 -05:00
|
|
|
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
1999-07-28 17:01:04 -04:00
|
|
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
1999-05-13 17:21:04 -04:00
|
|
|
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
|
|
|
|
WXWORD pos, WXHWND control);
|
1999-10-10 19:28:07 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize();
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1999-10-10 19:28:07 -04:00
|
|
|
// __WIN95__
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_SPINBUTT_H_
|