Screen in an in-memory buffer for the Microchip Graphic Composer.
More...
#include <composerscreen.h>
|
| ComposerScreen (const Size &size=Size(800, 480)) |
|
EGT_NODISCARD unsigned char * | get_pixmap () |
|
EGT_NODISCARD bool | is_composer () const override |
| Returns true if this is a screen used with the Microchip Graphic Composer.
|
|
void | resize (const Size &size) |
|
void | schedule_flip () override |
| Schedule a flip to occur later.
|
|
| Screen () noexcept |
|
| Screen (const Screen &)=default |
|
| Screen (Screen &&) noexcept=default |
|
virtual | ~Screen () noexcept=default |
|
void | async_flip (bool async) |
| Set if asynchronous buffer flips are used.
|
|
EGT_NODISCARD Rect | box () const |
| Bounding box for the screen.
|
|
virtual EGT_NODISCARD size_t | brightness () const |
| Get the current brightness of the screen.
|
|
virtual void | brightness (size_t brightness) |
| Set the brightness of the screen.
|
|
virtual void | flip (const DamageArray &damage) |
| Perform a flip of the buffers.
|
|
EGT_NODISCARD PixelFormat | format () const |
| Get the format of the screen.
|
|
virtual EGT_NODISCARD bool | have_planes () const |
| Returns true if the screen supports planes.
|
|
virtual void | high_fidelity () |
| Configure high fidelity options.
|
|
virtual uint32_t | index () |
| If the screen implementation manages multiple buffers, this will return the index of the current buffer.
|
|
virtual void | low_fidelity () |
| Configure low fidelity options.
|
|
virtual EGT_NODISCARD size_t | max_brightness () const |
| Get the max brightness of the screen.
|
|
Screen & | operator= (const Screen &)=default |
|
Screen & | operator= (Screen &&) noexcept=default |
|
EGT_NODISCARD Painter & | painter () |
| Get the painter for the screen.
|
|
EGT_NODISCARD Size | size () const |
| Size of the screen.
|
|
Screen in an in-memory buffer for the Microchip Graphic Composer.
◆ ComposerScreen()
◆ get_pixmap()
EGT_NODISCARD unsigned char * get_pixmap |
( |
| ) |
|
◆ is_composer()
EGT_NODISCARD bool is_composer |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns true if this is a screen used with the Microchip Graphic Composer.
Reimplemented from Screen.
◆ register_screen_resize_hook()
static Signal ::RegisterHandle register_screen_resize_hook |
( |
const Signal<>::EventCallback & |
handler | ) |
|
|
static |
Register a handler to manage screen size changes.
- Parameters
-
handler a callback to execute when the 'on_screen_resized' signal is invoked.
- Returns
- a handle that can be unregister later.
- Note
- This signal-base mechanism is suited to manage 'static' watchers like default widget sizes, especially within templates, because the ComposerScreen itself can't guess exhaustive lists of all templates instances (SliderType<int>, SliderType<float>, ...) to reset the default sizes for all of them.
However, it is not suited to manage 'instance' watchers like fonts and widgets for which we should have to deal with registrations from their copy/move constructors and assignment operators and with unregistrations from the destructors.
Besides, this method is 'static' so it can be called before the ComposerScreen instance is created (from MGC plugin) or even if it is not constructed at all, which is what happens anywhere else, like on targets.
◆ resize()
void resize |
( |
const Size & |
size | ) |
|
◆ schedule_flip()
Schedule a flip to occur later.
This is needed if a flip should occur sometime in the future to the hardware.
Implements Screen.
◆ unregister_screen_resize_hook()
static void unregister_screen_resize_hook |
( |
Signal<>::RegisterHandle |
handle | ) |
|
|
static |