Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
side_labels.h
Go to the documentation of this file.
1//
2// Copyright (c) 2023, DefenceX PTY LTD
3//
4// This file is part of the VivoeX project developed by DefenceX.
5//
6// Licensed under the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
7// License. See the LICENSE file in the project root for full license details.
8//
12#ifndef HMICORE_WIDGETS_SIDE_LABELS_H_
13#define HMICORE_WIDGETS_SIDE_LABELS_H_
14
15#include <cstdint>
16#include <string>
17#include <vector>
18
19#include "hmicore/events_gva.h"
22
23namespace gva {
24
26class WidgetSideLabels : public WidgetX {
27 public:
34 explicit WidgetSideLabels(const RendererGva& renderer, TouchGva* touch);
35
40 ~WidgetSideLabels() final = default;
41
47 std::string GetWidgetName() const final { return "WidgetSideLabels"; };
48
53 void Draw() final;
54
60 void SetLabels(std::array<FunctionKeys::Labels, 6>* labels);
61
62 private:
69 void DrawFunctionLabels();
70
81 void Draw(uint32_t x, uint32_t y, uint32_t width, uint32_t height, const std::string& text, uint32_t text_colour,
82 bool toggle_on);
83
90 void Toggle(const std::string& label1, const std::string& label2) const;
91
97 void RenderIcon(const std::string& text, uint32_t x, uint32_t y, uint32_t width, uint32_t height) const;
98
99 std::array<FunctionKeys::Labels, 6>* labels_;
100 TouchGva* touch_;
101};
102
103} // namespace gva
104
105#endif // HMICORE_WIDGETS_SIDE_LABELS_H_
Class definition of the GVA renderer.
Definition renderer_gva.h:29
Class defining the touch screen events.
Definition touch_gva.h:71
Class defining the side labels.
Definition side_labels.h:26
~WidgetSideLabels() final=default
Destroy the Widget Keyboard object.
void SetLabels(std::array< FunctionKeys::Labels, 6 > *labels)
Set the Labels object.
Definition side_labels.cc:113
std::string GetWidgetName() const final
Get the Widget Name attribute.
Definition side_labels.h:47
void Draw() final
The base overloaded Draw fuctions to draw this widget type.
Definition side_labels.cc:20
Class defining the base widget.
Definition widget.h:27
These are at the top of the screen.
Definition gva.h:386