]> git.saurik.com Git - wxWidgets.git/blob - src/common/scrolbarcmn.cpp
Don't recurse into top level children in wxWindow::FindWindow().
[wxWidgets.git] / src / common / scrolbarcmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/scrolbarcmn.cpp
3 // Purpose: wxScrollBar common code
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 #ifdef __BORLANDC__
15 #pragma hdrstop
16 #endif
17
18 #if wxUSE_SCROLLBAR
19
20 #include "wx/scrolbar.h"
21
22 #ifndef WX_PRECOMP
23 #include "wx/utils.h"
24 #include "wx/settings.h"
25 #endif
26
27 extern WXDLLEXPORT_DATA(const char) wxScrollBarNameStr[] = "scrollBar";
28
29 // ----------------------------------------------------------------------------
30 // XTI
31 // ----------------------------------------------------------------------------
32
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)
43
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)
51
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)
61
62 wxFLAGS_MEMBER(wxSB_HORIZONTAL)
63 wxFLAGS_MEMBER(wxSB_VERTICAL)
64 wxEND_FLAGS( wxScrollBarStyle )
65
66 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar, wxControl, "wx/scrolbar.h")
67
68 wxBEGIN_PROPERTIES_TABLE(wxScrollBar)
69 wxEVENT_RANGE_PROPERTY( Scroll, wxEVT_SCROLL_TOP, \
70 wxEVT_SCROLL_CHANGED, wxScrollEvent )
71
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"))
80
81 wxPROPERTY_FLAGS( WindowStyle, wxScrollBarStyle, long, SetWindowStyleFlag, \
82 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
83 wxT("Helpstring"), wxT("group")) // style
84 wxEND_PROPERTIES_TABLE()
85
86 wxEMPTY_HANDLERS_TABLE(wxScrollBar)
87
88 wxCONSTRUCTOR_5( wxScrollBar, wxWindow*, Parent, wxWindowID, Id, \
89 wxPoint, Position, wxSize, Size, long, WindowStyle )
90
91 #endif // wxUSE_SCROLLBAR