#include <GToolBar.h>
Inheritance diagram for GToolBar:
Public Member Functions | |
virtual void | OnButtonClick (GToolButton *Btn) |
Called when a button is clicked. | |
bool | IsVertical () |
True if the toolbar should layout in a vertical manner. | |
void | IsVertical (bool v) |
True if the toolbar should layout in a vertical manner. | |
bool | TextLabels () |
Shows text labels under the buttons. | |
void | TextLabels (bool i) |
Shows text labels under the buttons. | |
bool | Customizable () |
Returns true if the the customizable menu is on [default: off]. | |
void | Customizable (ObjProperties *Store=0, char *Option=0) |
Switch for the customization menu. | |
bool | SetBitmap (char *File, int Bx, int By) |
Sets the image list to use via a file. | |
bool | SetDC (GSurface *pDC, int Bx, int By) |
Sets the image list to use via a memory surface. | |
GImageList * | GetImageList () |
Gets the image list. | |
bool | SetImageList (GImageList *l, int Bx, int By, bool Own=true) |
Sets the image list to use. | |
GFont * | GetFont () |
Gets the font used to draw the text below the buttons. | |
GToolButton * | AppendButton (char *Tip, int Id, int Type=TBT_PUSH, int Enabled=true, int IconId=-1) |
Adds a button to the toolbar. | |
bool | AppendControl (GView *Ctrl) |
Appends any old control. | |
bool | AppendSeparator () |
Append a separator. | |
bool | AppendBreak () |
Append a line break (wraps the buttons onto the next line). | |
void | Empty () |
Empties the toolbar of buttons. | |
int | OnEvent (GMessage *Msg) |
Handles the incoming events. | |
void | OnPaint (GSurface *pDC) |
Called to paint the onscreen representation of the view. | |
void | OnMouseClick (GMouse &m) |
The mouse was clicked over this view. | |
void | OnMouseEnter (GMouse &m) |
Mouse moves into the area over the control. | |
void | OnMouseExit (GMouse &m) |
Mouse leaves the area over the control. | |
void | OnMouseMove (GMouse &m) |
The mouse moves over the control. | |
bool | Pour (GRegion &r) |
Friends | |
class | GToolButton |
A toolbar hosts buttons and separators in a row. The buttons contain icons and optionally text describing there function. When the user clicks a button a M_COMMAND message is passed up to the owning GWindow for the application to handle. In the same fashion as a menu command being clicked. You should override GWindow::OnCommand to catch events from a GToolBar.
This should be attached to the GWindow before other windows so that it lays itself out under the menu.
To initialize and attach a toolbar to your GWindow use something like:
GToolBar *t = LgiLoadToolbar(this, "icons.png"); if (t) { t->Attach(this); t->AppendButton("Open", IDM_OPEN, TBT_PUSH); t->AppendSeparator(); t->AppendButton("Help", IDM_HELP, TBT_PUSH); }
|
Adds a button to the toolbar.
|
|
Switch for the customization menu.
|
|
Lay out all the children views into the client area according to their own internal rules. Space is given in a first come first served basis. Reimplemented from GLayout. |