|
template<typename D , typename... Others> |
void | callEventFunForDrawers (auto lambda) |
| Calls a lambda function - that represents an event - for every Drawer object listed in the template parameter pack.
|
|
void | callEventFunForDrawers (auto lambda) |
|
void | wmInit () |
|
void | wmResize (uint width, uint height) |
|
void | wmPaint () |
|
void | wmSetModifiers (const KeyModifiers &modifiers) |
|
void | wmKeyPress (Key::Enum key) |
|
void | wmKeyRelease (Key::Enum key) |
|
void | wmMouseMove (double x, double y) |
|
void | wmMousePress (MouseButton::Enum button, double x, double y) |
|
void | wmMouseRelease (MouseButton::Enum button, double x, double y) |
|
void | wmMouseDoubleClick (MouseButton::Enum button, double x, double y) |
|
void | wmMouseScroll (double x, double y) |
|
void | cnvDraw () |
|
void | cnvDrawContent () |
|
void | cnvPostDraw () |
|
void * | dWindowPtr () |
|
vcl::Point2< uint > | dCanvasSize () const |
|
void | dSetCanvasDefaultClearColor (const Color &color) |
|
auto | dCanvasFrameBuffer () const |
|
bool | dReadDepth (const Point2i &point, ReadBufferTypes::CallbackReadBuffer callback=nullptr) |
|
void | dScreenshot (const std::string &filename, uint width, uint height) |
|
The RenderApp class is a template class that combines a canvas, a window manager, and a set of drawers, allowing them to work together and communicate with each other.
The RenderApp class uses the Curiously Recurring Template Pattern (CRTP) to allow the derived classes to access the member functions of the RenderApp class that propagate events from one derived class (e.g. the WindowManager) to another (e.g. the Canvas).
Each derived class has a role:
- The WindowManager class manages the window and the window events.
- The Canvas class manages the render backend and the surface where the drawers can draw.
- The Drawer classes draws the content on the canvas.
- Template Parameters
-
WindowManagerT | The type of the window manager class. It must satisfy the WindowManagerConcept. |
template<
typename D , typename... Others>
Calls a lambda function - that represents an event - for every Drawer object listed in the template parameter pack.
This function checks if the lambda function can be called for the D type, and if it can, it calls it. Then, it calls itself recursively for the other Drawer types in the list.
This function will call the lambda function for each Drawer object in the template parameter pack, in the order they are listed, only if several conditions are satisfied:
- The D type must satisfy the EventDrawerConcept: if it does not, the lambda will not be called for that type.
- If the D type satisfies the CanBlockEventDrawerConcept, the lambda function will return a boolean value that will be used to block the event propagation to the other drawers.
- Parameters
-