Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gtk::Toolbar Class Reference

A GtkToolbar C++ wrapper class. More...

#include <inti/gtk/toolbar.h>

Inheritance diagram for Inti::Gtk::Toolbar:

Inti::Gtk::Container Inti::Gtk::Widget Inti::Gtk::Object Inti::Atk::Implementor Inti::G::Object Inti::G::TypeInterface Inti::G::TypeInstance Inti::MemoryHandler Inti::G::TypeInstance Inti::ReferencedBase Inti::ReferencedBase List of all members.

Public Member Functions

Constructors
Accessors
Methods
Property Proxies
Signal Proxies

Protected Member Functions

Constructors
Signal Handlers

Detailed Description

A GtkToolbar C++ wrapper class.

After constructing an empty toolbar, buttons with text and/or images are added with append_button(), prepend_button(), and insert_button(). There are similar methods for adding ToggleButtons and RadioButtons. An arbitrary widget can be added to the toolbar with append_widget(), prepend_widget(), and insert_widget(). Widgets can be visibly grouped by adding gaps between widgets using append_space(), prepend_space(), and insert_space().


Constructor & Destructor Documentation

Inti::Gtk::Toolbar::Toolbar GtkToolbar *  toolbar,
bool  reference = false
[explicit, protected]
 

Construct a new Toolbar from an existing GtkToolbar.

Parameters:
toolbar A pointer to a GtkToolbar.
reference Set false if the initial reference count is floating, set true if it's not.

The toolbar can be a newly created GtkToolbar or an existing GtkToolbar (see G::Object::Object).

Inti::Gtk::Toolbar::Toolbar Orientation  orientation = ORIENTATION_HORIZONTAL,
ToolbarStyle  style = TOOLBAR_ICONS
[explicit]
 

Constrcut a new toolbar.

Parameters:
orientation The Orientation, either horizontal or vertical.
style The style for the toolbar.


Member Function Documentation

Button* Inti::Gtk::Toolbar::append_button const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new button to the end (right or bottom edges) of the toolbar.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

RadioButton* Inti::Gtk::Toolbar::append_radio_button const RadioButton group,
const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new radio button to the end (right or bottom edges) of the toolbar.

Parameters:
group The radio button whose group this radio button should be added to, or null.
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new radio button added to the toolbar.

The group argument should be null for the first radio button in a group. Then for subsequent radio buttons in the same group, the return value from the first or previous call to this method is passed as the group argument for the next call.

Button* Inti::Gtk::Toolbar::append_stock const char *  stock_id,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a stock button to the end (right or bottom edges) of the toolbar.

Parameters:
stock_id The GTK+ stock identifier, such as GTK_STOCK_OPEN or GTK_STOCK_EXIT.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

ToggleButton* Inti::Gtk::Toolbar::append_toggle_button const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new toggle button to the end (right or bottom edges) of the toolbar.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new toggle button added to the toolbar; you can ignore this value if you want.

void Inti::Gtk::Toolbar::append_widget Widget widget,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a widget to the end (right or bottom edges) of the toolbar.

Parameters:
widget The Widget to add.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.

bool Inti::Gtk::Toolbar::children std::vector< ToolbarChild * > &  child_list  )  const
 

Retrieves the list of the toolbar's children.

Parameters:
child_list A reference to a vector of ToolbarChild* to hold the child list.
Returns:
true if child_list is not empty.

ToolbarStyle Inti::Gtk::Toolbar::get_style  )  const
 

Retrieves whether the toolbar has text, icons, or both (see set_style()).

Returns:
The current style of the toolbar.

Reimplemented from Inti::Gtk::Widget.

Button* Inti::Gtk::Toolbar::insert_button const String text,
Widget icon,
const Slot0< void > *  callback,
int  position,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Inserts a new button into the toolbar at the specified position.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
position The number of widgets to insert this item after.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

RadioButton* Inti::Gtk::Toolbar::insert_radio_button const RadioButton group,
const String text,
Widget icon,
const Slot0< void > *  callback,
int  position,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Inserts a new radio button into the toolbar at the specified position.

Parameters:
group The radio button whose group this radio button should be added to, or null.
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
position The number of widgets to insert this item after.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new radio button added to the toolbar.

The group argument should be null for the first radio button in a group. Then for subsequent radio buttons in the same group, the return value from the first or previous call to this method is passed as the group argument for the next call.

