DetailView#

class omni.kit.window.filepicker.DetailView(**kwargs)#

Bases: object

Detail view that contains all detail frames

Methods

__init__(**kwargs)

add_detail_frame(name, glyph, build_fn[, ...])

Adds sub-frame to the detail view, and populates it with a custom built widget.

add_detail_frame_from_controller(name[, ...])

Adds sub-frame to the detail view, and populates it with a custom built widget.

delete_detail_frame(name)

Deletes the specified detail frame.

destroy()

Destructor

get_detail_frame(name)

Get the detail frame by given name.

on_filename_changed([filename])

When the user edits the filename, invokes the callbacks for the detail frames.

on_selection_changed([selected])

When the user changes their filebrowser selection(s), invokes the callbacks for the detail frames.

__init__(**kwargs)#
add_detail_frame(
name: str,
glyph: str,
build_fn: Callable[[], Widget],
selection_changed_fn: Callable[[List[str]], None] = None,
filename_changed_fn: Callable[[str], None] = None,
destroy_fn: Callable[[Widget], None] = None,
)#

Adds sub-frame to the detail view, and populates it with a custom built widget.

Parameters:
  • name (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.

  • glyph (str) – Associated glyph to display for this subj-section

  • build_fn (Callable) – This callback function builds the widget.

Keyword Arguments:
  • selection_changed_fn (Callable) – This callback is invoked to handle selection changes.

  • filename_changed_fn (Callable) – This callback is invoked when filename is changed.

  • destroy_fn (Callable) – Cleanup function called when destroyed.

add_detail_frame_from_controller(
name: str,
detail_frame: DetailFrameController = None,
)#

Adds sub-frame to the detail view, and populates it with a custom built widget.

Parameters:
  • name (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.

  • controller (DetailFrameController) – Controller object that encapsulates all aspects of creating, updating, and deleting a detail frame widget.

delete_detail_frame(name: str)#

Deletes the specified detail frame.

Parameters:

name (str) – Name of the detail frame.

destroy()#

Destructor

get_detail_frame(
name: str,
) DetailFrameController#

Get the detail frame by given name. This method is thread safe. Use with caution

Parameters:

name – Name of the detail frame

Returns:

obj:’DetailFrameController’ with given name or None if not found

on_filename_changed(filename: str = '')#

When the user edits the filename, invokes the callbacks for the detail frames.

Parameters:

filename (str) – Current filename.

on_selection_changed(
selected: List[FileBrowserItem] = [],
)#

When the user changes their filebrowser selection(s), invokes the callbacks for the detail frames.

Parameters:

selected (FileBrowserItem) – List of new selections.