HildonAppView

HildonAppView — A widget which present one view of an application

Synopsis




            HildonAppViewPrivate;
GtkWidget*  hildon_appview_new              (const gchar *title);
void        hildon_appview_add_with_scrollbar
                                            (HildonAppView *self,
                                             GtkWidget *child);
void        hildon_appview_set_fullscreen_key_allowed
                                            (HildonAppView *self,
                                             gboolean allow);
gboolean    hildon_appview_get_fullscreen_key_allowed
                                            (HildonAppView *self);
gboolean    hildon_appview_get_fullscreen   (HildonAppView *self);
void        hildon_appview_set_fullscreen   (HildonAppView *self,
                                             gboolean fullscreen);
GtkMenu*    hildon_appview_get_menu         (HildonAppView *self);
void        hildon_appview_set_toolbar      (HildonAppView *self,
                                             GtkToolbar *toolbar);
GtkToolbar* hildon_appview_get_toolbar      (HildonAppView *self);
void        hildon_appview_set_title        (HildonAppView *self,
                                             const gchar *newname);
const gchar* hildon_appview_get_title       (HildonAppView *self);
void        hildon_appview_set_connected_adjustment
                                            (HildonAppView *self,
                                             GtkAdjustment *adjustment);
GtkAdjustment* hildon_appview_get_connected_adjustment
                                            (HildonAppView *self);
void        hildon_appview_set_menu_ui      (HildonAppView *self,
                                             const gchar *ui_string);
const gchar* hildon_appview_get_menu_ui     (HildonAppView *self);

Description

HildonAppView is a widget which presents one view of an application. Application can have many different views and the appview helps to organize. It has automatic fullscreen and menu handling. It also helps to handle components like a toolbar.


appview = hildon_appview_new( "This is an application view" );
hildon_appview_set_fullscreen_key_allowed( appview, TRUE );
hildon_appview_set_toolbar( appview, toolbar );

hildon_app_set_appview( appview );

hildon_appview_set_fullscreen( appview, TRUE );

By default, HildonAppView doesn't toggle fullscreen from the fullscreen hardware key. This is because there might be applications that are not intended to have ability to switch to fullscreen mode at all. To enable fullscreen toggling from fullscreen hardware key, use hildon_appview_set_fullscreen_key_allowed -function.

Details

HildonAppViewPrivate

typedef struct _HildonAppViewPrivate HildonAppViewPrivate;

This structure contains just internal data. It should not be accessed directly.


hildon_appview_new ()

GtkWidget*  hildon_appview_new              (const gchar *title);

Use this function to create a new application view. The title will be set only if two-part-title is enabled on the HildonApp.

title : the application view title of the new HildonAppView
Returns : A HildonAppView.

hildon_appview_add_with_scrollbar ()

void        hildon_appview_add_with_scrollbar
                                            (HildonAppView *self,
                                             GtkWidget *child);

Adds the child to the self(HildonAppView) and creates a vertical scrollbar to it. Similar as adding first a GtkScrolledWindow and then the child to it.

self : a HildonAppView
child : a GtkWidget

hildon_appview_set_fullscreen_key_allowed ()

void        hildon_appview_set_fullscreen_key_allowed
                                            (HildonAppView *self,
                                             gboolean allow);

Sets given HildonAppView whether to allow toggling fullscreen mode with a shortcut key.

self : a HildonAppView
allow : wheter it's possible to swith fullscreen on/off with a shortcut key

hildon_appview_get_fullscreen_key_allowed ()

gboolean    hildon_appview_get_fullscreen_key_allowed
                                            (HildonAppView *self);

Check if fullscreening with a shortcut is allowed for given HildonAppView.

self : a HildonAppView
Returns : wheter it's possible to swith fullscreen on/off with a shortcut key

hildon_appview_get_fullscreen ()

gboolean    hildon_appview_get_fullscreen   (HildonAppView *self);

Gets the current state of fullscreen mode.

self : a HildonAppView
Returns : the current state of fullscreen mode

hildon_appview_set_fullscreen ()

void        hildon_appview_set_fullscreen   (HildonAppView *self,
                                             gboolean fullscreen);

Set the fullscreen state of given HildonAppView class.

self : a HildonAppView
fullscreen : the new state of fullscreen mode. TRUE means fullscreen will be set. FALSE the opposite.

hildon_appview_get_menu ()

GtkMenu*    hildon_appview_get_menu         (HildonAppView *self);

Gets the GtMenu assigned to the HildonAppview.

self : HildonAppView
Returns : the GtkMenu assigned to this application view

hildon_appview_set_toolbar ()

void        hildon_appview_set_toolbar      (HildonAppView *self,
                                             GtkToolbar *toolbar);

Sets the GtkToolbar to given HildonAppView. This is, however, not a recommended way to set your toolbars. When you have multi toolbars, calling this function more than once will just replace the bottom most toolbar. There is a GtkVBox in HildonAppView's public structure, the programmer is responsible to pack his toolbars in the GtkVBox, and HildonAppView will take care of putting them at the right place.

self : a HildonAppView
toolbar : a GtkToolbar

hildon_appview_get_toolbar ()

GtkToolbar* hildon_appview_get_toolbar      (HildonAppView *self);

This function will only return the last widget that has been packed into the GtkVBox in the public structure. Note this does not, however, mean that it is the bottom most toolbar.

self : a HildonAppView
Returns : the GtkToolbar assigned to this application view.

hildon_appview_set_title ()

void        hildon_appview_set_title        (HildonAppView *self,
                                             const gchar *newname);

Sets an title of an application view. The title is visible only if two-part-title is enabled on the HildonApp.

self : a HildonAppView
newname : the new title of the application view.

hildon_appview_get_title ()

const gchar* hildon_appview_get_title       (HildonAppView *self);

Gets the title of given HildonAppView.

self : a HildonAppView
Returns : the title of the application view

hildon_appview_set_connected_adjustment ()

void        hildon_appview_set_connected_adjustment
                                            (HildonAppView *self,
                                             GtkAdjustment *adjustment);

Sets a GtkAdjustment which will change when increase/decrease buttons are pressed.

self : HildonAppView
adjustment : a new GtkAdjustment set to reach to increase / decrease hardware keys or NULL to unset

hildon_appview_get_connected_adjustment ()

GtkAdjustment* hildon_appview_get_connected_adjustment
                                            (HildonAppView *self);

Retrieves the GtkAdjustment which is connected to this application view and is changed with increase / decrease hardware buttons.

self : a HildonAppView
Returns : currently connectd GtkAdjustment assigned to this application view or NULL if it's not set

hildon_appview_set_menu_ui ()

void        hildon_appview_set_menu_ui      (HildonAppView *self,
                                             const gchar *ui_string);

Sets the ui description (xml) from which the UIManager creates menus (see GtkUIManager for details on how to use it)

self : a HildonAppView
ui_string : a GtkUIManager ui description string

hildon_appview_get_menu_ui ()

const gchar* hildon_appview_get_menu_ui     (HildonAppView *self);

Sets the ui description (xml) from which the UIManager creates menus (see GtkUIManager for details on how to use it)

self : a HildonAppView
Returns : currently set ui description

See Also

HildonApp