#include <Fl_Tool_Bar.h>
Inheritance diagram for Fl_Tool_Bar:
Public Types | |
enum | TbSize { TB_SIZE_SMALL = 0, TB_SIZE_BIG, TB_SIZE_DEFAULT } |
Size of toolbar button icons. More... | |
Public Methods | |
Fl_Tool_Bar (int x, int y, int w, int h, const char *label=0) | |
Creates new toolbar widget using the given position, size, and label string. | |
Fl_Tool_Bar (const char *l=0, int layout_size=30, Fl_Align layout_al=FL_ALIGN_TOP, int label_w=-1) | |
Creates new toolbar widget using the label, size, alignment, and label width. | |
~Fl_Tool_Bar () | |
Destructor. | |
Fl_Tool_Button * | add_button (Fl_Image *image, long id, const char *label=0, const char *tip=0) |
Add normal button to tool bar. More... | |
Fl_Tool_Button * | add_button (const char *label, const char *tip, Fl_Image *image=0, Fl_Callback *cb=0, void *data=0) |
Add normal button to tool bar. More... | |
Fl_Tool_Button * | add_toggle (Fl_Image *image, long id, const char *label=0, const char *tip=0) |
Add toggle button to tool bar. More... | |
Fl_Tool_Button * | add_toggle (const char *label, const char *tip, Fl_Image *image=0, Fl_Callback *cb=0, void *data=0) |
Add toggle button to tool bar. More... | |
Fl_Divider * | add_divider () |
Add divider to tool bar. | |
Fl_Widget * | item () const |
Returns current item, this should be used ONLY is Fl_Tool_Bar::callback function. | |
void | item (Fl_Widget *i) |
Set current item, used internally. | |
virtual void | draw () |
void Fl_Widget::draw(). | |
virtual void | layout () |
void Fl_Widget::layout(). | |
virtual int | handle (int ev) |
int Fl_Widget::handle(int event). | |
virtual void | preferred_size (int &w, int &h) const |
Returns preferred size for tool bar, regarding to its state. | |
int | spacing () const |
This function is obsolete, you should use layout_spacing() instead. More... | |
void | spacing (int v) |
This function is obsolete, you should use layout_spacing() instead. More... | |
TbSize | tb_size () const |
Return current size mode. More... | |
void | tb_size (TbSize s) |
Set size mode. More... | |
Static Public Methods | |
void | default_callback (Fl_Widget *button, void *arg) |
Default callback for tool bar buttons. More... | |
void | button_glyph (const Fl_Widget *widget, int glyph, int x, int y, int w, int h, Fl_Flags flags) |
Default open/close glyph. | |
void | set_icon_size (TbSize size, int w, int h) |
Set default button sizes for ALL tool bars. More... | |
void | get_icon_size (TbSize size, int &w, int &h) |
Get default button sizes. More... | |
TbSize | default_tb_size () |
Return default size mode. More... | |
void | default_tb_size (TbSize s) |
Set default size mode for ALL tool bars. More... | |
Static Public Attributes | |
Fl_Named_Style * | default_style |
Named style for toolbar. More... |
Toolbar usually contains shortcuts to menu actions, such as "Open File". Items are normally represented as buttons, either normal or toggles. However, it is possible to add any kind of widget to tool bar group.
Fl_Tool_Bar provides simple interface for adding buttons. It is recommended to use these functions, this way you can get maximum usability for tool bar.
Definition at line 42 of file Fl_Tool_Bar.h.
|
Size of toolbar button icons.
Definition at line 51 of file Fl_Tool_Bar.h. Referenced by default_tb_size(), get_icon_size(), set_icon_size(), and tb_size(). |
|
Add normal button to tool bar.
|
|
Add normal button to tool bar.
|
|
Add toggle button to tool bar.
|
|
Add toggle button to tool bar.
|
|
Default callback for tool bar buttons. This sets 'button' to be current item() of tool bar and makes this->do_callback() Reimplemented from Fl_Widget. |
|
Set default size mode for ALL tool bars.
Definition at line 179 of file Fl_Tool_Bar.h. References TbSize. |
|
Return default size mode.
Definition at line 174 of file Fl_Tool_Bar.h. References TbSize. Referenced by tb_size(). |
|
Get default button sizes.
Definition at line 157 of file Fl_Tool_Bar.h. References TbSize. |
|
Set default button sizes for ALL tool bars.
Definition at line 152 of file Fl_Tool_Bar.h. References TbSize. |
|
This function is obsolete, you should use layout_spacing() instead. Set spacing between items. Definition at line 146 of file Fl_Tool_Bar.h. |
|
This function is obsolete, you should use layout_spacing() instead. Spacing between items. Definition at line 141 of file Fl_Tool_Bar.h. |
|
Set size mode.
Definition at line 168 of file Fl_Tool_Bar.h. References TbSize. |
|
Return current size mode.
Definition at line 163 of file Fl_Tool_Bar.h. References default_tb_size(), TB_SIZE_DEFAULT, and TbSize. |
|
Named style for toolbar. Name: "Tool Bar" Reimplemented from Fl_Bar. Definition at line 46 of file Fl_Tool_Bar.h. |