Window¶
-
class
ocvproto.ui.window.
Window
(name: str = None)¶ Represents a window.
Parameters: name – Window name. If not set, automatically generated. -
add_trackbar
(*trackbars)¶ Add the given trackbars to the window.
Parameters: trackbars –
-
add_trackbar_group
(definitions: Union[int, Dict[str, dict], List[dict], List[str]], prefix: str = '', **common_kwargs) → Tuple¶ A shortcut to batch create trackbars in a declarative way.
Parameters: - definitions –
Definitions to construct trackbars.
- Integer:
- 2 - create two trackbars with generated titles and default params.
- List:
- [‘one’, ‘two’, ‘three’] -
- create 3 trackbars with the given titles and default params.
- [{‘keys’: ‘kl’}, {}] -
- create 2 trackbars with generated titles and default params.
- Dictionary:
- {‘y’: {‘keys’: ‘kl’}, ‘x’: {‘step’: 20}} - create 2 trackbars with the given titles and params.
- prefix – Prefix to add to trackbars titles.
- common_kwargs – Common keyword arguments to pass to all trackbars.
- definitions –
-
create
(*, autosize=True)¶ Creates a window.
Parameters: autosize – If try, window is automatically sized to a content.
-
position
(*, x: int, y: int)¶ Positions the window.
-
render
()¶ Renders window contents.
-
resize
(*, width: int, height: int)¶ Resizes the window.
Parameters: - width –
- height –
-
set_frame
(frame: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7f886e166da0>, Frame])¶ Sets current frame for the window.
Parameters: frame –
-