MildenhallContextDrawer

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

Functions

ClutterActor * mildenhall_context_drawer_new ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MildenhallDrawerBase
                ╰── MildenhallContextDrawer

Implemented Interfaces

MildenhallContextDrawer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Description

MildenhallContextDrawer extends MildenhallDrawerBase and can be positioned at any of the four edges of the content item. This widget is same as MildenhallNaviDrawer & MildenhallViewsDrawer but only differs in the way it is positioned in the stage.

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 *context_drawer = mildenhall_context_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 (context_drawer, "model", model, NULL);

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

clutter_actor_add_child (stage, context_drawer);

Signal callback implementations for MildenhallContextDrawer::drawer-open, MildenhallContextDrawer::drawer-close, MildenhallContextDrawer::drawer-button-released, MildenhallContextDrawer::drawer-tooltip-hidden, MildenhallContextDrawer::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_context_drawer_new ()

ClutterActor *
mildenhall_context_drawer_new (void);

Creates a context drawer object

Returns

Mildenhall Context Drawer object.

[transfer full]

Types and Values

struct MildenhallContextDrawer

struct MildenhallContextDrawer;

The MildenhallContextDrawer struct contains only private data.


struct MildenhallContextDrawerClass

struct MildenhallContextDrawerClass {
	MildenhallDrawerBaseClass parent_class;
};

The MildenhallContextDrawerClass struct contains only private data.

See Also

ClutterActor, ThornburyItemFactory, MildenhallDrawerBase