]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/simplebook.h
Add wxTimer::StartOnce().
[wxWidgets.git] / interface / wx / simplebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/simplebook.h
3 // Purpose: wxSimplebook public API documentation.
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSimplebook
11
12 wxSimplebook is a control showing exactly one of its several pages.
13
14 It implements wxBookCtrlBase class interface but doesn't allow the user to
15 change the page being displayed, unlike all the other book control classes,
16 only the program can do it.
17
18 This class is created in the same manner as any other wxBookCtrl but then
19 the program will typically call ChangeSelection() to show different pages.
20 See the @ref page_samples_notebook for an example of wxSimplebook in
21 action.
22
23 Notice that is often convenient to use ShowNewPage() instead of the base
24 class AddPage().
25
26 There are no special styles defined for this class as it has no visual
27 appearance of its own.
28
29 There are also no special events, this class reuses
30 @c wxEVT_BOOKCTRL_PAGE_CHANGING and @c
31 wxEVT_BOOKCTRL_PAGE_CHANGED events for the events it generates if
32 the program calls SetSelection().
33
34 @library{none}
35 @category{bookctrl}
36
37 @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
38
39 @since 2.9.5
40 */
41 class wxSimplebook : public wxBookCtrlBase
42 {
43 public:
44 /**
45 Default constructor.
46
47 Use Create() (inherited from the base class) later to really create the
48 control.
49 */
50 wxSimplebook();
51
52 /**
53 Constructs a simple book control.
54 */
55 wxSimplebook(wxWindow* parent,
56 wxWindowID id = wxID_ANY,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = 0,
60 const wxString& name = wxEmptyString);
61
62
63 /**
64 Set the effects to use for showing and hiding the pages.
65
66 This method allows to specify the effects passed to
67 wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() respectively
68 when the pages need to be shown or hidden.
69
70 By default, no effects are used, but as the pages are only changed
71 by the program and not the user himself, it may be useful to use some
72 visual effects to make the changes more noticeable.
73
74 @param showEffect
75 The effect to use for showing the newly selected page.
76 @param hideEffect
77 The effect to use for hiding the previously selected page.
78
79 @see SetEffectsTimeouts()
80 */
81 void SetEffects(wxShowEffect showEffect, wxShowEffect hideEffect);
82
83 /**
84 Set the same effect to use for both showing and hiding the pages.
85
86 This is the same as <code>SetEffects(effect, effect)</code>.
87
88 @see SetEffectTimeout()
89 */
90 void SetEffect(wxShowEffect effect);
91
92 /**
93 Set the effect timeout to use for showing and hiding the pages.
94
95 This method allows to configure the timeout arguments passed to
96 wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() if a
97 non-default effect is used.
98
99 If this method is not called, default, system-dependent timeout is
100 used.
101
102 @param showTimeout
103 Timeout of the show effect, in milliseconds.
104 @param hideTimeout
105 Timeout of the hide effect, in milliseconds.
106
107 @see SetEffects()
108 */
109 void SetEffectsTimeouts(unsigned showTimeout, unsigned hideTimeout);
110
111 /**
112 Set the same effect timeout to use for both showing and hiding the
113 pages.
114
115 This is the same as <code>SetEffectsTimeouts(timeout, timeout)</code>.
116
117 @see SetEffect()
118 */
119 void SetEffectTimeout(unsigned timeout);
120
121 /**
122 Add a new page and show it immediately.
123
124 This is simply a thin wrapper around the base class
125 wxBookCtrlBase::AddPage() method using empty label (which is unused by
126 this class anyhow) and selecting the new page immediately.
127 */
128 bool ShowNewPage(wxWindow* page);
129 };