acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
dialog.h
1
//
2
// conversation_message.hpp
3
// acme
4
//
5
// Created by Camilo Sasuke Thomas Borregaard Soerensen on 01/Oct/22. 00:59
6
// Copyright (c) 2022 Camilo Sasuke Thomas Borregaard Soerensen. All rights reserved.
7
//
8
#pragma once
9
10
//
11
//::particle_pointer particle::realize(::particle * pparticleReificator)
12
//{
13
//
14
// return pparticleReificator->realize_particle(this);
15
//
16
//}
17
//
18
//
20
//::particle_pointer particle::realize_particle(::particle * pparticleToRealize)
21
//{
22
//
23
//
24
//}
25
//
26
//
28
29
30
#include "acme/prototype/prototype/realizable.h"
31
#include "acme/handler/sequenceable.h"
32
#include "acme/user/user/element.h"
33
//#include "acme/user/user/interaction.h"
34
35
namespace
user_interface
36
{
37
38
//namespace user
39
//{
40
41
class
message_box
;
42
43
44
enum
enum_dialog
45
{
46
47
e_dialog_none,
48
e_dialog_message_box,
49
e_dialog_message_box_details,
50
51
};
52
53
54
class
CLASS_DECL_ACME dialog :
55
virtual
public
::user::element
56
{
57
public
:
58
59
//class CLASS_DECL_ACME data :
60
// virtual public ::particle {
61
// public:
62
//
63
// enum_dialog m_edialog;
64
// ::string m_strTitle;
65
// ::payload m_payloadResult;
66
// ::function<void(dialog *)> m_functionOnTimeOut;
67
// ::function<void(const ::payload &)> m_functionOnDialogResult2;
68
// class ::time m_timeShowStart;
69
// class ::time m_timeTimeout;
70
// class ::time m_timeCancelledTimeout;
71
// ::pointer < ::manual_reset_happening > m_pmanualresethappeningDialogResponse;
72
//
73
// };
74
75
76
::pointer < ::user_interface::dialog > m_pdialog;
77
78
79
dialog();
80
~dialog()
override
;
81
82
virtual ::i32_rectangle initial_frame_rectangle();
83
84
virtual
void
on_initialize_dialog();
85
86
virtual
void
set_dialog_type(enum_dialog edialog);
87
88
virtual ::string dialog_title()
const
;
89
90
91
virtual ::function<void(const ::payload &)> & dialog_response_callback();
92
93
//virtual void display_dialog();
94
//virtual void display_dialog(::dialog * pdialog);
95
//virtual void display_dialog_and_wait_dialog_response(::dialog * pdialog);
96
//virtual void display_dialog(::dialog * pdialog);
97
bool
is_waiting_for_dialog_response()
override
;
98
99
virtual
void
wait_dialog_response(
const
class ::time & timeTimeout = ::time::infinity());
100
101
102
void
set_dialog_response(const ::payload & payloadResult)
override
;
103
104
::payload get_dialog_response()
override
;
105
106
virtual
void
on_dialog_response(const ::payload & payloadResult);
107
108
virtual
void
on_dialog_finished();
109
110
void
display(::e_display edisplay = e_display_default, const ::user::activation & useractivation = {})
override
;
111
//virtual message_box * get_message_box_payload();
112
113
virtual
class ::time dialog_time_remaining_from_timeout()
const
;
114
virtual
class ::time dialog_timeout()
const
;
115
virtual ::string dialog_details()
const
;
116
virtual ::string_array_base dialog_details_icon_urls()
const
;
117
virtual ::string_array_base & dialog_details_icon_urls();
118
119
// ::string dialog_title() const override;
120
//
122
// void display_dialog() override;
123
// void on_dialog_result(const ::payload & payloadResult) override;
124
//
125
//
126
// class ::time dialog_time_remaining_from_timeout() const override;
127
// class ::time dialog_timeout() const override;
128
129
};
130
131
132
//
133
//class CLASS_DECL_ACME dialog_payload :
134
// virtual public dialog
135
//{
136
//public:
137
//
138
//
139
//
140
//
141
// dialog_payload();
142
// ~dialog_payload() override;
143
//
144
//
145
//
146
//
147
//};
148
//
149
150
//class CLASS_DECL_ACME dialog_reifier :
151
// virtual public ::dialog
152
//{
153
//public:
154
//
155
//
156
// ::pointer < ::dialog > m_pdialog;
157
//
158
// dialog_reifier();
159
// ~dialog_reifier() override;
160
//
161
//
162
// ::string dialog_title() const override;
163
//
164
//
165
// void display_dialog() override;
166
// //void display_dialog(::dialog * pdialog) override;
167
//
168
//
169
// void set_dialog_result(const ::payload & payloadResult) override;
170
//
171
//
172
// class ::time dialog_time_remaining_from_timeout() const override;
173
// class ::time dialog_timeout() const override;
174
//
175
//
176
// message_box_payload * get_message_box_payload() override;
177
//
178
//
179
//
180
//};
181
182
//
183
//class CLASS_DECL_ACME message_box :
185
//virtual public ::dialog
186
//{
187
//public:
188
//
189
//
190
// bool m_bDetails = false;
191
// string m_strMessage;
192
// string m_strTitle;
193
// ::user::e_message_box m_emessagebox;
194
// string m_strDetails;
195
// ::string m_strDetailsTitle;
196
// ::string_array m_straDetailsIconUrl;
197
// ::pointer < ::nano::graphics::icon > m_picon2;
198
// ::string_array m_straIconUrl;
199
// ::pointer < ::user::activation_token > m_puseractivationtoken;
200
// ::function<void(::message_box *)> m_functionOnMessageBoxResult;
201
//
202
//
203
// //message_box_payload(const ::scoped_string & scopedstrMessage, const ::scoped_string & scopedstrTitle = {}, const ::user::e_message_box & emessagebox = {}, const ::scoped_string & scopedstrDetails = nullptr, ::nano::graphics::icon * picon = nullptr);
204
// message_box(const ::scoped_string &scopedstrMessage, const ::scoped_string &scopedstrTitle = {},
205
// const ::user::e_message_box &emessagebox = {}, const ::scoped_string &scopedstrDetails = nullptr,
206
// const ::string_array_base &straIconUrl = {});
207
// message_box(const ::exception & exception, const ::scoped_string & strMoreDetails);
208
// message_box(const ::exception &exception, const ::scoped_string &strMessage,
209
// const ::scoped_string &scopedstrTitle, const ::user::e_message_box &emessagebox = {},
210
// const ::scoped_string &scopedstrDetails = nullptr, const ::string_array_base &straIconUrl = {});
211
// ~message_box() override;
212
// //
213
// //#ifdef _DEBUG
214
// // ::i64 increment_reference_count() override;
215
// // ::i64 decrement_reference_count() override;
216
// //#endif
217
//
218
// //virtual ::string get_conversation_message();
219
// //virtual ::string get_conversation_title();
220
// //virtual ::user::e_message_box get_conversation_flags();
221
// //virtual ::string get_conversation_details();
222
// //virtual ::payload get_conversation_result();
223
//
224
// //message_box_payload *get_message_box_payload() override;
225
//
226
// ::payload get_result_payload() override;
227
//
228
//
229
// void on_timed_out() override;
230
//
231
// ::string dialog_details() const override;
232
//
233
// ::string_array_base dialog_details_icon_urls() const override;
234
//
235
// void display_dialog() override;
236
// //virtual void async();
237
// //virtual void sync();
238
//
239
// //::payload do_synchronously(const class time & timeWait) override;
240
// //void do_asynchronously() override;
241
//
242
// /// shows the message box
243
// /// override in the topper implementation to display the message box (run the message box)
244
// void run() override;
245
// //void complete_aggregation(sequence * psequence) override;
246
// //
247
//
248
// void on_dialog_result(const ::payload &payloadResult) override;
249
//
250
//};
251
//
252
253
254
//} // namespace user
255
256
257
}
// namespace user_interface
258
259
260
user_interface::message_box
Definition
message_box.h:145
user
interface
dialog.h
Generated by
1.17.0