HildonDialog

HildonDialog — Widget representing a popup window in the Hildon framework.

Synopsis

                    HildonDialog;
GtkWidget*          hildon_dialog_new                   (void);
GtkWidget*          hildon_dialog_new_with_buttons      (const gchar *title,
                                                         GtkWindow *parent,
                                                         GtkDialogFlags flags,
                                                         const gchar *first_button_text,
                                                         ...);
GtkWidget*          hildon_dialog_add_button            (HildonDialog *dialog,
                                                         const gchar *button_text,
                                                         gint response_id);
void                hildon_dialog_add_buttons           (HildonDialog *dialog,
                                                         const gchar *first_button_text,
                                                         ...);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----HildonDialog
                                                   +----HildonPickerDialog

Implemented Interfaces

HildonDialog implements AtkImplementorIface and GtkBuildable.

Description

The HildonDialog is a GTK widget which represent a popup window in the Hildon framework. It is derived from the GtkDialog and provides additional commodities specific to the Hildon framework.

Example 23. Simple HildonDialog usage

void quick_message (gchar *message)
{

    GtkWidget *dialog, *label;

    dialog = hildon_dialog_new ();
    label = gtk_label_new (message);

    g_signal_connect_swapped (dialog,
                              "response",
                              G_CALLBACK (gtk_widget_destroy),
                              dialog);

    gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
                       label);
    gtk_widget_show_all (dialog);

}


Details

HildonDialog

typedef struct _HildonDialog HildonDialog;


hildon_dialog_new ()

GtkWidget*          hildon_dialog_new                   (void);

Creates a new HildonDialog widget

Returns : the newly created HildonDialog

hildon_dialog_new_with_buttons ()

GtkWidget*          hildon_dialog_new_with_buttons      (const gchar *title,
                                                         GtkWindow *parent,
                                                         GtkDialogFlags flags,
                                                         const gchar *first_button_text,
                                                         ...);

Creates a new HildonDialog. See gtk_dialog_new_with_buttons() for more information.

title : Title of the dialog, or NULL
parent : Transient parent of the dialog, or NULL
flags : from GtkDialogFlags
first_button_text : stock ID or text to go in first button, or NULL
... : response ID for first button, then additional buttons, ending with NULL
Returns : a new HildonDialog

hildon_dialog_add_button ()

GtkWidget*          hildon_dialog_add_button            (HildonDialog *dialog,
                                                         const gchar *button_text,
                                                         gint response_id);

Adds a button to the dialog. Works exactly like gtk_dialog_add_button(), the only difference being that the button has finger size.

dialog : a HildonDialog
button_text : text of the button, or stock ID
response_id : response ID for the button.
Returns : the button widget that was added

hildon_dialog_add_buttons ()

void                hildon_dialog_add_buttons           (HildonDialog *dialog,
                                                         const gchar *first_button_text,
                                                         ...);

Adds several buttons to the dialog. Works exactly like gtk_dialog_add_buttons(), the only difference being that the buttons have finger size.

dialog : a HildonDialog
first_button_text : text of the button, or stock ID
... : response ID for first button, then more text-response_id pairs

See Also

HildonCodeDialog, HildonColorChooserDialog, HildonFontSelectionDialog, HildonGetPasswordDialog, HildonLoginDialog, HildonSetPasswordDialog, HildonSortDialog, HildonWizardDialog