Class Box
Box is the main layout element of Elsie.
Declaration
source linkDocumentation
Its most useful methods actually come from `BoxMixin`.
Methods
▶ def __init__(self, slide: slide.Slide, layout: layout.Layout, styles, ...) override def __init__(
self,
slide: slide.Slide,
layout: layout.Layout,
styles,
show_info: show.ShowInfo,
z_level=0,
name: str = None,
)
This method overrides elsie.text.stylecontainer.StyleContainer.__init__.
Parameters
- slide : slide.Slide
Slide that contains this box.
- layout : layout.Layout
Layout of the box (vertical/horizontal).
- name : str
Name of the box (useful for debugging and name policy).
- show_info : show.ShowInfo
Contains information about fragments in which the box should be shown.
- z_level : int
Z-level of the box (useful for changing render order).
▷ def add_child(self, obj, prepend=False, above=None, below=None) Semi-internal function, you can add your child if you know what you are doing.
▷ def current_fragment(self) -> int Returns the current fragment (the fragment with the highest number defined so far).