acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
types.h
1
//
2
// Created by camilo on 2025-08-31 23:54 <3ThomasBorregaardSorensen!!
3
//
4
#pragma once
5
6
7
#include "acme/filesystem/file/byte2_stream.h"
8
9
#include "../../user/interface/message_box.h"
10
11
12
namespace
message
13
{
14
15
struct
set_editor_selection
{
16
17
::i32 m_iSelectionStart;
18
::i32 m_iSelectionEnd;
19
20
void
byte2_exchange(
byte2_stream
&
stream
)
21
{
22
23
stream
.exchange(m_iSelectionStart);
24
stream
.exchange(m_iSelectionEnd);
25
26
}
27
28
};
29
30
struct
editor_text_and_selection
{
31
32
::string m_strEditorText;
33
::i32 m_iSelectionStart;
34
::i32 m_iSelectionEnd;
35
36
void
byte2_exchange(
byte2_stream
&
stream
)
37
{
38
39
stream
.exchange(m_strEditorText);
40
stream
.exchange(m_iSelectionStart);
41
stream
.exchange(m_iSelectionEnd);
42
43
}
44
45
};
46
47
struct
editor_text_updated
{
48
49
::string m_strEditorText;
50
void
byte2_exchange(
byte2_stream
&
stream
)
51
{
52
53
stream
.exchange(m_strEditorText);
54
55
}
56
57
};
58
59
60
struct
text
{
61
62
::string m_strText;
63
void
byte2_exchange(
byte2_stream
&
stream
)
64
{
65
66
stream
.exchange(m_strText);
67
68
}
69
70
};
71
72
73
struct
open_url
{
74
75
::string m_strUrl;
76
void
byte2_exchange(
byte2_stream
&
stream
)
77
{
78
79
stream
.exchange(m_strUrl);
80
81
}
82
};
83
84
85
struct
message_box
86
{
87
::i64 m_llMessageBoxSequence;
88
::string m_strMessage;
89
::string m_strTitle;
90
::i32 m_iButton;
91
92
message_box()
93
{
94
m_llMessageBoxSequence = 0;
95
m_iButton = 0;
96
97
}
98
99
message_box(
::user_interface::message_box
* pmessagebox)
100
{
101
pmessagebox->increment_reference_count();
102
m_llMessageBoxSequence = (::i64)(::iptr)(
void
*)pmessagebox;
103
m_strMessage = pmessagebox->get_message();
104
m_strTitle = pmessagebox->get_title();
105
m_iButton = 0;
106
107
}
108
109
void
byte2_exchange(
byte2_stream
&
stream
)
110
{
111
112
stream
.exchange(m_llMessageBoxSequence);
113
stream
.exchange(m_strMessage);
114
stream
.exchange(m_strTitle);
115
stream
.exchange(m_iButton);
116
117
}
118
119
};
120
121
122
}
// namespace message
123
124
//
125
//void stream_exchange(byte2_stream & stream, ::message::set_editor_selection & selection)
126
//{
127
//
128
// stream.exchange(selection.m_iSelectionStart);
129
// stream.exchange(selection.m_iSelectionEnd);
130
//
131
//}
132
//
133
//
134
//
135
//void stream_exchange(byte2_stream & stream, ::message::editor_text_updated & updated)
136
//{
137
//
138
// stream.exchange(updated.m_strEditorText);
139
//
140
//}
141
//
142
//
143
//
144
//void stream_exchange(byte2_stream & stream, ::message::text & text)
145
//{
146
//
147
// stream.exchange(text.m_strText);
148
//
149
//}
150
//void stream_exchange(byte2_stream & stream, ::message::open_url & openurl)
151
//{
152
//
153
// stream.exchange(openurl.m_strUrl);
154
//
155
//}
156
byte2_stream
Definition
byte2_stream.h:25
stream
Definition
___serialization_draft.h:42
user_interface::message_box
Definition
message_box.h:145
message::editor_text_and_selection
Definition
types.h:30
message::editor_text_updated
Definition
types.h:47
message::open_url
Definition
types.h:73
message::set_editor_selection
Definition
types.h:15
message::text
Definition
types.h:60
windowing
message
types.h
Generated by
1.17.0