Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
header.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2019-2021 natinusala
3
Copyright 2019 p-sam
4
5
Licensed under the Apache License, Version 2.0 (the "License");
6
you may not use this file except in compliance with the License.
7
You may obtain a copy of the License at
8
9
http://www.apache.org/licenses/LICENSE-2.0
10
11
Unless required by applicable law or agreed to in writing, software
12
distributed under the License is distributed on an "AS IS" BASIS,
13
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
See the License for the specific language governing permissions and
15
limitations under the License.
16
*/
17
18
#pragma once
19
20
#include <
aurore/core/bind.hpp
>
21
#include <
aurore/core/box.hpp
>
22
#include <
aurore/views/label.hpp
>
23
24
namespace
aurore
25
{
26
27
// A simple header with a title, an optional subtitle, a rectangle on the left
28
// and a separator
29
class
Header
:
public
Box
30
{
31
public
:
32
Header
();
33
34
void
setTitle
(std::string
text
);
35
void
setSubtitle
(std::string
text
);
36
37
static
View
*
create
();
38
39
private
:
40
AURORE_BIND
(
Label
, title,
"aurore/header/title"
);
41
AURORE_BIND
(
Label
, subtitle,
"aurore/header/subtitle"
);
42
};
43
44
}
// namespace aurore
bind.hpp
AURORE_BIND
#define AURORE_BIND(type, name, id)
Definition
bind.hpp:39
box.hpp
aurore::Box
Generic FlexBox layout.
Definition
box.hpp:74
aurore::Header
Definition
header.hpp:30
aurore::Header::create
static View * create()
aurore::Header::setSubtitle
void setSubtitle(std::string text)
aurore::Header::setTitle
void setTitle(std::string text)
aurore::Header::Header
Header()
aurore::Label
Definition
label.hpp:65
aurore::View
Definition
view.hpp:232
label.hpp
aurore
Definition
actions.hpp:25
text
Definition
text.hpp:13
aurore
views
header.hpp
Generated by
1.9.8