Version: 3.2.5
wxToolBarToolBase Class Reference

#include <wx/toolbar.h>

+ Inheritance diagram for wxToolBarToolBase:

Detailed Description

A toolbar tool represents one item on the toolbar.

It has a unique id (except for the separators), 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.

Notice that the toolbar can not be modified by changing its tools via the (intentionally undocumented here) setter methods of this class, all the modifications must be done using the methods of wxToolBar itself.

Public Member Functions

 wxToolBarToolBase (wxToolBarBase *tbar=NULL, int toolid=wxID_SEPARATOR, const wxString &label=wxEmptyString, const wxBitmapBundle &bmpNormal=wxNullBitmap, const wxBitmapBundle &bmpDisabled=wxNullBitmap, wxItemKind kind=wxITEM_NORMAL, wxObject *clientData=NULL, const wxString &shortHelpString=wxEmptyString, const wxString &longHelpString=wxEmptyString)
 wxToolBarToolBase (wxToolBarBase *tbar, wxControl *control, const wxString &label)
int GetId () const
wxControlGetControl () const
wxToolBarBase * GetToolBar () const
bool IsStretchable () const
bool IsButton () const
bool IsControl () const
bool IsSeparator () const
bool IsStretchableSpace () const
int GetStyle () const
wxItemKind GetKind () const
void MakeStretchable ()
bool IsEnabled () const
bool IsToggled () const
bool CanBeToggled () const
wxBitmapBundle GetNormalBitmapBundle () const
 Return the bundle containing normal tool bitmaps. More...
wxBitmapBundle GetDisabledBitmapBundle () const
 Return the bundle containing disabled tool bitmaps. More...
wxBitmap GetNormalBitmap () const
wxBitmap GetDisabledBitmap () const
wxBitmap GetBitmap () const
const wxStringGetLabel () const
const wxStringGetShortHelp () const
const wxStringGetLongHelp () const
wxObjectGetClientData () const
bool Enable (bool enable)
bool Toggle (bool toggle)
bool SetToggle (bool toggle)
bool SetShortHelp (const wxString &help)
bool SetLongHelp (const wxString &help)
void Toggle ()
void SetNormalBitmap (const wxBitmapBundle &bmp)
void SetDisabledBitmap (const wxBitmapBundle &bmp)
void SetLabel (const wxString &label)
void SetClientData (wxObject *clientData)
void Detach ()
void Attach (wxToolBarBase *tbar)
void SetDropdownMenu (wxMenu *menu)
wxMenuGetDropdownMenu () const
- Public Member Functions inherited from wxObject
 wxObject ()
 Default ctor; initializes to NULL the internal reference data. More...
 wxObject (const wxObject &other)
 Copy ctor. More...
virtual ~wxObject ()
 Destructor. More...
virtual wxClassInfoGetClassInfo () const
 This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
wxObjectRefDataGetRefData () const
 Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
bool IsKindOf (const wxClassInfo *info) const
 Determines whether this class is a subclass of (or the same class as) the given class. More...
bool IsSameAs (const wxObject &obj) const
 Returns true if this object has the same data pointer as obj. More...
void Ref (const wxObject &clone)
 Makes this object refer to the data in clone. More...
void SetRefData (wxObjectRefData *data)
 Sets the wxObject::m_refData pointer. More...
void UnRef ()
 Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
void UnShare ()
 This is the same of AllocExclusive() but this method is public. More...
void operator delete (void *buf)
 The delete operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. More...
void * operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
 The new operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. More...

Additional Inherited Members

- Protected Member Functions inherited from wxObject
void AllocExclusive ()
 Ensure that this object's data is not shared with any other object. More...
virtual wxObjectRefDataCreateRefData () const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
virtual wxObjectRefDataCloneRefData (const wxObjectRefData *data) const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...
- Protected Attributes inherited from wxObject
 Pointer to an object which is the object's reference-counted data. More...

Constructor & Destructor Documentation

◆ wxToolBarToolBase() [1/2]

