2008-07-01 22:57:50 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
1997-12-19 21:14:44 +00:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
* GtkToolbar copyright (C) Federico Mena
|
|
|
|
*
|
2003-12-29 10:55:53 +00:00
|
|
|
* Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
|
2003-06-29 23:34:20 +00:00
|
|
|
* Copyright (C) 2002 James Henstridge <james@daa.com.au>
|
|
|
|
* Copyright (C) 2003 Soeren Sandmann <sandmann@daimi.au.dk>
|
2008-05-28 15:35:43 +00:00
|
|
|
*
|
1997-12-19 21:14:44 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1997-12-19 21:14:44 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
1997-12-19 21:14:44 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-12-19 21:14:44 +00:00
|
|
|
*/
|
|
|
|
|
1999-02-24 07:37:18 +00:00
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +00:00
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
2008-05-28 15:35:43 +00:00
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
1999-02-24 07:37:18 +00:00
|
|
|
*/
|
|
|
|
|
2008-05-28 15:07:04 +00:00
|
|
|
#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
|
|
|
#error "Only <gtk/gtk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
#ifndef __GTK_TOOLBAR_H__
|
|
|
|
#define __GTK_TOOLBAR_H__
|
|
|
|
|
2008-10-30 15:58:06 +00:00
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
#include <gtk/gtkcontainer.h>
|
2002-10-09 00:38:22 +00:00
|
|
|
#include <gtk/gtktooltips.h>
|
2008-06-13 14:26:44 +00:00
|
|
|
#include <gtk/gtktoolitem.h>
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
#ifndef GTK_DISABLE_DEPRECATED
|
|
|
|
|
2002-10-09 00:38:22 +00:00
|
|
|
/* Not needed, retained for compatibility -Yosh */
|
1997-12-22 21:32:24 +00:00
|
|
|
#include <gtk/gtkpixmap.h>
|
1997-12-23 00:35:48 +00:00
|
|
|
#include <gtk/gtksignal.h>
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2003-10-25 19:58:51 +00:00
|
|
|
#endif /* GTK_DISABLE_DEPRECATED */
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
G_BEGIN_DECLS
|
1997-12-19 21:14:44 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
#define GTK_TYPE_TOOLBAR (gtk_toolbar_get_type ())
|
|
|
|
#define GTK_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOLBAR, GtkToolbar))
|
|
|
|
#define GTK_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOLBAR, GtkToolbarClass))
|
|
|
|
#define GTK_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOLBAR))
|
|
|
|
#define GTK_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOLBAR))
|
|
|
|
#define GTK_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TOOLBAR, GtkToolbarClass))
|
2000-02-13 08:16:48 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
#ifndef GTK_DISABLE_DEPRECATED
|
1998-06-15 21:27:17 +00:00
|
|
|
typedef enum
|
1998-01-30 10:21:37 +00:00
|
|
|
{
|
|
|
|
GTK_TOOLBAR_CHILD_SPACE,
|
|
|
|
GTK_TOOLBAR_CHILD_BUTTON,
|
1998-02-23 20:48:46 +00:00
|
|
|
GTK_TOOLBAR_CHILD_TOGGLEBUTTON,
|
|
|
|
GTK_TOOLBAR_CHILD_RADIOBUTTON,
|
1998-01-30 10:21:37 +00:00
|
|
|
GTK_TOOLBAR_CHILD_WIDGET
|
1998-06-15 21:27:17 +00:00
|
|
|
} GtkToolbarChildType;
|
1998-01-30 10:21:37 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
typedef struct _GtkToolbarChild GtkToolbarChild;
|
1998-02-01 08:50:08 +00:00
|
|
|
|
1998-01-30 10:21:37 +00:00
|
|
|
struct _GtkToolbarChild
|
|
|
|
{
|
|
|
|
GtkToolbarChildType type;
|
|
|
|
GtkWidget *widget;
|
|
|
|
GtkWidget *icon;
|
|
|
|
GtkWidget *label;
|
|
|
|
};
|
|
|
|
|
2004-01-17 11:51:28 +00:00
|
|
|
#endif /* GTK_DISABLE_DEPRECATED */
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_TOOLBAR_SPACE_EMPTY,
|
|
|
|
GTK_TOOLBAR_SPACE_LINE
|
|
|
|
} GtkToolbarSpaceStyle;
|
|
|
|
|
|
|
|
typedef struct _GtkToolbar GtkToolbar;
|
|
|
|
typedef struct _GtkToolbarClass GtkToolbarClass;
|
|
|
|
typedef struct _GtkToolbarPrivate GtkToolbarPrivate;
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
struct _GtkToolbar
|
|
|
|
{
|
|
|
|
GtkContainer container;
|
2003-10-25 19:58:51 +00:00
|
|
|
|
2004-01-17 11:51:28 +00:00
|
|
|
/*< public >*/
|
2008-06-20 11:02:30 +00:00
|
|
|
gint GSEAL (num_children);
|
|
|
|
GList *GSEAL (children);
|
|
|
|
GtkOrientation GSEAL (orientation);
|
|
|
|
GtkToolbarStyle GSEAL (style);
|
|
|
|
GtkIconSize GSEAL (icon_size);
|
2008-05-28 15:35:43 +00:00
|
|
|
|
Replace non-deprecated API using old tooltips API, deprecate old tooltips
2007-07-09 Kristian Rietveld <kris@imendio.com>
Replace non-deprecated API using old tooltips API, deprecate
old tooltips API for real. (#451575).
* gtk/gtk.symbols: updated.
* gtk/gtkwidget.c (gtk_widget_real_show_help): don't call
_gtk_tooltips_toggle_keyboard_mode() anymore.
* gtk/gtkmenutoolbutton.[ch] (gtk_menu_tool_button_set_arrow_tooltip):
deprecated,
(gtk_menu_tool_button_set_arrow_tooltip_{text,markup}): replacements.
* gtk/gtktoolitem.[ch] (gtk_tool_item_real_set_tooltip): use
new API,
(gtk_tool_item_set_tooltip): deprecated,
(gtk_tool_item_set_tooltip_{text,markup): replacements.
(GtkToolItemClass:set_tooltip): deprecated.
* gtk/gtktooltips.[ch]: strip out all unused parts, made
gtk_tooltips_set_tip() call gtk_widget_set_tooltip_text(),
deprecate all of gtk_tooltips_*.
* gtk/gtktoolbar.[ch] (gtk_toolbar_get_tooltips): always return
TRUE,
(GtkToolbar:tooltips): deprecated, renamed.
* gtk/gtkaction.c (gtk_action_sync_tooltip): use new API to
set the tooltip text.
* tests/autotestfilechooser.c: #undef GTK_DISABLE_DEPRECATED for now,
will be removed GtkFileChooserDefault has been converted.
svn path=/trunk/; revision=18418
2007-07-09 19:23:18 +00:00
|
|
|
#ifndef GTK_DISABLE_DEPRECATED
|
2008-06-20 11:02:30 +00:00
|
|
|
GtkTooltips *GSEAL (tooltips);
|
Replace non-deprecated API using old tooltips API, deprecate old tooltips
2007-07-09 Kristian Rietveld <kris@imendio.com>
Replace non-deprecated API using old tooltips API, deprecate
old tooltips API for real. (#451575).
* gtk/gtk.symbols: updated.
* gtk/gtkwidget.c (gtk_widget_real_show_help): don't call
_gtk_tooltips_toggle_keyboard_mode() anymore.
* gtk/gtkmenutoolbutton.[ch] (gtk_menu_tool_button_set_arrow_tooltip):
deprecated,
(gtk_menu_tool_button_set_arrow_tooltip_{text,markup}): replacements.
* gtk/gtktoolitem.[ch] (gtk_tool_item_real_set_tooltip): use
new API,
(gtk_tool_item_set_tooltip): deprecated,
(gtk_tool_item_set_tooltip_{text,markup): replacements.
(GtkToolItemClass:set_tooltip): deprecated.
* gtk/gtktooltips.[ch]: strip out all unused parts, made
gtk_tooltips_set_tip() call gtk_widget_set_tooltip_text(),
deprecate all of gtk_tooltips_*.
* gtk/gtktoolbar.[ch] (gtk_toolbar_get_tooltips): always return
TRUE,
(GtkToolbar:tooltips): deprecated, renamed.
* gtk/gtkaction.c (gtk_action_sync_tooltip): use new API to
set the tooltip text.
* tests/autotestfilechooser.c: #undef GTK_DISABLE_DEPRECATED for now,
will be removed GtkFileChooserDefault has been converted.
svn path=/trunk/; revision=18418
2007-07-09 19:23:18 +00:00
|
|
|
#else
|
2008-06-20 11:02:30 +00:00
|
|
|
gpointer GSEAL (_tooltips);
|
Replace non-deprecated API using old tooltips API, deprecate old tooltips
2007-07-09 Kristian Rietveld <kris@imendio.com>
Replace non-deprecated API using old tooltips API, deprecate
old tooltips API for real. (#451575).
* gtk/gtk.symbols: updated.
* gtk/gtkwidget.c (gtk_widget_real_show_help): don't call
_gtk_tooltips_toggle_keyboard_mode() anymore.
* gtk/gtkmenutoolbutton.[ch] (gtk_menu_tool_button_set_arrow_tooltip):
deprecated,
(gtk_menu_tool_button_set_arrow_tooltip_{text,markup}): replacements.
* gtk/gtktoolitem.[ch] (gtk_tool_item_real_set_tooltip): use
new API,
(gtk_tool_item_set_tooltip): deprecated,
(gtk_tool_item_set_tooltip_{text,markup): replacements.
(GtkToolItemClass:set_tooltip): deprecated.
* gtk/gtktooltips.[ch]: strip out all unused parts, made
gtk_tooltips_set_tip() call gtk_widget_set_tooltip_text(),
deprecate all of gtk_tooltips_*.
* gtk/gtktoolbar.[ch] (gtk_toolbar_get_tooltips): always return
TRUE,
(GtkToolbar:tooltips): deprecated, renamed.
* gtk/gtkaction.c (gtk_action_sync_tooltip): use new API to
set the tooltip text.
* tests/autotestfilechooser.c: #undef GTK_DISABLE_DEPRECATED for now,
will be removed GtkFileChooserDefault has been converted.
svn path=/trunk/; revision=18418
2007-07-09 19:23:18 +00:00
|
|
|
#endif
|
2008-05-28 15:35:43 +00:00
|
|
|
|
2004-01-17 11:51:28 +00:00
|
|
|
/*< private >*/
|
2008-06-20 11:02:30 +00:00
|
|
|
gint GSEAL (button_maxw); /* maximum width of homogeneous children */
|
|
|
|
gint GSEAL (button_maxh); /* maximum height of homogeneous children */
|
2005-11-24 16:51:22 +00:00
|
|
|
|
|
|
|
guint _gtk_reserved1;
|
|
|
|
guint _gtk_reserved2;
|
|
|
|
|
2008-06-20 11:09:49 +00:00
|
|
|
guint GSEAL (style_set) : 1;
|
|
|
|
guint GSEAL (icon_size_set) : 1;
|
1997-12-19 21:14:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkToolbarClass
|
|
|
|
{
|
|
|
|
GtkContainerClass parent_class;
|
2008-05-28 15:35:43 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
/* signals */
|
2003-10-25 19:58:51 +00:00
|
|
|
void (* orientation_changed) (GtkToolbar *toolbar,
|
2003-07-04 16:48:40 +00:00
|
|
|
GtkOrientation orientation);
|
2003-10-25 19:58:51 +00:00
|
|
|
void (* style_changed) (GtkToolbar *toolbar,
|
2003-07-04 16:48:40 +00:00
|
|
|
GtkToolbarStyle style);
|
|
|
|
gboolean (* popup_context_menu) (GtkToolbar *toolbar,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint button_number);
|
2008-05-28 15:35:43 +00:00
|
|
|
|
2002-02-23 20:22:05 +00:00
|
|
|
/* Padding for future expansion */
|
|
|
|
void (*_gtk_reserved1) (void);
|
|
|
|
void (*_gtk_reserved2) (void);
|
|
|
|
void (*_gtk_reserved3) (void);
|
1997-12-19 21:14:44 +00:00
|
|
|
};
|
|
|
|
|
2008-11-11 15:45:08 +00:00
|
|
|
GType gtk_toolbar_get_type (void) G_GNUC_CONST;
|
|
|
|
GtkWidget * gtk_toolbar_new (void);
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
void gtk_toolbar_insert (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item,
|
|
|
|
gint pos);
|
2008-11-11 15:45:08 +00:00
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
gint gtk_toolbar_get_item_index (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *item);
|
|
|
|
gint gtk_toolbar_get_n_items (GtkToolbar *toolbar);
|
|
|
|
GtkToolItem * gtk_toolbar_get_nth_item (GtkToolbar *toolbar,
|
|
|
|
gint n);
|
2008-11-11 15:45:08 +00:00
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
gboolean gtk_toolbar_get_show_arrow (GtkToolbar *toolbar);
|
|
|
|
void gtk_toolbar_set_show_arrow (GtkToolbar *toolbar,
|
|
|
|
gboolean show_arrow);
|
2008-11-11 15:28:07 +00:00
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar);
|
|
|
|
void gtk_toolbar_set_style (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style);
|
|
|
|
void gtk_toolbar_unset_style (GtkToolbar *toolbar);
|
2008-11-11 15:45:08 +00:00
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
GtkIconSize gtk_toolbar_get_icon_size (GtkToolbar *toolbar);
|
2008-11-11 15:45:08 +00:00
|
|
|
void gtk_toolbar_set_icon_size (GtkToolbar *toolbar,
|
|
|
|
GtkIconSize icon_size);
|
|
|
|
void gtk_toolbar_unset_icon_size (GtkToolbar *toolbar);
|
|
|
|
|
2004-03-09 01:21:45 +00:00
|
|
|
GtkReliefStyle gtk_toolbar_get_relief_style (GtkToolbar *toolbar);
|
|
|
|
gint gtk_toolbar_get_drop_index (GtkToolbar *toolbar,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
|
|
|
void gtk_toolbar_set_drop_highlight_item (GtkToolbar *toolbar,
|
|
|
|
GtkToolItem *tool_item,
|
2004-06-02 03:16:03 +00:00
|
|
|
gint index_);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2008-11-11 15:45:08 +00:00
|
|
|
|
2004-01-17 11:51:28 +00:00
|
|
|
/* internal functions */
|
2008-01-25 09:30:40 +00:00
|
|
|
gchar * _gtk_toolbar_elide_underscores (const gchar *original);
|
|
|
|
void _gtk_toolbar_paint_space_line (GtkWidget *widget,
|
|
|
|
GtkToolbar *toolbar,
|
|
|
|
const GdkRectangle *area,
|
|
|
|
const GtkAllocation *allocation);
|
2004-03-09 01:21:45 +00:00
|
|
|
gint _gtk_toolbar_get_default_space_size (void);
|
|
|
|
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
G_END_DECLS
|
1997-12-19 21:14:44 +00:00
|
|
|
|
|
|
|
#endif /* __GTK_TOOLBAR_H__ */
|