GtkMisc

Name

GtkMisc -- a base class for widgets with alignments and padding.

Synopsis


#include <gtk/gtk.h>


struct      GtkMisc;
void        gtk_misc_set_alignment          (GtkMisc *misc,
                                             gfloat xalign,
                                             gfloat yalign);
void        gtk_misc_set_padding            (GtkMisc *misc,
                                             gint xpad,
                                             gint ypad);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkMisc

Properties


  "xalign"               gfloat               : Read / Write
  "yalign"               gfloat               : Read / Write
  "xpad"                 gint                 : Read / Write
  "ypad"                 gint                 : Read / Write

Description

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

Details

struct GtkMisc

struct GtkMisc;

The GtkMisc struct contains the following fields. (These fields should be considered read-only. They should never be set by an application.)

gfloat xalign;the horizontal alignment, from 0 (left) to 1 (right).
gfloat yalign;the vertical alignment, from 0 (top) to 1 (bottom).
guint16 xpad;the amount of space to add on the left and right of the widget, in pixels.
guint16 ypad;the amount of space to add on the top and bottom of the widget, in pixels.


gtk_misc_set_alignment ()

void        gtk_misc_set_alignment          (GtkMisc *misc,
                                             gfloat xalign,
                                             gfloat yalign);

Sets the alignment of the widget.

misc :a GtkMisc.
xalign :the horizontal alignment, from 0 (left) to 1 (right).
yalign :the vertical alignment, from 0 (top) to 1 (bottom).


gtk_misc_set_padding ()

void        gtk_misc_set_padding            (GtkMisc *misc,
                                             gint xpad,
                                             gint ypad);

Sets the amount of space to add around the widget.

misc :a GtkMisc.
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.

Properties

"xalign" (gfloat : Read / Write)

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

"yalign" (gfloat : Read / Write)

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

"xpad" (gint : Read / Write)

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

"ypad" (gint : Read / Write)

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