class documentation
Manage multiple views and provide navigation capabilities.
| Method | __del__ |
Destructor to clean up resources. |
| Method | __init__ |
Initialize the ViewManager with default settings. |
| Method | active |
Set the active state of the ViewManager. |
| Method | add |
Add a view to the manager. |
| Method | alert |
Show an alert and wait for the user to acknowledge it. |
| Method | back |
Navigate back to the previous view in the stack. |
| Method | background |
Set the background color. |
| Method | clear |
Clear the screen with the background color. |
| Method | clear |
Clear the navigation stack. |
| Method | foreground |
Set the foreground color. |
| Method | freq |
Set the CPU frequency. |
| Method | get |
Get a view by name. |
| Method | log |
Log a message with an optional log type. |
| Method | push |
Push a view to the stack by name. |
| Method | remove |
Remove a view by name. |
| Method | run |
Run the current view. |
| Method | selected |
Set the selected color. |
| Method | set |
Set the current view by name, clearing the stack. |
| Method | switch |
Switch to a view by name with options for stack management. |
| Constant | FREQ |
Undocumented |
| Constant | FREQ |
Undocumented |
| Constant | FREQ |
Undocumented |
| Constant | FREQ |
Undocumented |
| Constant | MAX |
Undocumented |
| Constant | MAX |
Undocumented |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | view |
Undocumented |
| Instance Variable | views |
Undocumented |
| Property | active |
Return whether the ViewManager is active. |
| Property | app |
Return the shared AppLoader instance. |
| Property | audio |
Return the Audio instance. |
| Property | background |
Return the current background color. |
| Property | battery |
Return the Battery instance. |
| Property | board |
Return the current board ID. |
| Property | board |
Return the current device name. |
| Property | button |
Return the current button state. |
| Property | current |
Return the current view. |
| Property | draw |
Return the Draw instance. |
| Property | foreground |
Return the current foreground color. |
| Property | gmt |
Return the GMT offset in hours. |
| Property | has |
Return whether the current board has audio capability. |
| Property | has |
Return whether the current board has Bluetooth capability. |
| Property | has |
Return whether the current board has PSRAM. |
| Property | has |
Return whether the current board has an SD card. |
| Property | has |
Return whether the current board has WiFi capability. |
| Property | input |
Return the Input manager instance. |
| Property | keyboard |
Return the Keyboard instance. |
| Property | logs |
Return the stored logs as a list of strings. |
| Property | screen |
Return the screen size as a Vector. |
| Property | selected |
Return the selected color. |
| Property | storage |
Return the Storage instance. |
| Property | thread |
Return the ThreadManager instance. |
| Property | time |
Return the Time instance. |
| Property | usb |
Return the USBVideoStream instance. |
| Property | view |
Return the number of views managed. |
| Property | wifi |
Return the WiFi instance. |
| Method | _push |
Push a view onto the navigation stack. |
| Method | _unload |
Unload view and gui modules no longer used (Flipper only). |
| Constant | _CORE |
Undocumented |
| Instance Variable | _active |
Undocumented |
| Instance Variable | _app |
Undocumented |
| Instance Variable | _audio |
Undocumented |
| Instance Variable | _background |
Undocumented |
| Instance Variable | _battery |
Undocumented |
| Instance Variable | _button |
Undocumented |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _draw |
Undocumented |
| Instance Variable | _foreground |
Undocumented |
| Instance Variable | _gmt |
Undocumented |
| Instance Variable | _input |
Undocumented |
| Instance Variable | _keyboard |
Undocumented |
| Instance Variable | _log |
Undocumented |
| Instance Variable | _selected |
Undocumented |
| Instance Variable | _stack |
Undocumented |
| Instance Variable | _storage |
Undocumented |
| Instance Variable | _thread |
Undocumented |
| Instance Variable | _time |
Undocumented |
| Instance Variable | _usb |
Undocumented |
| Instance Variable | _view |
Undocumented |
| Instance Variable | _wifi |
Undocumented |
Add a view to the manager.
| Parameters | |
view:View | The View object to add. |
| Returns | |
bool | True if successfully added, False if max views reached. |
Show an alert and wait for the user to acknowledge it.
| Parameters | |
message:str | The message to display in the alert. |
back:bool | Whether to navigate back after the alert is acknowledged. Defaults to False. |
| Returns | |
bool | True if the user confirmed the alert, False otherwise. |
def back(self, remove_current_view:
bool = True, should_clear: bool = True, should_start: bool = True):
¶
Navigate back to the previous view in the stack.
| Parameters | |
removebool | Whether to remove the current view from the manager. Defaults to True. |
shouldbool | Whether to clear the screen. Defaults to True. |
shouldbool | Whether to start the previous view. Defaults to True. |
Set the CPU frequency.
| Parameters | |
usebool | Whether to use the default frequency. Defaults to False. |
frequency:int | Explicit frequency in Hz. Defaults to None. |
| Returns | |
int | The new CPU frequency. |
Get a view by name.
| Parameters | |
viewstr | The name of the view to find. |
| Returns | |
View | The view object if found, None otherwise. |
Log a message with an optional log type.
| Parameters | |
message:str | The message to log. |
logint | The type of log. Defaults to -1. |
| Returns | |
bool | True if the message was logged. |
Set the current view by name, clearing the stack.
| Parameters | |
viewstr | The name of the view to set as current. |
Switch to a view by name with options for stack management.
| Parameters | |
viewstr | The name of the view to switch to. |
clearbool | Whether to clear the navigation stack. Defaults to False. |
pushbool | Whether to push the current view to the stack. Defaults to True. |