ToolDrawer Tool Item

ToolDrawer Tool Item — A GtkToolItem that can be expand to show multiple items.

Functions

Properties

gboolean expanded Read / Write / Construct
gchar * icon-name Read / Write / Construct Only
gchar * label Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkToolItem
                        ╰── TalkatuToolDrawer

Implemented Interfaces

TalkatuToolDrawer implements AtkImplementorIface, GtkBuildable and GtkActivatable.

Description

A TalkatuToolDrawer is a GtkToolItem that groups many GtkToolItems into a collection that can be collapsed into a single item to eliminate clutter in the user interface.

Functions

talkatu_tool_drawer_new ()

GtkToolItem *
talkatu_tool_drawer_new (const gchar *label,
                         const gchar *icon_name);

Creates a new TalkatuToolDrawer instance.

Parameters

label

The label to give item.

 

icon_name

The name of the icon for this item.

 

Returns

The new TalkatuToolDrawer instance.

[transfer full]


talkatu_tool_drawer_add_item ()

void
talkatu_tool_drawer_add_item (TalkatuToolDrawer *drawer,
                              GAction *action,
                              const gchar *markup,
                              const gchar *icon_name,
                              gchar *tooltip,
                              GCallback callback);

Adds a new item to drawer .

Parameters

drawer

The TalkatuToolDrawer instance.

 

action

The GAction to add.

 

markup

Pango markup to use as a label.

 

icon_name

The name of the icon to display.

 

tooltip

UTF-8 text to display as a tooltip.

 

callback

The callback to call when the item is activated.

[scope notified]

talkatu_tool_drawer_add_separator ()

void
talkatu_tool_drawer_add_separator (TalkatuToolDrawer *drawer);

Adds a separator to the end of drawer .

Parameters

drawer

The TalkatuToolDrawer instance.

 

talkatu_tool_drawer_get_label ()

const gchar *
talkatu_tool_drawer_get_label (TalkatuToolDrawer *drawer);

Gets the label that's displayed when drawer is collapsed.

Parameters

drawer

The TalkatuToolDrawer instance.

 

Returns

The label to use when drawer is collapsed.


talkatu_tool_drawer_set_label ()

void
talkatu_tool_drawer_set_label (TalkatuToolDrawer *drawer,
                               const gchar *label);

Sets the label to be displayed when drawer is collapsed.

Parameters

drawer

The TalkatuToolDrawer instance.

 

label

The label to use when drawer is collapsed.

 

talkatu_tool_drawer_get_icon_name ()

const gchar *
talkatu_tool_drawer_get_icon_name (TalkatuToolDrawer *drawer);

Gets the icon name for drawer .

Parameters

drawer

The TalkatuToolDrawer instance.

 

Returns

The icon name for drawer .


talkatu_tool_drawer_set_icon_name ()

void
talkatu_tool_drawer_set_icon_name (TalkatuToolDrawer *drawer,
                                   const gchar *icon_name);

Sets the name of the icon to be displayed when drawer is collapsed.

Parameters

drawer

The TalkatuToolDrawer instance.

 

icon_name

The name of the icon to display when collapse.

 

talkatu_tool_drawer_set_expanded ()

void
talkatu_tool_drawer_set_expanded (TalkatuToolDrawer *drawer,
                                  gboolean expanded);

Sets whether or not drawer is expanded.

Parameters

drawer

The TalkatuToolDrawer instance.

 

expanded

TRUE to expand drawer , FALSE to collapse.

 

talkatu_tool_drawer_get_expanded ()

gboolean
talkatu_tool_drawer_get_expanded (TalkatuToolDrawer *drawer);

Gets whether or not drawer is expanded.

Parameters

drawer

The TalkatuToolDrawer instance.

 

Returns

TRUE if drawer is expanded, FALSE otherwise.

Types and Values

TALKATU_TYPE_TOOL_DRAWER

#define TALKATU_TYPE_TOOL_DRAWER            (talkatu_tool_drawer_get_type())

TalkatuToolDrawer

typedef struct _TalkatuToolDrawer TalkatuToolDrawer;

Property Details

The “expanded” property

  “expanded”                 gboolean

Whether or not the drawer is expanded.

Flags: Read / Write / Construct

Default value: FALSE


The “icon-name” property

  “icon-name”                gchar *

The name of the icon to display when not expanded.

Flags: Read / Write / Construct Only

Default value: NULL


The “label” property

  “label”                    gchar *

The label to display when not expanded.

Flags: Read / Write / Construct Only

Default value: NULL