| GTK+ 3 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <gtk/gtk.h> struct GtkToolItemGroup; gboolean gtk_tool_item_group_get_collapsed (GtkToolItemGroup *group); GtkToolItem * gtk_tool_item_group_get_drop_item (GtkToolItemGroup *group,gint x,gint y); PangoEllipsizeMode gtk_tool_item_group_get_ellipsize (GtkToolItemGroup *group); gint gtk_tool_item_group_get_item_position (GtkToolItemGroup *group,GtkToolItem *item); guint gtk_tool_item_group_get_n_items (GtkToolItemGroup *group); const gchar * gtk_tool_item_group_get_label (GtkToolItemGroup *group); GtkWidget * gtk_tool_item_group_get_label_widget (GtkToolItemGroup *group); GtkToolItem * gtk_tool_item_group_get_nth_item (GtkToolItemGroup *group,guint index); GtkReliefStyle gtk_tool_item_group_get_header_relief (GtkToolItemGroup *group); void gtk_tool_item_group_insert (GtkToolItemGroup *group,GtkToolItem *item,gint position); GtkWidget * gtk_tool_item_group_new (const gchar *label); void gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group,gboolean collapsed); void gtk_tool_item_group_set_ellipsize (GtkToolItemGroup *group,PangoEllipsizeMode ellipsize); void gtk_tool_item_group_set_item_position (GtkToolItemGroup *group,GtkToolItem *item,gint position); void gtk_tool_item_group_set_label (GtkToolItemGroup *group,const gchar *label); void gtk_tool_item_group_set_label_widget (GtkToolItemGroup *group,GtkWidget *label_widget); void gtk_tool_item_group_set_header_relief (GtkToolItemGroup *group,GtkReliefStyle style);
A GtkToolItemGroup is used together with GtkToolPalette to add GtkToolItems to a palette like container with different categories and drag and drop support.
struct GtkToolItemGroup {
GtkContainer parent_instance;
GtkToolItemGroupPrivate *priv;
};
This should not be accessed directly. Use the accessor functions below.
gboolean gtk_tool_item_group_get_collapsed (GtkToolItemGroup *group);
Gets whether group is collapsed or expanded.
Since 2.20
GtkToolItem * gtk_tool_item_group_get_drop_item (GtkToolItemGroup *group,gint x,gint y);
Gets the tool item at position (x, y).
|
a GtkToolItemGroup |
|
the x position |
|
the y position |
Returns : |
the GtkToolItem at position (x, y). [transfer none] |
Since 2.20
PangoEllipsizeMode gtk_tool_item_group_get_ellipsize (GtkToolItemGroup *group);
Gets the ellipsization mode of group.
|
a GtkToolItemGroup |
Returns : |
the PangoEllipsizeMode of group
|
Since 2.20
gint gtk_tool_item_group_get_item_position (GtkToolItemGroup *group,GtkToolItem *item);
Gets the position of item in group as index.
|
a GtkToolItemGroup |
|
a GtkToolItem |
Returns : |
the index of item in group or -1 if item is no child of group
|
Since 2.20
guint gtk_tool_item_group_get_n_items (GtkToolItemGroup *group);
Gets the number of tool items in group.
|
a GtkToolItemGroup |
Returns : |
the number of tool items in group
|
Since 2.20
const gchar * gtk_tool_item_group_get_label (GtkToolItemGroup *group);
Gets the label of group.
|
a GtkToolItemGroup |
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 gtk_tool_item_group_set_label_widget()
|
Since 2.20
GtkWidget * gtk_tool_item_group_get_label_widget
(GtkToolItemGroup *group);
Gets the label widget of group.
See gtk_tool_item_group_set_label_widget().
|
a GtkToolItemGroup |
Returns : |
the label widget of group. [transfer none]
|
Since 2.20
GtkToolItem * gtk_tool_item_group_get_nth_item (GtkToolItemGroup *group,guint index);
Gets the tool item at index in group.
|
a GtkToolItemGroup |
|
the index |
Returns : |
the GtkToolItem at index. [transfer none] |
Since 2.20
GtkReliefStyle gtk_tool_item_group_get_header_relief
(GtkToolItemGroup *group);
Gets the relief mode of the header button of group.
|
a GtkToolItemGroup |
Returns : |
the GtkReliefStyle |
Since 2.20
void gtk_tool_item_group_insert (GtkToolItemGroup *group,GtkToolItem *item,gint position);
Inserts item at position in the list of children of group.
|
a GtkToolItemGroup |
|
the GtkToolItem to insert into group
|
|
the position of item in group, starting with 0.
The position -1 means end of list. |
Since 2.20
GtkWidget * gtk_tool_item_group_new (const gchar *label);
Creates a new tool item group with label label.
|
the label of the new group |
Returns : |
a new GtkToolItemGroup. |
Since 2.20
void gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group,gboolean collapsed);
Sets whether the group should be collapsed or expanded.
|
a GtkToolItemGroup |
|
whether the group should be collapsed or expanded |
Since 2.20
void gtk_tool_item_group_set_ellipsize (GtkToolItemGroup *group,PangoEllipsizeMode ellipsize);
Sets the ellipsization mode which should be used by labels in group.
|
a GtkToolItemGroup |
|
the PangoEllipsizeMode labels in group should use |
Since 2.20
void gtk_tool_item_group_set_item_position (GtkToolItemGroup *group,GtkToolItem *item,gint position);
Sets the position of item in the list of children of group.
|
a GtkToolItemGroup |
|
the GtkToolItem to move to a new position, should
be a child of group. |
|
the new position of item in group, starting with 0.
The position -1 means end of list. |
Since 2.20
void gtk_tool_item_group_set_label (GtkToolItemGroup *group,const gchar *label);
Sets the label of the tool item group. The label is displayed in the header of the group.
|
a GtkToolItemGroup |
|
the new human-readable label of of the group |
Since 2.20
void gtk_tool_item_group_set_label_widget (GtkToolItemGroup *group,GtkWidget *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.
|
a GtkToolItemGroup |
|
the widget to be displayed in place of the usual label |
Since 2.20
void gtk_tool_item_group_set_header_relief (GtkToolItemGroup *group,GtkReliefStyle style);
Set the button relief of the group header.
See gtk_button_set_relief() for details.
|
a GtkToolItemGroup |
|
the GtkReliefStyle |
Since 2.20