From 837775af7ba01aa87c5e10b7de0c7772ada9a7a2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 26 Nov 2009 23:52:20 -0500 Subject: [PATCH] Fix up docs, and set up the aliasing machinery --- docs/reference/gtk/gtk-sections.txt | 47 +-- docs/reference/gtk/images/toolpalette.png | Bin 0 -> 10010 bytes docs/tools/widgets.c | 29 ++ gtk/gtk.symbols | 50 ++++ gtk/gtktoolitemgroup.c | 187 ++++++------ gtk/gtktoolitemgroup.h | 12 +- gtk/gtktoolpalette.c | 343 +++++++++++++--------- gtk/gtktoolpalette.h | 12 +- gtk/gtktoolshell.c | 2 +- 9 files changed, 400 insertions(+), 282 deletions(-) create mode 100644 docs/reference/gtk/images/toolpalette.png diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index 4e40dde3a9..c7fb92b366 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -4198,6 +4198,7 @@ gtk_tool_shell_get_style gtk_tool_shell_get_text_alignment gtk_tool_shell_get_text_orientation gtk_tool_shell_rebuild_menu +gtk_tool_shell_get_text_size_group GTK_IS_TOOL_SHELL @@ -4460,42 +4461,6 @@ GTK_TOOLTIPS_GET_CLASS gtk_tooltips_get_type -
-gtktoolpalette -GtkToolPalette -GtkToolPalette -gtk_tool_palette_new -gtk_tool_palette_get_exclusive -gtk_tool_palette_set_exclusive -gtk_tool_palette_get_expand -gtk_tool_palette_set_expand -gtk_tool_palette_get_group_position -gtk_tool_palette_set_group_position -gtk_tool_palette_get_icon_size -gtk_tool_palette_set_icon_size -gtk_tool_palette_get_style -gtk_tool_palette_set_style -gtk_tool_palette_unset_style -gtk_tool_palette_add_drag_dest -gtk_tool_palette_get_drag_item -gtk_tool_palette_get_drag_target_group -gtk_tool_palette_get_drag_target_item -gtk_tool_palette_get_drop_group -gtk_tool_palette_get_drop_item -gtk_tool_palette_set_drag_source - -GtkToolPaletteClass -GTK_TOOL_PALETTE -GTK_IS_TOOL_PALETTE -GTK_TYPE_TOOL_PALETTE -GTK_TOOL_PALETTE_CLASS -GTK_IS_TOOL_PALETTE_CLASS -GTK_TOOL_PALETTE_GET_CLASS - -gtk_tool_palette_get_type -GtkToolPalettePrivate -
-
gtktoolitemgroup GtkToolItemGroup @@ -4508,6 +4473,7 @@ gtk_tool_item_group_get_n_items gtk_tool_item_group_get_label gtk_tool_item_group_get_label_widget gtk_tool_item_group_get_nth_item +gtk_tool_item_group_get_header_relief gtk_tool_item_group_insert gtk_tool_item_group_new gtk_tool_item_group_set_collapsed @@ -4515,6 +4481,7 @@ gtk_tool_item_group_set_ellipsize gtk_tool_item_group_set_item_position gtk_tool_item_group_set_label gtk_tool_item_group_set_label_widget +gtk_tool_item_group_set_header_relief GtkToolItemGroupClass GTK_TOOL_ITEM_GROUP @@ -4528,7 +4495,7 @@ gtk_tool_item_group_get_type
-GtkToolPalette +gtktoolpalette GtkToolPalette GtkToolPalette gtk_tool_palette_new @@ -4541,17 +4508,19 @@ gtk_tool_palette_set_group_position gtk_tool_palette_get_icon_size gtk_tool_palette_set_icon_size gtk_tool_palette_unset_icon_size -gtk_tool_palette_get_orientation -gtk_tool_palette_set_orientation gtk_tool_palette_get_style gtk_tool_palette_set_style +gtk_tool_palette_unset_style gtk_tool_palette_add_drag_dest gtk_tool_palette_get_drag_item gtk_tool_palette_get_drag_target_group gtk_tool_palette_get_drag_target_item gtk_tool_palette_get_drop_group gtk_tool_palette_get_drop_item +GtkToolPaletteDragTargets gtk_tool_palette_set_drag_source +gtk_tool_palette_get_hadjustment +gtk_tool_palette_get_vadjustment GtkToolPaletteClass GTK_TOOL_PALETTE diff --git a/docs/reference/gtk/images/toolpalette.png b/docs/reference/gtk/images/toolpalette.png new file mode 100644 index 0000000000000000000000000000000000000000..c940823b8aa2d6c8ebc52172fb3692b26f227192 GIT binary patch literal 10010 zcmc(lbyOTdw5JDm2?P%sG`JJoVS+;lF2UV3xCGZBxCIH2!QDMTaCg^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U-hO#7pT*t1d$aR8Zy8jMF@nk=q>5!4%A{XUx!kj0o@$!J!85x(^mEmLM- zZ5@sn9TA6^C(yc;!;)fwlsBMdG##fb3x$J-3_blUDaCg_?l#C3k_109t9a9{~0l~=p1L)ch2*w>dLof#7=s20sl%`8cN;WbPP=0^e zcIT3f0p-TC(+9-=xpd>2n&Qx5;o;|1t8r(J?DWaH01UdRsfn8{1PTRe{JZhujoZud z*9$@d;SKdexmMHCilzmx@W6l-GFC3d+|A$=lN47tm};1-W-ycm48+W|;KRv2sio!R zpHOH%v?b#ZYIEp$O5?w{9`UnGx<=PIW0W>cvCf)w6dF|ly(P!?AbM>~#veB`^AQMv zQ$amY|QDx7Gu0u1cYza6z-8=+s>_U zCCtpGH=Qp+YwUc+w@<$*aK`Q~2Aj6fr>0S^OVUfNNr5EV%En~IXV3CKn=Lj8`HVn{RYOx##?Ma#3oDjqc0TW9G33q&#rc!w zW^DXGX2u69ZiM1xDM=G}a3t7E*rBEdncG<0Mw%h%^%$0=JqQ)ZGH7CrQCc-;Qv9?^4>NcJ`_Mw7Q$ihe64Qz=NA_R z$V~IPs_Wz8i|FPBO|I4M9M*W=X zjk|l>ZK#b5?`vf65viwq11VJnAxnwyf&FOkffx};TY?VTtt;_JCLp~~40hC>bZ*p7 z{_GR|iN+JWp#1@0TiBNY^mpCAHxWkOESgUU@zJC9EDlm>doH6Q2YJNRAuAJuFoOw% z#cx0p_2(!c1w^10$?;J5z #include #include - -#define P_(msgid) (msgid) +#include "gtkprivate.h" +#include "gtkintl.h" +#include "gtkalias.h" #define ANIMATION_TIMEOUT 50 #define ANIMATION_DURATION (ANIMATION_TIMEOUT * 4) @@ -39,12 +42,13 @@ #define DEFAULT_ELLIPSIZE PANGO_ELLIPSIZE_NONE /** - * SECTION:GtkToolItemGroup - * @short_description: A sub container used in a tool palette - * @include: gtktoolitemgroup.h + * SECTION:gtktoolitemgroup + * @Short_description: A sub container used in a tool palette + * @Title: GtkToolItemGroup * - * An #GtkToolItemGroup is used together with #GtkToolPalette to add #GtkToolItems to a palette like container - * with different categories and drag and drop support. + * A #GtkToolItemGroup is used together with #GtkToolPalette to add + * #GtkToolItems to a palette like container with different + * categories and drag and drop support. * * Since: 2.20 */ @@ -427,17 +431,22 @@ gtk_tool_item_group_set_property (GObject *object, case PROP_LABEL: gtk_tool_item_group_set_label (group, g_value_get_string (value)); break; + case PROP_LABEL_WIDGET: gtk_tool_item_group_set_label_widget (group, g_value_get_object (value)); + case PROP_COLLAPSED: gtk_tool_item_group_set_collapsed (group, g_value_get_boolean (value)); break; + case PROP_ELLIPSIZE: gtk_tool_item_group_set_ellipsize (group, g_value_get_enum (value)); break; + case PROP_RELIEF: gtk_tool_item_group_set_header_relief (group, g_value_get_enum(value)); break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -828,8 +837,8 @@ gtk_tool_item_group_real_size_query (GtkWidget *widget, } static void -gtk_tool_item_group_real_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) +gtk_tool_item_group_real_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) { const gint border_width = GTK_CONTAINER (widget)->border_width; GtkToolItemGroup *group = GTK_TOOL_ITEM_GROUP (widget); @@ -1524,40 +1533,35 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) P_("Label"), P_("The human-readable title of this item group"), DEFAULT_LABEL, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_object_class_install_property (oclass, PROP_LABEL_WIDGET, g_param_spec_object ("label-widget", P_("Label widget"), P_("A widget to display in place of the usual label"), GTK_TYPE_WIDGET, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_object_class_install_property (oclass, PROP_COLLAPSED, g_param_spec_boolean ("collapsed", P_("Collapsed"), P_("Wether the group has been collapsed and items are hidden"), DEFAULT_COLLAPSED, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_object_class_install_property (oclass, PROP_ELLIPSIZE, g_param_spec_enum ("ellipsize", P_("ellipsize"), P_("Ellipsize for item group headers"), PANGO_TYPE_ELLIPSIZE_MODE, DEFAULT_ELLIPSIZE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_object_class_install_property (oclass, PROP_RELIEF, g_param_spec_enum ("header-relief", P_("Header Relief"), P_("Relief of the group header button"), GTK_TYPE_RELIEF_STYLE, GTK_RELIEF_NORMAL, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); gtk_widget_class_install_style_property (wclass, g_param_spec_int ("expander-size", @@ -1566,8 +1570,7 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) 0, G_MAXINT, DEFAULT_EXPANDER_SIZE, - G_PARAM_READABLE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READABLE)); gtk_widget_class_install_style_property (wclass, g_param_spec_int ("header-spacing", @@ -1576,40 +1579,35 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) 0, G_MAXINT, DEFAULT_HEADER_SPACING, - G_PARAM_READABLE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READABLE)); gtk_container_class_install_child_property (cclass, CHILD_PROP_HOMOGENEOUS, g_param_spec_boolean ("homogeneous", P_("Homogeneous"), P_("Whether the item should be the same size as other homogeneous items"), TRUE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); gtk_container_class_install_child_property (cclass, CHILD_PROP_EXPAND, g_param_spec_boolean ("expand", P_("Expand"), - P_("Whether the item should receive extra space when the toolbar grows"), + P_("Whether the item should receive extra space when the group grows"), FALSE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); gtk_container_class_install_child_property (cclass, CHILD_PROP_FILL, g_param_spec_boolean ("fill", P_("Fill"), - P_("Whether the item should fill the avaiable space"), + P_("Whether the item should fill the available space"), TRUE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); gtk_container_class_install_child_property (cclass, CHILD_PROP_NEW_ROW, g_param_spec_boolean ("new-row", P_("New Row"), P_("Whether the item should start a new row"), FALSE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); gtk_container_class_install_child_property (cclass, CHILD_PROP_POSITION, g_param_spec_int ("position", @@ -1618,15 +1616,14 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) 0, G_MAXINT, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_type_class_add_private (cls, sizeof (GtkToolItemGroupPrivate)); } /** * gtk_tool_item_group_new: - * @label: the label of the new group. + * @label: the label of the new group * * Creates a new tool item group with label @label. * @@ -1637,14 +1634,13 @@ gtk_tool_item_group_class_init (GtkToolItemGroupClass *cls) GtkWidget* gtk_tool_item_group_new (const gchar *label) { - return g_object_new (GTK_TYPE_TOOL_ITEM_GROUP, "label", - label, NULL); + return g_object_new (GTK_TYPE_TOOL_ITEM_GROUP, "label", label, NULL); } /** * gtk_tool_item_group_set_label: - * @group: an #GtkToolItemGroup. - * @label: the new human-readable label of of the group. + * @group: a #GtkToolItemGroup + * @label: the new human-readable label of of the group * * Sets the label of the tool item group. The label is displayed in the header * of the group. @@ -1672,11 +1668,12 @@ gtk_tool_item_group_set_label (GtkToolItemGroup *group, /** * gtk_tool_item_group_set_label_widget: - * @group: an #GtkToolItemGroup. - * @widget: the new human-readable label of of the group. + * @group: a #GtkToolItemGroup + * @label_widget: the widget to be displayed in place of the usual label * - * Sets the label of the tool item group. The label is displayed in the header - * of the group. + * 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. * * Since: 2.20 */ @@ -1727,26 +1724,28 @@ gtk_tool_item_group_set_label_widget (GtkToolItemGroup *group, /** * gtk_tool_item_group_header_relief: - * @group: an #GtkToolItemGroup. - * @style: The GtkReliefStyle + * @group: a #GtkToolItemGroup + * @style: the #GtkReliefStyle * - * Set the button relief of the group header. See #gtk_button_set_relief for - * details + * Set the button relief of the group header. + * See gtk_button_set_relief() for details. * * Since: 2.20 */ void -gtk_tool_item_group_set_header_relief (GtkToolItemGroup *group, - GtkReliefStyle style) +gtk_tool_item_group_set_header_relief (GtkToolItemGroup *group, + GtkReliefStyle style) { g_return_if_fail (GTK_IS_TOOL_ITEM_GROUP (group)); - gtk_button_set_relief (GTK_BUTTON(group->priv->header), style); + + gtk_button_set_relief (GTK_BUTTON (group->priv->header), style); } static gint64 gtk_tool_item_group_get_animation_timestamp (GtkToolItemGroup *group) { GTimeVal now; + g_source_get_current_time (group->priv->animation_timeout, &now); return (now.tv_sec * G_USEC_PER_SEC + now.tv_usec - group->priv->animation_start) / 1000; } @@ -1802,7 +1801,7 @@ gtk_tool_item_group_animation_cb (gpointer data) gint64 timestamp = gtk_tool_item_group_get_animation_timestamp (group); gboolean retval; - GDK_THREADS_ENTER(); + GDK_THREADS_ENTER (); /* Enque this early to reduce number of expose events. */ gtk_widget_queue_resize_no_redraw (GTK_WIDGET (group)); @@ -1831,15 +1830,15 @@ gtk_tool_item_group_animation_cb (gpointer data) retval = (priv->animation_timeout != NULL); - GDK_THREADS_LEAVE(); + GDK_THREADS_LEAVE (); return retval; } /** * gtk_tool_item_group_set_collapsed: - * @group: an #GtkToolItemGroup. - * @collapsed: whether the @group should be collapsed or expanded. + * @group: a #GtkToolItemGroup + * @collapsed: whether the @group should be collapsed or expanded * * Sets whether the @group should be collapsed or expanded. * @@ -1893,8 +1892,8 @@ gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group, /** * gtk_tool_item_group_set_ellipsize: - * @group: an #GtkToolItemGroup. - * @ellipsize: the #PangoEllipsizeMode labels in @group should use. + * @group: a #GtkToolItemGroup + * @ellipsize: the #PangoEllipsizeMode labels in @group should use * * Sets the ellipsization mode which should be used by labels in @group. * @@ -1917,12 +1916,13 @@ gtk_tool_item_group_set_ellipsize (GtkToolItemGroup *group, /** * gtk_tool_item_group_get_label: - * @group: an #GtkToolItemGroup. + * @group: a #GtkToolItemGroup * * Gets the label of @group. * - * 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() + * 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 */ @@ -1943,11 +1943,12 @@ gtk_tool_item_group_get_label (GtkToolItemGroup *group) /** * gtk_tool_item_group_get_label_widget: - * @group: an #GtkToolItemGroup. + * @group: a #GtkToolItemGroup * * Gets the label widget of @group. + * See gtk_tool_item_group_set_label_widget(). * - * Returns: the label widget of @group. See gtk_tool_item_group_set_label_widget() + * Returns: the label widget of @group * * Since: 2.20 */ @@ -1955,16 +1956,17 @@ GtkWidget* gtk_tool_item_group_get_label_widget (GtkToolItemGroup *group) { GtkWidget *alignment = gtk_tool_item_group_get_alignment (group); + return gtk_bin_get_child (GTK_BIN (alignment)); } /** * gtk_tool_item_group_get_collapsed: - * @group: an GtkToolItemGroup. + * @group: a GtkToolItemGroup * * Gets whether @group is collapsed or expanded. * - * Returns: %TRUE if @group is collapsed, %FALSE if it is expanded. + * Returns: %TRUE if @group is collapsed, %FALSE if it is expanded * * Since: 2.20 */ @@ -1972,16 +1974,17 @@ gboolean gtk_tool_item_group_get_collapsed (GtkToolItemGroup *group) { g_return_val_if_fail (GTK_IS_TOOL_ITEM_GROUP (group), DEFAULT_COLLAPSED); + return group->priv->collapsed; } /** * gtk_tool_item_group_get_ellipsize: - * @group: an #GtkToolItemGroup. + * @group: a #GtkToolItemGroup * * Gets the ellipsization mode of @group. * - * Returns: the #PangoEllipsizeMode of @group. + * Returns: the #PangoEllipsizeMode of @group * * Since: 2.20 */ @@ -1989,12 +1992,13 @@ PangoEllipsizeMode gtk_tool_item_group_get_ellipsize (GtkToolItemGroup *group) { g_return_val_if_fail (GTK_IS_TOOL_ITEM_GROUP (group), DEFAULT_ELLIPSIZE); + return group->priv->ellipsize; } /** * gtk_tool_item_group_get_header_relief: - * @group: an #GtkToolItemGroup. + * @group: a #GtkToolItemGroup * * Gets the relief mode of the header button of @group. * @@ -2006,14 +2010,16 @@ GtkReliefStyle gtk_tool_item_group_get_header_relief (GtkToolItemGroup *group) { g_return_val_if_fail (GTK_IS_TOOL_ITEM_GROUP (group), GTK_RELIEF_NORMAL); + return gtk_button_get_relief (GTK_BUTTON (group->priv->header)); } /** * gtk_tool_item_group_insert: - * @group: an #GtkToolItemGroup. - * @item: the #GtkToolItem to insert into @group. - * @position: the position of @item in @group, starting with 0. The position -1 means end of list. + * @group: a #GtkToolItemGroup + * @item: the #GtkToolItem to insert into @group + * @position: the position of @item in @group, starting with 0. + * The position -1 means end of list. * * Inserts @item at @position in the list of children of @group. * @@ -2055,9 +2061,11 @@ gtk_tool_item_group_insert (GtkToolItemGroup *group, /** * gtk_tool_item_group_set_item_position: - * @group: an #GtkToolItemGroup. - * @item: the #GtkToolItem 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. + * @group: a #GtkToolItemGroup + * @item: the #GtkToolItem 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. * * Sets the position of @item in the list of children of @group. * @@ -2075,7 +2083,6 @@ gtk_tool_item_group_set_item_position (GtkToolItemGroup *group, g_return_if_fail (GTK_IS_TOOL_ITEM_GROUP (group)); g_return_if_fail (GTK_IS_TOOL_ITEM (item)); - g_return_if_fail (position >= -1); child = gtk_tool_item_group_get_child (group, item, &old_position, &link); @@ -2096,12 +2103,12 @@ gtk_tool_item_group_set_item_position (GtkToolItemGroup *group, /** * gtk_tool_item_group_get_item_position: - * @group: an #GtkToolItemGroup. - * @item: a #GtkToolItem. + * @group: a #GtkToolItemGroup + * @item: a #GtkToolItem * * Gets the position of @item in @group as index. * - * Returns: the index of @item in @group or -1 if @item is no child of @group. + * Returns: the index of @item in @group or -1 if @item is no child of @group * * Since: 2.20 */ @@ -2122,11 +2129,11 @@ gtk_tool_item_group_get_item_position (GtkToolItemGroup *group, /** * gtk_tool_item_group_get_n_items: - * @group: an #GtkToolItemGroup. + * @group: a #GtkToolItemGroup * - * Gets the number of tool items in group. + * Gets the number of tool items in @group. * - * Returns: the number of tool items in group. + * Returns: the number of tool items in @group * * Since: 2.20 */ @@ -2140,12 +2147,12 @@ gtk_tool_item_group_get_n_items (GtkToolItemGroup *group) /** * gtk_tool_item_group_get_nth_item: - * @group: an #GtkToolItemGroup. - * @index: the index. + * @group: a #GtkToolItemGroup + * @index: the index * - * Gets the tool item at index in group. + * Gets the tool item at @index in group. * - * Returns: the #GtkToolItem at index. + * Returns: the #GtkToolItem at index * * Since: 2.20 */ @@ -2164,13 +2171,13 @@ gtk_tool_item_group_get_nth_item (GtkToolItemGroup *group, /** * gtk_tool_item_group_get_drop_item: - * @group: an #GtkToolItemGroup. - * @x: the x position. - * @y: the y position. + * @group: a #GtkToolItemGroup + * @x: the x position + * @y: the y position * * Gets the tool item at position (x, y). * - * Returns: the #GtkToolItem at position (x, y). + * Returns: the #GtkToolItem at position (x, y) * * Since: 2.20 */ @@ -2413,3 +2420,7 @@ _gtk_tool_item_group_palette_reconfigured (GtkToolItemGroup *group) gtk_tool_item_group_header_adjust_style (group); } + + +#define __GTK_TOOL_ITEM_GROUP_C__ +#include "gtkaliasdef.c" diff --git a/gtk/gtktoolitemgroup.h b/gtk/gtktoolitemgroup.h index ad3149488d..4a1b9b48c9 100644 --- a/gtk/gtktoolitemgroup.h +++ b/gtk/gtktoolitemgroup.h @@ -27,12 +27,12 @@ G_BEGIN_DECLS -#define GTK_TYPE_TOOL_ITEM_GROUP (gtk_tool_item_group_get_type()) -#define GTK_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroup)) -#define GTK_TOOL_ITEM_GROUP_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST(cls, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) -#define GTK_IS_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TOOL_ITEM_GROUP)) -#define GTK_IS_TOOL_ITEM_GROUP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE(obj, GTK_TYPE_TOOL_ITEM_GROUP)) -#define GTK_TOOL_ITEM_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) +#define GTK_TYPE_TOOL_ITEM_GROUP (gtk_tool_item_group_get_type ()) +#define GTK_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroup)) +#define GTK_TOOL_ITEM_GROUP_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) +#define GTK_IS_TOOL_ITEM_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_TOOL_ITEM_GROUP)) +#define GTK_IS_TOOL_ITEM_GROUP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_TOOL_ITEM_GROUP)) +#define GTK_TOOL_ITEM_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOL_ITEM_GROUP, GtkToolItemGroupClass)) typedef struct _GtkToolItemGroup GtkToolItemGroup; typedef struct _GtkToolItemGroupClass GtkToolItemGroupClass; diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c index b0f15b3357..9d7bc28f4c 100644 --- a/gtk/gtktoolpalette.c +++ b/gtk/gtktoolpalette.c @@ -19,11 +19,17 @@ * Mathias Hasselmann */ +#include "config.h" + +#include +#include + #include "gtktoolpaletteprivate.h" #include "gtkmarshalers.h" -#include -#include +#include "gtkprivate.h" +#include "gtkintl.h" +#include "gtkalias.h" #define DEFAULT_ICON_SIZE GTK_ICON_SIZE_SMALL_TOOLBAR #define DEFAULT_ORIENTATION GTK_ORIENTATION_VERTICAL @@ -32,21 +38,20 @@ #define DEFAULT_CHILD_EXCLUSIVE FALSE #define DEFAULT_CHILD_EXPAND FALSE -#define P_(msgid) (msgid) - /** - * SECTION:GtkToolPalette - * @short_description: A tool palette with categories - * @include: gtktoolpalette.h + * SECTION:gtktoolpalette + * @Short_description: A tool palette with categories + * @Title: GtkToolPalette * - * An #GtkToolPalette allows it to add #GtkToolItems to a palette like container - * with different categories and drag and drop support. + * A #GtkToolPalette allows it to add #GtkToolItems to a palette-like + * container with different categories and drag and drop support. * - * An #GtkToolPalette is created with a call to gtk_tool_palette_new(). + * A #GtkToolPalette is created with a call to gtk_tool_palette_new(). * - * #GtkToolItems cannot be added directly to an #GtkToolPalette, instead they - * are added to an #GtkToolItemGroup which can than be added to an #GtkToolPalette. To add - * an #GtkToolItemGroup to an #GtkToolPalette use gtk_container_add(). + * #GtkToolItems cannot be added directly to a #GtkToolPalette, + * instead they are added to a #GtkToolItemGroup which can than be added + * to a #GtkToolPalette. To add a #GtkToolItemGroup to a #GtkToolPalette, + * use gtk_container_add(). * * |[ * GtkWidget *palette, *group; @@ -60,9 +65,11 @@ * gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1); * ]| * - * The easiest way to use drag and drop with GtkToolPalette is to call gtk_tool_palette_add_drag_dest() - * with the desired drag source @palette and the desired drag target @widget. Than gtk_tool_palette_get_drag_item() - * can be used to get the dragged item in the #GtkWidget::drag-data-received signal handler of the drag target. + * The easiest way to use drag and drop with #GtkToolPalette is to call + * gtk_tool_palette_add_drag_dest() with the desired drag source @palette + * and the desired drag target @widget. Then gtk_tool_palette_get_drag_item() + * can be used to get the dragged item in the #GtkWidget::drag-data-received + * signal handler of the drag target. * * |[ * static void @@ -79,9 +86,11 @@ * GtkWidget *item; * * /* Get the dragged item */ - * palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context), GTK_TYPE_TOOL_PALETTE); + * palette = gtk_widget_get_ancestor (gtk_drag_get_source_widget (context), + * GTK_TYPE_TOOL_PALETTE); * if (palette != NULL) - * item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette), selection); + * item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette), + * selection); * * /* Do something with item */ * } @@ -181,7 +190,7 @@ gtk_tool_palette_init (GtkToolPalette *palette) GTK_TYPE_TOOL_PALETTE, GtkToolPalettePrivate); - palette->priv->groups = g_ptr_array_sized_new(4); + palette->priv->groups = g_ptr_array_sized_new (4); g_ptr_array_set_free_func (palette->priv->groups, g_free); palette->priv->icon_size = DEFAULT_ICON_SIZE; @@ -200,7 +209,7 @@ gtk_tool_palette_reconfigured (GtkToolPalette *palette) for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *info = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *info = g_ptr_array_index (palette->priv->groups, i); if (info->widget) _gtk_tool_item_group_palette_reconfigured (info->widget); } @@ -308,7 +317,7 @@ gtk_tool_palette_dispose (GObject *object) for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); if (group->notify_collapsed) { @@ -331,7 +340,7 @@ gtk_tool_palette_finalize (GObject *object) { GtkToolPalette *palette = GTK_TOOL_PALETTE (object); - g_ptr_array_free(palette->priv->groups, TRUE); + g_ptr_array_free (palette->priv->groups, TRUE); G_OBJECT_CLASS (gtk_tool_palette_parent_class)->finalize (object); } @@ -350,7 +359,7 @@ gtk_tool_palette_size_request (GtkWidget *widget, for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); if (!group->widget) continue; @@ -394,7 +403,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, gint x; - gint *group_sizes = g_newa(gint, palette->priv->groups->len); + gint *group_sizes = g_newa (gint, palette->priv->groups->len); GtkTextDirection direction = gtk_widget_get_direction (widget); @@ -428,10 +437,11 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, remaining_space = allocation->width; /* figure out the required size of all groups to be able to distribute the - * remaining space on allocation */ + * remaining space on allocation + */ for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); gint size; if (!group->widget) @@ -455,8 +465,9 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, remaining_space -= size; group_sizes[i] = size; - /* if the widget is currently expanding an offset which allows to display as much of the - * widget as possible is calculated */ + /* if the widget is currently expanding an offset which allows to + * display as much of the widget as possible is calculated + */ if (widget == palette->priv->expanding_child) { gint limit = @@ -512,7 +523,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget, /* allocate all groups at the calculated positions */ for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); GtkWidget *widget; if (!group->widget) @@ -623,7 +634,7 @@ gtk_tool_palette_expose_event (GtkWidget *widget, for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *info = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *info = g_ptr_array_index (palette->priv->groups, i); if (info->widget) _gtk_tool_item_group_paint (info->widget, cr); } @@ -739,7 +750,7 @@ gtk_tool_palette_remove (GtkContainer *container, for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *info = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *info = g_ptr_array_index (palette->priv->groups, i); if (GTK_WIDGET(info->widget) == child) { g_object_unref (child); @@ -762,7 +773,7 @@ gtk_tool_palette_forall (GtkContainer *container, for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *info = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *info = g_ptr_array_index (palette->priv->groups, i); if (info->widget) callback (GTK_WIDGET (info->widget), callback_data); @@ -856,9 +867,9 @@ gtk_tool_palette_settings_change_notify (GtkSettings *settings, const GParamSpec *pspec, GtkToolPalette *palette) { - if (! strcmp (pspec->name, "gtk-toolbar-style")) + if (strcmp (pspec->name, "gtk-toolbar-style") == 0) style_change_notify (palette); - else if (! strcmp (pspec->name, "gtk-toolbar-icon-size")) + else if (strcmp (pspec->name, "gtk-toolbar-icon-size") == 0) icon_size_change_notify (palette); } @@ -937,8 +948,9 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls) * @vadjustment: The vertical adjustment * * Set the scroll adjustments for the viewport. - * Usually scrolled containers like GtkScrolledWindow will emit this signal to - * connect two instances of GtkScrollbar to the scroll directions of the GtkToolpalette. + * Usually scrolled containers like GtkScrolledWindow will emit this + * signal to connect two instances of GtkScrollbar to the scroll + * directions of the GtkToolpalette. * * Since: 2.20 */ @@ -953,18 +965,17 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls) GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); - g_object_class_override_property (oclass, PROP_ORIENTATION, - "orientation"); + g_object_class_override_property (oclass, PROP_ORIENTATION, "orientation"); - /** + /** * GtkToolPalette:icon-size: * * The size of the icons in a tool palette is normally determined by - * the toolbar-icon-size setting. When this property is set, it - * overrides the setting. + * the #GtkSettings:toolbar-icon-size setting. When this property is set, + * it overrides the setting. * - * This should only be used for special-purpose toolbars, normal - * application toolbars should respect the user preferences for the + * This should only be used for special-purpose tool palettes, normal + * application tool palettes should respect the user preferences for the * size of icons. * * Since: 2.20 @@ -976,13 +987,12 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls) P_("Size of icons in this tool palette"), GTK_TYPE_ICON_SIZE, DEFAULT_ICON_SIZE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); /** * GtkToolPalette:icon-size-set: * - * Is %TRUE if the icon-size property has been set. + * Is %TRUE if the #GtkToolPalette:icon-size property has been set. * * Since: 2.20 */ @@ -992,34 +1002,53 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls) P_("Icon size set"), P_("Whether the icon-size property has been set"), FALSE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); + /** + * GtkToolPalette:toolbar-style: + * + * The style of items in the tool palette. + * + * Since: 2.20 + */ g_object_class_install_property (oclass, PROP_TOOLBAR_STYLE, g_param_spec_enum ("toolbar-style", P_("Toolbar Style"), P_("Style of items in the tool palette"), GTK_TYPE_TOOLBAR_STYLE, DEFAULT_TOOLBAR_STYLE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); + /** + * GtkToolPalette:exclusive: + * + * Whether the item group should be the only one that is expanded + * at a given time. + * + * Since: 2.20 + */ gtk_container_class_install_child_property (cclass, CHILD_PROP_EXCLUSIVE, g_param_spec_boolean ("exclusive", P_("Exclusive"), P_("Whether the item group should be the only expanded at a given time"), DEFAULT_CHILD_EXCLUSIVE, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); + /** + * GtkToolPalette:expand: + * + * Whether the item group should receive extra space when the palette grows. + * at a given time. + * + * Since: 2.20 + */ gtk_container_class_install_child_property (cclass, CHILD_PROP_EXPAND, g_param_spec_boolean ("expand", P_("Expand"), P_("Whether the item group should receive extra space when the palette grows"), DEFAULT_CHILD_EXPAND, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME | - G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + GTK_PARAM_READWRITE)); g_type_class_add_private (cls, sizeof (GtkToolPalettePrivate)); @@ -1032,7 +1061,7 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls) * * Creates a new tool palette. * - * Returns: a new #GtkToolPalette. + * Returns: a new #GtkToolPalette * * Since: 2.20 */ @@ -1044,8 +1073,8 @@ gtk_tool_palette_new (void) /** * gtk_tool_palette_set_icon_size: - * @palette: an #GtkToolPalette. - * @icon_size: the #GtkIconSize that icons in the tool palette shall have. + * @palette: a #GtkToolPalette + * @icon_size: the #GtkIconSize that icons in the tool palette shall have * * Sets the size of icons in the tool palette. * @@ -1088,10 +1117,10 @@ toolpalette_get_settings (GtkToolPalette *palette) /** * gtk_tool_palette_unset_icon_size: - * @palette: an #GtkToolPalette. + * @palette: a #GtkToolPalette * - * Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(), so that - * user preferences will be used to determine the icon size. + * Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(), + * so that user preferences will be used to determine the icon size. * * Since: 2.20 */ @@ -1128,12 +1157,12 @@ gtk_tool_palette_unset_icon_size (GtkToolPalette *palette) } /* Set the "toolbar-style" property and do appropriate things. - * GtkToolbar does this by emiting a signal instead of just calling a function, - * but I don't see how that is useful. murrayc. + * GtkToolbar does this by emitting a signal instead of just + * calling a function... */ static void -gtk_tool_palette_change_style (GtkToolPalette *palette, - GtkToolbarStyle style) +gtk_tool_palette_change_style (GtkToolPalette *palette, + GtkToolbarStyle style) { GtkToolPalettePrivate* priv = palette->priv; @@ -1151,8 +1180,8 @@ gtk_tool_palette_change_style (GtkToolPalette *palette, /** * gtk_tool_palette_set_style: - * @palette: a #GtkToolPalette. - * @style: the #GtkToolbarStyle that items in the tool palette shall have. + * @palette: a #GtkToolPalette + * @style: the #GtkToolbarStyle that items in the tool palette shall have * * Sets the style (text, icons or both) of items in the tool palette. * @@ -1171,11 +1200,13 @@ gtk_tool_palette_set_style (GtkToolPalette *palette, /** * gtk_tool_palette_unset_style: - * @palette: a #GtkToolPalette. + * @palette: a #GtkToolPalette * - * Unsets a toolbar style set with gtk_tool_palette_set_style(), so that - * user preferences will be used to determine the toolbar style. - **/ + * Unsets a toolbar style set with gtk_tool_palette_set_style(), + * so that user preferences will be used to determine the toolbar style. + * + * Since: 2.20 + */ void gtk_tool_palette_unset_style (GtkToolPalette *palette) { @@ -1189,9 +1220,9 @@ gtk_tool_palette_unset_style (GtkToolPalette *palette) GtkSettings *settings = toolpalette_get_settings (palette); if (settings) - g_object_get (settings, - "gtk-toolbar-style", &style, - NULL); + g_object_get (settings, + "gtk-toolbar-style", &style, + NULL); else style = DEFAULT_TOOLBAR_STYLE; @@ -1204,11 +1235,12 @@ gtk_tool_palette_unset_style (GtkToolPalette *palette) /** * gtk_tool_palette_get_icon_size: - * @palette: an #GtkToolPalette. + * @palette: a #GtkToolPalette * - * Gets the size of icons in the tool palette. See gtk_tool_palette_set_icon_size(). + * Gets the size of icons in the tool palette. + * See gtk_tool_palette_set_icon_size(). * - * Returns: the #GtkIconSize of icons in the tool palette. + * Returns: the #GtkIconSize of icons in the tool palette * * Since: 2.20 */ @@ -1216,12 +1248,13 @@ GtkIconSize gtk_tool_palette_get_icon_size (GtkToolPalette *palette) { g_return_val_if_fail (GTK_IS_TOOL_PALETTE (palette), DEFAULT_ICON_SIZE); + return palette->priv->icon_size; } /** * gtk_tool_palette_get_style: - * @palette: an #GtkToolPalette. + * @palette: a #GtkToolPalette * * Gets the style (icons, text or both) of items in the tool palette. * @@ -1233,25 +1266,25 @@ GtkToolbarStyle gtk_tool_palette_get_style (GtkToolPalette *palette) { g_return_val_if_fail (GTK_IS_TOOL_PALETTE (palette), DEFAULT_TOOLBAR_STYLE); + return palette->priv->style; } gint _gtk_tool_palette_compare_groups (gconstpointer a, - gconstpointer b) + gconstpointer b) { const GtkToolItemGroupInfo *group_a = a; const GtkToolItemGroupInfo *group_b = b; return group_a->pos - group_b->pos; - } /** * gtk_tool_palette_set_group_position: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup which is a child of palette. - * @position: a new index for group. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup which is a child of palette + * @position: a new index for group * * Sets the position of the group as an index of the tool palette. * If position is 0 the group will become the first child, if position is @@ -1270,7 +1303,6 @@ gtk_tool_palette_set_group_position (GtkToolPalette *palette, g_return_if_fail (GTK_IS_TOOL_PALETTE (palette)); g_return_if_fail (GTK_IS_TOOL_ITEM_GROUP (group)); - g_return_if_fail (position >= -1); if (-1 == position) @@ -1278,7 +1310,7 @@ gtk_tool_palette_set_group_position (GtkToolPalette *palette, g_return_if_fail ((guint) position < palette->priv->groups->len); - group_new = g_ptr_array_index(palette->priv->groups, position); + group_new = g_ptr_array_index (palette->priv->groups, position); if (GTK_TOOL_ITEM_GROUP (group) == group_new->widget) return; @@ -1286,7 +1318,7 @@ gtk_tool_palette_set_group_position (GtkToolPalette *palette, old_position = gtk_tool_palette_get_group_position (palette, group); g_return_if_fail (old_position >= 0); - group_old = g_ptr_array_index(palette->priv->groups, old_position); + group_old = g_ptr_array_index (palette->priv->groups, old_position); group_new->pos = position; group_old->pos = old_position; @@ -1319,12 +1351,12 @@ gtk_tool_palette_group_notify_collapsed (GtkToolItemGroup *group, /** * gtk_tool_palette_set_exclusive: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup which is a child of palette. - * @exclusive: whether the group should be exclusive or not. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup which is a child of palette + * @exclusive: whether the group should be exclusive or not * - * Sets whether the group should be exclusive or not. If an exclusive group is expanded - * all other groups are collapsed. + * Sets whether the group should be exclusive or not. + * If an exclusive group is expanded all other groups are collapsed. * * Since: 2.20 */ @@ -1371,9 +1403,9 @@ gtk_tool_palette_set_exclusive (GtkToolPalette *palette, /** * gtk_tool_palette_set_expand: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup which is a child of palette. - * @expand: whether the group should be given extra space. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup which is a child of palette + * @expand: whether the group should be given extra space * * Sets whether the group should be given extra space. * @@ -1405,12 +1437,13 @@ gtk_tool_palette_set_expand (GtkToolPalette *palette, /** * gtk_tool_palette_get_group_position: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup * - * Gets the position of @group in @palette as index. see gtk_tool_palette_set_group_position(). + * Gets the position of @group in @palette as index. + * See gtk_tool_palette_set_group_position(). * - * Returns: the index of group or -1 if @group is not a child of @palette. + * Returns: the index of group or -1 if @group is not a child of @palette * * Since: 2.20 */ @@ -1435,12 +1468,13 @@ gtk_tool_palette_get_group_position (GtkToolPalette *palette, /** * gtk_tool_palette_get_exclusive: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup which is a child of palette. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup which is a child of palette * - * Gets whether group is exclusive or not. See gtk_tool_palette_set_exclusive(). + * Gets whether @group is exclusive or not. + * See gtk_tool_palette_set_exclusive(). * - * Returns: %TRUE if group is exclusive. + * Returns: %TRUE if @group is exclusive * * Since: 2.20 */ @@ -1464,12 +1498,13 @@ gtk_tool_palette_get_exclusive (GtkToolPalette *palette, /** * gtk_tool_palette_get_expand: - * @palette: an #GtkToolPalette. - * @group: an #GtkToolItemGroup which is a child of palette. + * @palette: a #GtkToolPalette + * @group: a #GtkToolItemGroup which is a child of palette * - * Gets whether group should be given extra space. See gtk_tool_palette_set_expand(). + * Gets whether group should be given extra space. + * See gtk_tool_palette_set_expand(). * - * Returns: %TRUE if group should be given extra space, %FALSE otherwise. + * Returns: %TRUE if group should be given extra space, %FALSE otherwise * * Since: 2.20 */ @@ -1493,13 +1528,14 @@ gtk_tool_palette_get_expand (GtkToolPalette *palette, /** * gtk_tool_palette_get_drop_item: - * @palette: an #GtkToolPalette. - * @x: the x position. - * @y: the y position. + * @palette: a #GtkToolPalette + * @x: the x position + * @y: the y position * - * Gets the item at position (x, y). See gtk_tool_palette_get_drop_group(). + * Gets the item at position (x, y). + * See gtk_tool_palette_get_drop_group(). * - * Returns: the #GtkToolItem at position or %NULL if there is no such item. + * Returns: the #GtkToolItem at position or %NULL if there is no such item * * Since: 2.20 */ @@ -1520,13 +1556,14 @@ gtk_tool_palette_get_drop_item (GtkToolPalette *palette, /** * gtk_tool_palette_get_drop_group: - * @palette: an #GtkToolPalette. - * @x: the x position. - * @y: the y position. + * @palette: a #GtkToolPalette + * @x: the x position + * @y: the y position * * Gets the group at position (x, y). * - * Returns: the #GtkToolItemGroup at position or %NULL if there is no such group. + * Returns: the #GtkToolItemGroup at position or %NULL + * if there is no such group * * Since: 2.20 */ @@ -1547,7 +1584,7 @@ gtk_tool_palette_get_drop_group (GtkToolPalette *palette, for (i = 0; i < palette->priv->groups->len; ++i) { - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); GtkWidget *widget; gint x0, y0; @@ -1569,13 +1606,13 @@ gtk_tool_palette_get_drop_group (GtkToolPalette *palette, /** * gtk_tool_palette_get_drag_item: - * @palette: an #GtkToolPalette. - * @selection: a #GtkSelectionData. + * @palette: a #GtkToolPalette + * @selection: a #GtkSelectionData * - * Get the dragged item from the selection. This could be a #GtkToolItem or - * an #GtkToolItemGroup. + * Get the dragged item from the selection. + * This could be a #GtkToolItem or a #GtkToolItemGroup. * - * Returns: the dragged item in selection. + * Returns: the dragged item in selection * * Since: 2.20 */ @@ -1608,17 +1645,16 @@ gtk_tool_palette_get_drag_item (GtkToolPalette *palette, /** * gtk_tool_palette_set_drag_source: - * @palette: an #GtkToolPalette. - * @targets: the #GtkToolPaletteDragTargets which the widget should support. - * - * Sets the tool palette as a drag source. Enables all groups and items in - * the tool palette as drag sources on button 1 and button 3 press with copy - * and move actions. + * @palette: a #GtkToolPalette + * @targets: the #GtkToolPaletteDragTargets + * which the widget should support * + * Sets the tool palette as a drag source. + * Enables all groups and items in the tool palette as drag sources + * on button 1 and button 3 press with copy and move actions. * See gtk_drag_source_set(). * * Since: 2.20 - * */ void gtk_tool_palette_set_drag_source (GtkToolPalette *palette, @@ -1645,19 +1681,16 @@ gtk_tool_palette_set_drag_source (GtkToolPalette *palette, /** * gtk_tool_palette_add_drag_dest: - * @palette: an #GtkToolPalette. - * @widget: a #GtkWidget which should be a drag destination for palette. - * @flags: the flags that specify what actions GTK+ should take for drops on that widget. - * @targets: the #GtkToolPaletteDragTargets which the widget should support. - * @actions: the #GdkDragActions which the widget should suppport. - * - * Sets the tool palette as drag source (see gtk_tool_palette_set_drag_source()) and - * sets widget as a drag destination for drags from palette. With flags the actions - * (like highlighting and target checking) which should be performed by GTK+ for - * drops on widget can be specified. With targets the supported drag targets - * (groups and/or items) can be specified. With actions the supported drag actions - * (copy and move) can be specified. + * @palette: a #GtkToolPalette + * @widget: a #GtkWidget which should be a drag destination for @palette + * @flags: the flags that specify what actions GTK+ should take for drops + * on that widget + * @targets: the #GtkToolPaletteDragTargets which the widget + * should support + * @actions: the #GdkDragActions which the widget should suppport * + * Sets @palette as drag source (see gtk_tool_palette_set_drag_source()) + * and sets @widget as a drag destination for drags from @palette. * See gtk_drag_dest_set(). * * Since: 2.20 @@ -1708,7 +1741,7 @@ _gtk_tool_palette_get_item_size (GtkToolPalette *palette, { GtkRequisition requisition; gint rows; - GtkToolItemGroupInfo *group = g_ptr_array_index(palette->priv->groups, i); + GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i); if (!group->widget) continue; @@ -1807,7 +1840,7 @@ _gtk_tool_palette_child_set_drag_source (GtkWidget *child, /** * gtk_tool_palette_get_drag_target_item: * - * Get the target entry for a dragged #GtkToolItem. + * Gets the target entry for a dragged #GtkToolItem. * * Returns: the #GtkTargetEntry for a dragged item. * @@ -1824,7 +1857,7 @@ gtk_tool_palette_get_drag_target_item (void) * * Get the target entry for a dragged #GtkToolItemGroup. * - * Returns: the #GtkTargetEntry for a dragged group. + * Returns: the #GtkTargetEntry for a dragged group * * Since: 2.20 */ @@ -1842,17 +1875,39 @@ _gtk_tool_palette_set_expanding_child (GtkToolPalette *palette, palette->priv->expanding_child = widget; } +/** + * gtk_tool_palette_get_hadjustment: + * @palette: a #GtkToolPalette + * + * Gets the horizontal adjustment of the tool palette. + * + * Returns: the horizontal adjustment of @palette + * + * Since: 2.20 + */ GtkAdjustment* gtk_tool_palette_get_hadjustment (GtkToolPalette *palette) { g_return_val_if_fail (GTK_IS_TOOL_PALETTE (palette), NULL); + return palette->priv->hadjustment; } +/** + * gtk_tool_palette_get_vadjustment: + * @palette: a #GtkToolPalette + * + * Gets the vertical adjustment of the tool palette. + * + * Returns: the vertical adjustment of @palette + * + * Since: 2.20 + */ GtkAdjustment* gtk_tool_palette_get_vadjustment (GtkToolPalette *palette) { g_return_val_if_fail (GTK_IS_TOOL_PALETTE (palette), NULL); + return palette->priv->vadjustment; } @@ -1863,3 +1918,7 @@ _gtk_tool_palette_get_size_group (GtkToolPalette *palette) return palette->priv->text_size_group; } + + +#define __GTK_TOOL_PALETTE_C__ +#include "gtkaliasdef.c" diff --git a/gtk/gtktoolpalette.h b/gtk/gtktoolpalette.h index 8ee805d47c..36eb379dbc 100644 --- a/gtk/gtktoolpalette.h +++ b/gtk/gtktoolpalette.h @@ -28,12 +28,12 @@ G_BEGIN_DECLS -#define GTK_TYPE_TOOL_PALETTE (gtk_tool_palette_get_type()) -#define GTK_TOOL_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, GTK_TYPE_TOOL_PALETTE, GtkToolPalette)) -#define GTK_TOOL_PALETTE_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST(cls, GTK_TYPE_TOOL_PALETTE, GtkToolPaletteClass)) -#define GTK_IS_TOOL_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GTK_TYPE_TOOL_PALETTE)) -#define GTK_IS_TOOL_PALETTE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE(obj, GTK_TYPE_TOOL_PALETTE)) -#define GTK_TOOL_PALETTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_PALETTE, GtkToolPaletteClass)) +#define GTK_TYPE_TOOL_PALETTE (gtk_tool_palette_get_type ()) +#define GTK_TOOL_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_TOOL_PALETTE, GtkToolPalette)) +#define GTK_TOOL_PALETTE_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_TOOL_PALETTE, GtkToolPaletteClass)) +#define GTK_IS_TOOL_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_TOOL_PALETTE)) +#define GTK_IS_TOOL_PALETTE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_TOOL_PALETTE)) +#define GTK_TOOL_PALETTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOL_PALETTE, GtkToolPaletteClass)) typedef struct _GtkToolPalette GtkToolPalette; typedef struct _GtkToolPaletteClass GtkToolPaletteClass; diff --git a/gtk/gtktoolshell.c b/gtk/gtktoolshell.c index ec1c10b5ca..92560e57a6 100644 --- a/gtk/gtktoolshell.c +++ b/gtk/gtktoolshell.c @@ -28,7 +28,7 @@ /** * SECTION:gtktoolshell - * @short_description: Interface for containers containing GtkToolItem widgets. + * @Short_description: Interface for containers containing GtkToolItem widgets * @Title: GtkToolShell * * The #GtkToolShell interface allows container widgets to provide additional