void Inti::Gtk::Toolbar::insert_space int  position  ) 
 

Inserts a new space into the toolbar at the specified position.

Parameters:
position The number of widgets to insert the space after.

Button* Inti::Gtk::Toolbar::insert_stock const char *  stock_id,
const Slot0< void > *  callback,
int  position,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Inserts a new stock button into the toolbar at the specified position.

Parameters:
stock_id The GTK+ stock identifier, such as GTK_STOCK_OPEN or GTK_STOCK_EXIT.
callback The slot to call when the button is pressed.
position The number of widgets to insert this item after.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

ToggleButton* Inti::Gtk::Toolbar::insert_toggle_button const String text,
Widget icon,
const Slot0< void > *  callback,
int  position,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Inserts a new toggle button into the toolbar at the specified position.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
position The number of widgets to insert this item after.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new toggle button added to the toolbar; you can ignore this value if you want.

void Inti::Gtk::Toolbar::insert_widget Widget widget,
int  position,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Inserts a widget into the toolbar at the specified position.

Parameters:
widget The Widget to add.
position The number of widgets to insert the Widget after.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.

virtual void Inti::Gtk::Toolbar::on_orientation_changed Orientation  orientation  )  [protected, virtual]
 

Called when the orientation of a toolbar is changed.

Parameters:
orientation The new Orientation of the toolbar.

virtual void Inti::Gtk::Toolbar::on_style_changed ToolbarStyle  style  )  [protected, virtual]
 

Called when ever the style of a toolbar is adjusted.

Parameters:
style The new ToolbarStyle of toolbar.

For example, this would be a useful signal to connect to if you want to display more items on the toolbar when it is in icon-only mode; each item takes less space on the bar.

Button* Inti::Gtk::Toolbar::prepend_button const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new button to the beginning (left or top edges) of the toolbar.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

RadioButton* Inti::Gtk::Toolbar::prepend_radio_button const RadioButton group,
const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new radio button to the beginning (left or top edges) of the toolbar.

Parameters:
group The radio button whose group this radio button should be added to, or null.
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new radio button added to the toolbar.

The group argument should be null for the first radio button in a group. Then for subsequent radio buttons in the same group, the return value from the first or previous call to this method is passed as the group argument for the next call.

Button* Inti::Gtk::Toolbar::prepend_stock const char *  stock_id,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a stock button to the beginning (left or top edges) of the toolbar.

Parameters:
stock_id The GTK+ stock identifier, such as GTK_STOCK_OPEN or GTK_STOCK_EXIT.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new button added to the toolbar; you can ignore this value if you want.

ToggleButton* Inti::Gtk::Toolbar::prepend_toggle_button const String text,
Widget icon,
const Slot0< void > *  callback,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a new toggle button to the beginning (left or top edges) of the toolbar.

Parameters:
text The toolbar button label.
icon A Widget that should be used as the button's icon.
callback The slot to call when the button is pressed.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.
Returns:
The new toggle button added to the toolbar; you can ignore this value if you want.

void Inti::Gtk::Toolbar::prepend_widget Widget widget,
const String tooltip_text = 0,
const String tooltip_private_text = 0
 

Adds a widget to the beginning (left or top edges) of the toolbar.

Parameters:
widget The Widget to add.
tooltip_text A string that appears when the user holds the mouse over this item.
tooltip_private_text The private text of the tooltip.

void Inti::Gtk::Toolbar::set_icon_size IconSize  icon_size  ) 
 

Sets the size of stock icons in the toolbar.

Parameters:
icon_size The IconSize that stock icons in the toolbar shall have.

You can call this method either before you add the icons or after they've been added. The size you set will override user preferences for the default icon size.

void Inti::Gtk::Toolbar::set_orientation Orientation  orientation  ) 
 

Sets whether a toolbar should appear horizontally or vertically.

Parameters:
orientation The new Orientation.

void Inti::Gtk::Toolbar::set_style ToolbarStyle  style  ) 
 

Alters the view of toolbar to display either icons only, text only, or both.

Parameters:
style The new style for the toolbar.

void Inti::Gtk::Toolbar::set_tooltips bool  enable  ) 
 

Sets if the tooltips of a toolbar should be active or not.

Parameters:
enable Set to false to disable the tooltips, or true to enable them.


The documentation for this class was generated from the following file: Main Page - Footer


Generated on Sun Sep 14 20:08:20 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002