Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

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 #include <glibmm.h>
00007 
00008 // -*- C++ -*- // this is for the .hg, I realize gensig puts one in
00009 /* $Id: color-picker.hg,v 1.11 2003/11/29 16:39:08 murrayc Exp $ */
00010 
00011 /* color-picker.h
00012  * 
00013  * Copyright (C) 1998 EMC Capital Management Inc.
00014  * Developed by Havoc Pennington <hp@pobox.com>
00015  *
00016  * Copyright (C) 1999 The Gtk-- Development Team
00017  *
00018  * This library is free software; you can redistribute it and/or
00019  * modify it under the terms of the GNU Library General Public
00020  * License as published by the Free Software Foundation; either
00021  * version 2 of the License, or (at your option) any later version.
00022  *
00023  * This library is distributed in the hope that it will be useful,
00024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00026  * Library General Public License for more details.
00027  *
00028  * You should have received a copy of the GNU Library General Public
00029  * License along with this library; if not, write to the Free
00030  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00031  */
00032 
00033 #include <gtkmm/button.h>
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GnomeColorPicker GnomeColorPicker;
00038 typedef struct _GnomeColorPickerClass GnomeColorPickerClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gnome
00043 {
00044 
00045 namespace UI
00046 { class ColorPicker_Class; } // namespace UI
00047 
00048 } // namespace Gnome
00049 namespace Gnome
00050 {
00051 
00052 namespace UI
00053 {
00054 
00055 #ifndef GNOMEMM_DISABLE_DEPRECATED
00056 
00057 /* Button used to Select Colors
00058  * This widget provides color selection facilities to your
00059  * application. The widget appears as a button which contains a
00060  * "color swatch" of the currently selected color. When the button
00061  * is pressed, the widget presents the user with a color selection
00062  * dialog where the color can be selected.
00063  *
00064  * You can select the color to be displayed in a number of ways:
00065  * floating point values for the red, green and blue channels,
00066  * integers in the range 0 to 65,535, or integers in the range 0 to
00067  * 255, depending on your needs.
00068  */
00069 
00070 class ColorPicker : public Gtk::Button
00071 {
00072    public:
00073 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00074   typedef ColorPicker CppObjectType;
00075   typedef ColorPicker_Class CppClassType;
00076   typedef GnomeColorPicker BaseObjectType;
00077   typedef GnomeColorPickerClass BaseClassType;
00078 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00079 
00080   virtual ~ColorPicker();
00081 
00082 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00083 
00084 private:
00085   friend class ColorPicker_Class;
00086   static CppClassType colorpicker_class_;
00087 
00088   // noncopyable
00089   ColorPicker(const ColorPicker&);
00090   ColorPicker& operator=(const ColorPicker&);
00091 
00092 protected:
00093   explicit ColorPicker(const Glib::ConstructParams& construct_params);
00094   explicit ColorPicker(GnomeColorPicker* castitem);
00095 
00096 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00097 
00098 public:
00099 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00100   static GType get_type()      G_GNUC_CONST;
00101   static GType get_base_type() G_GNUC_CONST;
00102 #endif
00103 
00105   GnomeColorPicker*       gobj()       { return reinterpret_cast<GnomeColorPicker*>(gobject_); }
00106 
00108   const GnomeColorPicker* gobj() const { return reinterpret_cast<GnomeColorPicker*>(gobject_); }
00109 
00110 
00111 public:
00112   //C++ methods used to invoke GTK+ virtual functions:
00113 
00114 protected:
00115   //GTK+ Virtual Functions (override these to change behaviour):
00116 
00117   //Default Signal Handlers::
00118   virtual void on_color_set(guint r, guint g, guint b, guint a);
00119 
00120 
00121 private:
00122 
00123 public:
00124   ColorPicker();
00125 
00126   
00127   void set(double r, double g, double b, double a);
00128 
00129   
00130   void set(guint8 r, guint8 g, guint8 b, guint8 a);
00131 
00132   
00133   void set(gushort r, gushort g, gushort b, gushort a);
00134 
00135   
00136   void get(double& r, double& g, double& b, double& a) const;
00137   
00138   void get(guint8& r, guint8& g, guint8& b, guint8& a) const;
00139   
00140   void get(gushort& r, gushort& g, gushort& b, gushort& a) const;
00141 
00142   
00143   void set_dither(bool dither = true);
00144   
00145   bool get_dither() const;
00146 
00147   
00148   void set_use_alpha(bool use_alpha = true);
00149   
00150   bool get_use_alpha() const;
00151 
00152   
00153   void set_title(const Glib::ustring& title);
00154   
00155   Glib::ustring get_title() const;
00156 
00157   
00158   Glib::SignalProxy4< void,guint,guint,guint,guint > signal_color_set();
00159 
00160 
00167   Glib::PropertyProxy<bool> property_dither() ;
00168 
00175   Glib::PropertyProxy_ReadOnly<bool> property_dither() const;
00176 
00183   Glib::PropertyProxy<bool> property_use_alpha() ;
00184 
00191   Glib::PropertyProxy_ReadOnly<bool> property_use_alpha() const;
00192 
00199   Glib::PropertyProxy<Glib::ustring> property_title() ;
00200 
00207   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
00208 
00215   Glib::PropertyProxy<guint> property_red() ;
00216 
00223   Glib::PropertyProxy_ReadOnly<guint> property_red() const;
00224 
00231   Glib::PropertyProxy<guint> property_green() ;
00232 
00239   Glib::PropertyProxy_ReadOnly<guint> property_green() const;
00240 
00247   Glib::PropertyProxy<guint> property_blue() ;
00248 
00255   Glib::PropertyProxy_ReadOnly<guint> property_blue() const;
00256 
00263   Glib::PropertyProxy<guint> property_alpha() ;
00264 
00271   Glib::PropertyProxy_ReadOnly<guint> property_alpha() const;
00272 
00273 
00274 };
00275 
00276 #endif //GNOMEMM_DISABLE_DEPRECATED
00277 
00278 } /* namespace UI */
00279 } /* namespace Gnome */
00280 
00281 namespace Glib
00282 {
00288   Gnome::UI::ColorPicker* wrap(GnomeColorPicker* object, bool take_copy = false);
00289 }
00290 #endif /* _LIBGNOMEUIMM_COLOR_PICKER_H */
00291 

Generated on Sun Sep 11 03:28:38 2005 for libgnomeuimm by  doxygen 1.4.4