GtkMisc
GtkMisc — Base class for widgets with alignments and padding
|
|
Implemented Interfaces
GtkMisc implements
AtkImplementorIface and GtkBuildable.
Includes
#include <gtk/gtk.h>
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 widget's position.
Note that the desired effect can in most cases be achieved by using the
“halign”, “valign” and “margin” properties
on the child widget, so GtkMisc should not be used in new code. To reflect
this fact, all GtkMisc API has been deprecated.
Functions
gtk_misc_set_alignment ()
void
gtk_misc_set_alignment (GtkMisc *misc,
gfloat xalign,
gfloat yalign);
Sets the alignment of the widget.
gtk_misc_set_padding ()
void
gtk_misc_set_padding (GtkMisc *misc,
gint xpad,
gint ypad);
gtk_misc_set_padding has been deprecated since version 3.14 and should not be used in newly-written code.
Use GtkWidget alignment and margin properties.
Sets the amount of space to add around the widget.
gtk_misc_get_alignment ()
void
gtk_misc_get_alignment (GtkMisc *misc,
gfloat *xalign,
gfloat *yalign);
gtk_misc_get_alignment has been deprecated since version 3.14 and should not be used in newly-written code.
Use GtkWidget alignment and margin properties.
Gets the X and Y alignment of the widget within its allocation.
See gtk_misc_set_alignment().
gtk_misc_get_padding ()
void
gtk_misc_get_padding (GtkMisc *misc,
gint *xpad,
gint *ypad);
gtk_misc_get_padding has been deprecated since version 3.14 and should not be used in newly-written code.
Use GtkWidget alignment and margin properties.
Gets the padding in the X and Y directions of the widget.
See gtk_misc_set_padding().
Types and Values
struct GtkMisc
struct GtkMisc;
Property Details
The “xalign” property
“xalign” gfloat
The horizontal alignment. A value of 0.0 means left alignment (or right
on RTL locales); a value of 1.0 means right alignment (or left on RTL
locales).
Owner: GtkMisc
Flags: Read / Write
Allowed values: [0,1]
Default value: 0.5
The “xpad” property
“xpad” gint
The amount of space to add on the left and right of the widget, in
pixels.
Owner: GtkMisc
Flags: Read / Write
Allowed values: >= 0
Default value: 0
The “yalign” property
“yalign” gfloat
The vertical alignment. A value of 0.0 means top alignment;
a value of 1.0 means bottom alignment.
Owner: GtkMisc
Flags: Read / Write
Allowed values: [0,1]
Default value: 0.5
The “ypad” property
“ypad” gint
The amount of space to add on the top and bottom of the widget, in
pixels.
Owner: GtkMisc
Flags: Read / Write
Allowed values: >= 0
Default value: 0