Version: 3.2.5
wxAuiToolBarItem Class Reference

#include <wx/aui/auibar.h>

Detailed Description

wxAuiToolBarItem is part of the wxAUI class framework, representing a toolbar element.

See also wxAuiToolBar and wxAUI Overview.

It has a unique id (except for the separators which always have id = -1), the style (telling whether it is a normal button, separator or a control), the state (toggled or not, enabled or not) and short and long help strings. The default implementations use the short help string for the tooltip text which is popped up when the mouse pointer enters the tool and the long help string for the applications status bar (currently not implemented).

Library:  wxAui
Category:  Window Docking (wxAUI)

Public Member Functions

 wxAuiToolBarItem ()
 Default Constructor. More...
 
 wxAuiToolBarItem (const wxAuiToolBarItem &c)
 Assigns the properties of the wxAuiToolBarItem "c" to this. More...
 
wxAuiToolBarItemoperator= (const wxAuiToolBarItem &c)
 Assigns the properties of the wxAuiToolBarItem "c" to this, returning a pointer to this. More...
 
void Assign (const wxAuiToolBarItem &c)
 Assigns the properties of the wxAuiToolBarItem "c" to this. More...
 
void SetWindow (wxWindow *w)
 Assigns a window to the toolbar item. More...
 
wxWindowGetWindow ()
 Returns the wxWindow* associated to the toolbar item. More...
 
void SetId (int new_id)
 Sets the toolbar item identifier. More...
 
int GetId () const
 Returns the toolbar item identifier. More...
 
void SetKind (int new_kind)
 Sets the wxAuiToolBarItem kind. More...
 
int GetKind () const
 Returns the toolbar item kind. More...
 
void SetState (int new_state)
 Set the current state of the toolbar item. More...
 
int GetState () const
 Gets the current state of the toolbar item. More...
 
void SetSizerItem (wxSizerItem *s)
 
wxSizerItemGetSizerItem () const
 
void SetLabel (const wxString &s)
 
const wxStringGetLabel () const
 
void SetBitmap (const wxBitmapBundle &bmp)
 
wxBitmap GetBitmap () const
 
void SetDisabledBitmap (const wxBitmapBundle &bmp)
 
wxBitmap GetDisabledBitmap () const
 
void SetHoverBitmap (const wxBitmapBundle &bmp)
 
wxBitmap GetHoverBitmap () const
 
void SetShortHelp (const wxString &s)
 
const wxStringGetShortHelp () const
 
void SetLongHelp (const wxString &s)
 
const wxStringGetLongHelp () const
 
void SetMinSize (const wxSize &s)
 
const wxSizeGetMinSize () const
 
void SetSpacerPixels (int s)
 
int GetSpacerPixels () const
 
void SetProportion (int p)
 
int GetProportion () const
 
void SetActive (bool b)
 
bool IsActive () const
 
void SetHasDropDown (bool b)
 Set whether this tool has a drop down button. More...
 
bool HasDropDown () const
 Returns whether the toolbar item has an associated drop down button. More...
 
void SetSticky (bool b)
 
bool IsSticky () const
 
void SetUserData (long l)
 
long GetUserData () const
 
void SetAlignment (int l)
 
int GetAlignment () const
 
bool CanBeToggled () const
 Returns whether the toolbar item can be toggled. More...
 

Constructor & Destructor Documentation

◆ wxAuiToolBarItem() [1/2]

wxAuiToolBarItem::wxAuiToolBarItem ( )

Default Constructor.

◆ wxAuiToolBarItem() [2/2]

wxAuiToolBarItem::wxAuiToolBarItem ( const wxAuiToolBarItem c)

Assigns the properties of the wxAuiToolBarItem "c" to this.

Member Function Documentation

◆ Assign()

void wxAuiToolBarItem::Assign ( const wxAuiToolBarItem c)

Assigns the properties of the wxAuiToolBarItem "c" to this.

◆ CanBeToggled()

bool wxAuiToolBarItem::CanBeToggled ( ) const

Returns whether the toolbar item can be toggled.

Since
3.1.5

◆ GetAlignment()

int wxAuiToolBarItem::GetAlignment ( ) const

◆ GetBitmap()

wxBitmap wxAuiToolBarItem::GetBitmap ( ) const

◆ GetDisabledBitmap()

wxBitmap wxAuiToolBarItem::GetDisabledBitmap ( ) const

◆ GetHoverBitmap()

