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