Table of Contents

Class AlertDialog

Namespace
Gtk
Assembly
Gtk-4.0.dll
public class AlertDialog : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
AlertDialog
Implements
Inherited Members

Constructors

AlertDialog(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public AlertDialog(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

AlertDialog(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected AlertDialog(CreationData data)

Parameters

data CreationData

AlertDialog(AlertDialogHandle)

protected AlertDialog(AlertDialogHandle handle)

Parameters

handle AlertDialogHandle

Fields

ButtonsPropertyDefinition

public static readonly Property<string[], AlertDialog> ButtonsPropertyDefinition

Field Value

Property<string[], AlertDialog>

CancelButtonPropertyDefinition

public static readonly Property<int, AlertDialog> CancelButtonPropertyDefinition

Field Value

Property<int, AlertDialog>

DefaultButtonPropertyDefinition

public static readonly Property<int, AlertDialog> DefaultButtonPropertyDefinition

Field Value

Property<int, AlertDialog>

DetailPropertyDefinition

public static readonly Property<string?, AlertDialog> DetailPropertyDefinition

Field Value

Property<string, AlertDialog>

MessagePropertyDefinition

public static readonly Property<string?, AlertDialog> MessagePropertyDefinition

Field Value

Property<string, AlertDialog>

ModalPropertyDefinition

public static readonly Property<bool, AlertDialog> ModalPropertyDefinition

Field Value

Property<bool, AlertDialog>

Properties

Buttons

public string[] Buttons { get; set; }

Property Value

string[]

CancelButton

public int CancelButton { get; set; }

Property Value

int

DefaultButton

public int DefaultButton { get; set; }

Property Value

int

Detail

public string? Detail { get; set; }

Property Value

string

Message

public string? Message { get; set; }

Property Value

string

Modal

public bool Modal { get; set; }

Property Value

bool

Methods

ChooseAsync(Window?)

public Task<int> ChooseAsync(Window? parent)

Parameters

parent Window

Returns

Task<int>

ChooseFinish(AsyncResult)

[Version("4.10")]
public int ChooseFinish(AsyncResult result)

Parameters

result AsyncResult

Returns

int

GetButtons()

[Version("4.10")]
public string[]? GetButtons()

Returns

string[]

GetCancelButton()

[Version("4.10")]
public int GetCancelButton()

Returns

int

GetDefaultButton()

[Version("4.10")]
public int GetDefaultButton()

Returns

int

GetDetail()

[Version("4.10")]
public string GetDetail()

Returns

string

GetGType()

public static Type GetGType()

Returns

Type

GetMessage()

[Version("4.10")]
public string GetMessage()

Returns

string

GetModal()

[Version("4.10")]
public bool GetModal()

Returns

bool

NewFromPointer(nint, bool)

Creates a new managed AlertDialog instance for a given pointer.

public static AlertDialog NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

AlertDialog

NewWithProperties(ConstructArgument[])

Creates a new AlertDialog and sets the properties specified by the construct arguments.

public static AlertDialog NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

AlertDialog

SetButtons(string[])

[Version("4.10")]
public void SetButtons(string[] labels)

Parameters

labels string[]

SetCancelButton(int)

[Version("4.10")]
public void SetCancelButton(int button)

Parameters

button int

SetDefaultButton(int)

[Version("4.10")]
public void SetDefaultButton(int button)

Parameters

button int

SetDetail(string)

[Version("4.10")]
public void SetDetail(string detail)

Parameters

detail string

SetMessage(string)

[Version("4.10")]
public void SetMessage(string message)

Parameters

message string

SetModal(bool)

[Version("4.10")]
public void SetModal(bool modal)

Parameters

modal bool

Show(Window?)

[Version("4.10")]
public void Show(Window? parent)

Parameters

parent Window