3 * Modified version of gimpchainbutton.h for gLabels:
5 * LIBGIMP - The GIMP Library
6 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
9 * Copyright (C) 1999-2000 Sven Neumann <sven@gimp.org>
11 * Modified or gLabels by Jim Evins <evins@snaught.com>
14 * This file is part of gLabels.
16 * gLabels is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
21 * gLabels is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
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__
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__ */
103 * Local Variables: -- emacs
105 * c-basic-offset: 8 -- emacs
106 * tab-width: 8 -- emacs
107 * indent-tabs-mode: nil -- emacs