HildonEditToolbar

HildonEditToolbar — Toolbar for edition of user data.

Synopsis

                    HildonEditToolbar;
GtkWidget*          hildon_edit_toolbar_new             (void);
GtkWidget*          hildon_edit_toolbar_new_with_text   (const gchar *label,
                                                         const gchar *button);
void                hildon_edit_toolbar_set_label       (HildonEditToolbar *toolbar,
                                                         const gchar *label);
void                hildon_edit_toolbar_set_button_label
                                                        (HildonEditToolbar *toolbar,
                                                         const gchar *label);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkHBox
                                       +----HildonEditToolbar

Implemented Interfaces

HildonEditToolbar implements AtkImplementorIface and GtkBuildable.

Style Properties

  "arrow-height"             guint                 : Read
  "arrow-width"              guint                 : Read

Signals

  "arrow-clicked"                                  : Run First
  "button-clicked"                                 : Run First

Description

The HildonEditToolbar is a toolbar which contains a label and two buttons, one of them being an arrow pointing backwards.

The label is a description of the action that the user is supposed to do. The button is to be pressed when the user completes the action. The arrow is used to go back to the previous view discarding any changes.

Note that those widgets don't do anything themselves by default. To actually peform actions the developer must provide callbacks for them.

To add a HildonEditToolbar to a window use hildon_window_set_edit_toolbar().

This toolbar is meant to replace the window title bar by emulating its appearance, so you should put the window in full screen mode with gtk_window_fullscreen().

Example 15. HildonEditToolbar example

GtkWidget *window;
GtkWidget *toolbar;
// Declare more widgets here ...

window = hildon_stackable_window_new ();
toolbar = hildon_edit_toolbar_new_with_text ("Choose items to delete", "Delete");
// Create more widgets here ...

// Add toolbar to window
hildon_window_set_edit_toolbar (HILDON_WINDOW (window), HILDON_EDIT_TOOLBAR (toolbar));

// Add other widgets ...

g_signal_connect (toolbar, "button-clicked", G_CALLBACK (delete_button_clicked), someparameter);
g_signal_connect_swapped (toolbar, "arrow-clicked", G_CALLBACK (gtk_widget_destroy), window);

gtk_widget_show_all (window);
gtk_window_fullscreen (GTK_WINDOW (window));


Details

HildonEditToolbar

typedef struct _HildonEditToolbar HildonEditToolbar;


hildon_edit_toolbar_new ()

GtkWidget*          hildon_edit_toolbar_new             (void);

Creates a new HildonEditToolbar.

Returns : a new HildonEditToolbar

Since 2.2


hildon_edit_toolbar_new_with_text ()

GtkWidget*          hildon_edit_toolbar_new_with_text   (const gchar *label,
                                                         const gchar *button);

Creates a new HildonEditToolbar, with the toolbar label set to label and the button label set to button.

label : Text for the toolbar label.
button : Text for the toolbar button.
Returns : a new HildonEditToolbar

Since 2.2


hildon_edit_toolbar_set_label ()

void                hildon_edit_toolbar_set_label       (HildonEditToolbar *toolbar,
                                                         const gchar *label);

Sets the label of toolbar to label. This will clear any previously set value.

toolbar : a HildonEditToolbar
label : a new text for the toolbar label

Since 2.2


hildon_edit_toolbar_set_button_label ()

void                hildon_edit_toolbar_set_button_label
                                                        (HildonEditToolbar *toolbar,
                                                         const gchar *label);

Sets the label of the toolbar button to label. This will clear any previously set value.

toolbar : a HildonEditToolbar
label : a new text for the label of the toolbar button

Since 2.2

Style Property Details

The "arrow-height" style property

  "arrow-height"             guint                 : Read

Height of the arrow button.

Default value: 56


The "arrow-width" style property

  "arrow-width"              guint                 : Read

Width of the arrow button.

Default value: 112

Signal Details

The "arrow-clicked" signal

void                user_function                      (HildonEditToolbar *widget,
                                                        gpointer           user_data)      : Run First

Emitted when the toolbar back button (arrow) has been activated (pressed and released).

widget : the object which received the signal.
user_data : user data set when the signal handler was connected.

Since 2.2


The "button-clicked" signal

void                user_function                      (HildonEditToolbar *widget,
                                                        gpointer           user_data)      : Run First

Emitted when the toolbar button has been activated (pressed and released).

widget : the object which received the signal.
user_data : user data set when the signal handler was connected.

Since 2.2