HildonEditToolbar

HildonEditToolbar — Widget representing a toolbar for editing.

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.

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.

Example 21. HildonEditToolbar example

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

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

gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0);
// Pack more widgets here ...

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

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