MildenhallViewsDrawer

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

Functions

ClutterActor * mildenhall_views_drawer_new ()

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MildenhallDrawerBase
                ╰── MildenhallViewsDrawer

Implemented Interfaces

MildenhallViewsDrawer implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Includes

#include <include/mildenhall_roller_container.h>

Description

MildenhallViewsDrawer extends MildenhallDrawerBase and can be positioned at any of the four edges of the content item. This widget is same as MildenhallNaviDrawer but only differs in the way it is positioned at 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 *views_drawer = mildenhall_views_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 (views_drawer, "model", model, NULL);

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

clutter_actor_add_child (stage, views_drawer);

Signal callback implementations for MildenhallViewsDrawer::drawer-open, MildenhallViewsDrawer::drawer-close, MildenhallViewsDrawer::drawer-button-released, MildenhallViewsDrawer::drawer-tooltip-hidden and MildenhallViewsDrawer::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);
}

Since0.3.0

Functions

mildenhall_views_drawer_new ()

ClutterActor *
mildenhall_views_drawer_new (void);

Creates a views drawer object

Returns

Mildenhall Views Drawer object.

[transfer full]

Types and Values

struct MildenhallViewsDrawer

struct MildenhallViewsDrawer;

The MildenhallviewsDrawer struct contains only private data.


struct MildenhallViewsDrawerClass

struct MildenhallViewsDrawerClass {
	MildenhallDrawerBaseClass parent_class;
};

The MildenhallViewsDrawerClass struct contains only private data.

See Also

ClutterActor, ThornburyModel