# Copyright (c) 2018-2020, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
"""
The basic UI widget and set of supporting classes for navigating the filesystem through a tree view.
The filesystem can either be from your local machine or the Omniverse server.

Example:

.. code-block:: python

    With just a few lines of code, you can create a powerful, flexible tree view widget that you
    can embed into your view.

        filebrowser = FileBrowserWidget(
            "Omniverse",
            layout=SPLIT_PANES,
            mouse_pressed_fn=on_mouse_pressed,
            selection_changed_fn=on_selection_changed,
            drop_fn=drop_handler,
            filter_fn=item_filter_fn,
        )

Module Constants:

    layout: {LAYOUT_SINGLE_PANE_SLIM, LAYOUT_SINGLE_PANE_WIDE, LAYOUT_SPLIT_PANES, LAYOUT_DEFAULT}

"""
LAYOUT_SINGLE_PANE_SLIM = 1
LAYOUT_SINGLE_PANE_WIDE = 2
LAYOUT_SPLIT_PANES = 3
LAYOUT_SINGLE_PANE_LIST = 4
LAYOUT_DEFAULT = 3

TREEVIEW_PANE = 1
LISTVIEW_PANE = 2

import carb.events
CONNECTION_ERROR_EVENT: int = carb.events.type_from_string("omni.kit.widget.filebrowser.CONNECTION_ERROR")
MISSING_IMAGE_THUMBNAILS_EVENT: int = carb.events.type_from_string("omni.services.thumbnails.MISSING_IMAGE_THUMBNAILS")
THUMBNAILS_GENERATED_EVENT: int = carb.events.type_from_string("omni.services.thumbnails.THUMBNAILS_GENERATED")

ALERT_INFO = 1
ALERT_WARNING = 2
ALERT_ERROR = 3

from .widget import FileBrowserWidget
from .card import FileBrowserItemCard
from .model import FileBrowserModel, FileBrowserItem, FileBrowserUdimItem, FileBrowserItemFactory
from .filesystem_model import FileSystemModel, FileSystemItem
from .nucleus_model import NucleusModel, NucleusItem, NucleusConnectionItem
from .column_delegate_registry import ColumnDelegateRegistry
from .abstract_column_delegate import ColumnItem
from .abstract_column_delegate import AbstractColumnDelegate
from .thumbnails import find_thumbnails_for_files_async, list_thumbnails_for_folder_async
from .clipboard import save_items_to_clipboard, get_clipboard_items, is_clipboard_cut, is_path_cut, clear_clipboard
