container¶
classDiagram
CachedClass <|-- Container
This module contains all ability of a container to manage layouts.
- class charmy.widgets.container.Container(*args, **kwargs)¶
基类:
CachedClassContainer represents a widget's ability to contain and arrange other widgets inside.
The Container class contains the ability of managing widgets within the container, and should be inherited by all types of containers including windows, frames, etc., but not supposed to be instantiated directly.
- __init__(*args, **kwargs)¶
Initialize a container base class.
The container base class is not supposed to be instantiated directly, make sure you are executing this method during subclassing.
- property layers: PropType¶
- abstract property pos: tuple[int, int]¶
- abstract property abs_pos: tuple[int, int]¶
- abstract property size: tuple[int, int]¶
- add_child(child: widget.Widget) Self¶
Add a child object.
- draw_children() Self¶
Draw the container and its children.
- get_mouse_hover(abs_pos: shape.Point) List[Container | widget.Widget]¶