1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
4 * Modified version of gimpchainbutton.h for gLabels:
6 * LIBGIMP - The GIMP Library
7 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
10 * Copyright (C) 1999-2000 Sven Neumann <sven@gimp.org>
12 * Modified or gLabels by Jim Evins <evins@snaught.com>
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
24 * You should have received a copy of the GNU General Public
25 * License along with this library; if not, write to the
26 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27 * Boston, MA 02111-1307, USA.
31 * This implements a widget derived from GtkTable that visualizes
32 * it's state with two different pixmaps showing a closed and a
33 * broken chain. It's intented to be used with the GimpSizeEntry
34 * widget. The usage is quite similar to the one the GtkToggleButton
38 #ifndef __WDGT_CHAIN_BUTTON_H__
39 #define __WDGT_CHAIN_BUTTON_H__
41 #include <gtk/gtktable.h>
52 } glWdgtChainPosition;
55 #define GL_WDGT_TYPE_CHAIN_BUTTON (gl_wdgt_chain_button_get_type ())
56 #define GL_WDGT_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButton))
57 #define GL_WDGT_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass))
58 #define GL_WDGT_IS_CHAIN_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_WDGT_TYPE_CHAIN_BUTTON))
59 #define GL_WDGT_IS_CHAIN_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_WDGT_TYPE_CHAIN_BUTTON))
60 #define GL_WDGT_CHAIN_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_WDGT_TYPE_CHAIN_BUTTON, glWdgtChainButtonClass))
63 typedef struct _glWdgtChainButton glWdgtChainButton;
64 typedef struct _glWdgtChainButtonClass glWdgtChainButtonClass;
66 struct _glWdgtChainButton
68 GtkTable parent_instance;
70 glWdgtChainPosition position;
79 struct _glWdgtChainButtonClass
81 GtkTableClass parent_class;
83 void (* toggled) (glWdgtChainButton *button);
87 GType gl_wdgt_chain_button_get_type (void) G_GNUC_CONST;
89 GtkWidget * gl_wdgt_chain_button_new (glWdgtChainPosition position);
91 void gl_wdgt_chain_button_set_active (glWdgtChainButton *button,
93 gboolean gl_wdgt_chain_button_get_active (glWdgtChainButton *button);
98 #endif /* __WDGT_CHAIN_BUTTON_H__ */