CYD-UI
A C++ library for building native graphic user interfaces
Loading...
Searching...
No Matches
component_ev_dispatcher.cppm
Go to the documentation of this file.
1// Copyright (c) 2024, Víctor Castillo Agüero.
2// SPDX-License-Identifier: GPL-3.0-or-later
3
5
6import std;
7
8import fabric.logging;
9
10export import :holder;
11
12export import cydui.events;
13export import cydui.styling;
14export import cydui.graphics;
15
16export namespace cydui::components {
18 public:
19 virtual ~event_dispatcher_base_t() = default;
20
21 virtual std::vector<component_holder_t> update(StyleArchive &style_archive,
22 component_builder_t &content_children_builder) = 0;
23
24 virtual void paint_fragment(vg::fragment_t &fragment) = 0;
25
26 virtual void dispatch_key_press(const KeyEvent& ev) = 0;
27 virtual void dispatch_key_release(const KeyEvent& ev) = 0;
28 virtual void dispatch_text_input(const TextInputEvent& ev) = 0;
35 virtual void dispatch_focus_changed() = 0;
36 };
37}
virtual void dispatch_mouse_enter(dimension_t::value_type x, dimension_t::value_type y)=0
virtual void dispatch_mouse_motion(dimension_t::value_type x, dimension_t::value_type y)=0
virtual void dispatch_button_press(const Button &ev, dimension_t::value_type x, dimension_t::value_type y)=0
virtual void dispatch_key_release(const KeyEvent &ev)=0
virtual std::vector< component_holder_t > update(StyleArchive &style_archive, component_builder_t &content_children_builder)=0
virtual void dispatch_button_release(const Button &ev, dimension_t::value_type x, dimension_t::value_type y)=0
virtual void paint_fragment(vg::fragment_t &fragment)=0
virtual void dispatch_text_input(const TextInputEvent &ev)=0
virtual void dispatch_mouse_exit(dimension_t::value_type x, dimension_t::value_type y)=0
virtual void dispatch_key_press(const KeyEvent &ev)=0
virtual void dispatch_scroll(dimension_t::value_type dx, dimension_t::value_type dy)=0