hildon 2.1.42 Reference Manual | ||||
---|---|---|---|---|
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);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----HildonEditToolbar
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()
.
Example 23. 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));
GtkWidget* hildon_edit_toolbar_new (void);
Creates a new HildonEditToolbar.
Returns : | a new HildonEditToolbar |
Since 2.2
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
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
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
"arrow-height"
style property"arrow-height" guint : Read
Height of the arrow button.
Default value: 56
"arrow-clicked"
signalvoid 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
"button-clicked"
signalvoid 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