~ubuntu-branches/ubuntu/vivid/ardour/vivid-proposed

« back to all changes in this revision

Viewing changes to libs/gtkmm2/gtk/gtkmm/colorselection.h

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler, Jaromír Mikeš, Felipe Sateler
  • Date: 2014-05-22 14:39:25 UTC
  • mfrom: (29 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: package-import@ubuntu.com-20140522143925-vwqfo9287pmkrroe
Tags: 1:2.8.16+git20131003-3
* Team upload

[ Jaromír Mikeš ]
* Add -dbg package

[ Felipe Sateler ]
* Upload to experimental

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_COLORSELECTION_H
 
4
#define _GTKMM_COLORSELECTION_H
 
5
 
 
6
#include <glibmm.h>
 
7
 
 
8
/* $Id$ */
 
9
 
 
10
/* Copyright (C) 1998-2002 The gtkmm Development Team
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 *
 
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.
 
25
 */
 
26
 
 
27
 
 
28
#include <gtkmm/box.h>
 
29
#include <gtkmm/dialog.h>
 
30
#include <gtkmm/button.h>
 
31
 
 
32
 
 
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
34
typedef struct _GtkColorSelection GtkColorSelection;
 
35
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
 
36
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
37
 
 
38
 
 
39
namespace Gtk
 
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 */
 
45
 
 
46
 
 
47
namespace Gtk
 
48
{ class ColorSelectionDialog_Class; } // namespace Gtk
 
49
namespace Gtk
 
50
{
 
51
 
 
52
/** A widget used to select a color.
 
53
 *
 
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.
 
57
 *
 
58
 * It is found on the standard color selection dialog box
 
59
 * Gtk::ColorSelectionDialog. 
 
60
 *
 
61
 * @ingroup Widgets
 
62
 */
 
63
 
 
64
class ColorSelection : public VBox
 
65
{
 
66
  public:
 
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 */
 
73
 
 
74
  virtual ~ColorSelection();
 
75
 
 
76
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
77
 
 
78
private:
 
79
  friend class ColorSelection_Class;
 
80
  static CppClassType colorselection_class_;
 
81
 
 
82
  // noncopyable
 
83
  ColorSelection(const ColorSelection&);
 
84
  ColorSelection& operator=(const ColorSelection&);
 
85
 
 
86
protected:
 
87
  explicit ColorSelection(const Glib::ConstructParams& construct_params);
 
88
  explicit ColorSelection(GtkColorSelection* castitem);
 
89
 
 
90
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
91
 
 
92
public:
 
93
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
94
  static GType get_type()      G_GNUC_CONST;
 
95
  static GType get_base_type() G_GNUC_CONST;
 
96
#endif
 
97
 
 
98
  ///Provides access to the underlying C GtkObject.
 
99
  GtkColorSelection*       gobj()       { return reinterpret_cast<GtkColorSelection*>(gobject_); }
 
100
 
 
101
  ///Provides access to the underlying C GtkObject.
 
102
  const GtkColorSelection* gobj() const { return reinterpret_cast<GtkColorSelection*>(gobject_); }
 
103
 
 
104
 
 
105
public:
 
106
  //C++ methods used to invoke GTK+ virtual functions:
 
107
 
 
108
protected:
 
109
  //GTK+ Virtual Functions (override these to change behaviour):
 
110
 
 
111
  //Default Signal Handlers::
 
112
  virtual void on_color_changed();
 
113
 
 
114
 
 
115
private:
 
116
 
 
117
  
 
118
public:
 
119
  ColorSelection();
 
120
 
 
121
  
 
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.
 
124
   */
 
125
  bool get_has_opacity_control() const;
 
126
  
 
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.
 
129
   */
 
130
  void set_has_opacity_control(bool has_opacity = true);
 
131
  
 
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.
 
134
   */
 
135
  bool get_has_palette() const;
 
136
  
 
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.
 
139
   */
 
140
  void set_has_palette(bool has_palette = true);
 
141
  
 
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.
 
145
   */
 
146
  void set_current_color(const Gdk::Color& color);
 
147
  
 
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.
 
151
   */
 
152
  void set_current_alpha(guint16 alpha);
 
153
  Gdk::Color get_current_color() const;
 
154
  
 
155
  /** Returns the current alpha value.
 
156
   * @return An integer between 0 and 65535.
 
157
   */
 
158
  guint16 get_current_alpha() const;
 
159
  
 
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
 
163
   * time it is called.
 
164
   * @param color A Gdk::Color to set the previous color with.
 
165
   */
 
166
  void set_previous_color(const Gdk::Color& color);
 
167
  
 
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.
 
171
   */
 
172
  void set_previous_alpha(guint16 alpha);
 
173
  Gdk::Color get_previous_color() const;
 
174
  
 
175
  /** Returns the previous alpha value.
 
176
   * @return An integer between 0 and 65535.
 
177
   */
 
178
  guint16 get_previous_alpha() const;
 
179
 
 
180
  
 
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.
 
184
   */
 
185
  bool is_adjusting() const;
 
186
 
 
187
  static Gdk::ArrayHandle_Color palette_from_string(const Glib::ustring& str);
 
188
  static Glib::ustring palette_to_string(const Gdk::ArrayHandle_Color& colors);
 
189
 
 
190
  typedef sigc::slot<void, const Glib::RefPtr<Gdk::Screen>&,
 
191
                            const Gdk::ArrayHandle_Color&> SlotChangePaletteHook;
 
192
 
 
193
  static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot);
 
194
 
 
195
  
 
196
  Glib::SignalProxy0< void > signal_color_changed();
 
197
 
 
198
 
 
199
  /** Whether a palette should be used.
 
200
   *
 
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.
 
204
   */
 
205
  Glib::PropertyProxy<bool> property_has_palette() ;
 
206
 
 
207
/** Whether a palette should be used.
 
208
   *
 
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.
 
212
   */
 
213
  Glib::PropertyProxy_ReadOnly<bool> property_has_palette() const;
 
214
 
 
215
  /** Whether the color selector should allow setting opacity.
 
216
   *
 
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.
 
220
   */
 
221
  Glib::PropertyProxy<bool> property_has_opacity_control() ;
 
222
 
 
223
/** Whether the color selector should allow setting opacity.
 
224
   *
 
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.
 
228
   */
 
229
  Glib::PropertyProxy_ReadOnly<bool> property_has_opacity_control() const;
 
230
 
 
231
  /** The current color.
 
232
   *
 
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.
 
236
   */
 
237
  Glib::PropertyProxy<Gdk::Color> property_current_color() ;
 
238
 
 
239
/** The current color.
 
240
   *
 
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.
 
244
   */
 
245
  Glib::PropertyProxy_ReadOnly<Gdk::Color> property_current_color() const;
 
246
 
 
247
  /** The current opacity value (0 fully transparent, 65535 fully opaque).
 
248
   *
 
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.
 
252
   */
 
253
  Glib::PropertyProxy<guint> property_current_alpha() ;
 
254
 
 
255
/** The current opacity value (0 fully transparent, 65535 fully opaque).
 
256
   *
 
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.
 
260
   */
 
261
  Glib::PropertyProxy_ReadOnly<guint> property_current_alpha() const;
 
262
 
 
263
 
 
264
};
 
265
 
 
266
/** This dialog allows the user to select a color.
 
267
 * @ingroup Dialogs
 
268
 */
 
269
 
 
270
class ColorSelectionDialog : public Dialog
 
271
{
 
272
  public:
 
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 */
 
279
 
 
280
  virtual ~ColorSelectionDialog();
 
281
 
 
282
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
283
 
 
284
private:
 
285
  friend class ColorSelectionDialog_Class;
 
286
  static CppClassType colorselectiondialog_class_;
 
287
 
 
288
  // noncopyable
 
289
  ColorSelectionDialog(const ColorSelectionDialog&);
 
290
  ColorSelectionDialog& operator=(const ColorSelectionDialog&);
 
291
 
 
292
protected:
 
293
  explicit ColorSelectionDialog(const Glib::ConstructParams& construct_params);
 
294
  explicit ColorSelectionDialog(GtkColorSelectionDialog* castitem);
 
295
 
 
296
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
297
 
 
298
public:
 
299
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
300
  static GType get_type()      G_GNUC_CONST;
 
301
  static GType get_base_type() G_GNUC_CONST;
 
302
#endif
 
303
 
 
304
  ///Provides access to the underlying C GtkObject.
 
305
  GtkColorSelectionDialog*       gobj()       { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
 
306
 
 
307
  ///Provides access to the underlying C GtkObject.
 
308
  const GtkColorSelectionDialog* gobj() const { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
 
309
 
 
310
 
 
311
public:
 
312
  //C++ methods used to invoke GTK+ virtual functions:
 
313
 
 
314
protected:
 
315
  //GTK+ Virtual Functions (override these to change behaviour):
 
316
 
 
317
  //Default Signal Handlers::
 
318
 
 
319
 
 
320
private:
 
321
 
 
322
  
 
323
public:
 
324
 
 
325
  ColorSelectionDialog();
 
326
  explicit ColorSelectionDialog(const Glib::ustring& title);
 
327
 
 
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;
 
336
 
 
337
 
 
338
};
 
339
 
 
340
} // namespace Gtk
 
341
 
 
342
 
 
343
namespace Glib
 
344
{
 
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.
 
349
   */
 
350
  Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy = false);
 
351
}
 
352
namespace Glib
 
353
{
 
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.
 
358
   */
 
359
  Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy = false);
 
360
}
 
361
#endif /* _GTKMM_COLORSELECTION_H */
 
362