Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::Misc Class Reference

A GtkMisc C++ wrapper class. More...

`#include <xfc/gtk/misc.hh>`

Inheritance diagram for Xfc::Gtk::Misc:

List of all members.

## Public Member Functions

Constructors

- virtual ~Misc ()
    Destructor.

Accessors

- GtkMisc * gtk_misc () const
    Get a pointer to the GtkMisc structure.
- operator GtkMisc * () const
    Conversion operator; safely converts a Misc to a GtkMisc pointer.
- void get_alignment (float *xalign, float *yalign)
    Gets the X and Y alignment of the widget within its allocation (see set_alignment()).
- void get_padding (int *xpad, int *ypad)
    Gets the padding in the X and Y directions of the widget (see set_padding()).

Methods

- void set_alignment (float xalign, float yalign)
    Sets the alignment of the widget.
- void set_padding (int xpad, int ypad)
    Sets the amount of space to add around the widget.

## Protected Member Functions

Constructors

- Misc ()
    Construct a new Misc.
- Misc (GtkMisc *misc, bool owns_reference=false)
    Construct a new Misc from an existing GtkMisc.

## Detailed Description

A GtkMisc C++ wrapper class.

The Misc widget is an abstract widget which is not useful itself, but is used to derive subclasses which have alignment and padding attributes. The horizontal and vertical padding attributes allows extra space to be added around the widget. The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widgets position.

## Constructor & Destructor Documentation

Xfc::Gtk::Misc::Misc | ( | GtkMisc * | misc,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

Construct a new Misc from an existing GtkMisc.

Parameters:

  | misc | A pointer to a GtkMisc.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.

The misc can be a newly created GtkMisc or an existing GtkMisc (see G::Object::Object).

## Member Function Documentation

void Xfc::Gtk::Misc::get_alignment | ( | float * | xalign,
|  | float * | yalign
| ) |

Gets the X and Y alignment of the widget within its allocation (see set_alignment()).

Parameters:

  | xalign | The location to store X alignment of misc, or null.
  | yalign | The location to store Y alignment of misc, or null.

void Xfc::Gtk::Misc::get_padding | ( | int * | xpad,
|  | int * | ypad
| ) |

Gets the padding in the X and Y directions of the widget (see set_padding()).

Parameters:

  | xpad | The location to store padding in the X direction, or null.
  | ypad | The location to store padding in the Y direction, or null.

void Xfc::Gtk::Misc::set_alignment | ( | float | xalign,
|  | float | yalign
| ) |

Sets the alignment of the widget.

Parameters:

  | xalign | The horizontal alignment, from 0 (left) to 1 (right).
  | yalign | The vertical alignment, from 0 (top) to 1 (bottom).

void Xfc::Gtk::Misc::set_padding | ( | int | xpad,
|  | int | ypad
| ) |

Sets the amount of space to add around the widget.

Parameters:

  | xpad | The amount of space to add on the left and right of the widget, in pixels.
  | ypad | The amount of space to add on the top and bottom of the widget, in pixels.

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

- misc.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3