/* Copyright (C) 1998-2002 The gtkmm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ // To exclude this file from the documentation when build-deprecated-api=false. _CONFIGINCLUDE(gtkmmconfig.h) #include _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/bin_p.h) #m4 _PUSH(SECTION_CC_PRE_INCLUDES) #undef GTK_DISABLE_DEPRECATED #define GDK_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() namespace Gtk { /** A widget which controls the alignment and size of its child. * * Normally, a widget is allocated at least as much size as it requests, and, * most widgets expand to fill any extra allocated space, but sometimes * this behavior is not desired. The alignment widget allows the * programmer to specify how a widget should expand and position itself * to fill the area it is allocated. * * It has four settings: xscale, yscale, xalign, and yalign: * The scale settings specify how much the child widget should expand to fill the space allocated to the Gtk::Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space). * The align settings place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect. * * * @deprecated Use Widget alignment and margin properties instead. * @ingroup Widgets * @ingroup Containers */ class GTKMM_API Alignment : public Bin { _CLASS_GTKOBJECT(Alignment,GtkAlignment,GTK_ALIGNMENT,Gtk::Bin,GtkBin,,,GTKMM_API) _IS_DEPRECATED public: /** Constructor to create an Alignment object. * @param xalign The initial horizontal alignment of the child. * @param yalign The initial vertical alignment of the child. * @param xscale The initial amount that the child expands horizontally to fill up unused space. * @param yscale The initial amount that the child expands vertically to fill up unused space. */ _WRAP_CTOR(Alignment(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale = 1.0), gtk_alignment_new) /** Constructor to create an Alignment object. * @param xalign A Gtk::Align describing the initial horizontal alignment of the child. * @param yalign A Gtk::Align describing the initial vertical alignment of the child. * @param xscale The initial amount that the child expands horizontally to fill up unused space. * @param yscale The initial amount that the child expands vertically to fill up unused space. */ _WRAP_CTOR(Alignment(Align xalign, Align yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale = 1.0), gtk_alignment_new) _WRAP_METHOD(void set(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale= 1.0), gtk_alignment_set) _WRAP_METHOD(void set(Align xalign, Align yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale= 1.0), gtk_alignment_set) //New in GTK+ 2.4 _WRAP_METHOD(void set_padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right), gtk_alignment_set_padding) _WRAP_METHOD(void get_padding(guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right), gtk_alignment_get_padding) _WRAP_PROPERTY("xalign", float) _WRAP_PROPERTY("yalign", float) _WRAP_PROPERTY("xscale", float) _WRAP_PROPERTY("yscale", float) //New in GTK+ 2.4 _WRAP_PROPERTY("top_padding", guint) _WRAP_PROPERTY("bottom_padding", guint) _WRAP_PROPERTY("left_padding", guint) _WRAP_PROPERTY("right_padding", guint) }; } //namespace Gtk