@@ -23,7 +23,7 @@ Events are generally polled from the system in a loop and handled immediately.
2323include::snippets/graphics_event.cc[tag=loop]
2424----
2525
26- Based on the type of the event, specific event data can be retrieved using <<get >> or, better, <<from>>.
26+ Based on the type of the event, specific event data can be retrieved using <<as >> or, better, <<from>>.
2727
2828.Example for `gf::Event` specific data
2929[source,indent=0]
@@ -71,6 +71,20 @@ constexpr Event(uint64_t timestamp, T&& data); <2>
7171<1> Default constructor. The type if the event is `gf::EventType::None`.
7272<2> Constructor with a timestamp and specific event data.
7373
74+ === `as`
75+
76+ [source]
77+ ----
78+ template<typename T>
79+ constexpr T& as();
80+ template<typename T>
81+ constexpr const T& as() const;
82+ ----
83+
84+ Get the specific event data of type `T`. Generally, if the event type is `gf::EventType::Foo`, then the associated specific data type is `FooEvent`.
85+
86+ See also: <<is>>, <<from>>
87+
7488=== `is`
7589
7690[source]
@@ -81,7 +95,7 @@ constexpr bool is() const;
8195
8296Check if the specific data type is `T`.
8397
84- See also: <<get >>
98+ See also: <<as >>
8599
86100=== `from`
87101
@@ -95,21 +109,7 @@ constexpr const auto& from() const;
95109
96110Get the specific event data associated with the event `E`
97111
98- See also: <<get>>
99-
100- === `get`
101-
102- [source]
103- ----
104- template<typename T>
105- constexpr T& as();
106- template<typename T>
107- constexpr const T& as() const;
108- ----
109-
110- Get the specific event data of type `T`. Generally, if the event type is `gf::EventType::Foo`, then the associated specific data type is `FooEvent`.
111-
112- See also: <<is>>, <<from>>
112+ See also: <<as>>
113113
114114=== `timestamp`
115115
0 commit comments