|
PatchworkOS
|
Go to the source code of this file.
Data Structures | |
| struct | button_t |
Functions | |
| static void | button_draw (element_t *elem, button_t *button) |
| static void | button_send_action (element_t *elem, action_type_t type) |
| static uint64_t | button_procedure (window_t *win, element_t *elem, const event_t *event) |
| element_t * | button_new (element_t *parent, element_id_t id, const rect_t *rect, const char *text, element_flags_t flags) |
| Create a new button element. | |
Definition at line 15 of file button.c.
References ALIGN_CENTER, ALIGN_MAX, ALIGN_MIN, theme_color_set_t::backgroundNormal, theme_color_set_t::backgroundSelectedEnd, theme_color_set_t::bezel, theme_t::bezelSize, rect_t::bottom, theme_t::button, draw_bezel(), draw_dashed_outline(), draw_frame(), draw_image_blend(), draw_rect(), draw_text(), element_draw_begin(), element_draw_end(), ELEMENT_FLAT, element_get_content_rect(), element_get_theme(), ELEMENT_NO_BEZEL, ELEMENT_NO_OUTLINE, element_t::flags, text_props_t::font, theme_color_set_t::foregroundNormal, theme_color_set_t::foregroundSelected, theme_t::frameSize, theme_color_set_t::highlight, element_t::image, image_height(), image_width(), element_t::imageProps, button_t::isFocused, button_t::isHovered, button_t::isPressed, rect_t::left, NULL, RECT_HEIGHT, RECT_SHRINK, RECT_WIDTH, rect_t::right, theme_color_set_t::shadow, theme_t::smallPadding, image_props_t::srcOffset, element_t::text, element_t::textProps, theme, rect_t::top, image_props_t::xAlign, and image_props_t::yAlign.
Referenced by button_procedure().
Definition at line 146 of file button.c.
References levent_force_action_t::action, ACTION_CANCEL, ACTION_PRESS, ACTION_RELEASE, button_draw(), button_send_action(), element_get_content_rect(), element_get_private(), element_set_private(), ELEMENT_TOGGLE, ENOMEM, ERR, errno, EVENT_CURSOR_LEAVE, EVENT_MOUSE, EVENT_REPORT, surface_info_t::flags, element_t::flags, free(), event_report_t::info, button_t::isFocused, button_t::isHovered, button_t::isPressed, LEVENT_DEINIT, LEVENT_FORCE_ACTION, LEVENT_INIT, LEVENT_REDRAW, event_t::lForceAction, malloc(), event_t::mouse, MOUSE_LEFT, button_t::mouseButtons, NULL, event_mouse_t::pos, RECT_CONTAINS_POINT, event_t::report, SURFACE_FOCUSED, and event_t::type.
Referenced by button_new().
|
static |
Definition at line 140 of file button.c.
References window_t::disp, display_push(), element_t::id, LEVENT_ACTION, levent_action_t::source, window_t::surface, and element_t::win.
Referenced by button_procedure().