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

box.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 00025 00026 #ifndef GFC_GTK_BOX_HH 00027 #define GFC_GTK_BOX_HH 00028 00029 #ifndef GFC_GTK_CONTAINER_HH 00030 #include <gfc/gtk/container.hh> 00031 #endif 00032 00033 #ifndef __GTK_HBOX_H__ 00034 #include <gtk/gtkhbox.h> 00035 #endif 00036 00037 #ifndef __GTK_VBOX_H__ 00038 #include <gtk/gtkvbox.h> 00039 #endif 00040 00041 #ifndef GFC_GTK_BOX_CHILD_HH 00042 #include <gfc/gtk/boxchild.hh> 00043 #endif 00044 00045 namespace GFC { 00046 00047 namespace Gtk { 00048 00077 00078 class Box : public Container 00079 { 00080 friend class G::Object; 00081 00082 Box(const Box&); 00083 Box& operator=(const Box&); 00084 00085 protected: 00088 00089 explicit Box(GtkBox *box, bool owns_reference = false); 00096 00097 virtual ~Box() = 0; 00099 00101 00102 public: 00105 00106 GtkBox* gtk_box() const; 00108 00109 operator GtkBox* () const; 00111 00112 bool children(std::vector<BoxChild*>& child_list) const; 00119 00120 bool get_homogeneous() const; 00123 00124 int get_spacing() const; 00127 00131 00132 void pack_start(Widget& child, bool expand = true, bool fill = true, unsigned int padding = 0); 00148 00149 void pack_end(Widget& child, bool expand = true, bool fill = true, unsigned int padding = 0); 00165 00166 void insert_start(Widget& child, int position, bool expand = true, bool fill = true, unsigned int padding = 0); 00184 00185 void insert_end(Widget& child, int position, bool expand = true, bool fill = true, unsigned int padding = 0); 00203 00204 void set_homogeneous(bool homogeneous); 00209 00210 void set_spacing(int spacing); 00213 00214 void reorder_child(Widget& child, int position); 00226 00227 void query_child_packing(Widget& child, bool *expand, bool *fill, unsigned int *padding, PackType *pack_type) const; 00234 00235 void set_child_packing(Widget& child, bool expand, bool fill, unsigned int padding, PackType pack_type); 00242 00244 }; 00245 00252 00253 class HBox : public Box 00254 { 00255 friend class G::Object; 00256 00257 HBox(const HBox&); 00258 HBox& operator=(const HBox&); 00259 00260 protected: 00263 00264 explicit HBox(GtkHBox *hbox, bool owns_reference = false); 00271 00273 00274 public: 00277 00278 explicit HBox(bool homogeneous = false, int spacing = 0); 00282 00283 virtual ~HBox(); 00284 00286 00290 00291 GtkHBox* gtk_hbox() const; 00293 00294 operator GtkHBox* () const; 00296 00298 }; 00299 00306 00307 class VBox : public Box 00308 { 00309 friend class G::Object; 00310 00311 VBox(const VBox&); 00312 VBox& operator=(const VBox&); 00313 00314 protected: 00317 00318 explicit VBox(GtkVBox *vbox, bool owns_reference = false); 00325 00327 00328 public: 00331 00332 explicit VBox(bool homogeneous = false, int spacing = 0); 00336 00337 virtual ~VBox(); 00339 00343 00344 GtkVBox* gtk_vbox() const; 00346 00347 operator GtkVBox* () const; 00349 00351 }; 00352 00353 } // namespace Gtk 00354 00355 } // namespace GFC 00356 00357 #include <gfc/gtk/inline/box.inl> 00358 00359 #endif // GFC_GTK_BOX_HH 00360 00361

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