MildenhallNaviDrawer

MildenhallNaviDrawer — provides a swipe-based side panel to provide a central location for navigation.

Functions

ClutterActor * mildenhall_navi_drawer_new ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MildenhallDrawerBase
                ╰── MildenhallNaviDrawer

Implemented Interfaces

MildenhallNaviDrawer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Description

MildenhallNaviDrawer extends MildenhallDrawerBase and can be positioned at any of the four edges of the content item. This widget is like a combo box and same as like context and views drawers but only differs with some positional changes.

Freeing the widget

Call g_object_unref() to free the widget.

Sample C Code

How to create MildenhallContextDrawer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ClutterActor *navi_drawer = mildenhall_navi_drawer_new ();
ThornburyModel *model =  (ThornburyModel*) thornbury_list_model_new (COLUMN_LAST,
                                                                    G_TYPE_STRING, NULL,
                                                                    G_TYPE_STRING, NULL,
                                                                    G_TYPE_STRING, NULL,
                                                                    G_TYPE_BOOLEAN, NULL,
                                                                    -1);
thornbury_model_append (model,
                       COLUMN_NAME, "MUSIC",
                       COLUMN_ICON, "/var/lib/MILDENHALL_extensions/themes/blau/test-drawer-base/icon_music_AC.png",
                       COLUMN_TOOLTIP_TEXT, "MUSIC",
                       COLUMN_REACTIVE, TRUE, -1);
thornbury_model_append (model,
                       COLUMN_NAME, "ARTISTS",
                       COLUMN_ICON, "/var/lib/MILDENHALL_extensions/themes/blau/test-drawer-base/icon_music_artists_AC.png",
                       COLUMN_TOOLTIP_TEXT, "ARTIST",
                       COLUMN_REACTIVE, TRUE, -1);
thornbury_model_append (model,
                       COLUMN_NAME, "INTERNET",
                       COLUMN_ICON, "/var/lib/MILDENHALL_extensions/themes/blau/test-drawer-base/icon_internet_AC.png",
                       COLUMN_TOOLTIP_TEXT, "INTERNET",
                       COLUMN_REACTIVE, TRUE, -1);
thornbury_model_append (model,
                       COLUMN_NAME, "ALBUMS",
                       COLUMN_ICON, "/var/lib/MILDENHALL_extensions/themes/blau/test-drawer-base/icon_music_AC.png",
                       COLUMN_TOOLTIP_TEXT, "ALBUMS",
                       COLUMN_REACTIVE, TRUE, -1);
g_object_set (navi_drawer, "model", model, NULL);

g_signal_connect (navi_drawer, "drawer-open", G_CALLBACK (drawer_opened), NULL);
g_signal_connect (navi_drawer, "drawer-close", G_CALLBACK (drawer_closed), NULL);
g_signal_connect (navi_drawer, "drawer-button-released", G_CALLBACK (drawer_button_released), NULL);
g_signal_connect (navi_drawer, "drawer-tooltip-hidden", G_CALLBACK (tooltip_hidden), NULL);
g_signal_connect (navi_drawer, "drawer-tooltip-shown", G_CALLBACK (tooltip_shown), NULL);

clutter_actor_add_child (stage, navi_drawer);

Signal callback implementations for MildenhallNaviDrawer::drawer-open, MildenhallNaviDrawer::drawer-close, MildenhallNaviDrawer::drawer-button-released, MildenhallNaviDrawer::drawer-tooltip-hidden, MildenhallNaviDrawer::drawer-tooltip-shown

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
static void
drawer_opened (GObject *actor, gpointer user_data)
{
  g_debug ("DRAWER_WIDGET: %s", __FUNCTION__);
}

static void
drawer_closed (GObject *actor, gpointer user_data)
{
  g_debug ("DRAWER_WIDGET: %s", __FUNCTION__);
}

static void
tooltip_hidden (GObject *actor, gpointer user_data)
{
  g_debug ("DRAWER_WIDGET: %s", __FUNCTION__);
}

static void
tooltip_shown (GObject *actor, gpointer user_data)
{
  g_debug ("DRAWER_WIDGET: %s", __FUNCTION__);
}

static void
drawer_button_released (GObject *actor, gchar *name, gpointer user_data)
{
  g_debug ("DRAWER_WIDGET: %s", __FUNCTION__);
  g_debug ("DRAWER_WIDGET: button released = %s", name);
}

Functions

mildenhall_navi_drawer_new ()

ClutterActor *
mildenhall_navi_drawer_new (void);

Creates a navi drawer object

Returns

Mildenhall Navi Drawer object.

[transfer full]

Types and Values

struct MildenhallNaviDrawer

struct MildenhallNaviDrawer;

The MildenhallNaviDrawer struct contains only private data.


struct MildenhallNaviDrawerClass

struct MildenhallNaviDrawerClass {
	MildenhallDrawerBaseClass parent_class;
};

The MildenhallNaviDrawerClass struct contains only private data.

See Also

ClutterActor, ThornburyItemFactory, MildenhallDrawerBase