#include <toolbarcust/toolbarcust.h>
Public Member Functions | |
wxToolBarCustomisationInfo (const wxString &toolbarName=wxEmptyString) | |
wxToolBarCustomisationInfo (const wxToolBarCustomisationInfo &info) | |
~wxToolBarCustomisationInfo () | |
void | Init () |
Initialises the class. | |
void | Clear () |
Clears the items. | |
void | Copy (const wxToolBarCustomisationInfo &info) |
Copies the object. | |
wxToolBarCustomisationInfoItem & | AddTool (int toolid, const wxString &name, const wxString &label, const wxBitmap &bitmap, const wxBitmap &bmpDisabled, wxItemKind kind=wxITEM_NORMAL, const wxString &shortHelp=wxEmptyString, const wxString &longHelp=wxEmptyString, int style=wxTOOL_STYLE_BUTTON) |
Adds a tool. | |
wxToolBarCustomisationInfoItem & | AddButton (int toolid, const wxString &name, const wxString &label, const wxBitmap &bitmap, const wxString &shortHelp=wxEmptyString, const wxString &longHelp=wxEmptyString) |
Adds a normal button tool. | |
wxToolBarCustomisationInfoItem & | AddCheckButton (int toolid, const wxString &name, const wxString &label, const wxBitmap &bitmap, const wxString &shortHelp=wxEmptyString, const wxString &longHelp=wxEmptyString) |
Adds a check button tool. | |
wxToolBarCustomisationInfoItem & | AddRadioButton (int toolid, const wxString &name, const wxString &label, const wxBitmap &bitmap, const wxString &shortHelp=wxEmptyString, const wxString &longHelp=wxEmptyString) |
Adds a radio button tool. | |
wxToolBarCustomisationInfoItem & | AddControl (int toolid, const wxString &name, const wxString &shortHelp=wxEmptyString, const wxString &longHelp=wxEmptyString) |
Adds a control. | |
wxToolBarCustomisationInfoItem & | AddSeparator () |
Adds a separator. | |
bool | Save (const wxString &path, wxConfigBase &config) |
Saves enabled status to config. | |
bool | Load (const wxString &path, wxConfigBase &config) |
Load enabled status from config. | |
bool | Reset (wxToolBarBase *toolBar) |
Reset to beginning of info, to be called before iterating. | |
bool | GetNextItem () |
Call at the beginning of the loop. | |
bool | CreateTool () |
Creates a tool using the current info. | |
bool | CreateTool (wxControl *control) |
Creates a tool using the current info. | |
const wxToolBarCustomisationInfoItem & | GetCurrentItem () const |
Gets the current item. | |
wxToolBarCustomisationInfoItem & | GetCurrentItem () |
bool | IsControl () const |
True if the current tool is a control. | |
bool | IsSeparator () const |
True if the current tool is a separator. | |
bool | IsButton () const |
True if the current tool is a button. | |
bool | IsEnabled () const |
True if the current tool is enabled. | |
bool | IsToolBarEnabled () const |
Get/set toolbar enabled flag. | |
void | SetToolBarEnabled (bool enabled) |
bool | GetCanHaveLabels () const |
Get/set can have labels. | |
void | SetCanHaveLabels (bool labels) |
bool | GetUseLabels () const |
Get/set labels. | |
void | SetUseLabels (bool useLabels) |
int | GetTotalItemCount () const |
Get total number of items. | |
int | GetEnabledItemCount () const |
Get number of enabled items. | |
const wxToolBarCustomisationInfoItem & | GetItem (int n) const |
Gets the nth item. | |
wxToolBarCustomisationInfoItem & | GetItem (int n) |
wxToolBarCustomisationInfoItem * | Find (const wxString &name) const |
Finds a tool by name. | |
wxToolBarCustomisationInfoItem * | Find (int id) const |
Finds a tool by id. | |
void | SetName (const wxString &name) |
Set/get name. | |
const wxString & | GetName () const |
wxString | GetKey (const wxString &prefix, const wxString &key) const |
Returns the key with "prefix/" prepended if non-empty. | |
Protected Attributes | |
wxString | m_name |
wxList | m_toolbarItems |
int | m_currentTool |
bool | m_needsSeparator |
int | m_createdCount |
bool | m_toolbarEnabled |
bool | m_canHaveLabels |
bool | m_useLabels |
wxToolBarBase * | m_currentToolBar |
wxToolBarCustomisationInfo::wxToolBarCustomisationInfo | ( | const wxString & | toolbarName = wxEmptyString |
) |
wxToolBarCustomisationInfo stores customisation information about a single toolbar.
wxToolBarCustomisationInfo::wxToolBarCustomisationInfo | ( | const wxToolBarCustomisationInfo & | info | ) |
wxToolBarCustomisationInfo::~wxToolBarCustomisationInfo | ( | ) |
void wxToolBarCustomisationInfo::Init | ( | ) |
Initialises the class.
void wxToolBarCustomisationInfo::Clear | ( | ) |
Clears the items.
void wxToolBarCustomisationInfo::Copy | ( | const wxToolBarCustomisationInfo & | info | ) |
Copies the object.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddTool | ( | int | toolid, | |
const wxString & | name, | |||
const wxString & | label, | |||
const wxBitmap & | bitmap, | |||
const wxBitmap & | bmpDisabled, | |||
wxItemKind | kind = wxITEM_NORMAL , |
|||
const wxString & | shortHelp = wxEmptyString , |
|||
const wxString & | longHelp = wxEmptyString , |
|||
int | style = wxTOOL_STYLE_BUTTON | |||
) |
Adds a tool.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddButton | ( | int | toolid, | |
const wxString & | name, | |||
const wxString & | label, | |||
const wxBitmap & | bitmap, | |||
const wxString & | shortHelp = wxEmptyString , |
|||
const wxString & | longHelp = wxEmptyString | |||
) |
Adds a normal button tool.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddCheckButton | ( | int | toolid, | |
const wxString & | name, | |||
const wxString & | label, | |||
const wxBitmap & | bitmap, | |||
const wxString & | shortHelp = wxEmptyString , |
|||
const wxString & | longHelp = wxEmptyString | |||
) |
Adds a check button tool.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddRadioButton | ( | int | toolid, | |
const wxString & | name, | |||
const wxString & | label, | |||
const wxBitmap & | bitmap, | |||
const wxString & | shortHelp = wxEmptyString , |
|||
const wxString & | longHelp = wxEmptyString | |||
) |
Adds a radio button tool.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddControl | ( | int | toolid, | |
const wxString & | name, | |||
const wxString & | shortHelp = wxEmptyString , |
|||
const wxString & | longHelp = wxEmptyString | |||
) |
Adds a control.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::AddSeparator | ( | ) |
Adds a separator.
bool wxToolBarCustomisationInfo::Save | ( | const wxString & | path, | |
wxConfigBase & | config | |||
) |
Saves enabled status to config.
bool wxToolBarCustomisationInfo::Load | ( | const wxString & | path, | |
wxConfigBase & | config | |||
) |
Load enabled status from config.
bool wxToolBarCustomisationInfo::Reset | ( | wxToolBarBase * | toolBar | ) |
Reset to beginning of info, to be called before iterating.
bool wxToolBarCustomisationInfo::GetNextItem | ( | ) |
Call at the beginning of the loop.
bool wxToolBarCustomisationInfo::CreateTool | ( | ) |
Creates a tool using the current info.
Also implicitly creates a separator if appropriate.
bool wxToolBarCustomisationInfo::CreateTool | ( | wxControl * | control | ) |
Creates a tool using the current info.
Also implicitly creates a separator if appropriate.
const wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::GetCurrentItem | ( | ) | const |
Gets the current item.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::GetCurrentItem | ( | ) |
bool wxToolBarCustomisationInfo::IsControl | ( | ) | const |
True if the current tool is a control.
bool wxToolBarCustomisationInfo::IsSeparator | ( | ) | const |
True if the current tool is a separator.
bool wxToolBarCustomisationInfo::IsButton | ( | ) | const |
True if the current tool is a button.
bool wxToolBarCustomisationInfo::IsEnabled | ( | ) | const |
True if the current tool is enabled.
bool wxToolBarCustomisationInfo::IsToolBarEnabled | ( | ) | const [inline] |
Get/set toolbar enabled flag.
void wxToolBarCustomisationInfo::SetToolBarEnabled | ( | bool | enabled | ) | [inline] |
bool wxToolBarCustomisationInfo::GetCanHaveLabels | ( | ) | const [inline] |
Get/set can have labels.
void wxToolBarCustomisationInfo::SetCanHaveLabels | ( | bool | labels | ) | [inline] |
bool wxToolBarCustomisationInfo::GetUseLabels | ( | ) | const [inline] |
Get/set labels.
void wxToolBarCustomisationInfo::SetUseLabels | ( | bool | useLabels | ) | [inline] |
int wxToolBarCustomisationInfo::GetTotalItemCount | ( | ) | const |
Get total number of items.
int wxToolBarCustomisationInfo::GetEnabledItemCount | ( | ) | const |
Get number of enabled items.
const wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::GetItem | ( | int | n | ) | const |
Gets the nth item.
wxToolBarCustomisationInfoItem & wxToolBarCustomisationInfo::GetItem | ( | int | n | ) |
wxToolBarCustomisationInfoItem * wxToolBarCustomisationInfo::Find | ( | const wxString & | name | ) | const |
Finds a tool by name.
wxToolBarCustomisationInfoItem * wxToolBarCustomisationInfo::Find | ( | int | id | ) | const |
Finds a tool by id.
void wxToolBarCustomisationInfo::SetName | ( | const wxString & | name | ) | [inline] |
Set/get name.
const wxString& wxToolBarCustomisationInfo::GetName | ( | ) | const [inline] |
wxString wxToolBarCustomisationInfo::GetKey | ( | const wxString & | prefix, | |
const wxString & | key | |||
) | const |
Returns the key with "prefix/" prepended if non-empty.
wxString wxToolBarCustomisationInfo::m_name [protected] |
wxList wxToolBarCustomisationInfo::m_toolbarItems [protected] |
int wxToolBarCustomisationInfo::m_currentTool [protected] |
bool wxToolBarCustomisationInfo::m_needsSeparator [protected] |
int wxToolBarCustomisationInfo::m_createdCount [protected] |
bool wxToolBarCustomisationInfo::m_toolbarEnabled [protected] |
bool wxToolBarCustomisationInfo::m_canHaveLabels [protected] |
bool wxToolBarCustomisationInfo::m_useLabels [protected] |
wxToolBarBase* wxToolBarCustomisationInfo::m_currentToolBar [protected] |