-
public void add_action_widget (Widget child, int response_id)
Adds an activatable widget to the action area of a Dialog,
connecting a signal handler that will emit the response signal on the dialog
when the widget is activated. The widget is appended to the end of the dialog's action area. If you want to add a non-activatable
widget, simply pack it into the action_area field of the Dialog struct.
-
public weak Widget add_button (string button_text, int response_id)
Adds a button with the given text (or a stock button, if button_text is a stock ID) and
sets things up so that clicking the button will emit the response signal with
the given response_id. The button is appended to the end of the dialog's action area. The button widget is returned,
but usually you don't need it.
-
public void add_buttons (...)
Adds more buttons, same as calling add_button
repeatedly. The variable argument list should be null-terminated as with
Dialog.with_buttons. Each button must have both text and
response ID.
-
public weak Widget get_action_area ()
Returns the action area of dialog.
-
public weak Widget get_content_area ()
Returns the content area of dialog.
-
public bool get_has_separator ()
Accessor for whether the dialog has a separator.
-
public int get_response_for_widget (Widget widget)
Gets the response id of a widget in the action area of a dialog.
-
public weak Widget get_widget_for_response (int response_id)
Gets the widget button that uses the given response ID in the action area of a dialog.
-
public int run ()
Blocks in a recursive main loop until the dialog either emits the
response signal, or is destroyed. If the dialog is destroyed during the call
to run, run returns
NONE. Otherwise, it returns the response ID from the
response signal emission.
-
public void set_alternative_button_order (...)
Sets an alternative button order. If the
gtk_alternative_button_order setting is set to
true, the dialog buttons are reordered according to the order of the response ids passed to this function.
-
public void set_alternative_button_order_from_array (int n_params, int new_order)
Sets an alternative button order. If the
gtk_alternative_button_order setting is set to
true, the dialog buttons are reordered according to the order of the response ids in new_order.
-
public void set_default_response (int response_id)
Sets the last widget in the dialog's action area with the given response_id as the
default widget for the dialog. Pressing "Enter" normally activates the default widget.
-
public void set_has_separator (bool setting)
Sets whether the dialog has a separator above the buttons.
-
public void set_response_sensitive (int response_id, bool setting)
Calls gtk_widget_set_sensitive (widget, setting) for each widget in the dialog's
action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.