![]() |
![]() |
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.
Public Member Functions | |
virtual | ~Alignment () |
GtkAlignment* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkAlignment* | gobj () const |
Provides access to the underlying C GtkObject. | |
Alignment (float xalign=0.5, float yalign=0.5, float xscale=1.0, float yscale=1.0) | |
Constructor to create an Alignment object. | |
Alignment (AlignmentEnum xalign, AlignmentEnum yalign=Gtk::ALIGN_CENTER, float xscale=1.0, float yscale=1.0) | |
Constructor to create an Alignment object. | |
void | set (float xalign=0.5, float yalign=0.5, float xscale=1.0, float yscale=1.0) |
Sets the Alignment values. | |
void | set (AlignmentEnum xalign, AlignmentEnum yalign=Gtk::ALIGN_CENTER, float xscale=1.0, float yscale=1.0) |
Sets the Alignment values. | |
void | set_padding (guint padding_top, guint padding_bottom, guint padding_left, guint padding_right) |
Sets the padding on the different sides of the widget. | |
void | get_padding (guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right) |
Gets the padding on the different sides of the widget. | |
Glib::PropertyProxy<float> | property_xalign () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< float > | property_xalign () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<float> | property_yalign () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< float > | property_yalign () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<float> | property_xscale () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< float > | property_xscale () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<float> | property_yscale () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< float > | property_yscale () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<guint> | property_top_padding () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< guint > | property_top_padding () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<guint> | property_bottom_padding () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< guint > | property_bottom_padding () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<guint> | property_left_padding () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< guint > | property_left_padding () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<guint> | property_right_padding () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy_ReadOnly< guint > | property_right_padding () const |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::Alignment* | wrap (GtkAlignment* object, bool take_copy=false) |
|
|
|
Constructor to create an Alignment object.
|
|
Constructor to create an Alignment object.
|
|
Gets the padding on the different sides of the widget. See set_padding(). Since: 2.4
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Bin.
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Bin.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Sets the Alignment values.
|
|
Sets the Alignment values.
|
|
Sets the padding on the different sides of the widget. The padding adds blank space to the sides of the widget. For instance, this can be used to indent the child widget towards the right by adding padding on the left. Since: 2.4
|
|
|