]>
git.saurik.com Git - wxWidgets.git/blob - src/common/scrolbarcmn.cpp
65db8fb2de20e833bab66a8b51933714ec8632ca
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/scrolbarcmn.cpp
3 // Purpose: wxScrollBar common code
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
20 #include "wx/scrolbar.h"
24 #include "wx/settings.h"
27 extern WXDLLEXPORT_DATA(const char) wxScrollBarNameStr
[] = "scrollBar";
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 wxDEFINE_FLAGS( wxScrollBarStyle
)
34 wxBEGIN_FLAGS( wxScrollBarStyle
)
35 // new style border flags, we put them first to
36 // use them for streaming out
37 wxFLAGS_MEMBER(wxBORDER_SIMPLE
)
38 wxFLAGS_MEMBER(wxBORDER_SUNKEN
)
39 wxFLAGS_MEMBER(wxBORDER_DOUBLE
)
40 wxFLAGS_MEMBER(wxBORDER_RAISED
)
41 wxFLAGS_MEMBER(wxBORDER_STATIC
)
42 wxFLAGS_MEMBER(wxBORDER_NONE
)
44 // old style border flags
45 wxFLAGS_MEMBER(wxSIMPLE_BORDER
)
46 wxFLAGS_MEMBER(wxSUNKEN_BORDER
)
47 wxFLAGS_MEMBER(wxDOUBLE_BORDER
)
48 wxFLAGS_MEMBER(wxRAISED_BORDER
)
49 wxFLAGS_MEMBER(wxSTATIC_BORDER
)
50 wxFLAGS_MEMBER(wxBORDER
)
52 // standard window styles
53 wxFLAGS_MEMBER(wxTAB_TRAVERSAL
)
54 wxFLAGS_MEMBER(wxCLIP_CHILDREN
)
55 wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW
)
56 wxFLAGS_MEMBER(wxWANTS_CHARS
)
57 wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE
)
58 wxFLAGS_MEMBER(wxALWAYS_SHOW_SB
)
59 wxFLAGS_MEMBER(wxVSCROLL
)
60 wxFLAGS_MEMBER(wxHSCROLL
)
62 wxFLAGS_MEMBER(wxSB_HORIZONTAL
)
63 wxFLAGS_MEMBER(wxSB_VERTICAL
)
64 wxEND_FLAGS( wxScrollBarStyle
)
66 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar
, wxControl
, "wx/scrolbar.h")
68 wxBEGIN_PROPERTIES_TABLE(wxScrollBar
)
69 wxEVENT_RANGE_PROPERTY( Scroll
, wxEVT_SCROLL_TOP
, \
70 wxEVT_SCROLL_CHANGED
, wxScrollEvent
)
72 wxPROPERTY( ThumbPosition
, int, SetThumbPosition
, GetThumbPosition
, 0, \
73 0 /*flags*/, wxT("Helpstring"), wxT("group"))
74 wxPROPERTY( Range
, int, SetRange
, GetRange
, 0, \
75 0 /*flags*/, wxT("Helpstring"), wxT("group"))
76 wxPROPERTY( ThumbSize
, int, SetThumbSize
, GetThumbSize
, 0, \
77 0 /*flags*/, wxT("Helpstring"), wxT("group"))
78 wxPROPERTY( PageSize
, int, SetPageSize
, GetPageSize
, 0, \
79 0 /*flags*/, wxT("Helpstring"), wxT("group"))
81 wxPROPERTY_FLAGS( WindowStyle
, wxScrollBarStyle
, long, SetWindowStyleFlag
, \
82 GetWindowStyleFlag
, wxEMPTY_PARAMETER_VALUE
, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group")) // style
84 wxEND_PROPERTIES_TABLE()
86 wxEMPTY_HANDLERS_TABLE(wxScrollBar
)
88 wxCONSTRUCTOR_5( wxScrollBar
, wxWindow
*, Parent
, wxWindowID
, Id
, \
89 wxPoint
, Position
, wxSize
, Size
, long, WindowStyle
)
91 #endif // wxUSE_SCROLLBAR