Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

layout.h

Go to the documentation of this file.
00001 /*  Inti: Integrated Foundation Classes
00002  *  Copyright (C) 2002 The Inti Development Team.
00003  *  Copyright (C) 2000 Red Hat, Inc.
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019  
00027 
00028 #ifndef INTI_GTK_LAYOUT_H
00029 #define INTI_GTK_LAYOUT_H
00030 
00031 #ifndef INTI_GTK_CONTAINER_H
00032 #include <inti/gtk/container.h>
00033 #endif
00034 
00035 #ifndef __GTK_LAYOUT_H__
00036 #include <gtk/gtklayout.h>
00037 #endif
00038 
00039 namespace Inti {
00040 
00041 namespace Gtk {
00042 
00043 class LayoutClass;
00044 
00055 
00056 class Layout : public Container
00057 {
00058         friend class G::Object;
00059         friend class LayoutClass;
00060 
00061         Layout(const Layout&);
00062         Layout& operator=(const Layout&);
00063         
00064 protected:
00067 
00068         explicit Layout(GtkLayout *layout, bool reference = false);
00075 
00079 
00080         virtual void on_set_scroll_adjustments(Adjustment *hadjustment, Adjustment *vadjustment);
00084 
00086 //  Properties
00087 
00088         typedef G::Property<Adjustment*, G::Object*> HAjustmentPropertyType;
00089         typedef G::PropertyProxy<G::Object, HAjustmentPropertyType> HAjustmentPropertyProxy;
00090         static const HAjustmentPropertyType hadjustment_property;
00091 
00092         typedef G::Property<Adjustment*, G::Object*> VAjustmentPropertyType;
00093         typedef G::PropertyProxy<G::Object, VAjustmentPropertyType> VAjustmentPropertyProxy;
00094         static const VAjustmentPropertyType vadjustment_property;
00095 
00096         typedef G::Property<unsigned int> WidthPropertyType;
00097         typedef G::PropertyProxy<G::Object, WidthPropertyType> WidthPropertyProxy;
00098         static const WidthPropertyType width_property;
00099 
00100         typedef G::Property<unsigned int> HeightPropertyType;
00101         typedef G::PropertyProxy<G::Object, HeightPropertyType> HeightPropertyProxy;
00102         static const HeightPropertyType height_property;
00103 
00104 //  Child properties
00105 
00106         typedef Gtk::ChildProperty<int> XPropertyType;
00107         typedef Gtk::ChildPropertyProxy<Container, XPropertyType> XPropertyProxy;
00108         static const XPropertyType x_property;
00109 
00110         typedef Gtk::ChildProperty<int> YPropertyType;
00111         typedef Gtk::ChildPropertyProxy<Container, YPropertyType> YPropertyProxy;
00112         static const YPropertyType y_property;
00113 
00114 //  Signals
00115 
00116         typedef G::Signal2<void, GtkAdjustment*, GtkAdjustment*> SetScrollAdjustmentsSignalType;
00117         typedef G::SignalProxy<TypeInstance, SetScrollAdjustmentsSignalType> SetScrollAdjustmentsSignalProxy;
00118         static const SetScrollAdjustmentsSignalType set_scroll_adjustments_signal;
00119 
00120 public:
00123 
00124         Layout();
00126 
00127         Layout(Adjustment *hadjustment, Adjustment *vadjustment);
00131 
00132         virtual ~Layout();
00134         
00138 
00139         GtkLayout* gtk_layout() const { return (GtkLayout*)instance; }
00141 
00142         GtkLayoutClass* gtk_layout_class() const;
00144 
00145         operator GtkLayout* () const;
00147 
00148         Gdk::Window* bin_window() const;
00151 
00152         void get_size(unsigned int *width, unsigned int *height);
00157 
00158         Adjustment* get_hadjustment() const;
00165 
00166         Adjustment* get_vadjustment() const;
00173 
00177 
00178         void put(Widget& child_widget, int x, int y);
00184 
00185         void move(Widget& child_widget, int x, int y);
00190         
00191         void set_size(unsigned int width, unsigned int height);
00195 
00196         void set_hadjustment(Adjustment *adjustment);
00201 
00202         void set_vadjustment(Adjustment *adjustment);
00207 
00211 
00212         const HAjustmentPropertyProxy prop_hadjustment()
00213         {
00214                 return HAjustmentPropertyProxy(this, &hadjustment_property);
00215         }
00217 
00218         const VAjustmentPropertyProxy prop_vadjustment()
00219         {
00220                 return VAjustmentPropertyProxy(this, &vadjustment_property);
00221         }
00223 
00224         const WidthPropertyProxy prop_width()
00225         {
00226                 return WidthPropertyProxy(this, &width_property);
00227         }
00229 
00230         const HeightPropertyProxy prop_height()
00231         {
00232                 return HeightPropertyProxy(this, &height_property);
00233         }
00235 
00239 
00240         const XPropertyProxy prop_x()
00241         {
00242                 return XPropertyProxy(this, &x_property);
00243         }
00245 
00246         const YPropertyProxy prop_y()
00247         {
00248                 return YPropertyProxy(this, &y_property);
00249         }
00251 
00255 
00256         const SetScrollAdjustmentsSignalProxy sig_set_scroll_adjustments()
00257         {
00258                 return SetScrollAdjustmentsSignalProxy(this, &set_scroll_adjustments_signal);
00259         }
00262 
00264 };
00265 
00266 } // namespace Gtk
00267 
00268 } // namespace Inti
00269 
00270 #endif // INTI_GTK_LAYOUT_H
00271 
Main Page - Footer


Generated on Sun Sep 14 20:08:03 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002