Photon microGUI widgets library 0.6.0
Text.h
1#ifndef PHWIDGETS_TEXT_H
2#define PHWIDGETS_TEXT_H
3
4#include <photon/PtText.h>
5
6#include <string>
7
8#include "./Label.h"
9
10
11namespace PhWidgets
12{
19
24 typedef
25 class TextWidget:
26 public Label
27 {
28 public:
29
31 struct ThisArgs
32 {
33 struct ArgComplex
34 {
35 enum eArgComplex
36 {
37 text_substring = Pt_ARG_TEXT_SUBSTRING
38 };
39 };
40
41 };
42
45 {
47 struct Callback
48 {
50
59 {
60 modify_notify = Pt_CB_MODIFY_NOTIFY,
61 modify_verify = Pt_CB_MODIFY_VERIFY,
62 motion_notify = Pt_CB_MOTION_NOTIFY,
63 motion_verify = Pt_CB_MOTION_VERIFY,
64 text_changed = Pt_CB_TEXT_CHANGED
65 };
66 };
67 };
68
70 struct ArgComplex:
71 public ThisArgs::ArgComplex
72 { };
73
75 struct Callback:
76 public ArgumentsEx<ThisCallbacks::Callback>,
77 public Label::Callback
78 {
80 };
81
83 struct Arguments:
84 public ArgComplex,
85 public Label::Arguments
86 { };
87
89 struct Callbacks:
90 public Callback,
91 public Label::Callbacks
92 { };
93
94 typedef ResourceFrom<Label::WidgetResourcesSingleton>::
95 Define::Struct<ThisArgs::ArgComplex::eArgComplex, PtTextControl_t>::
96
97 Define::Link<ThisCallbacks::Callback::eCallback, PtCallback_t*>::
98
99 resource_type WidgetResourcesSingleton;
100
101 protected:
102 virtual void check();
103
104 public:
106
110 WidgetResourcesSingleton resource;
111
113
117 explicit TextWidget(int abn);
118
120
124 explicit TextWidget(PtWidget_t *wdg);
125
127
131 TextWidget(const TextWidget &other);
132
134
141
142
144
151
152} // namespace PhWidgets
153
154
155#endif // PHWIDGETS_TEXT_H
A text, bitmap, or image label.
Definition: Label.h:151
Single-line text.
Definition: Text.h:27
TextWidget & operator=(const TextWidget &other)
Assigns value in Text widget.
WidgetResourcesSingleton resource
Resources of the Text.
Definition: Text.h:110
TextWidget(const TextWidget &other)
(copy constructor)
TextWidget(PtWidget_t *wdg)
(constructor)
TextWidget(int abn)
(constructor)
An event, which raise a notification to registered subscribers (event handlers) that something of int...
Definition: Widget.h:132
The main namespace for all widgets.
Definition: Basic.h:11
PhWidgets::TextWidget Text
Single-line text.
Contains resource IDs for Basic callbacks.
Definition: Basic.h:217
Contains resource IDs for all Label arguments.
Definition: Label.h:445
Contains resource IDs for complex arguments.
Definition: Text.h:72
Contains resource IDs for all Text arguments.
Definition: Text.h:86
Contains resource IDs for callbacks of type PtCallback_t.
Definition: Text.h:78
Contains resource IDs for all Text callbacks.
Definition: Text.h:92
Contains resource IDs for Text arguments.
Definition: Text.h:32
Contains resource IDs for Text callbacks of type PtCallback_t.
Definition: Text.h:48
eCallback
Resource IDs for Text arguments of type PtCallback_t.
Definition: Text.h:59
Contains resource IDs for Text callbacks.
Definition: Text.h:45