ndv.views #
Wrappers around GUI & graphics frameworks.
Most stuff in this module is not intended for public use, but ndv.views.bases
shows the protocol that GUI & graphics classes should implement.
Modules:
-
bases
–Abstract base classes for views and viewable objects.
Classes:
-
CanvasBackend
–Enum of available canvas backends.
-
GuiFrontend
–Enum of available GUI frontends.
Functions:
-
get_array_canvas_class
–Return
ArrayCanvas
class for current canvas backend. -
get_array_view_class
–Return
ArrayView
class for current GUI frontend. -
get_histogram_canvas_class
–Return
HistogramCanvas
class for current canvas backend. -
gui_frontend
–Return the active
GuiFrontend
. -
run_app
–Start the active GUI application event loop.
CanvasBackend #
GuiFrontend #
Enum of available GUI frontends.
Attributes:
get_array_canvas_class #
get_array_canvas_class(
backend: str | None = None,
) -> type[ArrayCanvas]
Return ArrayCanvas
class for current canvas backend.
Source code in ndv/views/_app.py
558 559 560 561 562 563 |
|
get_array_view_class #
Return ArrayView
class for current GUI frontend.
Source code in ndv/views/_app.py
553 554 555 |
|
get_histogram_canvas_class #
get_histogram_canvas_class(
backend: str | None = None,
) -> type[HistogramCanvas]
Return HistogramCanvas
class for current canvas backend.
Source code in ndv/views/_app.py
566 567 568 569 570 571 |
|
gui_frontend cached
#
gui_frontend() -> GuiFrontend
Return the active GuiFrontend
.
This is determined first by the NDV_GUI_FRONTEND
environment variable, after which known GUI providers are tried in order until one is found that is either already running, or available.
Source code in ndv/views/_app.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
|
run_app #
run_app() -> None
Start the active GUI application event loop.
Source code in ndv/views/_app.py
592 593 594 |
|