ConfirmItemDeletionDialog#
- class omni.kit.window.filepicker.ConfirmItemDeletionDialog(
- items: List[FileBrowserItem],
- title: str = 'Confirm File Deletion',
- message: str = 'You are about to delete',
- message_fn: Callable[[None], None] = None,
- parent: Widget = None,
- width: int = 500,
- ok_handler: Callable[[PopupDialog], None] = None,
- cancel_handler: Callable[[PopupDialog], None] = None,
Bases:
PopupDialog
Dialog prompting the User to confirm the deletion of the provided list of files and folders.
Methods
__init__
(items[, title, message, ...])Dialog prompting the User to confirm the deletion of the provided list of files and folders.
destroy
()Destructor.
rebuild_ui
(message_fn)Rebuild ui widgets with new message
Attributes
- __init__(
- items: List[FileBrowserItem],
- title: str = 'Confirm File Deletion',
- message: str = 'You are about to delete',
- message_fn: Callable[[None], None] = None,
- parent: Widget = None,
- width: int = 500,
- ok_handler: Callable[[PopupDialog], None] = None,
- cancel_handler: Callable[[PopupDialog], None] = None,
Dialog prompting the User to confirm the deletion of the provided list of files and folders.
- Parameters:
items ([FileBrowserItem]) – List of files and folders to delete.
title (str) – Title of the dialog. Default “Confirm File Deletion”.
message (str) – Basic message. Default “You are about to delete”.
message_fn (Callable[[None], None]) – Message build function.
parent (
omni.ui.Widget
) – OBSOLETE. If specified, the dialog position is relative to this widget. Default `None`.width (int) – Dialog width. Default `500`.
ok_handler (Callable) – Function to execute upon clicking the “Yes” button. Function signature: void ok_handler(dialog:
PopupDialog
)cancel_handler (Callable) – Function to execute upon clicking the “No” button. Function signature: void cancel_handler(dialog:
PopupDialog
)
- destroy() None #
Destructor.
- rebuild_ui(
- message_fn: Callable[[None], None],
Rebuild ui widgets with new message
- Parameters:
message_fn (Callable[[None], None]) – Message build function.