FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
SkiaBaseBlockRenderer.h
Go to the documentation of this file.
1#ifndef GUI_ELEMENTS_BASE_BLOCK_RENDERER_H
2#define GUI_ELEMENTS_BASE_BLOCK_RENDERER_H
3
4#include <skia/include/core/SkCanvas.h>
5
6#include <magic_enum/magic_enum.hpp>
7
12#include "renderer/colors.h"
13
17namespace gui::elements {
18
19 // using an empty namespace to avoid polluting the outer scope of business_logic::elements::base
20 namespace {
21 namespace colors = gui::renderer::colors;
23 } // namespace
24
30 public:
32 virtual ~SkiaBaseBlockRenderer() = delete;
33
34 // disable copy semantics
37
38 // disable move semantics
41
54 SkCanvas* canvas,
55 int mouseX,
56 int mouseY,
57 bool isHovered);
58
59 private:
69 SkCanvas* canvas,
70 bool isHovered,
71 const std::string& blockValue);
72 };
73} // namespace gui::elements
74
75#endif // GUI_ELEMENTS_BASE_BLOCK_RENDERER_H
The base class for all blocks, containing common functionality and members.
Definition BaseBlock.h:36
A Skia-backed renderer implementation for a business_logic::elements::blocks::BaseBlock.
SkiaBaseBlockRenderer & operator=(SkiaBaseBlockRenderer &&)=delete
static void render(business_logic::elements::blocks::BaseBlock *block, SkCanvas *canvas, int mouseX, int mouseY, bool isHovered)
Renders a block on an SkCanvas.
static void renderValueAboveBlock(const business_logic::elements::blocks::BaseBlock *block, SkCanvas *canvas, bool isHovered, const std::string &blockValue)
Renders the value above the block.
SkiaBaseBlockRenderer & operator=(const SkiaBaseBlockRenderer &)=delete
SkiaBaseBlockRenderer(const SkiaBaseBlockRenderer &)=delete
SkiaBaseBlockRenderer(SkiaBaseBlockRenderer &&)=delete
UI primitives and components to be rendered as part of the UI.
Definition UIText.cpp:3
The GUI counterpart carrying implementations integrating with business_logic::elements.
Color constants used for rendering entities.
Definition colors.cpp:3