ToolbarButtonGroup

 

Name

ToolbarButtonGroup

Remark

Class offers Origin C-based access to toolbar button group settings used in the Button Groups tab of the Customize Toolbars Dialog Box. It allows toolbar button groups to be created, modified, and deleted.

It is generally used in conjunction with the ToolbarButton class.

In addition, the ToolbarButtonGroupMgr class can be used to install, modify, or remove button groups from Origin.

Hierarchy

  • ToolbarButtonGroup

header to Include

origin.h

Members

Name Brief
ToolbarButtonGroup()
Constructor.

 

int Load(LPCSTR pcszFile)
Loads settings from a button group INI file into the current instance of this class. Must use full path and file name. Returns 0 on success or UBG_ERR_FILE_NOT_FOUND.
int Save(LPCSTR pcszFile = NULL)
Saves settings to a button group INI file. If pcszFileis empty, it will use the file name specified by the SetFile method. Always returns 0.
void SetFile(LPCSTR pcszFile)
void GetFile(string &strFile)
LPCSTR GetFile()
Setter/Getter for full path and file name of button group INI file.
void SetName(LPCSTR pcszName)
void GetName(string &strName)
LPCSTR GetName()
Setter/Getter for name of button group.
void SetBmp(LPCSTR pcszBmp)
void GetBmp(string &strBmp)
LPCSTR GetBmp()
Setter/Getter for full path and file name of bitmap file for button images.
int GetButtonCount()
Returns count of button in the button group.
ToolbarButton *GetButton(UINT nID)
Returns a pointer to a ToolbarButton for the given button Id. If there is no button for given Id, returns NULL.
ToolbarButton *GetButtonAt(int i)
Returns a pointer to a ToolbarButton at the zero-based index position. If there is no button at the index, returns NULL.
int AddButton(int nImgIndex)
Adds a new button (with default settings) to the button group at the zero-based index position. Returns 0 on success or UTC_ERR_CMD.
int DeleteButton(UINT nID)
Removes a button from the button group for the given button Id. Returns 0 on success or UBG_ERR_BUTTON_INDEX.
int DeleteButtonAt(int i)
Removes a button from the button group at the zero-based index. Returns 0 on success or UBG_ERR_BUTTON_INDEX.