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

toolbutton.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_TOOL_BUTTON_HH 00025 #define GFC_GTK_TOOL_BUTTON_HH 00026 00027 #ifndef GFC_GTK_TOOL_ITEM_HH 00028 #include <gfc/gtk/toolitem.hh> 00029 #endif 00030 00031 #ifndef __GTK_TOOL_BUTTON_H__ 00032 #include <gtk/gtktoolbutton.h> 00033 #endif 00034 00035 namespace GFC { 00036 00037 namespace Gtk { 00038 00055 00056 class ToolButton : public ToolItem 00057 { 00058 friend class G::Object; 00059 00060 ToolButton(const ToolButton&); 00061 ToolButton& operator=(const ToolButton&); 00062 00063 protected: 00066 00067 explicit ToolButton(GtkToolButton *tool_button, bool owns_reference = false); 00074 00078 00079 typedef G::Signal<void> ClickedSignalType; 00080 typedef G::SignalProxy<TypeInstance, ClickedSignalType> ClickedSignalProxy; 00081 static const ClickedSignalType clicked_signal; 00086 00088 00089 public: 00092 00093 ToolButton(); 00095 00096 ToolButton(Widget& icon_widget); 00099 00100 ToolButton(const char *label, bool use_underline = false); 00101 ToolButton(const String& label, bool use_underline = false); 00105 00106 ToolButton(Widget& icon_widget, const char *label, bool use_underline = false); 00107 ToolButton(Widget& icon_widget, const String& label, bool use_underline = false); 00113 00114 ToolButton(const StockId& stock_id); 00119 00120 virtual ~ToolButton(); 00122 00126 00127 GtkToolButton* gtk_tool_button() const; 00129 00130 operator GtkToolButton* () const; 00132 00133 String get_label() const; 00137 00138 bool get_use_underline() const; 00142 00143 String get_stock_id() const; 00146 00147 Widget* get_icon_widget() const; 00150 00151 Widget* get_label_widget() const; 00154 00158 00159 void set_label(const char *label, bool use_underline = false); 00160 void set_label(const String& label, bool use_underline = false); 00169 00170 void set_use_underline(bool use_underline); 00181 00182 void set_stock_id(const StockId& stock_id); 00188 00189 void set_icon_widget(Widget *icon_widget); 00195 00196 void set_label_widget(Widget *label_widget); 00204 00205 void set_contents(Widget& icon_widget, const char *label, bool use_underline = false); 00206 void set_contents(Widget& icon_widget, const String& label, bool use_underline = false); 00215 00219 00220 const ClickedSignalProxy sig_clicked(); 00223 00225 }; 00226 00227 } // namespace Gtk 00228 00229 } // namespace GFC 00230 00231 #include <gfc/gtk/inline/toolbutton.inl> 00232 00233 #endif // GFC_GTK_TOOL_BUTTON_HH 00234

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