1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/slidercmn.cpp
3 // Purpose: wxSlider common code
4 // Author: Julian Smart
7 // RCS-ID: $Id: slider95.cpp 41054 2006-09-07 19:01:45Z ABX $
8 // Copyright: (c) Julian Smart 1998
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 // ============================================================================
15 // ============================================================================
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 // For compilers that support precompilation, includes "wx.h".
22 #include "wx/wxprec.h"
30 #include "wx/slider.h"
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
36 wxDEFINE_FLAGS( wxSliderStyle
)
37 wxBEGIN_FLAGS( wxSliderStyle
)
38 // new style border flags, we put them first to
39 // use them for streaming out
40 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
41 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
42 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
43 wxFLAGS_MEMBER(wxBORDER_RAISED
)
44 wxFLAGS_MEMBER(wxBORDER_STATIC
)
45 wxFLAGS_MEMBER(wxBORDER_NONE
)
47 // old style border flags
48 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
49 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
50 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
51 wxFLAGS_MEMBER(wxRAISED_BORDER
)
52 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
53 wxFLAGS_MEMBER(wxBORDER
)
55 // standard window styles
56 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
57 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
58 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
59 wxFLAGS_MEMBER(wxWANTS_CHARS
)
60 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
61 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
62 wxFLAGS_MEMBER(wxVSCROLL
)
63 wxFLAGS_MEMBER(wxHSCROLL
)
65 wxFLAGS_MEMBER(wxSL_HORIZONTAL
)
66 wxFLAGS_MEMBER(wxSL_VERTICAL
)
67 wxFLAGS_MEMBER(wxSL_AUTOTICKS
)
68 wxFLAGS_MEMBER(wxSL_LABELS
)
69 wxFLAGS_MEMBER(wxSL_LEFT
)
70 wxFLAGS_MEMBER(wxSL_TOP
)
71 wxFLAGS_MEMBER(wxSL_RIGHT
)
72 wxFLAGS_MEMBER(wxSL_BOTTOM
)
73 wxFLAGS_MEMBER(wxSL_BOTH
)
74 wxFLAGS_MEMBER(wxSL_SELRANGE
)
75 wxFLAGS_MEMBER(wxSL_INVERSE
)
76 wxEND_FLAGS( wxSliderStyle
)
78 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider
, wxControl
, "wx/slider.h")
80 wxBEGIN_PROPERTIES_TABLE(wxSlider
)
81 wxEVENT_RANGE_PROPERTY( Scroll
, wxEVT_SCROLL_TOP
, wxEVT_SCROLL_CHANGED
, wxScrollEvent
)
82 wxEVENT_PROPERTY( Updated
, wxEVT_COMMAND_SLIDER_UPDATED
, wxCommandEvent
)
84 wxPROPERTY( Value
, int, SetValue
, GetValue
, 0, 0 /*flags*/, \
85 wxT("Helpstring"), wxT("group"))
86 wxPROPERTY( Minimum
, int, SetMin
, GetMin
, 0, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group"))
88 wxPROPERTY( Maximum
, int, SetMax
, GetMax
, 0, 0 /*flags*/, \
89 wxT("Helpstring"), wxT("group"))
90 wxPROPERTY( PageSize
, int, SetPageSize
, GetLineSize
, 1, 0 /*flags*/, \
91 wxT("Helpstring"), wxT("group"))
92 wxPROPERTY( LineSize
, int, SetLineSize
, GetLineSize
, 1, 0 /*flags*/, \
93 wxT("Helpstring"), wxT("group"))
94 wxPROPERTY( ThumbLength
, int, SetThumbLength
, GetThumbLength
, 1, 0 /*flags*/, \
95 wxT("Helpstring"), wxT("group"))
97 wxPROPERTY_FLAGS( WindowStyle
, wxSliderStyle
, long, SetWindowStyleFlag
, \
98 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
99 wxT("Helpstring"), wxT("group")) // style
100 wxEND_PROPERTIES_TABLE()
102 wxEMPTY_HANDLERS_TABLE(wxSlider
)
104 wxCONSTRUCTOR_8( wxSlider
, wxWindow
*, Parent
, wxWindowID
, Id
, int, Value
, \
105 int, Minimum
, int, Maximum
, wxPoint
, Position
, wxSize
, Size
, \
108 #endif // wxUSE_SLIDER