GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

GFC::Gtk::Alignment Class Reference

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

#include <gfc/gtk/alignment.hh>

Inheritance diagram for GFC::Gtk::Alignment:

GFC::Gtk::Bin GFC::Gtk::Container GFC::Gtk::Widget GFC::Gtk::Object GFC::Atk::Implementor GFC::G::Object GFC::G::TypeInterface GFC::G::TypeInstance GFC::G::TypeInstance GFC::Trackable GFC::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.


Constructor & Destructor Documentation

GFC::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).

GFC::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 GFC::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 GFC::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 GFC::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:
Generated on Tue Aug 24 00:34:37 2004 for GFC-UI by doxygen 1.3.8