Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# aspectframe.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti 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 INTI_GTK_ASPECT_FRAME_H
    00026 #define INTI_GTK_ASPECT_FRAME_H
    00027
    00028 #ifndef INTI_GTK_FRAME_H
    00029 #include <inti/gtk/frame.h>
    00030 #endif
    00031
    00032 #ifndef __GTK_ASPECT_FRAME_H__
    00033 #include <gtk/gtkaspectframe.h>
    00034 #endif
    00035
    00036 namespace Inti {
    00037
    00038 namespace Gtk {
    00039
    00040 class AspectFrameClass;
    00041
    00049
    00050 class AspectFrame : public Frame
    00051 {
    00052         friend class G::Object;
    00053         friend class AspectFrameClass;
    00054
    00055         AspectFrame(const AspectFrame&);
    00056         AspectFrame& operator=(const AspectFrame&);
    00057
    00058 protected:
    00061
    00062         explicit AspectFrame(GtkAspectFrame *aspect_frame, bool reference = false);
    00069
    00071 //  Properties
    00072
    00073         typedef G::Property<float> XAlignPropertyType;
    00074         typedef G::PropertyProxy<G::Object, XAlignPropertyType> XAlignPropertyProxy;
    00075         static const XAlignPropertyType xalign_property;
    00076
    00077         typedef G::Property<float> YAlignPropertyType;
    00078         typedef G::PropertyProxy<G::Object, YAlignPropertyType> YAlignPropertyProxy;
    00079         static const YAlignPropertyType yalign_property;
    00080
    00081         typedef G::Property<float> RatioPropertyType;
    00082         typedef G::PropertyProxy<G::Object, RatioPropertyType> RatioPropertyProxy;
    00083         static const RatioPropertyType ratio_property;
    00084
    00085         typedef G::Property<bool> ObeyChildPropertyType;
    00086         typedef G::PropertyProxy<G::Object, ObeyChildPropertyType> ObeyChildPropertyProxy;
    00087         static const ObeyChildPropertyType obey_child_property;
    00088
    00089 public:
    00092
    00093         AspectFrame();
    00095
    00096         AspectFrame(float xalign, float yalign);
    00105
    00106         AspectFrame(float xalign, float yalign, float ratio);
    00115
    00116         AspectFrame(const String& label, float xalign, float yalign, float ratio);
    00126
    00127         virtual ~AspectFrame();
    00129
    00133
    00134         GtkAspectFrame* gtk_aspect_frame() const { return (GtkAspectFrame*)instance; }
    00136
    00137         GtkAspectFrameClass* gtk_aspect_frame_class() const;
    00139
    00140         operator GtkAspectFrame* () const;
    00142
    00146
    00147         void set(float xalign, float yalign, float ratio, bool obey_child);
    00156
    00160
    00161         const XAlignPropertyProxy prop_xalign()
    00162         {
    00163                 return XAlignPropertyProxy(this, &xalign_property);
    00164         }
    00166
    00167         const YAlignPropertyProxy prop_yalign()
    00168         {
    00169                 return YAlignPropertyProxy(this, &yalign_property);
    00170         }
    00172
    00173         const RatioPropertyProxy prop_ratio()
    00174         {
    00175                 return RatioPropertyProxy(this, &ratio_property);
    00176         }
    00178
    00179         const ObeyChildPropertyProxy prop_obey_child()
    00180         {
    00181                 return ObeyChildPropertyProxy(this, &obey_child_property);
    00182         }
    00184
    00186 };
    00187
    00188 } // namespace Gtk
    00189
    00190 } // namespace Inti
    00191
    00192 #endif // INTI_GTK_ASPECT_FRAME_H
    00193

Main Page - Footer