]> git.saurik.com Git - wxWidgets.git/blame - src/common/slidercmn.cpp
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / src / common / slidercmn.cpp
CommitLineData
e1d3601a
PC
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/common/slidercmn.cpp
3// Purpose: wxSlider common code
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
e1d3601a
PC
7// Copyright: (c) Julian Smart 1998
8// Vadim Zeitlin 2004
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#if wxUSE_SLIDER
28
29#include "wx/slider.h"
30
f313deaa
PC
31extern WXDLLEXPORT_DATA(const char) wxSliderNameStr[] = "slider";
32
e1d3601a
PC
33// ----------------------------------------------------------------------------
34// XTI
35// ----------------------------------------------------------------------------
36
37wxDEFINE_FLAGS( wxSliderStyle )
38wxBEGIN_FLAGS( wxSliderStyle )
39 // new style border flags, we put them first to
40 // use them for streaming out
41 wxFLAGS_MEMBER(wxBORDER_SIMPLE)
42 wxFLAGS_MEMBER(wxBORDER_SUNKEN)
43 wxFLAGS_MEMBER(wxBORDER_DOUBLE)
44 wxFLAGS_MEMBER(wxBORDER_RAISED)
45 wxFLAGS_MEMBER(wxBORDER_STATIC)
46 wxFLAGS_MEMBER(wxBORDER_NONE)
47
48 // old style border flags
49 wxFLAGS_MEMBER(wxSIMPLE_BORDER)
50 wxFLAGS_MEMBER(wxSUNKEN_BORDER)
51 wxFLAGS_MEMBER(wxDOUBLE_BORDER)
52 wxFLAGS_MEMBER(wxRAISED_BORDER)
53 wxFLAGS_MEMBER(wxSTATIC_BORDER)
54 wxFLAGS_MEMBER(wxBORDER)
55
56 // standard window styles
57 wxFLAGS_MEMBER(wxTAB_TRAVERSAL)
58 wxFLAGS_MEMBER(wxCLIP_CHILDREN)
59 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW)
60 wxFLAGS_MEMBER(wxWANTS_CHARS)
61 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE)
62 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB )
63 wxFLAGS_MEMBER(wxVSCROLL)
64 wxFLAGS_MEMBER(wxHSCROLL)
65
66 wxFLAGS_MEMBER(wxSL_HORIZONTAL)
67 wxFLAGS_MEMBER(wxSL_VERTICAL)
68 wxFLAGS_MEMBER(wxSL_AUTOTICKS)
69 wxFLAGS_MEMBER(wxSL_LABELS)
70 wxFLAGS_MEMBER(wxSL_LEFT)
71 wxFLAGS_MEMBER(wxSL_TOP)
72 wxFLAGS_MEMBER(wxSL_RIGHT)
73 wxFLAGS_MEMBER(wxSL_BOTTOM)
74 wxFLAGS_MEMBER(wxSL_BOTH)
75 wxFLAGS_MEMBER(wxSL_SELRANGE)
76 wxFLAGS_MEMBER(wxSL_INVERSE)
77wxEND_FLAGS( wxSliderStyle )
78
79wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl, "wx/slider.h")
80
81wxBEGIN_PROPERTIES_TABLE(wxSlider)
82 wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxScrollEvent )
ce7fe42e 83 wxEVENT_PROPERTY( Updated, wxEVT_SLIDER, wxCommandEvent )
e1d3601a
PC
84
85 wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
86 wxT("Helpstring"), wxT("group"))
87 wxPROPERTY( Minimum, int, SetMin, GetMin, 0, 0 /*flags*/, \
88 wxT("Helpstring"), wxT("group"))
89 wxPROPERTY( Maximum, int, SetMax, GetMax, 0, 0 /*flags*/, \
90 wxT("Helpstring"), wxT("group"))
91 wxPROPERTY( PageSize, int, SetPageSize, GetLineSize, 1, 0 /*flags*/, \
92 wxT("Helpstring"), wxT("group"))
93 wxPROPERTY( LineSize, int, SetLineSize, GetLineSize, 1, 0 /*flags*/, \
94 wxT("Helpstring"), wxT("group"))
95 wxPROPERTY( ThumbLength, int, SetThumbLength, GetThumbLength, 1, 0 /*flags*/, \
96 wxT("Helpstring"), wxT("group"))
97
98 wxPROPERTY_FLAGS( WindowStyle, wxSliderStyle, long, SetWindowStyleFlag, \
99 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
100 wxT("Helpstring"), wxT("group")) // style
101wxEND_PROPERTIES_TABLE()
102
103wxEMPTY_HANDLERS_TABLE(wxSlider)
104
105wxCONSTRUCTOR_8( wxSlider, wxWindow*, Parent, wxWindowID, Id, int, Value, \
106 int, Minimum, int, Maximum, wxPoint, Position, wxSize, Size, \
107 long, WindowStyle )
108
109#endif // wxUSE_SLIDER