]>
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
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 wxSimplebook is a control showing exactly one of its several pages.
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.
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
23 Notice that is often convenient to use ShowNewPage() instead of the base
26 There are no special styles defined for this class as it has no visual
27 appearance of its own.
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().
37 @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
41 class wxSimplebook
: public wxBookCtrlBase
47 Use Create() (inherited from the base class) later to really create the
53 Constructs a simple book control.
55 wxSimplebook(wxWindow
* parent
,
56 wxWindowID id
= wxID_ANY
,
57 const wxPoint
& pos
= wxDefaultPosition
,
58 const wxSize
& size
= wxDefaultSize
,
60 const wxString
& name
= wxEmptyString
);
64 Set the effects to use for showing and hiding the pages.
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.
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.
75 The effect to use for showing the newly selected page.
77 The effect to use for hiding the previously selected page.
79 @see SetEffectsTimeouts()
81 void SetEffects(wxShowEffect showEffect
, wxShowEffect hideEffect
);
84 Set the same effect to use for both showing and hiding the pages.
86 This is the same as <code>SetEffects(effect, effect)</code>.
88 @see SetEffectTimeout()
90 void SetEffect(wxShowEffect effect
);
93 Set the effect timeout to use for showing and hiding the pages.
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.
99 If this method is not called, default, system-dependent timeout is
103 Timeout of the show effect, in milliseconds.
105 Timeout of the hide effect, in milliseconds.
109 void SetEffectsTimeouts(unsigned showTimeout
, unsigned hideTimeout
);
112 Set the same effect timeout to use for both showing and hiding the
115 This is the same as <code>SetEffectsTimeouts(timeout, timeout)</code>.
119 void SetEffectTimeout(unsigned timeout
);
122 Add a new page and show it immediately.
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.
128 bool ShowNewPage(wxWindow
* page
);