]> git.saurik.com Git - wxWidgets.git/blame - src/common/spinbtncmn.cpp
skip apple options
[wxWidgets.git] / src / common / spinbtncmn.cpp
CommitLineData
e1d3601a
PC
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/common/spinbtncmn.cpp
3// Purpose: wxSpinButton common code
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
e1d3601a
PC
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// ============================================================================
12// declarations
13// ============================================================================
14
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19// For compilers that support precompilation, includes "wx.h".
20#include "wx/wxprec.h"
21
22#ifdef __BORLANDC__
23 #pragma hdrstop
24#endif
25
26#ifndef WX_PRECOMP
27 #include "wx/app.h"
28#endif
29
30#if wxUSE_SPINBTN
31
32#include "wx/spinbutt.h"
33
34// ----------------------------------------------------------------------------
35// XTI
36// ----------------------------------------------------------------------------
37
38wxDEFINE_FLAGS( wxSpinButtonStyle )
39wxBEGIN_FLAGS( wxSpinButtonStyle )
40 // new style border flags, we put them first to
41 // use them for streaming out
42 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
43 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
44 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
45 wxFLAGS_MEMBER(wxBORDER_RAISED)
46 wxFLAGS_MEMBER(wxBORDER_STATIC)
47 wxFLAGS_MEMBER(wxBORDER_NONE)
48
49 // old style border flags
50 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
51 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
52 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
53 wxFLAGS_MEMBER(wxRAISED_BORDER)
54 wxFLAGS_MEMBER(wxSTATIC_BORDER)
55 wxFLAGS_MEMBER(wxBORDER)
56
57 // standard window styles
58 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
59 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
60 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
61 wxFLAGS_MEMBER(wxWANTS_CHARS)
62 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
63 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
64 wxFLAGS_MEMBER(wxVSCROLL)
65 wxFLAGS_MEMBER(wxHSCROLL)
66
67 wxFLAGS_MEMBER(wxSP_HORIZONTAL)
68 wxFLAGS_MEMBER(wxSP_VERTICAL)
69 wxFLAGS_MEMBER(wxSP_ARROW_KEYS)
70 wxFLAGS_MEMBER(wxSP_WRAP)
71wxEND_FLAGS( wxSpinButtonStyle )
72
88a4f868 73wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl, "wx/spinbutt.h")
e1d3601a
PC
74
75wxBEGIN_PROPERTIES_TABLE(wxSpinButton)
76 wxEVENT_RANGE_PROPERTY( Spin, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxSpinEvent )
77
78 wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
79 wxT("Helpstring"), wxT("group"))
80 wxPROPERTY( Min, int, SetMin, GetMin, 0, 0 /*flags*/, \
81 wxT("Helpstring"), wxT("group"))
82 wxPROPERTY( Max, int, SetMax, GetMax, 0, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group"))
84
85 wxPROPERTY_FLAGS( WindowStyle, wxSpinButtonStyle, long, SetWindowStyleFlag, \
86 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group")) // style
88wxEND_PROPERTIES_TABLE()
89
90wxEMPTY_HANDLERS_TABLE(wxSpinButton)
91
92wxCONSTRUCTOR_5( wxSpinButton, wxWindow*, Parent, wxWindowID, Id, \
93 wxPoint, Position, wxSize, Size, long, WindowStyle )
94
95IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
96
97
98#endif // wxUSE_SPINBTN