2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GTKMM_COLORSELECTION_H
4
#define _GTKMM_COLORSELECTION_H
9
/* $Id: colorselection.hg,v 1.2 2004/02/10 14:50:11 murrayc Exp $ */
11
/* Copyright (C) 1998-2002 The gtkmm Development Team
13
* This library is free software; you can redistribute it and/or
14
* modify it under the terms of the GNU Lesser General Public
15
* License as published by the Free Software Foundation; either
16
* version 2.1 of the License, or (at your option) any later version.
18
* This library is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
* Lesser General Public License for more details.
23
* You should have received a copy of the GNU Lesser General Public
24
* License along with this library; if not, write to the Free
25
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
#include <gtkmm/box.h>
30
#include <gtkmm/dialog.h>
31
#include <gtkmm/button.h>
34
#ifndef DOXYGEN_SHOULD_SKIP_THIS
35
typedef struct _GtkColorSelection GtkColorSelection;
36
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
37
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
{ class ColorSelection_Class; } // namespace Gtk
42
#ifndef DOXYGEN_SHOULD_SKIP_THIS
43
typedef struct _GtkColorSelectionDialog GtkColorSelectionDialog;
44
typedef struct _GtkColorSelectionDialogClass GtkColorSelectionDialogClass;
45
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
49
{ class ColorSelectionDialog_Class; } // namespace Gtk
53
/** A widget used to select a color.
55
* This widget is used to select a color. It
56
* consists of a color wheel and number of sliders and entry boxes for color
57
* parameters such as hue, saturation, value, red, green, blue, and opacity.
59
* It is found on the standard color selection dialog box
60
* Gtk::ColorSelectionDialog.
65
class ColorSelection : public VBox
68
#ifndef DOXYGEN_SHOULD_SKIP_THIS
69
typedef ColorSelection CppObjectType;
70
typedef ColorSelection_Class CppClassType;
71
typedef GtkColorSelection BaseObjectType;
72
typedef GtkColorSelectionClass BaseClassType;
73
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
75
virtual ~ColorSelection();
77
#ifndef DOXYGEN_SHOULD_SKIP_THIS
80
friend class ColorSelection_Class;
81
static CppClassType colorselection_class_;
84
ColorSelection(const ColorSelection&);
85
ColorSelection& operator=(const ColorSelection&);
88
explicit ColorSelection(const Glib::ConstructParams& construct_params);
89
explicit ColorSelection(GtkColorSelection* castitem);
91
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
94
#ifndef DOXYGEN_SHOULD_SKIP_THIS
95
static GType get_type() G_GNUC_CONST;
98
static GType get_base_type() G_GNUC_CONST;
101
///Provides access to the underlying C GtkObject.
102
GtkColorSelection* gobj() { return reinterpret_cast<GtkColorSelection*>(gobject_); }
104
///Provides access to the underlying C GtkObject.
105
const GtkColorSelection* gobj() const { return reinterpret_cast<GtkColorSelection*>(gobject_); }
109
//C++ methods used to invoke GTK+ virtual functions:
112
//GTK+ Virtual Functions (override these to change behaviour):
114
//Default Signal Handlers::
115
virtual void on_color_changed();
125
/** Determines whether the colorsel has an opacity control.
126
* @return <tt>true</tt> if the @a colorsel has an opacity control. <tt>false</tt> if it does't.
128
bool get_has_opacity_control() const;
130
/** Sets the @a colorsel to use or not use opacity.
131
* @param has_opacity <tt>true</tt> if @a colorsel can set the opacity, <tt>false</tt> otherwise.
133
void set_has_opacity_control(bool has_opacity = true);
135
/** Determines whether the color selector has a color palette.
136
* @return <tt>true</tt> if the selector has a palette. <tt>false</tt> if it hasn't.
138
bool get_has_palette() const;
140
/** Shows and hides the palette based upon the value of @a has_palette.
141
* @param has_palette <tt>true</tt> if palette is to be visible, <tt>false</tt> otherwise.
143
void set_has_palette(bool has_palette = true);
145
/** Sets the current color to be @a color. The first time this is called, it will
146
* also set the original color to be @a color too.
147
* @param color A Gdk::Color to set the current color with.
149
void set_current_color(const Gdk::Color& color);
151
/** Sets the current opacity to be @a alpha. The first time this is called, it will
152
* also set the original opacity to be @a alpha too.
153
* @param alpha An integer between 0 and 65535.
155
void set_current_alpha(guint16 alpha);
156
Gdk::Color get_current_color() const;
158
/** Returns the current alpha value.
159
* @return An integer between 0 and 65535.
161
guint16 get_current_alpha() const;
163
/** Sets the 'previous' color to be @a color. This function should be called with
164
* some hesitations, as it might seem confusing to have that color change.
165
* Calling set_current_color() will also set this color the first
167
* @param color A Gdk::Color to set the previous color with.
169
void set_previous_color(const Gdk::Color& color);
171
/** Sets the 'previous' alpha to be @a alpha. This function should be called with
172
* some hesitations, as it might seem confusing to have that alpha change.
173
* @param alpha An integer between 0 and 65535.
175
void set_previous_alpha(guint16 alpha);
176
Gdk::Color get_previous_color() const;
178
/** Returns the previous alpha value.
179
* @return An integer between 0 and 65535.
181
guint16 get_previous_alpha() const;
184
/** Gets the current state of the @a colorsel.
185
* @return <tt>true</tt> if the user is currently dragging a color around, and <tt>false</tt>
186
* if the selection has stopped.
188
bool is_adjusting() const;
190
static Gdk::ArrayHandle_Color palette_from_string(const Glib::ustring& str);
191
static Glib::ustring palette_to_string(const Gdk::ArrayHandle_Color& colors);
193
typedef sigc::slot<void, const Glib::RefPtr<Gdk::Screen>&,
194
const Gdk::ArrayHandle_Color&> SlotChangePaletteHook;
196
static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot);
201
* <tt>void on_my_%color_changed()</tt>
204
Glib::SignalProxy0< void > signal_color_changed();
207
#ifdef GLIBMM_PROPERTIES_ENABLED
208
/** Whether a palette should be used.
210
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
211
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
212
* the value of the property changes.
214
Glib::PropertyProxy<bool> property_has_palette() ;
215
#endif //#GLIBMM_PROPERTIES_ENABLED
217
#ifdef GLIBMM_PROPERTIES_ENABLED
218
/** Whether a palette should be used.
220
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
221
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
222
* the value of the property changes.
224
Glib::PropertyProxy_ReadOnly<bool> property_has_palette() const;
225
#endif //#GLIBMM_PROPERTIES_ENABLED
227
#ifdef GLIBMM_PROPERTIES_ENABLED
228
/** Whether the color selector should allow setting opacity.
230
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
231
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
232
* the value of the property changes.
234
Glib::PropertyProxy<bool> property_has_opacity_control() ;
235
#endif //#GLIBMM_PROPERTIES_ENABLED
237
#ifdef GLIBMM_PROPERTIES_ENABLED
238
/** Whether the color selector should allow setting opacity.
240
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
241
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
242
* the value of the property changes.
244
Glib::PropertyProxy_ReadOnly<bool> property_has_opacity_control() const;
245
#endif //#GLIBMM_PROPERTIES_ENABLED
247
#ifdef GLIBMM_PROPERTIES_ENABLED
248
/** The current color.
250
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
251
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
252
* the value of the property changes.
254
Glib::PropertyProxy<Gdk::Color> property_current_color() ;
255
#endif //#GLIBMM_PROPERTIES_ENABLED
257
#ifdef GLIBMM_PROPERTIES_ENABLED
258
/** The current color.
260
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
261
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
262
* the value of the property changes.
264
Glib::PropertyProxy_ReadOnly<Gdk::Color> property_current_color() const;
265
#endif //#GLIBMM_PROPERTIES_ENABLED
267
#ifdef GLIBMM_PROPERTIES_ENABLED
268
/** The current opacity value (0 fully transparent, 65535 fully opaque).
270
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
271
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
272
* the value of the property changes.
274
Glib::PropertyProxy<guint> property_current_alpha() ;
275
#endif //#GLIBMM_PROPERTIES_ENABLED
277
#ifdef GLIBMM_PROPERTIES_ENABLED
278
/** The current opacity value (0 fully transparent, 65535 fully opaque).
280
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
281
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
282
* the value of the property changes.
284
Glib::PropertyProxy_ReadOnly<guint> property_current_alpha() const;
285
#endif //#GLIBMM_PROPERTIES_ENABLED
290
/** This dialog allows the user to select a color.
292
* A ColorSelectionDialog looks like this:
293
* @image html colorselectiondialog1.png
298
class ColorSelectionDialog : public Dialog
301
#ifndef DOXYGEN_SHOULD_SKIP_THIS
302
typedef ColorSelectionDialog CppObjectType;
303
typedef ColorSelectionDialog_Class CppClassType;
304
typedef GtkColorSelectionDialog BaseObjectType;
305
typedef GtkColorSelectionDialogClass BaseClassType;
306
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
308
virtual ~ColorSelectionDialog();
310
#ifndef DOXYGEN_SHOULD_SKIP_THIS
313
friend class ColorSelectionDialog_Class;
314
static CppClassType colorselectiondialog_class_;
317
ColorSelectionDialog(const ColorSelectionDialog&);
318
ColorSelectionDialog& operator=(const ColorSelectionDialog&);
321
explicit ColorSelectionDialog(const Glib::ConstructParams& construct_params);
322
explicit ColorSelectionDialog(GtkColorSelectionDialog* castitem);
324
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
327
#ifndef DOXYGEN_SHOULD_SKIP_THIS
328
static GType get_type() G_GNUC_CONST;
331
static GType get_base_type() G_GNUC_CONST;
334
///Provides access to the underlying C GtkObject.
335
GtkColorSelectionDialog* gobj() { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
337
///Provides access to the underlying C GtkObject.
338
const GtkColorSelectionDialog* gobj() const { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
342
//C++ methods used to invoke GTK+ virtual functions:
345
//GTK+ Virtual Functions (override these to change behaviour):
347
//Default Signal Handlers::
355
ColorSelectionDialog();
356
explicit ColorSelectionDialog(const Glib::ustring& title);
359
/** Retrieves the Gtk::ColorSelection widget embedded in the dialog.
362
* @return The embedded Gtk::ColorSelection.
364
ColorSelection* get_color_selection();
366
/** Retrieves the Gtk::ColorSelection widget embedded in the dialog.
369
* @return The embedded Gtk::ColorSelection.
371
const ColorSelection* get_color_selection() const;
373
#ifndef GTKMM_DISABLE_DEPRECATED
375
//TODO: Remove these in gtkmm 3. They use G_SEAL()ed struct fields.
377
/** @deprecated Use get_color_selection() instead.
379
ColorSelection* get_colorsel();
381
/** @deprecated Use get_color_selection() instead.
383
const ColorSelection* get_colorsel() const;
385
/** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
387
Button* get_ok_button();
388
const Button* get_ok_button() const;
390
/** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
392
Button* get_cancel_button();
393
const Button* get_cancel_button() const;
395
/** @deprecated Use Gtk::Dialog::get_widget_for_response() instead.
397
Button* get_help_button();
398
const Button* get_help_button() const;
399
#endif // GTKMM_DISABLE_DEPRECATED
402
#ifdef GLIBMM_PROPERTIES_ENABLED
403
/** The color selection embedded in the dialog.
405
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
406
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
407
* the value of the property changes.
409
Glib::PropertyProxy_ReadOnly<ColorSelection*> property_color_selection() const;
410
#endif //#GLIBMM_PROPERTIES_ENABLED
413
#ifdef GLIBMM_PROPERTIES_ENABLED
414
/** The OK button of the dialog.
416
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
417
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
418
* the value of the property changes.
420
Glib::PropertyProxy_ReadOnly<Button*> property_ok_button() const;
421
#endif //#GLIBMM_PROPERTIES_ENABLED
424
#ifdef GLIBMM_PROPERTIES_ENABLED
425
/** The cancel button of the dialog.
427
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
428
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
429
* the value of the property changes.
431
Glib::PropertyProxy_ReadOnly<Button*> property_cancel_button() const;
432
#endif //#GLIBMM_PROPERTIES_ENABLED
435
#ifdef GLIBMM_PROPERTIES_ENABLED
436
/** The help button of the dialog.
438
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
439
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
440
* the value of the property changes.
442
Glib::PropertyProxy_ReadOnly<Button*> property_help_button() const;
443
#endif //#GLIBMM_PROPERTIES_ENABLED
453
/** A Glib::wrap() method for this object.
455
* @param object The C instance.
456
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
457
* @result A C++ instance that wraps this C instance.
459
* @relates Gtk::ColorSelection
461
Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy = false);
467
/** A Glib::wrap() method for this object.
469
* @param object The C instance.
470
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
471
* @result A C++ instance that wraps this C instance.
473
* @relates Gtk::ColorSelectionDialog
475
Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy = false);
479
#endif /* _GTKMM_COLORSELECTION_H */