Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::Alignment Class Reference

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

`#include <inti/gtk/alignment.h>`

Inheritance diagram for Inti::Gtk::Alignment:

List of all members.

## Public Member Functions

Constructors

- Alignment ()
    Construct an Alignment with the default values 0.5 for xalign and yalign and 1.0 for xscale and yscale.
- Alignment (float xalign, float yalign, float xscale=0.0, float yscale=0.0)
    Construct a new Alignment.
- virtual ~Alignment ()
    Destructor.

Accessors

- GtkAlignment * gtk_alignment () const
    Get a pointer to the GtkAlignment structure.
- GtkAlignmentClass * gtk_alignment_class () const
    Get a pointer to the GtkAlignmentClass structure.
- operator GtkAlignment * () const
    Conversion operator; safely converts an Alignment to a GtkAlignment pointer.

Methods

- void set (float xalign, float yalign, float xscale, float yscale)
    Sets the Alignment values.

Property Proxies

- const XAlignPropertyProxy prop_xalign ()
    Horizontal position of child in available space; 0.0 is left aligned, 1.0 is right aligned (float : Read / Write).
- const YAlignPropertyProxy prop_yalign ()
    Vertical position of child in available space; 0.0 is top aligned, 1.0 is bottom aligned (float : Read / Write).
- const XScalePropertyProxy prop_xscale ()
    If available horizontal space is bigger than needed for the child, how much of it to use for the child; 0.0 means none, 1.0 means all (float : Read / Write).
- const YScalePropertyProxy prop_yscale ()
    If available vertical space is bigger than needed for the child, how much of it to use for the child; 0.0 means none, 1.0 means all (float : Read / Write).

## Protected Member Functions

Constructors

- Alignment (GtkAlignment *alignment, bool reference=false)
    Construct a new Alignment from an existing GtkAlignment.

## 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

Inti::Gtk::Alignment::Alignment | ( | GtkAlignment * | alignment,
|  | bool | reference = false
| ) | `[explicit, protected]`

  | Construct a new Alignment from an existing GtkAlignment. Parameters:
  alignment | T pointer to a GtkAlignment.
  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).

Inti::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 Inti::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.

The documentation for this class was generated from the following file:

- alignment.h

Main Page - Footer