1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 16:59:19 -04:00
|
|
|
// Name: wx/univ/spinbutt.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// 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"
|
|
|
|
|
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,
|
2001-06-26 16:59:19 -04:00
|
|
|
const wxString& name = wxSPIN_BUTTON_NAME)
|
1999-01-31 18:28:58 -05:00
|
|
|
{
|
|
|
|
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,
|
2001-06-26 16:59:19 -04:00
|
|
|
const wxString& name = wxSPIN_BUTTON_NAME);
|
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
|
|
|
|
2000-01-23 18:23:46 -05:00
|
|
|
// a wxSpinButton can't do anything useful with focus, only wxSpinCtrl can
|
|
|
|
virtual bool AcceptsFocus() const { return FALSE; }
|
|
|
|
|
1999-10-10 19:28:07 -04:00
|
|
|
protected:
|
1999-11-19 16:01:20 -05:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
1999-10-10 19:28:07 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_SPINBUTT_H_
|