2003-06-29 23:34:20 +00:00
|
|
|
/* gtktoolbutton.h
|
|
|
|
*
|
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>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2003-06-29 23:34:20 +00:00
|
|
|
*/
|
|
|
|
|
2012-12-28 14:57:34 +00:00
|
|
|
#ifndef __GTK_TOOL_BUTTON_H__
|
|
|
|
#define __GTK_TOOL_BUTTON_H__
|
|
|
|
|
2009-10-21 18:30:04 +00:00
|
|
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2008-05-28 15:07:04 +00:00
|
|
|
#error "Only <gtk/gtk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2008-06-13 14:26:44 +00:00
|
|
|
#include <gtk/gtktoolitem.h>
|
2003-06-29 23:34:20 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GTK_TYPE_TOOL_BUTTON (gtk_tool_button_get_type ())
|
|
|
|
#define GTK_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButton))
|
|
|
|
#define GTK_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_BUTTON, GtkToolButtonClass))
|
|
|
|
#define GTK_IS_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOL_BUTTON))
|
2004-08-22 03:38:42 +00:00
|
|
|
#define GTK_IS_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOL_BUTTON))
|
2003-06-29 23:34:20 +00:00
|
|
|
#define GTK_TOOL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonClass))
|
|
|
|
|
|
|
|
typedef struct _GtkToolButton GtkToolButton;
|
|
|
|
typedef struct _GtkToolButtonClass GtkToolButtonClass;
|
|
|
|
typedef struct _GtkToolButtonPrivate GtkToolButtonPrivate;
|
|
|
|
|
|
|
|
struct _GtkToolButton
|
|
|
|
{
|
|
|
|
GtkToolItem parent;
|
|
|
|
|
2003-07-08 18:20:45 +00:00
|
|
|
/*< private >*/
|
2010-07-13 23:58:29 +00:00
|
|
|
GtkToolButtonPrivate *priv;
|
2003-06-29 23:34:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkToolButtonClass
|
|
|
|
{
|
|
|
|
GtkToolItemClass parent_class;
|
2008-05-28 15:35:43 +00:00
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
GType button_type;
|
|
|
|
|
|
|
|
/* signal */
|
|
|
|
void (* clicked) (GtkToolButton *tool_item);
|
2003-07-31 15:26:40 +00:00
|
|
|
|
|
|
|
/* Padding for future expansion */
|
|
|
|
void (* _gtk_reserved1) (void);
|
|
|
|
void (* _gtk_reserved2) (void);
|
|
|
|
void (* _gtk_reserved3) (void);
|
|
|
|
void (* _gtk_reserved4) (void);
|
2003-06-29 23:34:20 +00:00
|
|
|
};
|
|
|
|
|
2004-11-23 20:02:15 +00:00
|
|
|
GType gtk_tool_button_get_type (void) G_GNUC_CONST;
|
2003-07-30 18:35:08 +00:00
|
|
|
GtkToolItem *gtk_tool_button_new (GtkWidget *icon_widget,
|
|
|
|
const gchar *label);
|
2003-06-29 23:34:20 +00:00
|
|
|
GtkToolItem *gtk_tool_button_new_from_stock (const gchar *stock_id);
|
|
|
|
|
2003-07-30 18:35:08 +00:00
|
|
|
void gtk_tool_button_set_label (GtkToolButton *button,
|
|
|
|
const gchar *label);
|
2011-06-06 18:13:44 +00:00
|
|
|
const gchar * gtk_tool_button_get_label (GtkToolButton *button);
|
2003-06-29 23:34:20 +00:00
|
|
|
void gtk_tool_button_set_use_underline (GtkToolButton *button,
|
|
|
|
gboolean use_underline);
|
|
|
|
gboolean gtk_tool_button_get_use_underline (GtkToolButton *button);
|
2003-07-30 18:35:08 +00:00
|
|
|
void gtk_tool_button_set_stock_id (GtkToolButton *button,
|
2003-06-29 23:34:20 +00:00
|
|
|
const gchar *stock_id);
|
2011-06-06 18:13:44 +00:00
|
|
|
const gchar * gtk_tool_button_get_stock_id (GtkToolButton *button);
|
2005-05-18 05:38:50 +00:00
|
|
|
void gtk_tool_button_set_icon_name (GtkToolButton *button,
|
|
|
|
const gchar *icon_name);
|
2011-06-06 18:13:44 +00:00
|
|
|
const gchar * gtk_tool_button_get_icon_name (GtkToolButton *button);
|
2003-07-30 18:35:08 +00:00
|
|
|
void gtk_tool_button_set_icon_widget (GtkToolButton *button,
|
2003-08-04 21:13:55 +00:00
|
|
|
GtkWidget *icon_widget);
|
2003-07-30 18:35:08 +00:00
|
|
|
GtkWidget * gtk_tool_button_get_icon_widget (GtkToolButton *button);
|
|
|
|
void gtk_tool_button_set_label_widget (GtkToolButton *button,
|
|
|
|
GtkWidget *label_widget);
|
|
|
|
GtkWidget * gtk_tool_button_get_label_widget (GtkToolButton *button);
|
2003-06-29 23:34:20 +00:00
|
|
|
|
2008-05-28 15:35:43 +00:00
|
|
|
|
2003-07-08 18:20:45 +00:00
|
|
|
/* internal function */
|
|
|
|
GtkWidget *_gtk_tool_button_get_button (GtkToolButton *button);
|
|
|
|
|
2003-06-29 23:34:20 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_TOOL_BUTTON_H__ */
|