aboutsummaryrefslogtreecommitdiff
path: root/boot/scene_internal.h
AgeCommit message (Collapse)Author
2023-10-11expo: Plumb in textlines to a sceneSimon Glass
Provide an implementation for textlines in the scene code, so that they are displayed correctly. Provide a way to have a border around the textline, with the internal part being the same colour as the background. This looks more natural. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Support opening a textlineSimon Glass
This object needs special handling when it is opened, to set up the CLI and the vidconsole context. Add special support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Allow rendering the background of any objectSimon Glass
So far only menus have a background. When other object types are rendered, they may have a background too. Make this code more generic so it will be usable by new object types. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Make calculation of an object bounding box genericSimon Glass
We want to support this for any object, not just menus. Move the code around to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11expo: Fix up comments for get_cur_menuitem_text() et alSimon Glass
This internal function could use a comment. Add one. Also tidy up a few other comments. Signed-off-by: Simon Glass <sjg@chromium.org> fixup: comments
2023-08-25expo: cedit: Support reading settings from CMOS RAMSimon Glass
Add a command to read edit settings from CMOS RAM, using the cedit definition to indicate which registers and bits are used. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Export scene_menuitem_find() for use in internal codeSimon Glass
Make this function available to other expo code so we can use it to look up a menu item. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Provide a way to iterate through all scene objectsSimon Glass
For some operations it is necessary to process all objects in an expo. Provide an iterator to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-25expo: Make scene_obj_find() take a const sceneSimon Glass
This does not change the scene, so mark the pointer const. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Add a configuration editorSimon Glass
Add a new 'cedit' command which allows editing configuration using an expo. The configuration items appear as menus on the display. This is extremely basic, only supporting menus and not providing any way to load or save the configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Draw the current opened menu on topSimon Glass
When a menu is opened, it must be displayed over all other objects in the scene, so that all its items are visible. Handle this by drawing the menu object a second time, after all other objects have been drawn. Draw all of the objects which are dependent on the menu object. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Draw popup menus in both opened and closed statesSimon Glass
When a popup menu is closed it shows only the selected item. When it is open it shows a background and all items, with a highlight that can be moved between the items. Add the drawing logic for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Support simple themesSimon Glass
It is a pain to manually set the fonts of all objects to be consistent. Some spacing settings are also better set globally than by manually positioning each object. Add a 'theme' to the expo, to hold this information. For now it includes only the font size. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Set up the width and height of objectsSimon Glass
Provide a way to set the full dimensions of objects, i.e. including the width and height. For menus, calculate the bounding box of all objects in the menu. Set all labels to be the same size, so that highlighting works correct, once implemented. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Use flags for objectsSimon Glass
We currently have just a 'hide' property for each object. In preparation for adding more properties, convert the struct to use a flags value, instead of individual booleans. This is more extensible. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-14expo: Correct some header-file commentsSimon Glass
The use of Returns instead of @return still confuses me. Fix some problems that have crept in. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16expo: Add support for scenesSimon Glass
A scene is a single screen within an expo. It is possible to move between scenes but only one can be displayed at once. Add a basic implementation. Signed-off-by: Simon Glass <sjg@chromium.org>