HButtonBox

A button box should be used to provide a consistent layout of buttons throughout your application. The layout/spacing can be altered by the programmer, or if desired, by the user to alter the 'feel' of a program to a small degree.

A GtkHButtonBox is created with gtk_hbutton_box_new(). Buttons are packed into a button box the same way widgets are added to any other container, using gtk_container_add(). You can also use gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both these functions work just like gtk_container_add(), ie., they pack the button in a way that depends on the current layout style and on whether the button has had gtk_button_box_set_child_secondary() called on it.

The spacing between buttons can be set with gtk_box_set_spacing(). The arrangement and layout of the buttons can be changed with gtk_button_box_set_layout().

GtkHButtonBox has been deprecated, use GtkButtonBox instead.

Constructors

this
this(GtkHButtonBox* gtkHButtonBox)

Sets our main struct and passes it to the parent class

this
this()

Warning gtk_hbutton_box_new has been deprecated since version 3.2 and should not be used in newly-written code. Use gtk_button_box_new() with GTK_ORIENTATION_HORIZONTAL instead Creates a new horizontal button box.

Members

Functions

getHButtonBoxStruct
GtkHButtonBox* getHButtonBoxStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

createActionBox
HButtonBox createActionBox()

Creates a new HButtonBox and sets comon parameters

Variables

gtkHButtonBox
GtkHButtonBox* gtkHButtonBox;

the main Gtk struct

Inherited Members

From ButtonBox

gtkButtonBox
GtkButtonBox* gtkButtonBox;

the main Gtk struct

getButtonBoxStruct
GtkButtonBox* getButtonBoxStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
createActionBox
ButtonBox createActionBox(void delegate(Button) onClicked, StockID[] stocks, string[] actions, bool vertical)
createOkBox
ButtonBox createOkBox(void delegate(Button) onClicked)
createOkCancelBox
ButtonBox createOkCancelBox(void delegate(Button) onClicked)
getLayout
GtkButtonBoxStyle getLayout()

Retrieves the method being used to arrange the buttons in a button box.

getChildSecondary
int getChildSecondary(Widget child)

Returns whether child should appear in a secondary group of children. Since 2.4

getChildNonHomogeneous
int getChildNonHomogeneous(Widget child)

Returns whether the child is exempted from homogenous sizing.

setLayout
void setLayout(GtkButtonBoxStyle layoutStyle)

Changes the way buttons are arranged in their container.

setChildSecondary
void setChildSecondary(Widget child, int isSecondary)

Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog. This group appears after the other children if the style is GTK_BUTTONBOX_START, GTK_BUTTONBOX_SPREAD or GTK_BUTTONBOX_EDGE, and before the other children if the style is GTK_BUTTONBOX_END. For horizontal button boxes, the definition of before/after depends on direction of the widget (see gtk_widget_set_direction()). If the style is GTK_BUTTONBOX_START or GTK_BUTTONBOX_END, then the secondary children are aligned at the other end of the button box from the main children. For the other styles, they appear immediately next to the main children.

setChildNonHomogeneous
void setChildNonHomogeneous(Widget child, int nonHomogeneous)

Sets whether the child is exempted from homogeous sizing.

Meta