color-picker.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _LIBGNOMEUIMM_COLOR_PICKER_H
00004 #define _LIBGNOMEUIMM_COLOR_PICKER_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00010 /* $Id: color-picker.hg,v 1.11 2003/11/29 16:39:08 murrayc Exp $ */
00011 
00012 /* color-picker.h
00013  * 
00014  * Copyright (C) 1998 EMC Capital Management Inc.
00015  * Developed by Havoc Pennington <hp@pobox.com>
00016  *
00017  * Copyright (C) 1999 The Gtk-- Development Team
00018  *
00019  * This library is free software; you can redistribute it and/or
00020  * modify it under the terms of the GNU Library General Public
00021  * License as published by the Free Software Foundation; either
00022  * version 2 of the License, or (at your option) any later version.
00023  *
00024  * This library is distributed in the hope that it will be useful,
00025  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00026  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00027  * Library General Public License for more details.
00028  *
00029  * You should have received a copy of the GNU Library General Public
00030  * License along with this library; if not, write to the Free
00031  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00032  */
00033 
00034 #include <gtkmm/button.h>
00035 
00036 
00037 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00038 typedef struct _GnomeColorPicker GnomeColorPicker;
00039 typedef struct _GnomeColorPickerClass GnomeColorPickerClass;
00040 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00041 
00042 
00043 namespace Gnome
00044 {
00045 
00046 namespace UI
00047 { class ColorPicker_Class; } // namespace UI
00048 
00049 } // namespace Gnome
00050 namespace Gnome
00051 {
00052 
00053 namespace UI
00054 {
00055 
00056 #ifndef GNOMEMM_DISABLE_DEPRECATED
00057 
00058 /* Button used to Select Colors
00059  * This widget provides color selection facilities to your
00060  * application. The widget appears as a button which contains a
00061  * "color swatch" of the currently selected color. When the button
00062  * is pressed, the widget presents the user with a color selection
00063  * dialog where the color can be selected.
00064  *
00065  * You can select the color to be displayed in a number of ways:
00066  * floating point values for the red, green and blue channels,
00067  * integers in the range 0 to 65,535, or integers in the range 0 to
00068  * 255, depending on your needs.
00069  */
00070 
00071 class ColorPicker : public Gtk::Button
00072 {
00073    public:
00074 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00075   typedef ColorPicker CppObjectType;
00076   typedef ColorPicker_Class CppClassType;
00077   typedef GnomeColorPicker BaseObjectType;
00078   typedef GnomeColorPickerClass BaseClassType;
00079 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00080 
00081   virtual ~ColorPicker();
00082 
00083 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00084 
00085 private:
00086   friend class ColorPicker_Class;
00087   static CppClassType colorpicker_class_;
00088 
00089   // noncopyable
00090   ColorPicker(const ColorPicker&);
00091   ColorPicker& operator=(const ColorPicker&);
00092 
00093 protected:
00094   explicit ColorPicker(const Glib::ConstructParams& construct_params);
00095   explicit ColorPicker(GnomeColorPicker* castitem);
00096 
00097 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00098 
00099 public:
00100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00101   static GType get_type()      G_GNUC_CONST;
00102   static GType get_base_type() G_GNUC_CONST;
00103 #endif
00104 
00106   GnomeColorPicker*       gobj()       { return reinterpret_cast<GnomeColorPicker*>(gobject_); }
00107 
00109   const GnomeColorPicker* gobj() const { return reinterpret_cast<GnomeColorPicker*>(gobject_); }
00110 
00111 
00112 public:
00113   //C++ methods used to invoke GTK+ virtual functions:
00114 #ifdef GLIBMM_VFUNCS_ENABLED
00115 #endif //GLIBMM_VFUNCS_ENABLED
00116 
00117 protected:
00118   //GTK+ Virtual Functions (override these to change behaviour):
00119 #ifdef GLIBMM_VFUNCS_ENABLED
00120 #endif //GLIBMM_VFUNCS_ENABLED
00121 
00122   //Default Signal Handlers::
00123 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00124   virtual void on_color_set(guint r, guint g, guint b, guint a);
00125 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00126 
00127 
00128 private:
00129 
00130 public:
00131   ColorPicker();
00132 
00133   
00134   void set(double r, double g, double b, double a);
00135 
00136   
00137   void set(guint8 r, guint8 g, guint8 b, guint8 a);
00138 
00139   
00140   void set(gushort r, gushort g, gushort b, gushort a);
00141 
00142   
00143   void get(double& r, double& g, double& b, double& a) const;
00144   
00145   void get(guint8& r, guint8& g, guint8& b, guint8& a) const;
00146   
00147   void get(gushort& r, gushort& g, gushort& b, gushort& a) const;
00148 
00149   
00150   void set_dither(bool dither = true);
00151   
00152   bool get_dither() const;
00153 
00154   
00155   void set_use_alpha(bool use_alpha = true);
00156   
00157   bool get_use_alpha() const;
00158 
00159   
00160   void set_title(const Glib::ustring& title);
00161   
00162   Glib::ustring get_title() const;
00163 
00164   
00165   Glib::SignalProxy4< void,guint,guint,guint,guint > signal_color_set();
00166 
00167 
00168   #ifdef GLIBMM_PROPERTIES_ENABLED
00169 
00175   Glib::PropertyProxy<bool> property_dither() ;
00176 #endif //#GLIBMM_PROPERTIES_ENABLED
00177 
00178 #ifdef GLIBMM_PROPERTIES_ENABLED
00179 
00185   Glib::PropertyProxy_ReadOnly<bool> property_dither() const;
00186 #endif //#GLIBMM_PROPERTIES_ENABLED
00187 
00188   #ifdef GLIBMM_PROPERTIES_ENABLED
00189 
00195   Glib::PropertyProxy<bool> property_use_alpha() ;
00196 #endif //#GLIBMM_PROPERTIES_ENABLED
00197 
00198 #ifdef GLIBMM_PROPERTIES_ENABLED
00199 
00205   Glib::PropertyProxy_ReadOnly<bool> property_use_alpha() const;
00206 #endif //#GLIBMM_PROPERTIES_ENABLED
00207 
00208   #ifdef GLIBMM_PROPERTIES_ENABLED
00209 
00215   Glib::PropertyProxy<Glib::ustring> property_title() ;
00216 #endif //#GLIBMM_PROPERTIES_ENABLED
00217 
00218 #ifdef GLIBMM_PROPERTIES_ENABLED
00219 
00225   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00226 #endif //#GLIBMM_PROPERTIES_ENABLED
00227 
00228   #ifdef GLIBMM_PROPERTIES_ENABLED
00229 
00235   Glib::PropertyProxy<guint> property_red() ;
00236 #endif //#GLIBMM_PROPERTIES_ENABLED
00237 
00238 #ifdef GLIBMM_PROPERTIES_ENABLED
00239 
00245   Glib::PropertyProxy_ReadOnly<guint> property_red() const;
00246 #endif //#GLIBMM_PROPERTIES_ENABLED
00247 
00248   #ifdef GLIBMM_PROPERTIES_ENABLED
00249 
00255   Glib::PropertyProxy<guint> property_green() ;
00256 #endif //#GLIBMM_PROPERTIES_ENABLED
00257 
00258 #ifdef GLIBMM_PROPERTIES_ENABLED
00259 
00265   Glib::PropertyProxy_ReadOnly<guint> property_green() const;
00266 #endif //#GLIBMM_PROPERTIES_ENABLED
00267 
00268   #ifdef GLIBMM_PROPERTIES_ENABLED
00269 
00275   Glib::PropertyProxy<guint> property_blue() ;
00276 #endif //#GLIBMM_PROPERTIES_ENABLED
00277 
00278 #ifdef GLIBMM_PROPERTIES_ENABLED
00279 
00285   Glib::PropertyProxy_ReadOnly<guint> property_blue() const;
00286 #endif //#GLIBMM_PROPERTIES_ENABLED
00287 
00288   #ifdef GLIBMM_PROPERTIES_ENABLED
00289 
00295   Glib::PropertyProxy<guint> property_alpha() ;
00296 #endif //#GLIBMM_PROPERTIES_ENABLED
00297 
00298 #ifdef GLIBMM_PROPERTIES_ENABLED
00299 
00305   Glib::PropertyProxy_ReadOnly<guint> property_alpha() const;
00306 #endif //#GLIBMM_PROPERTIES_ENABLED
00307 
00308 
00309 };
00310 
00311 #endif //GNOMEMM_DISABLE_DEPRECATED
00312 
00313 } /* namespace UI */
00314 } /* namespace Gnome */
00315 
00316 
00317 namespace Glib
00318 {
00324   Gnome::UI::ColorPicker* wrap(GnomeColorPicker* object, bool take_copy = false);
00325 } //namespace Glib
00326 
00327 
00328 #endif /* _LIBGNOMEUIMM_COLOR_PICKER_H */
00329 

Generated on Tue Aug 22 15:03:42 2006 for libgnomeuimm by  doxygen 1.4.7