Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
edit_text_dialog.hpp
Go to the documentation of this file.
1#pragma once
3#include <aurore/core/box.hpp>
5
6namespace aurore
7{
8class EditTextDialog : public Box
9{
10 public:
12 ~EditTextDialog() override;
13 void open();
14 void setText(const std::string& value);
15 void setHeaderText(const std::string& value);
16 void setHintText(const std::string& value);
17 void setCountText(const std::string& value);
18 void setCursor(int cursor);
19 bool isTranslucent() override;
20 void onLayout() override;
28 void updateUI();
29
30 private:
31 std::string content;
32 std::string hint;
33 Event<Point> layoutEvent;
34 Event<> backspaceEvent, cancelEvent, summitEvent, clearEvent;
35 Event<std::string> clipboardEvent;
36 bool init = false;
37
38 AURORE_BIND(aurore::Label, header, "aurore/dialog/header");
39 AURORE_BIND(aurore::Label, label, "aurore/dialog/label");
40 AURORE_BIND(aurore::Label, count, "aurore/dialog/count");
41 AURORE_BIND(aurore::Box, container, "aurore/container");
42};
43}
#define AURORE_BIND(type, name, id)
Definition bind.hpp:39
Generic FlexBox layout.
Definition box.hpp:74
Definition edit_text_dialog.hpp:9
void onLayout() override
void setText(const std::string &value)
Event< Point > * getLayoutEvent()
void setHeaderText(const std::string &value)
Event * getClearEvent()
Y: the whole text taken out (to type another in place of the one given)
void setCountText(const std::string &value)
bool isTranslucent() override
Event< std::string > * getClipboardEvent()
void setCursor(int cursor)
~EditTextDialog() override
void setHintText(const std::string &value)
Definition event.hpp:41
Definition label.hpp:65
Definition actions.hpp:25