Show / Hide Table of Contents

Class X11DialogComponent

Inheritance
object
X11DialogComponent
Implements
IDialogComponent
IPalComponent
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OpenTK.Platform.Native.X11
Assembly: OpenTK.Platform.dll
Syntax
public class X11DialogComponent : IDialogComponent, IPalComponent

Properties

CanTargetFolders

If the value of this property is true SelectDirectory will work. Otherwise this flag will be ignored.

Declaration
public bool CanTargetFolders { get; }
Property Value
Type Description
bool
See Also
Dialog
SelectDirectory
ShowOpenDialog(WindowHandle, string, string, DialogFileFilter[], OpenDialogOptions)

Logger

The logger that this component uses to log diagnostic messages.

Declaration
public ILogger? Logger { get; set; }
Property Value
Type Description
ILogger
See Also
ILogger
Logger

Name

Name of the abstraction layer component.

Declaration
public string Name { get; }
Property Value
Type Description
string

Provides

Specifies which PAL components this object provides.

Declaration
public PalComponents Provides { get; }
Property Value
Type Description
PalComponents

Methods

Initialize(ToolkitOptions)

Initialize the component.

Declaration
public void Initialize(ToolkitOptions options)
Parameters
Type Name Description
ToolkitOptions options

The options to initialize the component with.

See Also
ToolkitOptions
Init(ToolkitOptions)

ShowMessageBox(WindowHandle, string, string, MessageBoxType, IconHandle?)

Shows a modal message box.

Declaration
public MessageBoxButton ShowMessageBox(WindowHandle parent, string title, string content, MessageBoxType messageBoxType, IconHandle? customIcon = null)
Parameters
Type Name Description
WindowHandle parent

The parent window for which this dialog is modal.

string title

The title of the dialog box.

string content

The content text of the dialog box. This is the prompt to the user, explain what they should do.

MessageBoxType messageBoxType

The type of message box. Determines button layout and default icon.

IconHandle customIcon

An optional custom icon to use instead of the default one.

Returns
Type Description
MessageBoxButton

The pressed message box button.

Remarks

This function runs a modal event loop and will only return once the dialog has been dissmissed by pressing any of it's buttons.

See Also
MessageBoxType
MessageBoxButton
Icon
IIconComponent

ShowOpenDialog(WindowHandle, string, string, DialogFileFilter[]?, OpenDialogOptions)

Shows a modal "open file/folder" dialog.

Declaration
public List<string>? ShowOpenDialog(WindowHandle parent, string title, string directory, DialogFileFilter[]? allowedExtensions, OpenDialogOptions options)
Parameters
Type Name Description
WindowHandle parent

The parent window handle for which this dialog will be modal.

string title

The title of the dialog.

string directory

The start directory of the file dialog.

DialogFileFilter[] allowedExtensions

A list of file filters that filter valid files to open. See DialogFileFilter for more info.

OpenDialogOptions options

Additional options for the file dialog (e.g. AllowMultiSelect for allowing multiple files to be selected.)

Returns
Type Description
List<string>

A list of selected files or null if no files where selected. If AllowMultiSelect is not specified the list will only contain a single element.

Remarks

This function runs a modal event loop and will only return once the dialog has been dissmissed by pressing any of it's buttons.

See Also
DialogFileFilter
OpenDialogOptions
ShowSaveDialog(WindowHandle, string, string, DialogFileFilter[], SaveDialogOptions)
CanTargetFolders

ShowSaveDialog(WindowHandle, string, string, DialogFileFilter[]?, SaveDialogOptions)

Shows a modal "save file" dialog.

Declaration
public string? ShowSaveDialog(WindowHandle parent, string title, string directory, DialogFileFilter[]? allowedExtensions, SaveDialogOptions options)
Parameters
Type Name Description
WindowHandle parent

The parent window handle for which this dialog will be modal.

string title

The title of the dialog.

string directory

The starting directory of the file dialog.

DialogFileFilter[] allowedExtensions

A list of file filters that filter valid file extensions to save as. See DialogFileFilter for more info.

SaveDialogOptions options

Additional options for the file dialog.

Returns
Type Description
string

The path to the selected save file, or null if no file was selected.

Remarks

This function runs a modal event loop and will only return once the dialog has been dissmissed by pressing any of it's buttons.

See Also
DialogFileFilter
SaveDialogOptions

Uninitialize()

Uninitialize the component. Frees any native resources used by the component.

Declaration
public void Uninitialize()
See Also
Uninit()

Implements

IDialogComponent
IPalComponent
In this article
Back to top Generated by DocFX