HildonWizardDialog

HildonWizardDialog — A widget to create a guided installation process wizard.

Synopsis


#include <hildon/hildon.h>

enum                HildonWizardDialogResponse;
                    HildonWizardDialog;
gboolean            (*HildonWizardDialogPageFunc)       (GtkNotebook *notebook,
                                                         gint current_page,
                                                         gpointer data);
GtkWidget*          hildon_wizard_dialog_new            (GtkWindow *parent,
                                                         const char *wizard_name,
                                                         GtkNotebook *notebook);
void                hildon_wizard_dialog_set_forward_page_func
                                                        (HildonWizardDialog *wizard_dialog,
                                                         HildonWizardDialogPageFunc page_func,
                                                         gpointer data,
                                                         GDestroyNotify destroy);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----HildonWizardDialog

Implemented Interfaces

HildonWizardDialog implements AtkImplementorIface and GtkBuildable.

Properties

  "autotitle"                gboolean              : Read / Write
  "wizard-name"              gchar*                : Read / Write
  "wizard-notebook"          GtkNotebook*          : Read / Write

Description

HildonWizardDialog is a widget to create a guided installation process. The dialog has three standard buttons, previous, next, finish, and contains several pages.

Response buttons are dimmed/undimmed automatically. The notebook widget provided by users contains the actual wizard pages.

Usage of the API is very simple, it has only one function to create it and the rest of it is handled by developers notebook. Also, the response is returned, either cancel or finish. Next and previous buttons are handled by the wizard dialog it self, by switching the page either forward or backward in the notebook.

It is possible to determinate whether users can go to the next page by setting a HildonWizardDialogPageFunc function with hildon_wizard_dialog_set_forward_page_func()

Details

enum HildonWizardDialogResponse

typedef enum
{
    HILDON_WIZARD_DIALOG_CANCEL = GTK_RESPONSE_CANCEL,
    HILDON_WIZARD_DIALOG_PREVIOUS = 0,
    HILDON_WIZARD_DIALOG_NEXT,
    HILDON_WIZARD_DIALOG_FINISH
}                                               HildonWizardDialogResponse;

Predefined values for use as response ids for HildonWizardDialog.

Warning

HILDON_WIZARD_DIALOG_CANCEL is deprecated and should not be used in newly-written code.

HILDON_WIZARD_DIALOG_CANCEL Returned by the 'Cancel' button.
HILDON_WIZARD_DIALOG_PREVIOUS Returned by the 'Previous' button.
HILDON_WIZARD_DIALOG_NEXT Returned by the 'Next' button.
HILDON_WIZARD_DIALOG_FINISH Returned by the 'Finish' button.

HildonWizardDialog

typedef struct _HildonWizardDialog HildonWizardDialog;


HildonWizardDialogPageFunc ()

gboolean            (*HildonWizardDialogPageFunc)       (GtkNotebook *notebook,
                                                         gint current_page,
                                                         gpointer data);

notebook :
current_page :
data :
Returns :

hildon_wizard_dialog_new ()

GtkWidget*          hildon_wizard_dialog_new            (GtkWindow *parent,
                                                         const char *wizard_name,
                                                         GtkNotebook *notebook);

Creates a new HildonWizardDialog.

parent : a GtkWindow
wizard_name : the name of dialog
notebook : the notebook to be shown on the dialog
Returns : a new HildonWizardDialog

hildon_wizard_dialog_set_forward_page_func ()

void                hildon_wizard_dialog_set_forward_page_func
                                                        (HildonWizardDialog *wizard_dialog,
                                                         HildonWizardDialogPageFunc page_func,
                                                         gpointer data,
                                                         GDestroyNotify destroy);

Sets the page forwarding function to be page_func. This function will be used to determine whether it is possible to go to the next page when the user presses the forward button. Setting page_func to NULL wil make the wizard to simply go always to the next page.

wizard_dialog : a HildonWizardDialog
page_func : the HildonWizardDialogPageFunc
data : user data for page_func
destroy : destroy notifier for data

Since 2.2

Property Details

The "autotitle" property

  "autotitle"                gboolean              : Read / Write

If the wizard should automatically try to change the window title when changing steps. Set to FALSE if you'd like to override the default behaviour.

Default value: TRUE

Since 0.14.5


The "wizard-name" property

  "wizard-name"              gchar*                : Read / Write

The name of the wizard.

Default value: NULL


The "wizard-notebook" property

  "wizard-notebook"          GtkNotebook*          : Read / Write

The notebook object, which is used by the HildonWizardDialog.