Copyright (C) 2000-2012 |
GNU Info (gtk.info)GtkAlignmentThe alignment widget ==================== Description ----------- The alignment widget is a container (Note: GtkContainer) derived from the bin widget (Note: GtkBin). Its entire purpose is to give the programmer flexibility in how the child it manages is positioned when a window is resized. Normally, a widget is allocated at least as much size as it requests. (Note: GtkContainer for a discussion of geometry management). When a widget is allocated more size than it requests there is a question of how the widget should expand. By convention, most GTK widgets expand to fill their allocated space. Sometimes this behavior is not desired. The alignment widget allows the programmer to specify how a widget should expand and position itself to fill the area it is allocated. Options ------- - User Option: xscale - User Option: yscale The XSCALE and YSCALE options specify how to scale the child widget. If the scale value is 0.0, the child widget is allocated exactly the size it requested in that dimension. If the scale value is 1.0, the child widget is allocated all of the space in a dimension. A scale value of 1.0 for both x and y is equivalent to not using an alignment widget. - User Option: xalign - User Option: yalign The XALIGN and YALIGN options specify how to position the child widget when it is not allocated all the space available to it (because the XSCALE and/or YSCALE options are less than 1.0). If an alignment value is 0.0 the widget is positioned to the left (or top) of its allocated space. An alignment value of 1.0 positions the widget to the right (or bottom) of its allocated space. A common usage is to specify XALIGN and YALIGN to be 0.5 which causes the widget to be centered within its allocated area. Signals ------- Functions --------- - Function: guint gtk_alignment_get_type (void) Returns the `GtkAlignment' type identifier. - Function: GtkWidget* gtk_alignment_new (gfloat XALIGN, gfloat YALIGN, gfloat XSCALE, gfloat YSCALE) Create a new `GtkAlignment' object and initialize it with the values XALIGN, YALIGN, XSCALE and YSCALE. The new widget is returned as a pointer to a `GtkWidget' object. `NULL' is returned on failure. - Function: void gtk_alignment_set (GtkAlignment *ALIGNMENT, gfloat XALIGN, gfloat YALIGN, gfloat XSCALE, gfloat YSCALE) Set the XALIGN, YALIGN, XSCALE and YSCALE options of an alignment widget. It is important to not set the fields of the `GtkAlignment' structure directly (or, for that matter, any type derived from `GtkObject'). - Function: GtkAlignment* GTK_ALIGNMENT (gpointer OBJ) Cast a generic pointer to `GtkAlignment*'. Note: Standard Macros, for more info. - Function: GtkAlignmentClass* GTK_ALIGNMENT_CLASS (gpointer CLASS) Cast a generic pointer to `GtkAlignmentClass*'. Note: Standard Macros, for more info. - Function: gint GTK_IS_ALIGNMENT (gpointer OBJ) Determine if a generic pointer refers to a `GtkAlignment' object. Note: Standard Macros, for more info. automatically generated by info2www version 1.2.2.9 |