wxExtend
Additional templates and function helpers for wxWidgets
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
wxAppBar< W > Class Template Reference

Dockable application bar template. More...

#include <wxex/appbar.h>

Inheritance diagram for wxAppBar< W >:

Public Member Functions

 wxAppBar ()
 Creates new application bar.
 
virtual ~wxAppBar ()
 Destructor.
 
Application bar general management
wxAppBarState GetState () const
 Returns current state of the application bar.
 
bool IsAlwaysOnTop () const
 Returns whether application bar is displayed always on top.
 
bool SetAlwaysOnTop (bool alwaysOnTop=true)
 Sets whether application bar is displayed always on top.
 
bool IsAutoHide () const
 Returns if application bar is configured for auto-hide.
 
bool SetAutoHide (bool autoHide=true)
 Sets whether application bar is displayed always on top.
 
bool GetAllowSizing () const
 Returns if sizing of the application bar is allowed.
 
bool SetAllowSizing (bool allow=true)
 Sets whether resizing of the application bar is allowed.
 
bool GetAutoHidden () const
 Returns if application bar is auto-hidden right now.
 
void MinimiseToEdge (wxAppBarState edge, wxWindow *wnd=NULL)
 Minimize application bar to the edge of the desktop.
 
void MaximiseFromEdge (const RECT *rect=NULL)
 Restore application bar from the edge of the desktop.
 
void MaximiseFromEdge (wxWindow *wnd)
 Restore application bar from the edge of the desktop.
 
void ShowAutoHideAppBar (bool show=true)
 Shows or hides auto-hide application bar.
 
void HideAutoHideAppBar ()
 Hides auto-hide application bar.
 

Protected Member Functions

Notification handlers
virtual void OnChangeState (wxAppBarState stateNew)
 Notification handler when the new state of the application bar is proposed.
 
virtual void OnChangeTaskBarState (UINT_PTR state)
 Notification handler when the Windows' taskbar state changes.
 
virtual void OnWindowsArrange (bool beginning)
 Notification handler when desktop windows are being arranged (cascaded, tiled, ...)
 
virtual void OnAutoHideDenied ()
 Called when application bar was forced from auto-hide to normal docking.
 

Protected Attributes

wxAppBarState m_state
 Current state of the application bar.
 
wxAppBarState m_stateDesired
 Desired state of the application bar while moving/resizing.
 
int m_flags
 Flags describing application bar's behaviour.
 
SIZE m_sizeFloat
 Window size when floating (we need it to restore floating size, when we undock)
 
SIZE m_sizeDocked
 Size of the window when docked (height when wxAppBarState::TOP or wxAppBarState::BOTTOM, width when wxAppBarState::LEFT or wxAppBarState::RIGHT)
 
SIZE m_sizeMin
 Minimum window size.
 
UINT_PTR m_stateTaskBar
 TaskBar's current state.
 
UINT_PTR m_timerID
 Application bar's timer id.
 
ITaskbarList * m_taskbarList
 Windows's taskbar list interface.
 

Detailed Description

template<class W>
class wxAppBar< W >

Dockable application bar template.

Member Function Documentation

◆ GetAllowSizing()

template<class W >
bool wxAppBar< W >::GetAllowSizing ( ) const
inline

Returns if sizing of the application bar is allowed.

Returns
  • true if sizing of the application bar is allowed
  • false otherwise

◆ GetAutoHidden()

template<class W >
bool wxAppBar< W >::GetAutoHidden ( ) const
inline

Returns if application bar is auto-hidden right now.

Returns
  • true if application bar is auto-hidden right now
  • false otherwise

◆ IsAlwaysOnTop()

template<class W >
bool wxAppBar< W >::IsAlwaysOnTop ( ) const
inline

Returns whether application bar is displayed always on top.

Returns
  • true when application bar is always on top
  • false otherwise

◆ IsAutoHide()

template<class W >
bool wxAppBar< W >::IsAutoHide ( ) const
inline

Returns if application bar is configured for auto-hide.

Returns
  • true if application bar is configured for auto-hide
  • false otherwise

◆ MaximiseFromEdge() [1/2]

template<class W >
void wxAppBar< W >::MaximiseFromEdge ( const RECT * rect = NULL)

Restore application bar from the edge of the desktop.

Parameters
[in]rectThe desired coordinates of the restored window. If NULL internally saved coordinates are used.

◆ MaximiseFromEdge() [2/2]

template<class W >
void wxAppBar< W >::MaximiseFromEdge ( wxWindow * wnd)

Restore application bar from the edge of the desktop.

Parameters
[in]wndWhen the undocked and docked window is different, this parameter denotes the undocked version.

◆ MinimiseToEdge()

template<class W >
void wxAppBar< W >::MinimiseToEdge ( wxAppBarState edge,
wxWindow * wnd = NULL )

Minimize application bar to the edge of the desktop.

Parameters
[in]edgeThe edge at which to dock. Must be either of: wxAppBarState::LEFT, wxAppBarState::TOP, wxAppBarState::RIGHT, or wxAppBarState::BOTTOM.
[in]wndWhen the undocked and docked window is different, this parameter denotes the undocked version.

◆ OnAutoHideDenied()

template<class W >
void wxAppBar< W >::OnAutoHideDenied ( )
protectedvirtual

Called when application bar was forced from auto-hide to normal docking.

Default implementation displays a warning dialog.

◆ OnChangeState()

template<class W >
void wxAppBar< W >::OnChangeState ( wxAppBarState stateNew)
protectedvirtual

Notification handler when the new state of the application bar is proposed.

Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.

Parameters
[in]stateNewNew state about to take effect.

◆ OnChangeTaskBarState()

template<class W >
void wxAppBar< W >::OnChangeTaskBarState ( UINT_PTR state)
protectedvirtual

Notification handler when the Windows' taskbar state changes.

Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.

Parameters
[in]stateNew taskbar state.

◆ OnWindowsArrange()

template<class W >
void wxAppBar< W >::OnWindowsArrange ( bool beginning)
protectedvirtual

Notification handler when desktop windows are being arranged (cascaded, tiled, ...)

Derived classes can implement their own. However, overriden virtual method should call the parent's implementation too.

Parameters
[in]beginningtrue when windows arrangement starts and false when arrangement ends.

◆ SetAllowSizing()

template<class W >
bool wxAppBar< W >::SetAllowSizing ( bool allow = true)
inline

Sets whether resizing of the application bar is allowed.

Parameters
[in]allowLogical variable to control whether resizing is to be enabled (true) or disabled (false).

◆ SetAlwaysOnTop()

template<class W >
bool wxAppBar< W >::SetAlwaysOnTop ( bool alwaysOnTop = true)
inline

Sets whether application bar is displayed always on top.

Parameters
[in]alwaysOnTopLogical variable to control whether always-on-top behaviour is to be enabled (true) or disabled (false).

◆ SetAutoHide()

template<class W >
bool wxAppBar< W >::SetAutoHide ( bool autoHide = true)
inline

Sets whether application bar is displayed always on top.

Parameters
[in]autoHideLogical variable to control whether auto-hide behaviour is to be enabled (true) or disabled (false).

◆ ShowAutoHideAppBar()

template<class W >
void wxAppBar< W >::ShowAutoHideAppBar ( bool show = true)

Shows or hides auto-hide application bar.

Parameters
[in]showLogical variable to control whether application bar is be shown (true) or hidden (false).

The documentation for this class was generated from the following file: