Struct gtk4::builders::AlertDialogBuilder
source · pub struct AlertDialogBuilder { /* private fields */ }
v4_10
only.Expand description
A builder-pattern type to construct AlertDialog
objects.
Implementations§
source§impl AlertDialogBuilder
impl AlertDialogBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new AlertDialogBuilder
.
sourcepub fn build(self) -> AlertDialog
pub fn build(self) -> AlertDialog
Build the AlertDialog
.
Labels for buttons to show in the alert.
The labels should be translated and may contain a _ to indicate the mnemonic character.
If this property is not set, then a ‘Close’ button is automatically created.
This property determines what happens when the Escape key is pressed while the alert is shown.
If this property holds the index of a button in property::AlertDialog::buttons
,
then pressing Escape is treated as if that button was pressed. If it is -1
or not a valid index for the buttons
array, then an error is returned.
If buttons
is NULL
, then the automatically created ‘Close’ button
is treated as both cancel and default button, so 0 is returned.
This property determines what happens when the Return key is pressed while the alert is shown.
If this property holds the index of a button in property::AlertDialog::buttons
,
then pressing Return is treated as if that button was pressed. If it is -1
or not a valid index for the buttons
array, then nothing happens.
If buttons
is NULL
, then the automatically created ‘Close’ button
is treated as both cancel and default button, so 0 is returned.
Trait Implementations§
source§impl Clone for AlertDialogBuilder
impl Clone for AlertDialogBuilder
source§fn clone(&self) -> AlertDialogBuilder
fn clone(&self) -> AlertDialogBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more