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

# alignment.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
    00023
    00024 #ifndef INTI_GTK_ALIGNMENT_H
    00025 #define INTI_GTK_ALIGNMENT_H
    00026
    00027 #ifndef INTI_GTK_BIN_H
    00028 #include <inti/gtk/bin.h>
    00029 #endif
    00030
    00031 #ifndef __GTK_ALIGNMENT_H__
    00032 #include <gtk/gtkalignment.h>
    00033 #endif
    00034
    00035 namespace Inti {
    00036
    00037 namespace Gtk {
    00038
    00039 class AlignmentClass;
    00040
    00056
    00057 class Alignment : public Bin
    00058 {
    00059         friend class G::Object;
    00060         friend class AlignmentClass;
    00061
    00062         Alignment(const Alignment&);
    00063         Alignment& operator=(const Alignment&);
    00064
    00065 protected:
    00068
    00069         explicit Alignment(GtkAlignment *alignment, bool reference = false);
    00076
    00078 //  Properties
    00079
    00080         typedef G::Property<float> XAlignPropertyType;
    00081         typedef G::PropertyProxy<G::Object, XAlignPropertyType> XAlignPropertyProxy;
    00082         static const XAlignPropertyType xalign_property;
    00083
    00084         typedef G::Property<float> YAlignPropertyType;
    00085         typedef G::PropertyProxy<G::Object, YAlignPropertyType> YAlignPropertyProxy;
    00086         static const YAlignPropertyType yalign_property;
    00087
    00088         typedef G::Property<float> XScalePropertyType;
    00089         typedef G::PropertyProxy<G::Object, XScalePropertyType> XScalePropertyProxy;
    00090         static const XScalePropertyType xscale_property;
    00091
    00092         typedef G::Property<float> YScalePropertyType;
    00093         typedef G::PropertyProxy<G::Object, YScalePropertyType> YScalePropertyProxy;
    00094         static const YScalePropertyType yscale_property;
    00095
    00096 public:
    00099
    00100         Alignment();
    00103
    00104         Alignment(float xalign, float yalign, float xscale = 0.0, float yscale = 0.0);
    00114
    00115         virtual ~Alignment();
    00117
    00121
    00122         GtkAlignment* gtk_alignment() const { return (GtkAlignment*)instance; }
    00124
    00125         GtkAlignmentClass* gtk_alignment_class() const;
    00127
    00128         operator GtkAlignment* () const;
    00130
    00134
    00135         void set(float xalign, float yalign, float xscale, float yscale);
    00145
    00149
    00150         const XAlignPropertyProxy prop_xalign()
    00151         {
    00152                 return XAlignPropertyProxy(this, &xalign_property);
    00153         }
    00156
    00157         const YAlignPropertyProxy prop_yalign()
    00158         {
    00159                 return YAlignPropertyProxy(this, &yalign_property);
    00160         }
    00163
    00164         const XScalePropertyProxy prop_xscale()
    00165         {
    00166                 return XScalePropertyProxy(this, &xscale_property);
    00167         }
    00170
    00171         const YScalePropertyProxy prop_yscale()
    00172         {
    00173                 return YScalePropertyProxy(this, &yscale_property);
    00174         }
    00177
    00179 };
    00180
    00181 } // namespace Gtk
    00182
    00183 } // namespace Inti
    00184
    00185 #endif // INTI_GTK_ALIGNMENT_H
    00186

Main Page - Footer