GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

colorbutton.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_GTK_COLOR_BUTTON_HH 00025 #define GFC_GTK_COLOR_BUTTON_HH 00026 00027 #ifndef GFC_GTK_BUTTON_HH 00028 #include <gfc/gtk/button.hh> 00029 #endif 00030 00031 #ifndef __GTK_COLOR_BUTTON_H__ 00032 #include <gtk/gtkcolorbutton.h> 00033 #endif 00034 00035 namespace GFC { 00036 00037 namespace Gdk { 00038 class Color; 00039 } 00040 00041 namespace Gtk { 00042 00049 00050 class ColorButton : public Button 00051 { 00052 friend class G::Object; 00053 00054 ColorButton(const ColorButton&); 00055 ColorButton& operator=(const ColorButton&); 00056 00057 protected: 00060 00061 explicit ColorButton(GtkColorButton *color_button, bool owns_reference = false); 00068 00072 00073 typedef G::Signal<void> ColorSetSignalType; 00074 typedef G::SignalProxy<TypeInstance, ColorSetSignalType> ColorSetSignalProxy; 00075 static const ColorSetSignalType color_set_signal; 00080 00082 00083 public: 00086 00087 ColorButton(); 00092 00093 explicit ColorButton(const Gdk::Color& color); 00096 00097 virtual ~ColorButton(); 00099 00103 00104 GtkColorButton* gtk_color_button() const; 00106 00107 operator GtkColorButton* () const; 00109 00110 Gdk::Color get_color() const; 00113 00114 unsigned short get_alpha() const; 00117 00118 bool get_use_alpha() const; 00121 00122 String get_title() const; 00125 00129 00130 void set_color(const Gdk::Color& color); 00133 00134 void set_alpha(unsigned short alpha); 00137 00138 void set_use_alpha(bool use_alpha); 00142 00143 void set_title(const char *title); 00144 void set_title(const String& title); 00147 00151 00152 const ColorSetSignalProxy sig_color_set(); 00155 00157 }; 00158 00159 } // namespace Gtk 00160 00161 } // namespace GFC 00162 00163 #include <gfc/gtk/inline/colorbutton.inl> 00164 00165 #endif // GFC_GTK_COLOR_BUTTON_HH 00166

Generated on Tue Aug 24 00:34:30 2004 for GFC-UI by doxygen 1.3.8