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

container.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_CONTAINER_HH 00026 #define GFC_GTK_CONTAINER_HH 00027 00028 #ifndef GFC_GTK_WIDGET_HH 00029 #include <gfc/gtk/widget.hh> 00030 #endif 00031 00032 #ifndef __GTK_CONTAINER_H__ 00033 #include <gtk/gtkcontainer.h> 00034 #endif 00035 00036 namespace GFC { 00037 00038 namespace Gtk { 00039 00050 00051 class Container : public Widget 00052 { 00053 friend class G::Object; 00054 00055 Container(const Container&); 00056 Container& operator=(const Container&); 00057 00058 protected: 00061 00062 explicit Container(GtkContainer *container, bool owns_reference = false); 00069 00073 00074 typedef G::Signal<void, Widget&> AddSignalType; 00075 typedef G::SignalProxy<TypeInstance, AddSignalType> AddSignalProxy; 00076 static const AddSignalType add_signal; 00082 00083 typedef G::Signal<void, Widget&> RemoveSignalType; 00084 typedef G::SignalProxy<TypeInstance, RemoveSignalType> RemoveSignalProxy; 00085 static const RemoveSignalType remove_signal; 00091 00092 typedef G::Signal<void> CheckResizeSignalType; 00093 typedef G::SignalProxy<TypeInstance, CheckResizeSignalType> CheckResizeSignalProxy; 00094 static const CheckResizeSignalType check_resize_signal; 00099 00100 typedef G::Signal<void, Widget*> SetFocusChildSignalType; 00101 typedef G::SignalProxy<TypeInstance, SetFocusChildSignalType> SetFocusChildSignalProxy; 00102 static const SetFocusChildSignalType set_focus_child_signal; 00108 00110 00111 public: 00112 typedef sigc::slot<void, Widget&> ForeachSlot; 00121 00124 00125 virtual ~Container(); 00127 00131 00132 GtkContainer* gtk_container() const; 00134 00135 operator GtkContainer* () const; 00137 00138 bool is_resize_container() const; 00141 00142 GType child_type() const; 00148 00149 Widget* focus_child() const; 00151 00152 bool get_children(std::vector<Widget*>& child_list) const; 00157 00158 unsigned int get_border_width() const; 00160 00161 ResizeMode get_resize_mode() const; 00163 00164 bool get_focus_chain(std::vector<Widget*>& focusable_widgets) const; 00173 00174 Adjustment* get_focus_vadjustment() const; 00177 00178 Adjustment* get_focus_hadjustment() const; 00181 00185 00186 void add(Widget& widget); 00197 00198 void remove(Widget& widget); 00206 00207 void check_resize(); 00210 00211 void set_focus_child(Widget& widget); 00215 00216 void set_border_width(unsigned int border_width); 00227 00228 void set_resize_mode(ResizeMode resize_mode); 00234 00235 void foreach(const ForeachSlot& each); 00241 00242 void set_reallocate_redraws(bool needs_redraws); 00246 00247 void set_focus_vadjustment(Adjustment *adjustment); 00253 00254 void set_focus_hadjustment(Adjustment *adjustment); 00260 00261 void resize_children(); 00266 00267 void propagate_expose(Widget& child, const Gdk::EventExpose& event); 00279 00280 void set_focus_chain(const std::vector<Widget*>& focusable_widgets); 00288 00289 void unset_focus_chain(); 00291 00295 00296 const AddSignalProxy sig_add(); 00298 00299 const RemoveSignalProxy sig_remove(); 00301 00302 const CheckResizeSignalProxy sig_check_resize(); 00305 00306 const SetFocusChildSignalProxy sig_set_focus_child(); 00308 00310 }; 00311 00312 } // namespace Gtk 00313 00314 } // namespace GFC 00315 00316 #include <gfc/gtk/inline/container.inl> 00317 00318 #endif // GFC_GTK_CONTAINER_HH 00319

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