gtkmm: Gtk::Misc Class Reference

gtkmm 3.4.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Related Functions
Gtk::Misc Class Reference

A base class for widgets with alignments and padding. More...

Inheritance diagram for Gtk::Misc:
[legend]

List of all members.

## Public Member Functions
virtual | ~Misc ()
GtkMisc* | gobj ()
| Provides access to the underlying C GtkObject.
const GtkMisc* | gobj () const
| Provides access to the underlying C GtkObject.
void | set_alignment (float xalign=0.0, float yalign=0.5)
| Sets the alignment of the widget.
void | set_alignment (Align xalign=Gtk::ALIGN_START, Align yalign=Gtk::ALIGN_CENTER)
| Sets the alignment of the widget.
void | get_alignment (float& xalign, float& yalign) const
| Gets the X and Y alignment of the widget within its allocation.
void | set_padding (int xpad, int ypad)
| Sets the amount of space to add around the widget.
void | get_padding (int& xpad, int& ypad) const
| Gets the padding in the X and Y directions of the widget.
Glib::PropertyProxy< float > | property_xalign ()
| The horizontal alignment, from 0 (left) to 1 (right).
Glib::PropertyProxy_ReadOnly < float > | property_xalign () const
| The horizontal alignment, from 0 (left) to 1 (right).
Glib::PropertyProxy< float > | property_yalign ()
| The vertical alignment, from 0 (top) to 1 (bottom).
Glib::PropertyProxy_ReadOnly < float > | property_yalign () const
| The vertical alignment, from 0 (top) to 1 (bottom).
Glib::PropertyProxy< int > | property_xpad ()
| The amount of space to add on the left and right of the widget, in pixels.
Glib::PropertyProxy_ReadOnly< int > | property_xpad () const
| The amount of space to add on the left and right of the widget, in pixels.
Glib::PropertyProxy< int > | property_ypad ()
| The amount of space to add on the top and bottom of the widget, in pixels.
Glib::PropertyProxy_ReadOnly< int > | property_ypad () const
| The amount of space to add on the top and bottom of the widget, in pixels.
## Protected Member Functions
| Misc ()
## Related Functions
(Note that these are not member functions.)
Gtk::Misc* | wrap (GtkMisc* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A base class for widgets with alignments and padding.

This is an abstract for a set of utility widgets that lack a physical window. They do have alignment and padding within their defined space.

Without a window, widgets of this type cannot capture events. To capture events place in Gtk::EventBox.

## Constructor & Destructor Documentation

virtual Gtk::Misc::~Misc | ( |  | ) | `[virtual]`

Gtk::Misc::Misc | ( |  | ) | `[protected]`

## Member Function Documentation

void Gtk::Misc::get_alignment | ( | float & | xalign,
|  | float & | yalign
| ) |  | const

Gets the X and Y alignment of the widget within its allocation.

See set_alignment().

Parameters:

  xalign | Location to store X alignment of misc, or `0`.
  yalign | Location to store Y alignment of misc, or `0`.

void Gtk::Misc::get_padding | ( | int & | xpad,
|  | int & | ypad
| ) |  | const

Gets the padding in the X and Y directions of the widget.

See set_padding().

Parameters:

  xpad | Location to store padding in the X direction, or `0`.
  ypad | Location to store padding in the Y direction, or `0`.

GtkMisc* Gtk::Misc::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::Image, Gtk::Arrow, Gtk::Label, and Gtk::AccelLabel.

const GtkMisc* Gtk::Misc::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Widget.

Reimplemented in Gtk::Image, Gtk::Arrow, Gtk::Label, and Gtk::AccelLabel.

Glib::PropertyProxy< float > Gtk::Misc::property_xalign | ( |  | ) |

The horizontal alignment, from 0 (left) to 1 (right).

Reversed for RTL layouts.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< float > Gtk::Misc::property_xalign | ( |  | ) | const

The horizontal alignment, from 0 (left) to 1 (right).

Reversed for RTL layouts.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< int > Gtk::Misc::property_xpad | ( |  | ) |

The amount of space to add on the left and right of the widget, in pixels.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< int > Gtk::Misc::property_xpad | ( |  | ) | const

The amount of space to add on the left and right of the widget, in pixels.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< float > Gtk::Misc::property_yalign | ( |  | ) |

The vertical alignment, from 0 (top) to 1 (bottom).

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< float > Gtk::Misc::property_yalign | ( |  | ) | const

The vertical alignment, from 0 (top) to 1 (bottom).

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy< int > Gtk::Misc::property_ypad | ( |  | ) |

The amount of space to add on the top and bottom of the widget, in pixels.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< int > Gtk::Misc::property_ypad | ( |  | ) | const

The amount of space to add on the top and bottom of the widget, in pixels.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
  A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::Misc::set_alignment | ( | float | xalign = `0.0`,
|  | float | yalign = `0.5`
| ) |  |

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 Gtk::Misc::set_alignment | ( | Align | xalign = `Gtk::ALIGN_START`,
|  | Align | yalign = `Gtk::ALIGN_CENTER`
| ) |  |

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

## Friends And Related Function Documentation

Gtk::Misc* wrap | ( | GtkMisc * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

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

- gtkmm/misc.h