]> git.saurik.com Git - wxWidgets.git/blame - src/common/slidercmn.cpp
remove run-time check for now-required GTK 2.4
[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
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart 1998
9// Vadim Zeitlin 2004
10// Licence: wxWindows licence
11/////////////////////////////////////////////////////////////////////////////
12
13// ============================================================================
14// declarations
15// ============================================================================
16
17// ----------------------------------------------------------------------------
18// headers
19// ----------------------------------------------------------------------------
20
21// For compilers that support precompilation, includes "wx.h".
22#include "wx/wxprec.h"
23
24#ifdef __BORLANDC__
25 #pragma hdrstop
26#endif
27
28#if wxUSE_SLIDER
29
30#include "wx/slider.h"
31
f313deaa
PC
32extern WXDLLEXPORT_DATA(const char) wxSliderNameStr[] = "slider";
33
e1d3601a
PC
34// ----------------------------------------------------------------------------
35// XTI
36// ----------------------------------------------------------------------------
37
38wxDEFINE_FLAGS( wxSliderStyle )
39wxBEGIN_FLAGS( wxSliderStyle )
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(wxSL_HORIZONTAL)
68 wxFLAGS_MEMBER(wxSL_VERTICAL)
69 wxFLAGS_MEMBER(wxSL_AUTOTICKS)
70 wxFLAGS_MEMBER(wxSL_LABELS)
71 wxFLAGS_MEMBER(wxSL_LEFT)
72 wxFLAGS_MEMBER(wxSL_TOP)
73 wxFLAGS_MEMBER(wxSL_RIGHT)
74 wxFLAGS_MEMBER(wxSL_BOTTOM)
75 wxFLAGS_MEMBER(wxSL_BOTH)
76 wxFLAGS_MEMBER(wxSL_SELRANGE)
77 wxFLAGS_MEMBER(wxSL_INVERSE)
78wxEND_FLAGS( wxSliderStyle )
79
80wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl, "wx/slider.h")
81
82wxBEGIN_PROPERTIES_TABLE(wxSlider)
83 wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, wxEVT_SCROLL_CHANGED, wxScrollEvent )
84 wxEVENT_PROPERTY( Updated, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent )
85
86 wxPROPERTY( Value, int, SetValue, GetValue, 0, 0 /*flags*/, \
87 wxT("Helpstring"), wxT("group"))
88 wxPROPERTY( Minimum, int, SetMin, GetMin, 0, 0 /*flags*/, \
89 wxT("Helpstring"), wxT("group"))
90 wxPROPERTY( Maximum, int, SetMax, GetMax, 0, 0 /*flags*/, \
91 wxT("Helpstring"), wxT("group"))
92 wxPROPERTY( PageSize, int, SetPageSize, GetLineSize, 1, 0 /*flags*/, \
93 wxT("Helpstring"), wxT("group"))
94 wxPROPERTY( LineSize, int, SetLineSize, GetLineSize, 1, 0 /*flags*/, \
95 wxT("Helpstring"), wxT("group"))
96 wxPROPERTY( ThumbLength, int, SetThumbLength, GetThumbLength, 1, 0 /*flags*/, \
97 wxT("Helpstring"), wxT("group"))
98
99 wxPROPERTY_FLAGS( WindowStyle, wxSliderStyle, long, SetWindowStyleFlag, \
100 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
101 wxT("Helpstring"), wxT("group")) // style
102wxEND_PROPERTIES_TABLE()
103
104wxEMPTY_HANDLERS_TABLE(wxSlider)
105
106wxCONSTRUCTOR_8( wxSlider, wxWindow*, Parent, wxWindowID, Id, int, Value, \
107 int, Minimum, int, Maximum, wxPoint, Position, wxSize, Size, \
108 long, WindowStyle )
109
110#endif // wxUSE_SLIDER