2
This file is part of darktable,
3
copyright (c) 2011 Henrik Andersson.
5
darktable is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
10
darktable is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with darktable. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef DTGTK_TRISTATEBUTTON_H
19
#define DTGTK_TRISTATEBUTTON_H
24
#define DTGTK_TRISTATEBUTTON(obj) GTK_CHECK_CAST(obj, dtgtk_tristatebutton_get_type (), GtkDarktableTriStateButton)
25
#define DTGTK_TRISTATEBUTTON_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, dtgtk_tristatebutton_get_type(), GtkDarktableTriStateButtonClass)
26
#define DTGTK_IS_TRISTATEBUTTON(obj) GTK_CHECK_TYPE(obj, dtgtk_tristatebutton_get_type())
27
#define DTGTK_IS_TRISTATEBUTTON_CLASS(klass) GTK_CHECK_CLASS_TYPE(obj, dtgtk_tristatebutton_get_type())
36
typedef struct _GtkDarktableTriStateButton
39
DTGTKCairoPaintIconFunc icon;
42
} GtkDarktableTriStateButton;
44
typedef struct _GtkDarktableTriStateButtonClass
46
GtkButtonClass parent_class;
47
void (* state_changed) (GtkDarktableTriStateButton *ts,int state);
48
} GtkDarktableTriStateButtonClass;
50
GType dtgtk_tristatebutton_get_type (void);
52
/** Instansiate a new darktable slider control passing adjustment as range */
53
GtkWidget* dtgtk_tristatebutton_new (DTGTKCairoPaintIconFunc paint, gint paintflag);
54
GtkWidget* dtgtk_tristatebutton_new_with_label (const gchar *label,DTGTKCairoPaintIconFunc paint, gint paintflag);
55
/** get the current state of the tristate button */
56
gint dtgtk_tristatebutton_get_state(const GtkDarktableTriStateButton * );
57
/** set the current state of the tristate button */
58
void dtgtk_tristatebutton_set_state(GtkDarktableTriStateButton *,gint state);