Window
A window for Freevo popups. This class will only draw the background and border and has some basic functions to get skin informations and show hide methods. When a window is shown, it will get the focus to the eventhandler that needs to be defined by inherting classes. Not setting x, y, width and height will result in centering the window with a default size.
Usage: Window(pos=(None, None), size=(None, None))
Inherited from
- from freevo.ui.gui import theme, displays
- from freevo.ui.gui.widgets import Rectangle, Container
Methods
- get_content_pos(): Return the position of the content inside the window
- get_content_size(): Return the size the content can have inside the window
- show(): Show the window on the screen
- destroy(): Destroy (close) the window
ConfirmBox
A box with two buttons: Yes and No. It can have additional handles what function should be called if Yes is selected. INPUT_EXIT will be close the box like pressing No.
Usage: ConfirmBox(WaitBox)
Inherited from
- from freevo.ui.gui.widgets.textbox import Textbox
- from freevo.ui.gui.widgets.button import Button
from waitbox import WaitBox
Methods
- update(): update the confirm box
WaitBox
A box with only a label and the user has no options to close it. This box should be used when Freevo is doing some background action and the user has to wait.
Usage: WaitBox(obj)
Inherited from
- from freevo.ui.config import config
- from freevo.ui.gui import displays
- from freevo.ui.gui.widgets.textbox import Textbox
Methods
- add_row(height): Add a row to fit objects with the given height. Resize the box if
needed and also respect spacing. Return the y position for the new object. This function can only be used to add _one_ row below the label
Attributes
- label: the box label
InputBox
Simple input box
Usage: InputBox(text, handler=None, type='text', start_value=None, num_boxes=16, increment=1, min_int=-1, max_int=-1)
Inherited from
- from freevo.ui.gui import displays
- from freevo.ui.gui.widgets.textbox import Textbox
- from window import Window
Methods
Private
- readd_value(): create the value box
- eventhandler(event): Eventhandler to edit a text
- Events: INPUT_UP, INPUT_DOWN, INPUT_LEFT, INPUT_RIGHT, INPUT_ALL_NUMBERS, INPUT_EXIT, INPUT_ENTER
MessageBox
A box with a label and an OK button to close it.
Usage: MessageBox(obj)
Inherited from
- from freevo.ui.gui.widgets.button import Button
from waitbox import WaitBox
ProgressBox
A box showing a progress bar. There is no wait for the user to close the box, this has to be done from the outside.
Inherited from
- from freevo.ui.gui.widgets.progressbar import Progressbar
from waitbox import WaitBox
Usage: ProgressBox(text, full=0)
Methods
- tick(): increase the bar position
