Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::Alignment Class Reference

A GtkAlignment C++ wrapper class. More...

#include <xfc/gtk/alignment.hh>

Inheritance diagram for Xfc::Gtk::Alignment:

Xfc::Gtk::Bin Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Public Member Functions

Constructors
Accessors
Methods

Protected Member Functions

Constructors

Detailed Description

A GtkAlignment C++ wrapper class.

The Alignment widget controls the alignment and size of its child widget. It has four settings: xscale, yscale, xalign, and yalign.

The scale settings are used to specify how much the child widget should expand to fill the space allocated to the 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 are used to 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.

See also: the Alignment Widget and ProgressBar HOWTOs and examples.


Constructor & Destructor Documentation

Xfc::Gtk::Alignment::Alignment GtkAlignment *  alignment,
bool  owns_reference = false
[explicit, protected]
 

Construct a new Alignment from an existing GtkAlignment.

Parameters:
alignment T pointer to a GtkAlignment.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The alignment can be a newly created GtkAlignment or an existing GtkAlignment. (see G::Object::Object).

Xfc::Gtk::Alignment::Alignment float  xalign,
float  yalign,
float  xscale = 0.0,
float  yscale = 0.0
 

Construct a new Alignment.

Parameters:
xalign The horizontal alignment of the child widget, from 0 (left) to 1 (right).
yalign The vertical alignment of the child widget, from 0 (top) to 1 (bottom).
xscale The amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the GtkAlignment.
yscale The amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xscale.


Member Function Documentation

void Xfc::Gtk::Alignment::get_padding unsigned int *  top,
unsigned int *  bottom,
unsigned int *  left,
unsigned int *  right
const
 

Gets the padding on the different sides of the widget (see set_padding()).

Parameters:
top The location to store the padding for the top of the widget, or null.
bottom The location to store the padding for the bottom of the widget, or null.
left The location to store the padding for the left of the widget, or null.
right The ocation to store the padding for the right of the widget, or null.

void Xfc::Gtk::Alignment::set float  xalign,
float  yalign,
float  xscale,
float  yscale
 

Sets the Alignment values.

Parameters:
xalign The horizontal alignment of the child widget, from 0 (left) to 1 (right).
yalign The vertical alignment of the child widget, from 0 (top) to 1 (bottom).
xscale The amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the GtkAlignment.
yscale The amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xscale.

void Xfc::Gtk::Alignment::set_padding unsigned int  top,
unsigned int  bottom,
unsigned int  left,
unsigned int  right
 

Sets the padding on the different sides of the widget.

Parameters:
top The padding at the top of the widget.
bottom The padding at the bottom of the widget.
left The padding at the left of the widget.
right The padding at the right 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.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3