CYD-UI
A C++ library for building native graphic user interfaces
Loading...
Searching...
No Matches
component_event_handler.cppm File Reference
+ Include dependency graph for component_event_handler.cppm:

Go to the source code of this file.

Classes

struct  cydui::components::event_handler_t
 EVENT HANDLER STRUCT. More...
 
struct  cydui::components::event_handler_data_t< Component >
 
class  custom_event_listener< Event >
 

Namespaces

namespace  cydui
 
namespace  cydui::components
 

Macros

#define TO_STRING(...)
 
#define ANCHOR(PREFIX, NAME)
 
#define CYDUI_INTERNAL_EV_HANDLER_DECL(NAME)
 
#define CYDUI_INTERNAL_EV_HANDLER_DECL_W_RET(NAME)
 
#define DIMENSIONAL_ARGS    $x, $y, $width, $height, $padding_top, $padding_bottom, $padding_left, $padding_right
 
#define CYDUI_INTERNAL_EV_button_PROPAGATE(NAME)
 
#define CYDUI_INTERNAL_EV_mouse_PROPAGATE(NAME)
 

Macro Definition Documentation

◆ ANCHOR

#define ANCHOR ( PREFIX,
NAME )
Value:
struct NAME { \
static constexpr dimension_parameter_t x{TO_STRING(PREFIX##_##NAME##_x)}; \
static constexpr dimension_parameter_t y{TO_STRING(PREFIX##_##NAME##_y)}; \
}
#define TO_STRING(...)

Definition at line 19 of file component_event_handler.cppm.

◆ CYDUI_INTERNAL_EV_button_PROPAGATE

#define CYDUI_INTERNAL_EV_button_PROPAGATE ( NAME)
export
Value:
if (component->parent.has_value()) \
component->parent.value()->get_event_dispatcher()->dispatch_button_##NAME( \
button, x + $x, y + $y \
);

Definition at line 63 of file component_event_handler.cppm.

◆ CYDUI_INTERNAL_EV_HANDLER_DECL

#define CYDUI_INTERNAL_EV_HANDLER_DECL ( NAME)
Value:
void on_##NAME CYDUI_INTERNAL_EV_##NAME##_ARGS

Definition at line 25 of file component_event_handler.cppm.

◆ CYDUI_INTERNAL_EV_HANDLER_DECL_W_RET

#define CYDUI_INTERNAL_EV_HANDLER_DECL_W_RET ( NAME)
Value:
CYDUI_INTERNAL_EV_##NAME##_RETURN on_##NAME CYDUI_INTERNAL_EV_##NAME##_ARGS

Definition at line 27 of file component_event_handler.cppm.

◆ CYDUI_INTERNAL_EV_mouse_PROPAGATE

#define CYDUI_INTERNAL_EV_mouse_PROPAGATE ( NAME)
export
Value:
if (component->parent.has_value()) \
component->parent.value()->get_event_dispatcher()->dispatch_mouse_##NAME(x + $x, y + $y);

Definition at line 68 of file component_event_handler.cppm.

◆ DIMENSIONAL_ARGS

#define DIMENSIONAL_ARGS    $x, $y, $width, $height, $padding_top, $padding_bottom, $padding_left, $padding_right
export

Definition at line 59 of file component_event_handler.cppm.

◆ TO_STRING

#define TO_STRING ( ...)
export
Value:
#__VA_ARGS__

Definition at line 18 of file component_event_handler.cppm.