wxBitmap wxAuiToolBarItem::GetHoverBitmap ( ) const

◆ GetId()

int wxAuiToolBarItem::GetId ( ) const

Returns the toolbar item identifier.

◆ GetKind()

int wxAuiToolBarItem::GetKind ( ) const

Returns the toolbar item kind.

Returns
one of wxITEM_NORMAL, wxITEM_CHECK or wxITEM_RADIO, wxITEM_SEPARATOR, wxITEM_CONTROL, wxITEM_SPACER, wxITEM_LABEL,

◆ GetLabel()

const wxString& wxAuiToolBarItem::GetLabel ( ) const

◆ GetLongHelp()

const wxString& wxAuiToolBarItem::GetLongHelp ( ) const

◆ GetMinSize()

const wxSize& wxAuiToolBarItem::GetMinSize ( ) const

◆ GetProportion()

int wxAuiToolBarItem::GetProportion ( ) const

◆ GetShortHelp()

const wxString& wxAuiToolBarItem::GetShortHelp ( ) const

◆ GetSizerItem()

wxSizerItem* wxAuiToolBarItem::GetSizerItem ( ) const

◆ GetSpacerPixels()

int wxAuiToolBarItem::GetSpacerPixels ( ) const

◆ GetState()

int wxAuiToolBarItem::GetState ( ) const

Gets the current state of the toolbar item.

Returns
an or'd combination of flags from wxAuiPaneButtonState representing the current state

◆ GetUserData()

long wxAuiToolBarItem::GetUserData ( ) const

◆ GetWindow()

wxWindow* wxAuiToolBarItem::GetWindow ( )

Returns the wxWindow* associated to the toolbar item.

◆ HasDropDown()

bool wxAuiToolBarItem::HasDropDown ( ) const

Returns whether the toolbar item has an associated drop down button.

◆ IsActive()

bool wxAuiToolBarItem::IsActive ( ) const

◆ IsSticky()

bool wxAuiToolBarItem::IsSticky ( ) const

◆ operator=()

wxAuiToolBarItem& wxAuiToolBarItem::operator= ( const wxAuiToolBarItem c)

Assigns the properties of the wxAuiToolBarItem "c" to this, returning a pointer to this.

◆ SetActive()

void wxAuiToolBarItem::SetActive ( bool  b)

◆ SetAlignment()

void wxAuiToolBarItem::SetAlignment ( int  l)

◆ SetBitmap()

void wxAuiToolBarItem::SetBitmap ( const wxBitmapBundle bmp)

◆ SetDisabledBitmap()

void wxAuiToolBarItem::SetDisabledBitmap ( const wxBitmapBundle bmp)

◆ SetHasDropDown()

void wxAuiToolBarItem::SetHasDropDown ( bool  b)

Set whether this tool has a drop down button.

This is only valid for wxITEM_NORMAL tools.

◆ SetHoverBitmap()

void wxAuiToolBarItem::SetHoverBitmap ( const wxBitmapBundle bmp)

◆ SetId()

void wxAuiToolBarItem::SetId ( int  new_id)

Sets the toolbar item identifier.

◆ SetKind()

void wxAuiToolBarItem::SetKind ( int  new_kind)

Sets the wxAuiToolBarItem kind.

◆ SetLabel()

void wxAuiToolBarItem::SetLabel ( const wxString s)

◆ SetLongHelp()

void wxAuiToolBarItem::SetLongHelp ( const wxString s)

◆ SetMinSize()

void wxAuiToolBarItem::SetMinSize ( const wxSize s)

◆ SetProportion()

void wxAuiToolBarItem::SetProportion ( int  p)

◆ SetShortHelp()

void wxAuiToolBarItem::SetShortHelp ( const wxString s)

◆ SetSizerItem()

void wxAuiToolBarItem::SetSizerItem ( wxSizerItem s)

◆ SetSpacerPixels()

void wxAuiToolBarItem::SetSpacerPixels ( int  s)

◆ SetState()

void wxAuiToolBarItem::SetState ( int  new_state)

Set the current state of the toolbar item.

Parameters
new_stateis an or'd combination of flags from wxAuiPaneButtonState

◆ SetSticky()

void wxAuiToolBarItem::SetSticky ( bool  b)

◆ SetUserData()

void wxAuiToolBarItem::SetUserData ( long  l)

◆ SetWindow()

void wxAuiToolBarItem::SetWindow ( wxWindow w)

Assigns a window to the toolbar item.