hildon 1.0.17 Reference Manual | ||||
---|---|---|---|---|
HildonNote; GtkWidget* hildon_note_new_confirmation (GtkWindow *parent, const gchar *description); GtkWidget* hildon_note_new_confirmation_add_buttons (GtkWindow *parent, const gchar *description, ...); GtkWidget* hildon_note_new_confirmation_with_icon_name (GtkWindow *parent, const gchar *description, const gchar *icon_name); GtkWidget* hildon_note_new_cancel_with_progress_bar (GtkWindow *parent, const gchar *description, GtkProgressBar *progressbar); GtkWidget* hildon_note_new_information (GtkWindow *parent, const gchar *description); GtkWidget* hildon_note_new_information_with_icon_name (GtkWindow *parent, const gchar *description, const gchar *icon_name); void hildon_note_set_button_text (HildonNote *note, const gchar *text); void hildon_note_set_button_texts (HildonNote *note, const gchar *text_ok, const gchar *text_cancel); enum HildonNoteType;
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----HildonNote
"description" gchararray : Read / Write "icon" gchararray : Read / Write "note-type" HildonNoteType : Read / Write / Construct "progressbar" GtkProgressBar : Read / Write "stock-icon" gchararray : Read / Write
Notes are used to for confirmation (OK/Cancel/etc.) from the user. A simple note contains an information text and an OK button to be pressed. Additional features such as progress bars or animation can also be included.
Example 14. HildonNote example
hildon_note_new_confirmation (window, "Confirmation message..."); i = gtk_dialog_run (GTK_DIALOG (note)); gtk_widget_destroy (GTK_WIDGET (note)); if (i == GTK_RESPONSE_OK) gtk_infoprint (window, "User pressed 'OK' button'"); else gtk_infoprint (window, "User pressed 'Cancel' button" );
GtkWidget* hildon_note_new_confirmation (GtkWindow *parent, const gchar *description);
Create a new confirmation note. Confirmation note has text (description) that you specify, two buttons and a default confirmation stock icon.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the message to confirm |
Returns : | a GtkWidget pointer of the note |
GtkWidget* hildon_note_new_confirmation_add_buttons (GtkWindow *parent, const gchar *description, ...);
Create a new confirmation note with custom buttons. Confirmation note has a text and any number of buttons. It's important to note that even though the name of the function might suggest, the default ok/cancel buttons are not appended but you have to provide all of the buttons.
FIXME: This doc seems to be wrong, the two buttons aren't added so it would only contain the "additional" buttons? However, changing this would break those applications that rely on current behaviour.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the message to confirm |
... : |
arguments pairs for new buttons(label and return value).
Terminate the list with NULL value.
|
Returns : | A GtkWidget pointer of the note |
GtkWidget* hildon_note_new_confirmation_with_icon_name (GtkWindow *parent, const gchar *description, const gchar *icon_name);
Create a new confirmation note. Confirmation note has text(description) that you specify, two buttons and an icon.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the message to confirm |
icon_name : |
icon to be displayed. If NULL, default icon is used. |
Returns : | a GtkWidget pointer of the note |
GtkWidget* hildon_note_new_cancel_with_progress_bar (GtkWindow *parent, const gchar *description, GtkProgressBar *progressbar);
Create a new cancel note with a progress bar. Cancel note has text(description) that you specify, a Cancel button and a progress bar.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the action to cancel |
progressbar : |
a pointer to GtkProgressBar to be filled with the
progressbar assigned to this note. Use this to set the fraction of
progressbar done. This parameter can be NULL as well, in which
case plain text cancel note appears.
|
Returns : | a GtkDialog. Use this to get rid of this note when you no longer need it. |
GtkWidget* hildon_note_new_information (GtkWindow *parent, const gchar *description);
Create a new information note. Information note has a text(description) that you specify, an OK button and an icon.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the message to confirm |
Returns : | a GtkWidget pointer of the note |
GtkWidget* hildon_note_new_information_with_icon_name (GtkWindow *parent, const gchar *description, const gchar *icon_name);
Create a new information note. Information note has text(description) that you specify, an OK button and an icon.
parent : |
the parent window. The X window ID of the parent window has to be the same as the X window ID of the application. This is important so that the window manager could handle the windows correctly. In GTK the X window ID can be checked using GDK_WINDOW_XID(GTK_WIDGET(parent)->window). |
description : |
the message to confirm |
icon_name : |
icon to be displayed. If NULL, default icon is used. |
Returns : | a GtkWidget pointer of the note |
void hildon_note_set_button_text (HildonNote *note, const gchar *text);
Sets the button text to be used by the hildon_note widget.
note : |
a HildonNote |
text : |
sets the button text and if there is two buttons in dialog, the button texts will be <text>, "Cancel". |
void hildon_note_set_button_texts (HildonNote *note, const gchar *text_ok, const gchar *text_cancel);
Sets the button texts to be used by this hildon_note widget.
note : |
a HildonNote |
text_ok : |
the new text of the default OK button |
text_cancel : |
the new text of the default cancel button |
description
" property"description" gchararray : Read / Write
Description for the note.
Default value: ""
note-type
" property"note-type" HildonNoteType : Read / Write / Construct
The type of the note dialog.
Default value: HILDON_NOTE_TYPE_CONFIRMATION
progressbar
" property"progressbar" GtkProgressBar : Read / Write
Progressbar for the note (if any).
stock-icon
" property"stock-icon" gchararray : Read / Write
Stock icon name for the note.
Default value: ""