Iros
 
Loading...
Searching...
No Matches
paste_event.h
Go to the documentation of this file.
1#pragma once
2
4#include "di/reflect/field.h"
6
7namespace ttx {
8class PasteEvent {
9public:
10 constexpr explicit PasteEvent(di::String text) : m_text(di::move(text)) {}
11
12 auto text() const -> di::StringView { return m_text; }
13
14 auto operator==(PasteEvent const&) const -> bool = default;
15
16private:
18 return di::make_fields<"PasteEvent">(di::field<"text", &PasteEvent::m_text>);
19 }
20
21 di::String m_text;
22};
23}
auto text() const -> di::StringView
Definition paste_event.h:12
auto operator==(PasteEvent const &) const -> bool=default
constexpr PasteEvent(di::String text)
Definition paste_event.h:10
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< PasteEvent >)
Definition paste_event.h:17
string::StringViewImpl< string::Utf8Encoding > StringView
Definition string_view.h:12
string::StringImpl< string::Utf8Encoding > String
Definition string.h:11
di::meta::Decay< decltype(T)> Tag
Definition tag_invoke.h:28
Definition zstring_parser.h:9
constexpr auto make_fields
Definition field.h:80
constexpr auto field
Definition field.h:42
Definition escape_sequence_parser.cpp:18
Definition in_place_type.h:5