]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/simplebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/simplebook.h
3 // Purpose: wxSimplebook public API documentation.
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
11 wxSimplebook is a control showing exactly one of its several pages.
13 It implements wxBookCtrlBase class interface but doesn't allow the user to
14 change the page being displayed, unlike all the other book control classes,
15 only the program can do it.
17 This class is created in the same manner as any other wxBookCtrl but then
18 the program will typically call ChangeSelection() to show different pages.
19 See the @ref page_samples_notebook for an example of wxSimplebook in
22 Notice that is often convenient to use ShowNewPage() instead of the base
25 There are no special styles defined for this class as it has no visual
26 appearance of its own.
28 There are also no special events, this class reuses
29 @c wxEVT_BOOKCTRL_PAGE_CHANGING and @c
30 wxEVT_BOOKCTRL_PAGE_CHANGED events for the events it generates if
31 the program calls SetSelection().
36 @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
40 class wxSimplebook
: public wxBookCtrlBase
46 Use Create() (inherited from the base class) later to really create the
52 Constructs a simple book control.
54 wxSimplebook(wxWindow
* parent
,
55 wxWindowID id
= wxID_ANY
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& size
= wxDefaultSize
,
59 const wxString
& name
= wxEmptyString
);
63 Set the effects to use for showing and hiding the pages.
65 This method allows to specify the effects passed to
66 wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() respectively
67 when the pages need to be shown or hidden.
69 By default, no effects are used, but as the pages are only changed
70 by the program and not the user himself, it may be useful to use some
71 visual effects to make the changes more noticeable.
74 The effect to use for showing the newly selected page.
76 The effect to use for hiding the previously selected page.
78 @see SetEffectsTimeouts()
80 void SetEffects(wxShowEffect showEffect
, wxShowEffect hideEffect
);
83 Set the same effect to use for both showing and hiding the pages.
85 This is the same as <code>SetEffects(effect, effect)</code>.
87 @see SetEffectTimeout()
89 void SetEffect(wxShowEffect effect
);
92 Set the effect timeout to use for showing and hiding the pages.
94 This method allows to configure the timeout arguments passed to
95 wxWindow::ShowWithEffect() and wxWindow::HideWithEffect() if a
96 non-default effect is used.
98 If this method is not called, default, system-dependent timeout is
102 Timeout of the show effect, in milliseconds.
104 Timeout of the hide effect, in milliseconds.
108 void SetEffectsTimeouts(unsigned showTimeout
, unsigned hideTimeout
);
111 Set the same effect timeout to use for both showing and hiding the
114 This is the same as <code>SetEffectsTimeouts(timeout, timeout)</code>.
118 void SetEffectTimeout(unsigned timeout
);
121 Add a new page and show it immediately.
123 This is simply a thin wrapper around the base class
124 wxBookCtrlBase::AddPage() method using empty label (which is unused by
125 this class anyhow) and selecting the new page immediately.
127 bool ShowNewPage(wxWindow
* page
);