gtk2/docs/reference/gtk/tmpl/gtkbbox.sgml

158 lines
4.4 KiB
Plaintext
Raw Normal View History

<!-- ##### SECTION Title ##### -->
GtkButtonBox
<!-- ##### SECTION Short_Description ##### -->
Base class for #GtkHButtonBox and #GtkVButtonBox
<!-- ##### SECTION Long_Description ##### -->
<para>
The primary purpose of this class is to keep track of the various properties
of #GtkHButtonBox and #GtkVButtonBox widgets.
</para>
<para>
gtk_button_box_get_child_size_default() retrieves the default minimum width and height
for widgets in any button box. gtk_button_box_set_child_size_default()
changes the default minimum child widget size.
</para>
<para>
gtk_button_box_get_child_size() retrieves the minimum width and height
for widgets in a given button box. gtk_button_box_set_child_size()
allows those properties to be changed.
</para>
<para>
gtk_button_box_get_child_ipadding_default() gets the default number of pixels of
horizontal and vertical padding that are applied to each button in every button box.
gtk_button_box_set_child_ipadding_default() allows these defaults to be
changed.
</para>
<para>
The internal padding of buttons can be retrieved and changed per button box using
gtk_button_box_get_child_ipadding() and gtk_button_box_set_child_ipadding()
respectively.
</para>
<para>
gtk_button_box_get_spacing() and gtk_button_box_set_spacing() retrieve and
change default number of pixels between buttons, respectively.
</para>
<para>
gtk_button_box_get_layout() and gtk_button_box_set_layout() retrieve and alter the method
used to spread the buttons in a button box across the container, respectively.
</para>
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkVButtonBox</term>
<listitem><para>Vertical sub-class of #GtkButtonBox.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkHButtonBox</term>
<listitem><para>Horizontal sub-class of #GtkButtonBox.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### STRUCT GtkButtonBox ##### -->
<para>
This is a read-only struct; no members should be modified directly.
</para>
<!-- ##### MACRO GTK_BUTTONBOX_DEFAULT ##### -->
<para>
Used internally only.
</para>
new function, turns off decorations for a window. 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns off decorations for a window. * demos/gtk-demo/button_box.c (create_bbox): adapt to button box changes * gtk/gtklabel.c (gtk_label_get_layout_offsets): new function to get location of PangoLayout inside the label, closes #51198 * gtk/testgtk.c (create_bbox): fix up button box usage * gtk/testcalendar.c (create_calendar): fix up button box usage * gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage * gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage * gtk/gtkhbbox.h: deprecations * gtk/gtkvbbox.h: deprecations * gtk/gtkbox.c (gtk_box_get_spacing): new function, used to emulate deprecated gtk_button_box_get_spacing * gtk/gtkbbox.h: deprecate some useless functions, remove entirely the "set global default" functions (struct _GtkButtonBox): remove "spacing" field, use the one from GtkBox base class * gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to render the icon, return the missing image icon. * gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing image icon if the load fails. * gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use when no image is found; should be the Netscape "missing image" icon eventually but for now is a random image * gtk/gtkwindow.c (gtk_window_set_role): new function, sets the role for the session manager * gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG * gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL * gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
<!-- ##### MACRO gtk_button_box_get_spacing ##### -->
<para>
Retrieves how much space a button box is placing between each child button.
</para>
@Returns: the current spacing applied to the buttons in @widget.
new function, turns off decorations for a window. 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns off decorations for a window. * demos/gtk-demo/button_box.c (create_bbox): adapt to button box changes * gtk/gtklabel.c (gtk_label_get_layout_offsets): new function to get location of PangoLayout inside the label, closes #51198 * gtk/testgtk.c (create_bbox): fix up button box usage * gtk/testcalendar.c (create_calendar): fix up button box usage * gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage * gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage * gtk/gtkhbbox.h: deprecations * gtk/gtkvbbox.h: deprecations * gtk/gtkbox.c (gtk_box_get_spacing): new function, used to emulate deprecated gtk_button_box_get_spacing * gtk/gtkbbox.h: deprecate some useless functions, remove entirely the "set global default" functions (struct _GtkButtonBox): remove "spacing" field, use the one from GtkBox base class * gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to render the icon, return the missing image icon. * gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing image icon if the load fails. * gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use when no image is found; should be the Netscape "missing image" icon eventually but for now is a random image * gtk/gtkwindow.c (gtk_window_set_role): new function, sets the role for the session manager * gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG * gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL * gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
<!-- # Unused Parameters # -->
@widget: a #GtkButtonBox.
<!-- ##### FUNCTION gtk_button_box_get_layout ##### -->
<para>
Retrieves the method being used to arrange the buttons in a button box.
</para>
@widget: a #GtkButtonBox.
@Returns: the method used to layout buttons in @widget.
<!-- ##### FUNCTION gtk_button_box_get_child_size ##### -->
<para>
Retrieves the current width and height of all child widgets in a button box.
@min_width and @min_height are filled with those values, respectively.
</para>
@widget: a #GtkButtonBox.
@min_width: the width of the buttons contained by @widget.
@min_height: the height of the buttons contained by @widget.
<!-- ##### FUNCTION gtk_button_box_get_child_ipadding ##### -->
<para>
Gets the default number of pixels that pad the buttons in a given button box.
</para>
@widget: a #GtkButtonBox.
@ipad_x: the horizontal padding used by buttons in @widget.
@ipad_y: the vertical padding used by buttons in @widget.
new function, turns off decorations for a window. 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns off decorations for a window. * demos/gtk-demo/button_box.c (create_bbox): adapt to button box changes * gtk/gtklabel.c (gtk_label_get_layout_offsets): new function to get location of PangoLayout inside the label, closes #51198 * gtk/testgtk.c (create_bbox): fix up button box usage * gtk/testcalendar.c (create_calendar): fix up button box usage * gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage * gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage * gtk/gtkhbbox.h: deprecations * gtk/gtkvbbox.h: deprecations * gtk/gtkbox.c (gtk_box_get_spacing): new function, used to emulate deprecated gtk_button_box_get_spacing * gtk/gtkbbox.h: deprecate some useless functions, remove entirely the "set global default" functions (struct _GtkButtonBox): remove "spacing" field, use the one from GtkBox base class * gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to render the icon, return the missing image icon. * gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing image icon if the load fails. * gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use when no image is found; should be the Netscape "missing image" icon eventually but for now is a random image * gtk/gtkwindow.c (gtk_window_set_role): new function, sets the role for the session manager * gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG * gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL * gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
<!-- ##### MACRO gtk_button_box_set_spacing ##### -->
<para>
Sets the amount of spacing between buttons in a given button box.
</para>
new function, turns off decorations for a window. 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns off decorations for a window. * demos/gtk-demo/button_box.c (create_bbox): adapt to button box changes * gtk/gtklabel.c (gtk_label_get_layout_offsets): new function to get location of PangoLayout inside the label, closes #51198 * gtk/testgtk.c (create_bbox): fix up button box usage * gtk/testcalendar.c (create_calendar): fix up button box usage * gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage * gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage * gtk/gtkhbbox.h: deprecations * gtk/gtkvbbox.h: deprecations * gtk/gtkbox.c (gtk_box_get_spacing): new function, used to emulate deprecated gtk_button_box_get_spacing * gtk/gtkbbox.h: deprecate some useless functions, remove entirely the "set global default" functions (struct _GtkButtonBox): remove "spacing" field, use the one from GtkBox base class * gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to render the icon, return the missing image icon. * gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing image icon if the load fails. * gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use when no image is found; should be the Netscape "missing image" icon eventually but for now is a random image * gtk/gtkwindow.c (gtk_window_set_role): new function, sets the role for the session manager * gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG * gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL * gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
<!-- # Unused Parameters # -->
@widget: a #GtkButtonBox.
@spacing: the number of pixels of spacing.
<!-- ##### FUNCTION gtk_button_box_set_layout ##### -->
<para>
Changes the way buttons are arranged in their container.
</para>
@widget: a #GtkButtonBox.
@layout_style: the new layout style.
<!-- ##### FUNCTION gtk_button_box_set_child_size ##### -->
<para>
Sets a new default size for the children of a given button box.
</para>
@widget: a #GtkButtonBox.
@min_width: a default width for buttons in @widget.
@min_height: a default height for buttons in @widget.
<!-- ##### FUNCTION gtk_button_box_set_child_ipadding ##### -->
<para>
Changes the amount of internal padding used by all buttons in a given button
box.
</para>
@widget: a #GtkButtonBox.
@ipad_x: the horizontal padding that should be used by each button in @widget.
@ipad_y: the vertical padding that should be used by each button in @widget.
<!-- ##### ARG GtkButtonBox:layout-style ##### -->
<para>
</para>