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