1997-12-19 21:14:44 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
* GtkToolbar copyright (C) Federico Mena
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library 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
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
#ifndef __GTK_TOOLBAR_H__
|
|
|
|
#define __GTK_TOOLBAR_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <gtk/gtkcontainer.h>
|
|
|
|
#include <gtk/gtkenums.h>
|
1997-12-22 21:32:24 +00:00
|
|
|
#include <gtk/gtkpixmap.h>
|
1997-12-23 00:35:48 +00:00
|
|
|
#include <gtk/gtksignal.h>
|
|
|
|
#include <gtk/gtktooltips.h>
|
1997-12-19 21:14:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#define GTK_TOOLBAR(obj) GTK_CHECK_CAST (obj, gtk_toolbar_get_type (), GtkToolbar)
|
|
|
|
#define GTK_TOOLBAR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_toolbar_get_type (), GtkToolbarClass)
|
|
|
|
#define GTK_IS_TOOLBAR(obj) GTK_CHECK_TYPE (obj, gtk_toolbar_get_type ())
|
|
|
|
|
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
|
|
|
|
1998-12-08 13:25:35 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_TOOLBAR_SPACE_EMPTY,
|
|
|
|
GTK_TOOLBAR_SPACE_LINE
|
|
|
|
} GtkToolbarSpaceStyle;
|
|
|
|
|
1998-02-01 08:50:08 +00:00
|
|
|
typedef struct _GtkToolbarChild GtkToolbarChild;
|
|
|
|
typedef struct _GtkToolbar GtkToolbar;
|
|
|
|
typedef struct _GtkToolbarClass GtkToolbarClass;
|
|
|
|
|
1998-01-30 10:21:37 +00:00
|
|
|
struct _GtkToolbarChild
|
|
|
|
{
|
|
|
|
GtkToolbarChildType type;
|
|
|
|
GtkWidget *widget;
|
|
|
|
GtkWidget *icon;
|
|
|
|
GtkWidget *label;
|
|
|
|
};
|
|
|
|
|
1997-12-19 21:14:44 +00:00
|
|
|
struct _GtkToolbar
|
|
|
|
{
|
|
|
|
GtkContainer container;
|
|
|
|
|
1997-12-22 20:43:55 +00:00
|
|
|
gint num_children;
|
1997-12-19 21:14:44 +00:00
|
|
|
GList *children;
|
|
|
|
GtkOrientation orientation;
|
|
|
|
GtkToolbarStyle style;
|
|
|
|
gint space_size; /* big optional space between buttons */
|
1998-12-08 13:25:35 +00:00
|
|
|
GtkToolbarSpaceStyle space_style;
|
1997-12-19 21:14:44 +00:00
|
|
|
|
1997-12-23 00:35:48 +00:00
|
|
|
GtkTooltips *tooltips;
|
|
|
|
|
1998-01-13 06:14:52 +00:00
|
|
|
gint button_maxw;
|
|
|
|
gint button_maxh;
|
1998-05-12 21:30:52 +00:00
|
|
|
GtkReliefStyle relief;
|
1997-12-19 21:14:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkToolbarClass
|
|
|
|
{
|
|
|
|
GtkContainerClass parent_class;
|
1997-12-23 06:11:36 +00:00
|
|
|
|
|
|
|
void (* orientation_changed) (GtkToolbar *toolbar,
|
|
|
|
GtkOrientation orientation);
|
|
|
|
void (* style_changed) (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style);
|
1997-12-19 21:14:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1997-12-23 06:11:36 +00:00
|
|
|
guint gtk_toolbar_get_type (void);
|
|
|
|
GtkWidget *gtk_toolbar_new (GtkOrientation orientation,
|
|
|
|
GtkToolbarStyle style);
|
|
|
|
|
1998-02-23 20:48:46 +00:00
|
|
|
/* Simple button items */
|
1998-01-13 06:14:52 +00:00
|
|
|
GtkWidget *gtk_toolbar_append_item (GtkToolbar *toolbar,
|
1997-12-23 06:11:36 +00:00
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_private_text,
|
1998-01-18 23:49:56 +00:00
|
|
|
GtkWidget *icon,
|
1997-12-23 06:11:36 +00:00
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data);
|
1998-01-13 06:14:52 +00:00
|
|
|
GtkWidget *gtk_toolbar_prepend_item (GtkToolbar *toolbar,
|
1997-12-23 06:11:36 +00:00
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_private_text,
|
1998-01-18 23:49:56 +00:00
|
|
|
GtkWidget *icon,
|
1997-12-23 06:11:36 +00:00
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data);
|
1998-01-13 06:14:52 +00:00
|
|
|
GtkWidget *gtk_toolbar_insert_item (GtkToolbar *toolbar,
|
1997-12-23 06:11:36 +00:00
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_private_text,
|
1998-01-18 23:49:56 +00:00
|
|
|
GtkWidget *icon,
|
1997-12-23 06:11:36 +00:00
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position);
|
1998-02-23 20:48:46 +00:00
|
|
|
|
|
|
|
/* Space Items */
|
1997-12-23 06:11:36 +00:00
|
|
|
void gtk_toolbar_append_space (GtkToolbar *toolbar);
|
|
|
|
void gtk_toolbar_prepend_space (GtkToolbar *toolbar);
|
|
|
|
void gtk_toolbar_insert_space (GtkToolbar *toolbar,
|
|
|
|
gint position);
|
1998-02-23 20:48:46 +00:00
|
|
|
|
|
|
|
/* Any element type */
|
|
|
|
GtkWidget *gtk_toolbar_append_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
GtkWidget *gtk_toolbar_prepend_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
GtkWidget *gtk_toolbar_insert_element (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarChildType type,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *text,
|
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text,
|
|
|
|
GtkWidget *icon,
|
|
|
|
GtkSignalFunc callback,
|
|
|
|
gpointer user_data,
|
|
|
|
gint position);
|
|
|
|
|
|
|
|
/* Generic Widgets */
|
1998-01-13 06:14:52 +00:00
|
|
|
void gtk_toolbar_append_widget (GtkToolbar *toolbar,
|
1998-01-19 22:38:22 +00:00
|
|
|
GtkWidget *widget,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text);
|
1998-01-13 06:14:52 +00:00
|
|
|
void gtk_toolbar_prepend_widget (GtkToolbar *toolbar,
|
1998-01-19 22:38:22 +00:00
|
|
|
GtkWidget *widget,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_text,
|
|
|
|
const char *tooltip_private_text);
|
1998-01-13 06:14:52 +00:00
|
|
|
void gtk_toolbar_insert_widget (GtkToolbar *toolbar,
|
|
|
|
GtkWidget *widget,
|
1998-01-19 22:38:22 +00:00
|
|
|
const char *tooltip_text,
|
1998-02-21 04:46:21 +00:00
|
|
|
const char *tooltip_private_text,
|
1998-01-13 06:14:52 +00:00
|
|
|
gint position);
|
1997-12-23 06:11:36 +00:00
|
|
|
|
1998-02-23 20:48:46 +00:00
|
|
|
/* Style functions */
|
1998-12-08 13:25:35 +00:00
|
|
|
void gtk_toolbar_set_orientation (GtkToolbar *toolbar,
|
|
|
|
GtkOrientation orientation);
|
|
|
|
void gtk_toolbar_set_style (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarStyle style);
|
|
|
|
void gtk_toolbar_set_space_size (GtkToolbar *toolbar,
|
|
|
|
gint space_size);
|
|
|
|
void gtk_toolbar_set_space_style (GtkToolbar *toolbar,
|
|
|
|
GtkToolbarSpaceStyle space_style);
|
|
|
|
void gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
|
|
|
|
gint enable);
|
|
|
|
void gtk_toolbar_set_button_relief (GtkToolbar *toolbar,
|
|
|
|
GtkReliefStyle relief);
|
|
|
|
GtkReliefStyle gtk_toolbar_get_button_relief (GtkToolbar *toolbar);
|
1997-12-19 21:14:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __GTK_TOOLBAR_H__ */
|