CtkToolItemGroup: CTK+ 3 Reference Manual

## CtkToolItemGroup CtkToolItemGroup — A sub container used in a tool palette |

## Functions

gboolean | ctk_tool_item_group_get_collapsed ()
CtkToolItem * | ctk_tool_item_group_get_drop_item ()
PangoEllipsizeMode | ctk_tool_item_group_get_ellipsize ()
gint | ctk_tool_item_group_get_item_position ()
guint | ctk_tool_item_group_get_n_items ()
const gchar * | ctk_tool_item_group_get_label ()
CtkWidget * | ctk_tool_item_group_get_label_widget ()
CtkToolItem * | ctk_tool_item_group_get_nth_item ()
CtkReliefStyle | ctk_tool_item_group_get_header_relief ()
void | ctk_tool_item_group_insert ()
CtkWidget * | ctk_tool_item_group_new ()
void | ctk_tool_item_group_set_collapsed ()
void | ctk_tool_item_group_set_ellipsize ()
void | ctk_tool_item_group_set_item_position ()
void | ctk_tool_item_group_set_label ()
void | ctk_tool_item_group_set_label_widget ()
void | ctk_tool_item_group_set_header_relief ()

## Properties

gboolean | collapsed | Read / Write
PangoEllipsizeMode | ellipsize | Read / Write
CtkReliefStyle | header-relief | Read / Write
char * | label | Read / Write
CtkWidget * | label-widget | Read / Write

## Types and Values

struct | CtkToolItemGroup
struct | CtkToolItemGroupClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── CtkWidget
                ╰── CtkContainer
                    ╰── CtkToolItemGroup

## Implemented Interfaces

CtkToolItemGroup implements AtkImplementorIface, CtkBuildable and CtkToolShell.

## Includes

    #include <ctk/ctk.h>

## Description

A CtkToolItemGroup is used together with CtkToolPalette to add CtkToolItems to a palette like container with different categories and drag and drop support.

### CSS nodes

CtkToolItemGroup has a single CSS node named toolitemgroup.

## Functions

### ctk_tool_item_group_get_collapsed ()

    gboolean
    ctk_tool_item_group_get_collapsed (CtkToolItemGroup *group);

Gets whether `group` is collapsed or expanded.

#### Parameters

group | a CtkToolItemGroup |

#### Returns

`TRUE` if `group` is collapsed, `FALSE` if it is expanded

Since: 2.20

### ctk_tool_item_group_get_drop_item ()

    CtkToolItem *
    ctk_tool_item_group_get_drop_item (CtkToolItemGroup *group,
                                       gint x,
                                       gint y);

Gets the tool item at position (x, y).

#### Parameters

group | a CtkToolItemGroup |
x | the x position |
y | the y position |

#### Returns

the CtkToolItem at position (x, y).

[transfer none]

Since: 2.20

### ctk_tool_item_group_get_ellipsize ()

    PangoEllipsizeMode
    ctk_tool_item_group_get_ellipsize (CtkToolItemGroup *group);

Gets the ellipsization mode of `group` .

#### Parameters

group | a CtkToolItemGroup |

#### Returns

the PangoEllipsizeMode of `group`

Since: 2.20

### ctk_tool_item_group_get_item_position ()

    gint
    ctk_tool_item_group_get_item_position (CtkToolItemGroup *group,
                                           CtkToolItem *item);

Gets the position of `item` in `group` as index.

#### Parameters

group | a CtkToolItemGroup |
item | a CtkToolItem |

#### Returns

the index of `item` in `group` or -1 if `item` is no child of `group`

Since: 2.20

### ctk_tool_item_group_get_n_items ()

    guint
    ctk_tool_item_group_get_n_items (CtkToolItemGroup *group);

Gets the number of tool items in `group` .

#### Parameters

group | a CtkToolItemGroup |

#### Returns

the number of tool items in `group`

Since: 2.20

### ctk_tool_item_group_get_label ()

    const gchar *
    ctk_tool_item_group_get_label (CtkToolItemGroup *group);

Gets the label of `group` .

#### Parameters

group | a CtkToolItemGroup |

#### Returns

the label of `group` . The label is an internal string of `group` and must not be modified. Note that `NULL` is returned if a custom label has been set with `ctk_tool_item_group_set_label_widget()`

Since: 2.20

### ctk_tool_item_group_get_label_widget ()

    CtkWidget *
    ctk_tool_item_group_get_label_widget (CtkToolItemGroup *group);

Gets the label widget of `group` . See `ctk_tool_item_group_set_label_widget()`.

#### Parameters

group | a CtkToolItemGroup |

#### Returns

the label widget of `group` .

[transfer none]

Since: 2.20

### ctk_tool_item_group_get_nth_item ()

    CtkToolItem *
    ctk_tool_item_group_get_nth_item (CtkToolItemGroup *group,
                                      guint index);

