acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
text_property.h
1// Changed by camilo with
2// property* system on 2024-06-06 21:19 <3ThomasBorregaardSorensen!!
3#pragma once
4
5
6//#include "acme/prototype/geometry2d/_geometry2d.h"
7#include "acme/user/user/property.h"
8#include "acme/prototype/prototype/action_context.h"
9#include "acme/prototype/data/text_property.h"
10#include "acme/prototype/data/property_listener.h"
11
12//#include "acme/prototype/prototype/payload.h"
14
15
16namespace user
17{
18
19 //struct text_change
20 //{
21 // ::data::text_property & m_textproperty;
22 // ::data::property_change & m_propertychange;
23 // auto & payload() {
24 // return m_propertychange.m_payload;
25 // }
26 // auto & action_context() {
27 // return m_propertychange.m_actioncontext;
28 // }
29 //};
30 //using text_will_change = ::function < bool(text_change & textchange) >;
31
32 //using text_changed = ::function < void(text_change & textchange) >;
33
35
36 class CLASS_DECL_ACME text_property :
37 public ::user::property,
39 {
40 protected:
41
42
43 //::data::property_will_change m_propertywillchange;
44 //::data::property_changed m_propertychanged;
45
46
47 //::comparable_array < ::user::text_will_change > m_textwillchangea;
48 //::comparable_array < ::user::text_changed > m_textchangeda;
50
51
52 //void unhook_callbacks();
53 //void hook_callbacks();
54
55
56 public:
57
58
59 //property * m_ppropertyText;
60
61
62 text_property(::user::control * pusercontrol, ::data::property_container * ppropertycontainer = nullptr, const ::atom & atom = {});
63 ~text_property();
64
65 //void set_text_property(const ::data::text_property & textproperty);
66
67
68 //::text_property & text() { return m_textproperty; }
69
70 //virtual void get_text(string & str);
71
72
73 //virtual character_count get_text_length();
74 //virtual void get_text(char_pointer psz, character_count len);
75 //virtual void get_text(string & str, ::collection::index iBeg, ::collection::index iEnd);
76
77
78 //virtual void set_text(const ::scoped_string & scopedstr, const ::action_context & action_context);
79 //virtual void set_text(const ::scoped_string & scopedstr, character_count len, const ::action_context & action_context);
80
81
82
83 //virtual void _001GetSel(character_count & iBeg, character_count & iEnd);
84 //virtual void set_text_selection(character_count iBeg, character_count iEnd, const ::action_context & action_context = ::e_source_user);
85 //virtual void _001SetSelEnd(character_count iSelEnd, const ::action_context & action_context = ::e_source_user);
86
87
88 //virtual void get_selection_text(string & str);
89 //virtual void set_selection_text(const ::scoped_string & scopedstr, const ::action_context & action_context);
90
91
92 //virtual void get_text_selection(character_count &iSelStart, character_count &iSelEnd);
93
94
95 //virtual void MacroBegin();
96 //virtual void MacroEnd();
97
98
99 void insert_text(const ::scoped_string & scopedstr, bool bForceNewStep, const ::action_context& context);
100
101
102 //string as_string() const override;
103 //virtual string& string_reference();
105
106
107 //virtual bool edit_undo();
108
109
110 //virtual void get_text_composition_area(::i32_rectangle& rectangle);
111
112 //::comparable_array < ::user::text_will_change > & text_will_change();
113 //::comparable_array < ::user::text_changed > & text_changed();
114
115 /*virtual bool on_property_will_change(property_container * pcontainer, const ::atom_array & atoma, const ::payload & payload, const ::action_context & actioncontext);
116 virtual void on_property_changed(property_container * pcontainer, const ::atom_array & atoma, const ::payload & payload, const ::action_context & actioncontext);
117 */
118
119
120
121 //bool on_text_will_change(text_change & textchange);
122 //void on_text_changed(text_change & textchange);
123
124
125 bool operator == (const ::data::text_property & textproperty) const;
126 bool operator == (const ::data::text_change & change) const;
127
128
129 };
130
131
132} // namespace user
133
134
135
Definition property_container.h:17
Definition text_property.h:45
Created by camilo on 2026-05-28 12:34 <3ThomasBorregaardSørensen!! Mummi!! Bilbo!!
Definition _.h:67