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

toolbar.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-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 00024 00025 #ifndef GFC_GTK_TOOLBAR_HH 00026 #define GFC_GTK_TOOLBAR_HH 00027 00028 #ifndef GFC_GTK_CONTAINER_HH 00029 #include <gfc/gtk/container.hh> 00030 #endif 00031 00032 #ifndef GFC_GTK_RADIO_TOOL_BUTTON_HH 00033 #include <gfc/gtk/radiotoolbutton.hh> 00034 #endif 00035 00036 #ifndef GFC_GTK_SEPARATOR_TOOL_ITEM_HH 00037 #include <gfc/gtk/separatortoolitem.hh> 00038 #endif 00039 00040 #ifndef __GTK_TOOLBAR_H__ 00041 #include <gtk/gtktoolbar.h> 00042 #endif 00043 00044 namespace GFC { 00045 00046 namespace Gtk { 00047 00048 class Tooltips; 00049 00063 00064 class Toolbar : public Container 00065 { 00066 friend class G::Object; 00067 00068 Toolbar(const Toolbar&); 00069 Toolbar& operator=(const Toolbar&); 00070 00071 protected: 00074 00075 explicit Toolbar(GtkToolbar *toolbar, bool owns_reference = false); 00082 00086 00087 typedef G::Signal<void, Orientation> OrientationChangedSignalType; 00088 typedef G::SignalProxy<TypeInstance, OrientationChangedSignalType> OrientationChangedSignalProxy; 00089 static const OrientationChangedSignalType orientation_changed_signal; 00095 00096 typedef G::Signal<void, ToolbarStyle> StyleChangedSignalType; 00097 typedef G::SignalProxy<TypeInstance, StyleChangedSignalType> StyleChangedSignalProxy; 00098 static const StyleChangedSignalType style_changed_signal; 00104 00105 typedef G::Signal<bool, int, int, int> PopupContextMenuSignalType; 00106 typedef G::SignalProxy<TypeInstance, PopupContextMenuSignalType> PopupContextMenuSignalProxy; 00107 static const PopupContextMenuSignalType popup_context_menu_signal; 00116 00118 00119 public: 00122 00123 Toolbar(); 00126 00127 explicit Toolbar(Orientation orientation); 00133 00134 Toolbar(Orientation orientation, ToolbarStyle style); 00138 00139 virtual ~Toolbar(); 00141 00145 00146 GtkToolbar* gtk_toolbar() const; 00148 00149 operator GtkToolbar* () const; 00151 00152 int get_item_index(const ToolItem& item) const; 00158 00159 int get_n_items() const; 00162 00163 ToolItem* get_nth_item(int n) const; 00168 00169 bool get_show_arrow() const; 00172 00173 Orientation get_orientation() const; 00176 00177 bool get_tooltips() const; 00180 00181 ToolbarStyle get_style() const; 00184 00185 IconSize get_icon_size() const; 00188 00189 ReliefStyle get_relief_style() const; 00192 00193 int get_drop_index(int x, int y) const; 00201 00205 00206 void append(ToolItem& item, const char *tooltip = 0); 00207 void append(ToolItem& item, const String& tooltip); 00211 00212 void prepend(ToolItem& item, const char *tooltip = 0); 00213 void prepend(ToolItem& item, const String& tooltip); 00217 00218 void insert(ToolItem& item, int pos, const char *tooltip = 0); 00219 void insert(ToolItem& item, int pos, const String& tooltip); 00228 00229 void append_separator(); 00231 00232 void insert_separator(int pos); 00239 00240 void set_show_arrow(bool show_arrow); 00247 00248 void set_orientation(Orientation orientation); 00251 00252 void set_tooltips(bool enable); 00255 00256 void set_style(ToolbarStyle style); 00259 00260 void unset_style(); 00263 00264 void set_drop_highlight_item(ToolItem& item, int index); 00273 00274 void unset_drop_highlight_item(); 00276 00277 void set_tooltip(ToolItem& item, const char *tip_text, const char *tip_private = 0); 00278 void set_tooltip(ToolItem& item, const String& tip_text, const String& tip_private = 0); 00286 00290 00291 const OrientationChangedSignalProxy sig_orientation_changed(); 00293 00294 const StyleChangedSignalProxy sig_style_changed(); 00296 00297 const PopupContextMenuSignalProxy sig_popup_context_menu(); 00300 00302 }; 00303 00304 } // namespace Gtk 00305 00306 } // namespace GFC 00307 00308 #include <gfc/gtk/inline/toolbar.inl> 00309 00310 #endif // GFC_GTK_TOOLBAR_HH 00311

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