Gets the tool item at `index` in group.

#### Parameters

group | a CtkToolItemGroup |
index | the index |

#### Returns

the CtkToolItem at index.

[transfer none]

Since: 2.20

### ctk_tool_item_group_get_header_relief ()

    CtkReliefStyle
    ctk_tool_item_group_get_header_relief (CtkToolItemGroup *group);

Gets the relief mode of the header button of `group` .

#### Parameters

group | a CtkToolItemGroup |

#### Returns

the CtkReliefStyle

Since: 2.20

### ctk_tool_item_group_insert ()

    void
    ctk_tool_item_group_insert (CtkToolItemGroup *group,
                                CtkToolItem *item,
                                gint position);

Inserts `item` at `position` in the list of children of `group` .

#### Parameters

group | a CtkToolItemGroup |
item | the CtkToolItem to insert into `group` |
position | the position of `item` in `group` , starting with 0. The position -1 means end of list. |

Since: 2.20

### ctk_tool_item_group_new ()

    CtkWidget *
    ctk_tool_item_group_new (const gchar *label);

Creates a new tool item group with label `label` .

#### Parameters

label | the label of the new group |

#### Returns

a new CtkToolItemGroup.

Since: 2.20

### ctk_tool_item_group_set_collapsed ()

    void
    ctk_tool_item_group_set_collapsed (CtkToolItemGroup *group,
                                       gboolean collapsed);

Sets whether the `group` should be collapsed or expanded.

#### Parameters

group | a CtkToolItemGroup |
collapsed | whether the `group` should be collapsed or expanded |

Since: 2.20

### ctk_tool_item_group_set_ellipsize ()

    void
    ctk_tool_item_group_set_ellipsize (CtkToolItemGroup *group,
                                       PangoEllipsizeMode ellipsize);

Sets the ellipsization mode which should be used by labels in `group` .

#### Parameters

group | a CtkToolItemGroup |
ellipsize | the PangoEllipsizeMode labels in `group` should use |

Since: 2.20

### ctk_tool_item_group_set_item_position ()

    void
    ctk_tool_item_group_set_item_position (CtkToolItemGroup *group,
                                           CtkToolItem *item,
                                           gint position);

Sets the position of `item` in the list of children of `group` .

#### Parameters

group | a CtkToolItemGroup |
item | the CtkToolItem to move to a new position, should be a child of `group` . |
position | the new position of `item` in `group` , starting with 0. The position -1 means end of list. |

Since: 2.20

### ctk_tool_item_group_set_label ()

    void
    ctk_tool_item_group_set_label (CtkToolItemGroup *group,
                                   const gchar *label);

Sets the label of the tool item group. The label is displayed in the header of the group.

#### Parameters

group | a CtkToolItemGroup |
label | the new human-readable label of of the group |

Since: 2.20

### ctk_tool_item_group_set_label_widget ()

    void
    ctk_tool_item_group_set_label_widget (CtkToolItemGroup *group,
                                          CtkWidget *label_widget);

Sets the label of the tool item group. The label widget is displayed in the header of the group, in place of the usual label.

#### Parameters

group | a CtkToolItemGroup |
label_widget | the widget to be displayed in place of the usual label |

Since: 2.20

### ctk_tool_item_group_set_header_relief ()

    void
    ctk_tool_item_group_set_header_relief (CtkToolItemGroup *group,
                                           CtkReliefStyle style);

Set the button relief of the group header. See `ctk_button_set_relief()` for details.

#### Parameters

group | a CtkToolItemGroup |
style | the CtkReliefStyle |

Since: 2.20

## Types and Values

### struct CtkToolItemGroup

    struct CtkToolItemGroup;

This should not be accessed directly. Use the accessor functions below.

### struct CtkToolItemGroupClass

    struct CtkToolItemGroupClass {
      CtkContainerClass parent_class;
    };

#### Members

## Property Details

### The `“collapsed”` property

      “collapsed”                gboolean

Whether the group has been collapsed and items are hidden.

Owner: CtkToolItemGroup

Flags: Read / Write

Default value: FALSE

### The `“ellipsize”` property

      “ellipsize”                PangoEllipsizeMode

Ellipsize for item group headers.

Owner: CtkToolItemGroup

Flags: Read / Write

Default value: PANGO_ELLIPSIZE_NONE

### The `“header-relief”` property

      “header-relief”            CtkReliefStyle

Relief of the group header button.

Owner: CtkToolItemGroup

Flags: Read / Write

Default value: CTK_RELIEF_NORMAL

### The `“label”` property

      “label”                    char *

The human-readable title of this item group.

Owner: CtkToolItemGroup

Flags: Read / Write

Default value: ""

### The `“label-widget”` property

      “label-widget”             CtkWidget *

A widget to display in place of the usual label.

Owner: CtkToolItemGroup

Flags: Read / Write