Hildon Reference Manual | ||||
---|---|---|---|---|
HildonPickerDialogHildonPickerDialog — A utility widget that shows a HildonTouchSelector widget |
#include <hildon/hildon.h> HildonPickerDialog; GtkWidget* hildon_picker_dialog_new (GtkWindow *parent); gboolean hildon_picker_dialog_set_selector (HildonPickerDialog *dialog, HildonTouchSelector *selector); void hildon_picker_dialog_set_done_label (HildonPickerDialog *dialog, const gchar *label); const gchar* hildon_picker_dialog_get_done_label (HildonPickerDialog *dialog); HildonTouchSelector* hildon_picker_dialog_get_selector (HildonPickerDialog *dialog);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----HildonDialog +----HildonPickerDialog
"center-on-show" gboolean : Read / Write / Construct "done-button-text" gchar* : Read / Write / Construct
"max-height-landscape" guint : Read / Write "max-height-portrait" guint : Read / Write
HildonPickerDialog is a dialog that is used to show a HildonTouchSelector widget and a 'Done' button to allow users to finish their selections.
The HildonPickerDialog will show a 'Done' button in case the
HildonTouchSelector allows multiple selection. The label of the
button can be set using hildon_picker_dialog_set_done_label()
and
retrieved using hildon_picker_dialog_get_done_label()
HildonPickerDialog will emit "response" when a selection is completed, with the response id set to GTK_RESPONSE_OK (or GTK_RESPONSE_DELETE_EVENT if the selection was cancelled).
Note that in most cases developers don't need to deal directly with this widget. HildonPickerButton is designed to pop up a HildonPickerDialog and manage the interaction with it.
GtkWidget* hildon_picker_dialog_new (GtkWindow *parent);
Creates a new HildonPickerDialog
parent : |
the parent window |
Returns : | a new HildonPickerDialog |
Since 2.2
gboolean hildon_picker_dialog_set_selector (HildonPickerDialog *dialog, HildonTouchSelector *selector);
Sets selector
as the HildonTouchSelector to be shown in dialog
dialog : |
a HildonPickerDialog |
selector : |
a HildonTouchSelector |
Returns : | TRUE if selector was set, FALSE otherwise
|
Since 2.2
void hildon_picker_dialog_set_done_label (HildonPickerDialog *dialog, const gchar *label);
Sets a custom string to be used as the 'Done' button label in dialog
.
dialog : |
a HildonPickerDialog |
label : |
a string |
Since 2.2
const gchar* hildon_picker_dialog_get_done_label (HildonPickerDialog *dialog);
Retrieves current 'Done' button label.
dialog : |
a HildonPickerDialog |
Returns : | the custom string to be used. |
Since 2.2
HildonTouchSelector* hildon_picker_dialog_get_selector (HildonPickerDialog *dialog);
Retrieves the HildonTouchSelector associated to dialog
.
dialog : |
a HildonPickerDialog |
Returns : | a HildonTouchSelector |
Since 2.2
"center-on-show"
property"center-on-show" gboolean : Read / Write / Construct
If the dialog should center on the current selection when it is showed.
Default value: TRUE
"done-button-text"
property"done-button-text" gchar* : Read / Write / Construct
Done Button Label.
Default value: "wdgt_bd_done"
"max-height-landscape"
style property"max-height-landscape" guint : Read / Write
Maximum dialog height on landscape mode.
Default value: 358
"max-height-portrait"
style property"max-height-portrait" guint : Read / Write
Maximum dialog height on portrait mode.
Default value: 638