wxToolBarToolBase::wxToolBarToolBase ( wxToolBarBase *  tbar = NULL,
int  toolid = wxID_SEPARATOR,
const wxString label = wxEmptyString,
const wxBitmapBundle bmpNormal = wxNullBitmap,
const wxBitmapBundle bmpDisabled = wxNullBitmap,
wxItemKind  kind = wxITEM_NORMAL,
wxObject clientData = NULL,
const wxString shortHelpString = wxEmptyString,
const wxString longHelpString = wxEmptyString 

◆ wxToolBarToolBase() [2/2]

wxToolBarToolBase::wxToolBarToolBase ( wxToolBarBase *  tbar,
wxControl control,
const wxString label 

Member Function Documentation

◆ Attach()

void wxToolBarToolBase::Attach ( wxToolBarBase *  tbar)

◆ CanBeToggled()

bool wxToolBarToolBase::CanBeToggled ( ) const

◆ Detach()

void wxToolBarToolBase::Detach ( )

◆ Enable()

bool wxToolBarToolBase::Enable ( bool  enable)

◆ GetBitmap()

wxBitmap wxToolBarToolBase::GetBitmap ( ) const

◆ GetClientData()

wxObject* wxToolBarToolBase::GetClientData ( ) const

◆ GetControl()

wxControl* wxToolBarToolBase::GetControl ( ) const

◆ GetDisabledBitmap()

wxBitmap wxToolBarToolBase::GetDisabledBitmap ( ) const

◆ GetDisabledBitmapBundle()

wxBitmapBundle wxToolBarToolBase::GetDisabledBitmapBundle ( ) const

Return the bundle containing disabled tool bitmaps.

This bundle may be invalid if the tool doesn't show a bitmap or doesn't have a specific disabled bitmap creates one automatically from the normal bitmap.


◆ GetDropdownMenu()

wxMenu* wxToolBarToolBase::GetDropdownMenu ( ) const

◆ GetId()

int wxToolBarToolBase::GetId ( ) const

◆ GetKind()

wxItemKind wxToolBarToolBase::GetKind ( ) const

◆ GetLabel()

const wxString& wxToolBarToolBase::GetLabel ( ) const

◆ GetLongHelp()

const wxString& wxToolBarToolBase::GetLongHelp ( ) const

◆ GetNormalBitmap()

wxBitmap wxToolBarToolBase::GetNormalBitmap ( ) const

◆ GetNormalBitmapBundle()

wxBitmapBundle wxToolBarToolBase::GetNormalBitmapBundle ( ) const

Return the bundle containing normal tool bitmaps.

This bundle may be invalid if the tool doesn't show a bitmap.


◆ GetShortHelp()

const wxString& wxToolBarToolBase::GetShortHelp ( ) const

◆ GetStyle()

int wxToolBarToolBase::GetStyle ( ) const

◆ GetToolBar()

wxToolBarBase* wxToolBarToolBase::GetToolBar ( ) const

◆ IsButton()

bool wxToolBarToolBase::IsButton ( ) const

◆ IsControl()

bool wxToolBarToolBase::IsControl ( ) const

◆ IsEnabled()

bool wxToolBarToolBase::IsEnabled ( ) const

◆ IsSeparator()

bool wxToolBarToolBase::IsSeparator ( ) const

◆ IsStretchable()

bool wxToolBarToolBase::IsStretchable ( ) const

◆ IsStretchableSpace()

bool wxToolBarToolBase::IsStretchableSpace ( ) const

◆ IsToggled()

bool wxToolBarToolBase::IsToggled ( ) const

◆ MakeStretchable()

void wxToolBarToolBase::MakeStretchable ( )

◆ SetClientData()

void wxToolBarToolBase::SetClientData ( wxObject clientData)

◆ SetDisabledBitmap()

void wxToolBarToolBase::SetDisabledBitmap ( const wxBitmapBundle bmp)

◆ SetDropdownMenu()

void wxToolBarToolBase::SetDropdownMenu ( wxMenu menu)

◆ SetLabel()

void wxToolBarToolBase::SetLabel ( const wxString label)

◆ SetLongHelp()

bool wxToolBarToolBase::SetLongHelp ( const wxString help)

◆ SetNormalBitmap()

void wxToolBarToolBase::SetNormalBitmap ( const wxBitmapBundle bmp)

◆ SetShortHelp()

bool wxToolBarToolBase::SetShortHelp ( const wxString help)

◆ SetToggle()

bool wxToolBarToolBase::SetToggle ( bool  toggle)

◆ Toggle() [1/2]

void wxToolBarToolBase::Toggle ( )

◆ Toggle() [2/2]

bool wxToolBarToolBase::Toggle ( bool  toggle)