Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | 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.10 2002/09/16 12:18:30 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 /* Button used to Select Colors 00056 * This widget provides color selection facilities to your 00057 * application. The widget appears as a button which contains a 00058 * "color swatch" of the currently selected color. When the button 00059 * is pressed, the widget presents the user with a color selection 00060 * dialog where the color can be selected. 00061 * 00062 * You can select the color to be displayed in a number of ways: 00063 * floating point values for the red, green and blue channels, 00064 * integers in the range 0 to 65,535, or integers in the range 0 to 00065 * 255, depending on your needs. 00066 */ 00067 00068 class ColorPicker : public Gtk::Button 00069 { 00070 public: 00071 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00072 typedef ColorPicker CppObjectType; 00073 typedef ColorPicker_Class CppClassType; 00074 typedef GnomeColorPicker BaseObjectType; 00075 typedef GnomeColorPickerClass BaseClassType; 00076 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00077 00078 virtual ~ColorPicker(); 00079 00080 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00081 00082 private: 00083 friend class ColorPicker_Class; 00084 static CppClassType colorpicker_class_; 00085 00086 // noncopyable 00087 ColorPicker(const ColorPicker&); 00088 ColorPicker& operator=(const ColorPicker&); 00089 00090 protected: 00091 explicit ColorPicker(const Glib::ConstructParams& construct_params); 00092 explicit ColorPicker(GnomeColorPicker* castitem); 00093 00094 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 00095 00096 public: 00097 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00098 static GType get_type() G_GNUC_CONST; 00099 static GType get_base_type() G_GNUC_CONST; 00100 #endif 00101 00103 GnomeColorPicker* gobj() { return reinterpret_cast<GnomeColorPicker*>(gobject_); } 00104 00106 const GnomeColorPicker* gobj() const { return reinterpret_cast<GnomeColorPicker*>(gobject_); } 00107 00108 00109 public: 00110 //C++ methods used to invoke GTK+ virtual functions: 00111 00112 protected: 00113 //GTK+ Virtual Functions (override these to change behaviour): 00114 00115 //Default Signal Handlers:: 00116 virtual void on_color_set(guint r, guint g, guint b, guint a); 00117 00118 00119 private: 00120 00121 public: 00122 ColorPicker(); 00123 00124 00125 void set(double r, double g, double b, double a); 00126 00127 00128 void set(guint8 r, guint8 g, guint8 b, guint8 a); 00129 00130 00131 void set(gushort r, gushort g, gushort b, gushort a); 00132 00133 00134 void get(double& r, double& g, double& b, double& a) const; 00135 00136 void get(guint8& r, guint8& g, guint8& b, guint8& a) const; 00137 00138 void get(gushort& r, gushort& g, gushort& b, gushort& a) const; 00139 00140 00141 void set_dither(bool dither = true); 00142 00143 bool get_dither() const; 00144 00145 00146 void set_use_alpha(bool use_alpha = true); 00147 00148 bool get_use_alpha() const; 00149 00150 00151 void set_title(const Glib::ustring& title); 00152 00153 Glib::ustring get_title() const; 00154 00155 00160 Glib::SignalProxy4<void,guint,guint,guint,guint> signal_color_set(); 00161 00162 00168 Glib::PropertyProxy<bool> property_dither(); 00169 00175 Glib::PropertyProxy<bool> property_use_alpha(); 00176 00182 Glib::PropertyProxy<Glib::ustring> property_title(); 00183 00189 Glib::PropertyProxy<guint> property_red(); 00190 00196 Glib::PropertyProxy<guint> property_green(); 00197 00203 Glib::PropertyProxy<guint> property_blue(); 00204 00210 Glib::PropertyProxy<guint> property_alpha(); 00211 00212 00213 }; 00214 00215 } /* namespace UI */ 00216 } /* namespace Gnome */ 00217 00218 namespace Glib 00219 { 00221 Gnome::UI::ColorPicker* wrap(GnomeColorPicker* object, bool take_copy = false); 00222 } 00223 #endif /* _LIBGNOMEUIMM_COLOR_PICKER_H */ 00224

Generated on Fri Oct 1 09:37:47 2004 for libgnomeuimm by doxygen 1.3.7