ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
Canvas.hpp
Go to the documentation of this file.
1#pragma once
2
12
13#include "Common.hpp"
14#include "Layout.hpp"
15
16namespace ZenitUI::UI
17{
21
28 class CanvasLayout : public TLayout<CanvasLayout>
29 {
30 public:
31 CanvasLayout();
32 ~CanvasLayout() override;
33
35 void draw(float parentOp = 1.0f) override;
36
37 protected:
38 void onDetachContext(UIContext *oldCtx) override;
39
40 private:
41 TargetHandle target;
42 };
43
44} // namespace ZenitUI::UI
Centralized standard library includes used throughout ZenitUI.
The node class: tree structure, layout pass, style resolution, input dispatch, render orchestration,...
TLayout(Args &&...args)
Definition Layout.hpp:1401
void draw(float parentOp=1.0f) override
Render the subtree into the off-screen target, then blit with effect.
void onDetachContext(UIContext *oldCtx) override
Called from detachContext() right before clearing ctx_.
Opaque handle to an off-screen render target.
Definition CoreTypes.hpp:155
Per-instance UI context: backends, theme, text engine, frame state, and routing.
Definition UIContext.hpp:725