Call this function to force one or both scrollbars to be always shown, even if
the window is big enough to show its entire contents without scrolling.
- @wxsince{2.9.0}
+ @since 2.9.0
@param hflag
Whether the horizontal scroll bar should always be visible.
non-existent
windows.
- @returns @true if the window has either been successfully deleted, or it
+ @return @true if the window has either been successfully deleted, or it
has been added to the list of windows pending real
deletion.
*/
/**
Disables the window, same as @ref enable() Enable(@false).
- @returns Returns @true if the window has been disabled, @false if it had
+ @return Returns @true if the window has been disabled, @false if it had
been already disabled before the call to this function.
*/
bool Disable();
@param enable
If @true, enables the window for input. If @false, disables the window.
- @returns Returns @true if the window has been enabled or disabled, @false
+ @return Returns @true if the window has been enabled or disabled, @false
if nothing was done, i.e. if the window had already
been in the specified state.
Returns the next window after this one among the parent children or @NULL if
this window is the last child.
- @wxsince{2.8.8}
+ @since 2.8.8
@see GetPrevSibling()
*/
@param y
The vertical position of the menu
- @returns The selected menu item id or wxID_NONE if none selected or an
+ @return The selected menu item id or wxID_NONE if none selected or an
error occurred.
*/
int GetPopupMenuSelectionFromUser(wxMenu& menu,
@NULL if
this window is the first child.
- @wxsince{2.8.8}
+ @since 2.8.8
@see GetNextSibling()
*/
Navigate() if the key event is one normally used for
keyboard navigation and return @true in this case.
- @returns Returns @true if the key pressed was for navigation and was
+ @return Returns @true if the key pressed was for navigation and was
handled, @false otherwise.
@see Navigate()
bool Hide();
/**
- This function hides a window, like Hide(), but using a
- special visual effect if possible.
- The parameters of this function are the same as for
- ShowWithEffect(), please see their
- description there.
+ This function hides a window, like Hide(), but using a special visual
+ effect if possible.
- @wxsince{2.9.0}
+ The parameters of this function are the same as for ShowWithEffect(),
+ please see their description there.
+
+ @since 2.9.0
*/
virtual bool HideWithEffect(wxShowEffect effect,
- unsigned timeout = 0,
- wxDirection dir = wxBOTTOM);
+ unsigned timeout = 0);
/**
This function is (or should be, in case of custom controls) called during
A combination of wxNavigationKeyEvent::IsForward and
wxNavigationKeyEvent::WinChange.
- @returns Returns @true if the focus was moved to another window or @false
+ @return Returns @true if the focus was moved to another window or @false
if nothing changed.
@remarks You may wish to call this from a text control custom keypress
@param count
The number of sequential IDs to reserve.
- @returns Returns the ID or the first ID of the range, or wxID_NONE if the
+ @return Returns the ID or the first ID of the range, or wxID_NONE if the
specified number of identifiers couldn't be allocated.
@see UnreserveControlId(), wxIdManager, @ref overview_windowidsoverview
@param virtualKeyCode
The virtual key code of the hotkey.
- @returns @true if the hotkey was registered successfully. @false if some
+ @return @true if the hotkey was registered successfully. @false if some
other application already registered a hotkey with this
modifier/virtualKeyCode combination.
The event handler to remove, must be non-@NULL and
must be present in this windows event handlers chain
- @returns Returns @true if it was found and @false otherwise (this also
+ @return Returns @true if it was found and @false otherwise (this also
results in an assert failure so this function should
only be called when the handler is supposed to be
there).
Scrolls the window by the given number of lines down (if @a lines is
positive) or up.
- @returns Returns @true if the window was scrolled, @false if it was already
+ @return Returns @true if the window was scrolled, @false if it was already
on top/bottom and nothing was done.
@remarks This function is currently only implemented under MSW and
- wxTextCtrl under wxGTK (it also works for
- wxScrolledWindow derived classes under all platforms).
+ wxTextCtrl under wxGTK (it also works for wxScrolled classes
+ under all platforms).
@see ScrollPages()
*/
Scrolls the window by the given number of pages down (if @a pages is
positive) or up.
- @returns Returns @true if the window was scrolled, @false if it was already
+ @return Returns @true if the window was scrolled, @false if it was already
on top/bottom and nothing was done.
@remarks This function is currently only implemented under MSW and wxGTK.
scrolled (this is always the case under wxGTK which doesn't support this
parameter)
- @remarks Note that you can often use wxScrolledWindow instead of using
- this function directly.
+ @remarks Note that you can often use wxScrolled instead of using this
+ function directly.
*/
virtual void ScrollWindow(int dx, int dy,
const wxRect* rect = NULL);
Font to associate with this window, pass
wxNullFont to reset to the default font.
- @returns @true if the want was really changed, @false if it was already set
+ @return @true if the want was really changed, @false if it was already set
to this font and so nothing was done.
@see GetFont(), InheritAttributes()
window: it is up to the application to take note of
scrollbar attributes and redraw contents accordingly.
- @see SetScrollbar(), GetScrollPos(), GetScrollThumb(),
- wxScrollBar, wxScrolledWindow
+ @see SetScrollbar(), GetScrollPos(), GetScrollThumb(), wxScrollBar,
+ wxScrolled
*/
virtual void SetScrollPos(int orientation, int pos,
bool refresh = true);
font. The window is sized so that you can only see 16
lines at a time.
- @see @ref overview_scrollingoverview "Scrolling overview", wxScrollBar,
- wxScrolledWindow, wxScrollWinEvent
+ @see @ref overview_scrolling, wxScrollBar, wxScrolled, wxScrollWinEvent
*/
virtual void SetScrollbar(int orientation, int position,
int thumbSize,
@param show
If @true displays the window. Otherwise, hides it.
- @returns @true if the window has been shown or hidden or @false if nothing
+ @return @true if the window has been shown or hidden or @false if nothing
was done because it already was in the requested state.
@see IsShown(), Hide(), wxRadioBox::Show
virtual bool Show(bool show = true);
/**
- This function shows a window, like Show(), but using a
- special visual effect if possible.
- Possible values for @a effect are:
-
- wxSHOW_EFFECT_ROLL
-
- Roll window effect
-
- wxSHOW_EFFECT_SLIDE
-
- Sliding window effect
+ This function shows a window, like Show(), but using a special visual
+ effect if possible.
- wxSHOW_EFFECT_BLEND
+ @param effect
+ The effect to use.
- Fade in or out effect
+ @param timeout
+ The @a timeout parameter specifies the time of the animation, in
+ milliseconds. If the default value of 0 is used, the default
+ animation time for the current platform is used.
- wxSHOW_EFFECT_EXPAND
+ @note Currently this function is only implemented in wxMSW and does the
+ same thing as Show() in the other ports.
- Expanding or collapsing effect
-
- For the roll and slide effects the @a dir parameter specifies the animation
- direction: it can be one of @c wxTOP, @c wxBOTTOM, @c wxLEFT
- or @c wxRIGHT. For the other effects, this parameter is unused.
- The @a timeout parameter specifies the time of the animation, in
- milliseconds. If the default value of 0 is used, the default animation time
- for the current platform is used.
- Currently this function is only implemented in wxMSW and does the same thing as
- Show() in the other ports.
-
- @wxsince{2.9.0}
+ @since 2.9.0
@see HideWithEffect()
*/
virtual bool ShowWithEffect(wxShowEffect effect,
- unsigned timeout = 0,
- wxDirection dir = wxBOTTOM);
+ unsigned timeout = 0);
/**
Reenables window updating after a previous call to Freeze().
Also, please notice that not all styles can be changed after the control
creation.
- @returns Returns @true if the style was turned on by this function, @false
+ @return Returns @true if the style was turned on by this function, @false
if it was switched off.
@see SetWindowStyleFlag(), HasFlag()
If the window has @c wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call TransferDataToWindow() of all child windows.
- @returns Returns @false if a transfer failed.
+ @return Returns @false if a transfer failed.
@see TransferDataFromWindow(), wxValidator, Validate()
*/
Numeric identifier of the hotkey. Must be the same id that was passed to
RegisterHotKey.
- @returns @true if the hotkey was unregistered successfully, @false if the
+ @return @true if the hotkey was unregistered successfully, @false if the
id was invalid.
@remarks This function is currently only implemented under MSW.
If the window has @c wxWS_EX_VALIDATE_RECURSIVELY extra style flag set,
the method will also call Validate() of all child windows.
- @returns Returns @false if any of the validations failed.
+ @return Returns @false if any of the validations failed.
@see TransferDataFromWindow(), TransferDataToWindow(),
wxValidator
};
+/// Valid values for wxWindow::ShowWithEffect() and wxWindow::HideWithEffect().
+enum wxShowEffect
+{
+ /// Roll window to the left
+ wxSHOW_EFFECT_ROLL_TO_LEFT,
+ /// Roll window to the right
+ wxSHOW_EFFECT_ROLL_TO_RIGHT,
+ /// Roll window to the top
+ wxSHOW_EFFECT_ROLL_TO_TOP,
+ /// Roll window to the bottom
+ wxSHOW_EFFECT_ROLL_TO_BOTTOM,
+ /// Slide window to the left
+ wxSHOW_EFFECT_SLIDE_TO_LEFT,
+ /// Slide window to the right
+ wxSHOW_EFFECT_SLIDE_TO_RIGHT,
+ /// Slide window to the top
+ wxSHOW_EFFECT_SLIDE_TO_TOP,
+ /// Slide window to the bottom
+ wxSHOW_EFFECT_SLIDE_TO_BOTTOM,
+ /// Fade in or out effect
+ wxSHOW_EFFECT_BLEND,
+ /// Expanding or collapsing effect
+ wxSHOW_EFFECT_EXPAND
+};
+
+
// ============================================================================
// Global functions/macros