Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
wireless.hpp
Go to the documentation of this file.
1/*
2 Copyright 2021 XITRIX
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#pragma once
18
20#include <aurore/core/box.hpp>
23
24namespace aurore
25{
26
27class WirelessWidget : public Box
28{
29 public:
31
32 void draw(NVGcontext* vg, float x, float y, float width, float height, Style style, FrameContext* ctx) override;
33 static View* create();
34
35 private:
36 Image* _0;
37 Image* _1;
38 Image* _2;
39 Image* _3;
40 Image* ethernet;
41 Platform* platform;
42
43 void applyTheme(ThemeVariant theme);
44
45 void updateState();
46 inline static bool hasWirelessConnection = false;
47 inline static int wifiLevel = 3;
48 inline static bool hasEthernetConnection = false;
49 inline static bool updating = false; // a read is under way
50};
51
52} // namespace aurore
Generic FlexBox layout.
Definition box.hpp:74
Definition frame_context.hpp:30
Definition image.hpp:67
Definition platform.hpp:37
Simple wrapper around StyleValues for the array operator.
Definition style.hpp:115
Definition view.hpp:232
Definition wireless.hpp:28
static View * create()
void draw(NVGcontext *vg, float x, float y, float width, float height, Style style, FrameContext *ctx) override
Definition actions.hpp:25
ThemeVariant
The two sets of colours every theme has: light and dark.
Definition theme.hpp:37