2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GTKMM_COLORSELECTION_H
4
#define _GTKMM_COLORSELECTION_H
10
/* Copyright (C) 1998-2002 The gtkmm Development Team
12
* This library is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU Library General Public
14
* License as published by the Free Software Foundation; either
15
* version 2 of the License, or (at your option) any later version.
17
* This library is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* Library General Public License for more details.
22
* You should have received a copy of the GNU Library General Public
23
* License along with this library; if not, write to the Free
24
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28
#include <gtkmm/box.h>
29
#include <gtkmm/dialog.h>
30
#include <gtkmm/button.h>
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
34
typedef struct _GtkColorSelection GtkColorSelection;
35
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
36
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
{ class ColorSelection_Class; } // namespace Gtk
41
#ifndef DOXYGEN_SHOULD_SKIP_THIS
42
typedef struct _GtkColorSelectionDialog GtkColorSelectionDialog;
43
typedef struct _GtkColorSelectionDialogClass GtkColorSelectionDialogClass;
44
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
48
{ class ColorSelectionDialog_Class; } // namespace Gtk
52
/** A widget used to select a color.
54
* This widget is used to select a color. It
55
* consists of a color wheel and number of sliders and entry boxes for color
56
* parameters such as hue, saturation, value, red, green, blue, and opacity.
58
* It is found on the standard color selection dialog box
59
* Gtk::ColorSelectionDialog.
64
class ColorSelection : public VBox
67
#ifndef DOXYGEN_SHOULD_SKIP_THIS
68
typedef ColorSelection CppObjectType;
69
typedef ColorSelection_Class CppClassType;
70
typedef GtkColorSelection BaseObjectType;
71
typedef GtkColorSelectionClass BaseClassType;
72
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
74
virtual ~ColorSelection();
76
#ifndef DOXYGEN_SHOULD_SKIP_THIS
79
friend class ColorSelection_Class;
80
static CppClassType colorselection_class_;
83
ColorSelection(const ColorSelection&);
84
ColorSelection& operator=(const ColorSelection&);
87
explicit ColorSelection(const Glib::ConstructParams& construct_params);
88
explicit ColorSelection(GtkColorSelection* castitem);
90
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
93
#ifndef DOXYGEN_SHOULD_SKIP_THIS
94
static GType get_type() G_GNUC_CONST;
95
static GType get_base_type() G_GNUC_CONST;
98
///Provides access to the underlying C GtkObject.
99
GtkColorSelection* gobj() { return reinterpret_cast<GtkColorSelection*>(gobject_); }
101
///Provides access to the underlying C GtkObject.
102
const GtkColorSelection* gobj() const { return reinterpret_cast<GtkColorSelection*>(gobject_); }
106
//C++ methods used to invoke GTK+ virtual functions:
109
//GTK+ Virtual Functions (override these to change behaviour):
111
//Default Signal Handlers::
112
virtual void on_color_changed();
122
/** Determines whether the colorsel has an opacity control.
123
* @return <tt>true</tt> if the @a colorsel has an opacity control. <tt>false</tt> if it does't.
125
bool get_has_opacity_control() const;
127
/** Sets the @a colorsel to use or not use opacity.
128
* @param has_opacity <tt>true</tt> if @a colorsel can set the opacity, <tt>false</tt> otherwise.
130
void set_has_opacity_control(bool has_opacity = true);
132
/** Determines whether the color selector has a color palette.
133
* @return <tt>true</tt> if the selector has a palette. <tt>false</tt> if it hasn't.
135
bool get_has_palette() const;
137
/** Shows and hides the palette based upon the value of @a has_palette .
138
* @param has_palette <tt>true</tt> if palette is to be visible, <tt>false</tt> otherwise.
140
void set_has_palette(bool has_palette = true);
142
/** Sets the current color to be @a color . The first time this is called, it will
143
* also set the original color to be @a color too.
144
* @param color A Gdk::Color to set the current color with.
146
void set_current_color(const Gdk::Color& color);
148
/** Sets the current opacity to be @a alpha . The first time this is called, it will
149
* also set the original opacity to be @a alpha too.
150
* @param alpha An integer between 0 and 65535.
152
void set_current_alpha(guint16 alpha);
153
Gdk::Color get_current_color() const;
155
/** Returns the current alpha value.
156
* @return An integer between 0 and 65535.
158
guint16 get_current_alpha() const;
160
/** Sets the 'previous' color to be @a color . This function should be called with
161
* some hesitations, as it might seem confusing to have that color change.
162
* Calling set_current_color() will also set this color the first
164
* @param color A Gdk::Color to set the previous color with.
166
void set_previous_color(const Gdk::Color& color);
168
/** Sets the 'previous' alpha to be @a alpha . This function should be called with
169
* some hesitations, as it might seem confusing to have that alpha change.
170
* @param alpha An integer between 0 and 65535.
172
void set_previous_alpha(guint16 alpha);
173
Gdk::Color get_previous_color() const;
175
/** Returns the previous alpha value.
176
* @return An integer between 0 and 65535.
178
guint16 get_previous_alpha() const;
181
/** Gets the current state of the @a colorsel .
182
* @return <tt>true</tt> if the user is currently dragging a color around, and <tt>false</tt>
183
* if the selection has stopped.
185
bool is_adjusting() const;
187
static Gdk::ArrayHandle_Color palette_from_string(const Glib::ustring& str);
188
static Glib::ustring palette_to_string(const Gdk::ArrayHandle_Color& colors);
190
typedef sigc::slot<void, const Glib::RefPtr<Gdk::Screen>&,
191
const Gdk::ArrayHandle_Color&> SlotChangePaletteHook;
193
static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot);
196
Glib::SignalProxy0< void > signal_color_changed();
199
/** Whether a palette should be used.
201
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
202
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
203
* the value of the property changes.
205
Glib::PropertyProxy<bool> property_has_palette() ;
207
/** Whether a palette should be used.
209
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
210
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
211
* the value of the property changes.
213
Glib::PropertyProxy_ReadOnly<bool> property_has_palette() const;
215
/** Whether the color selector should allow setting opacity.
217
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
218
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
219
* the value of the property changes.
221
Glib::PropertyProxy<bool> property_has_opacity_control() ;
223
/** Whether the color selector should allow setting opacity.
225
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
226
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
227
* the value of the property changes.
229
Glib::PropertyProxy_ReadOnly<bool> property_has_opacity_control() const;
231
/** The current color.
233
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
234
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
235
* the value of the property changes.
237
Glib::PropertyProxy<Gdk::Color> property_current_color() ;
239
/** The current color.
241
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
242
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
243
* the value of the property changes.
245
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_current_color() const;
247
/** The current opacity value (0 fully transparent, 65535 fully opaque).
249
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
250
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
251
* the value of the property changes.
253
Glib::PropertyProxy<guint> property_current_alpha() ;
255
/** The current opacity value (0 fully transparent, 65535 fully opaque).
257
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
258
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
259
* the value of the property changes.
261
Glib::PropertyProxy_ReadOnly<guint> property_current_alpha() const;
266
/** This dialog allows the user to select a color.
270
class ColorSelectionDialog : public Dialog
273
#ifndef DOXYGEN_SHOULD_SKIP_THIS
274
typedef ColorSelectionDialog CppObjectType;
275
typedef ColorSelectionDialog_Class CppClassType;
276
typedef GtkColorSelectionDialog BaseObjectType;
277
typedef GtkColorSelectionDialogClass BaseClassType;
278
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
280
virtual ~ColorSelectionDialog();
282
#ifndef DOXYGEN_SHOULD_SKIP_THIS
285
friend class ColorSelectionDialog_Class;
286
static CppClassType colorselectiondialog_class_;
289
ColorSelectionDialog(const ColorSelectionDialog&);
290
ColorSelectionDialog& operator=(const ColorSelectionDialog&);
293
explicit ColorSelectionDialog(const Glib::ConstructParams& construct_params);
294
explicit ColorSelectionDialog(GtkColorSelectionDialog* castitem);
296
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
299
#ifndef DOXYGEN_SHOULD_SKIP_THIS
300
static GType get_type() G_GNUC_CONST;
301
static GType get_base_type() G_GNUC_CONST;
304
///Provides access to the underlying C GtkObject.
305
GtkColorSelectionDialog* gobj() { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
307
///Provides access to the underlying C GtkObject.
308
const GtkColorSelectionDialog* gobj() const { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
312
//C++ methods used to invoke GTK+ virtual functions:
315
//GTK+ Virtual Functions (override these to change behaviour):
317
//Default Signal Handlers::
325
ColorSelectionDialog();
326
explicit ColorSelectionDialog(const Glib::ustring& title);
328
ColorSelection* get_colorsel();
329
const ColorSelection* get_colorsel() const;
330
Button* get_ok_button();
331
const Button* get_ok_button() const;
332
Button* get_cancel_button();
333
const Button* get_cancel_button() const;
334
Button* get_help_button();
335
const Button* get_help_button() const;
345
/** @relates Gtk::ColorSelection
346
* @param object The C instance
347
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
348
* @result A C++ instance that wraps this C instance.
350
Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy = false);
354
/** @relates Gtk::ColorSelectionDialog
355
* @param object The C instance
356
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
357
* @result A C++ instance that wraps this C instance.
359
Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy = false);
361
#endif /* _GTKMM_COLORSELECTION_H */