aseprite/src/ui
David Capello bd91a6430f Process os::Event::MouseEnter/Leave in correct order
When we received a MouseEnter/Leave, we were processing those laf-os
events immediately without taking care of all the MouseMove/Down/Up
events in the middle. Now we enqueue all the events as
messages (MouseEnter -> MouseMove/Down/Up -> MouseLeave).

This is important because when we process MouseLeave we are calling
setMouse(nullptr), which resets the mouse widget HAS_MOUSE flag, and
some widgets needs to know if they have the mouse above before the
MouseUp event. With this change we can remove the
Widget::hasMouseOver() function (that was checking the global
ui::get_mouse_position() instead of the HAS_MOUSE flag directly).

Another change was introduced to keep the old behavior now that
hasMouseOver() is not available: the ui::Manager doesn't assign the
HAS_MOUSE flag if the mouse is captured (it only assign the HAS_MOUSE
to the widget with the mouse captured, or to no widget, at least until
the capture is released).
2023-07-10 10:54:37 -03:00
..
accelerator_ui_tests.cpp Rename src/tests/test.h -> src/tests/app_test.h to avoid confusion with observable tests/test.h 2021-12-23 21:38:17 -03:00
accelerator.cpp Replace NULL to nullptr in ui library 2020-04-08 17:48:06 -03:00
accelerator.h
alert.cpp Add ability to use mnemonic without modifiers in alerts 2023-03-23 16:15:51 -03:00
alert.h
animated_widget.h Move AnimatedWidget from app to ui 2019-12-23 11:14:23 -03:00
app_state.cpp Close all docs correctly even in case of exception (fix #3162) 2022-04-05 23:07:08 -03:00
app_state.h Close all docs correctly even in case of exception (fix #3162) 2022-04-05 23:07:08 -03:00
base.h Replace NULL to nullptr in ui library 2020-04-08 17:48:06 -03:00
box.cpp Replace base::clamp -> std::clamp as now we use C++17 2022-06-09 19:05:48 -03:00
box.h
button.cpp Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
button.h Remove ui::Event& args from ui::Button::Click signal 2023-01-12 11:00:16 -03:00
clipboard_delegate.h
close_event.h Fix initialization order of base class and member variable in ui::CloseEvent class 2021-09-06 18:00:56 -03:00
CMakeLists.txt Merge branch 'main' into beta 2022-09-28 16:20:03 -03:00
combobox.cpp Remove ui::Event& args from ui::Button::Click signal 2023-01-12 11:00:16 -03:00
combobox.h Remove ui::Event& args from ui::Button::Click signal 2023-01-12 11:00:16 -03:00
component.cpp
component.h
cursor_type.h
cursor.cpp Cache mouse cursors to avoid re-generating them on each setCursor() 2021-07-09 10:21:16 -03:00
cursor.h Cache mouse cursors to avoid re-generating them on each setCursor() 2021-07-09 10:21:16 -03:00
display.cpp Swap buffers in Display::flipDisplay() 2022-05-19 17:00:19 -03:00
display.h [lua] Add app.editor.spritePos/mousePos and app.editor:cancel() 2023-04-25 09:03:20 -03:00
entry.cpp Fix alignment of several controls when UI scaling is 200% and Screen scaling is 100% to make them look the same as when US scaling is 100% and Screen scaling is 200% 2023-03-13 10:52:01 -03:00
entry.h Improve seleting words w/double-clicking on a ui::Entry (fix #3229) 2022-04-19 16:17:28 -03:00
event.cpp
event.h
fit_bounds.cpp Fix std::clamp() assert fail in ui::fit_bounds() 2023-03-15 16:32:56 -03:00
fit_bounds.h Use transparent windows for tooltips & popups like toolbar (fix #2764) 2021-07-30 16:14:38 -03:00
graphics.cpp Add support to render the background directly on screen 2023-04-03 15:59:29 -03:00
graphics.h Minor changes before the merge with main 2023-04-03 20:15:38 -03:00
grid_ui_tests.cpp Rename src/tests/test.h -> src/tests/app_test.h to avoid confusion with observable tests/test.h 2021-12-23 21:38:17 -03:00
grid.cpp Minor change in formatting of conditional ternary operator 2023-02-27 19:18:25 -03:00
grid.h Minor change in formatting of conditional ternary operator 2023-02-27 19:18:25 -03:00
hit_test_event.h
image_view.cpp Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
image_view.h Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
init_theme_event.h
int_entry.cpp Use new ScopedValue w/o old arg + C++17 class template argument deduction (CTAD) 2023-04-14 13:43:36 -03:00
int_entry.h Fix memory leak with IntEntry popups 2022-07-15 12:46:54 -03:00
intern.cpp Merge branch 'main' into beta 2022-05-23 18:04:55 -03:00
intern.h
keys.h
label.cpp
label.h
layout_io.h
LICENSE.txt Fix public -> private in ui::Timer 2022-04-18 18:01:39 -03:00
link_label.cpp Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
link_label.h
listbox.cpp Fix failing ASSERT(i >= 0 && i < int(m_states.size())) in ListBox::selectChild() 2023-04-17 22:32:22 -03:00
listbox.h Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
listitem.cpp Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
listitem.h Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
load_layout_event.h
manager.cpp Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
manager.h Fix bug where we were able to click a non-foreground window 2023-05-05 20:08:39 -03:00
menu.cpp Use new ScopedValue w/o old arg + C++17 class template argument deduction (CTAD) 2023-04-14 13:43:36 -03:00
menu.h Merge branch 'main' into beta 2022-04-13 23:01:12 -03:00
message_loop.cpp Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
message_loop.h
message_type.h Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
message.cpp Use transparent windows for tooltips & popups like toolbar (fix #2764) 2021-07-30 16:14:38 -03:00
message.h Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
mouse_button.h Match ui::MouseButton values to os::Event::MouseButton 2020-03-27 15:40:43 -03:00
move_region.cpp Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
move_region.h Add ui::Display to support multiple windows in the future 2021-02-18 12:34:42 -03:00
overlay_manager.cpp Merge branch 'main' into beta 2022-06-15 13:44:34 -03:00
overlay_manager.h Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
overlay.cpp Merge branch 'main' into beta 2022-07-13 19:49:03 -03:00
overlay.h Merge branch 'main' into beta 2022-06-15 13:44:34 -03:00
paint_event.cpp
paint_event.h
paint.cpp Add ui::Paint = os::Paint = SkPaint 2022-09-28 15:49:30 -03:00
paint.h Add ui::Paint = os::Paint = SkPaint 2022-09-28 15:49:30 -03:00
panel.cpp Add support to show multiple sections in Export Sprite Sheet 2019-10-29 16:37:06 -03:00
panel.h Add support to show multiple sections in Export Sprite Sheet 2019-10-29 16:37:06 -03:00
pointer_type.h
popup_window.cpp Use transparent windows for tooltips & popups like toolbar (fix #2764) 2021-07-30 16:14:38 -03:00
popup_window.h Fix several issues locating windows with multiple UI windows 2021-03-19 18:57:56 -03:00
property.cpp
property.h
README.md
register_message.cpp
register_message.h
resize_event.cpp
resize_event.h
save_layout_event.h
scale.h
scroll_bar.cpp Fix std::clamp() assert fail when scrollbars are too small 2022-07-13 16:47:20 -03:00
scroll_bar.h
scroll_helper.cpp Remove unused parameter in NEED_BAR() macro 2023-02-02 11:54:13 -03:00
scroll_helper.h Include ui/scroll_helper.h in ui/ui.h 2019-10-01 14:35:47 -03:00
scroll_region_event.h
separator.cpp Remove MIN/MAX/MID macros from ui library 2019-12-20 15:08:34 -03:00
separator.h
size_hint_event.cpp
size_hint_event.h
slider.cpp Merge branch 'main' into beta 2022-07-13 19:49:03 -03:00
slider.h Add a slider style in theme 2020-05-01 23:31:10 -03:00
splitter.cpp Merge branch 'main' into beta 2022-08-31 12:31:44 -03:00
splitter.h Don't change user-defined pos of Splitter when we resize the window 2021-05-20 20:42:01 -03:00
style.cpp Add gap, gap-rows, and gap-columns style attributes 2023-02-27 09:43:48 -03:00
style.h Add gap, gap-rows, and gap-columns style attributes 2023-02-27 09:43:48 -03:00
system.cpp Remove base::thread, we use std::thread 2023-01-05 16:43:09 -03:00
system.h Backport new laf API to main branch of aseprite 2021-07-05 17:51:29 -03:00
textbox.cpp Centralize the warning message for incompatible files/forward compatibility (#3811, #3812) 2023-05-11 12:18:31 -03:00
textbox.h
theme.cpp Fix alignment of several controls when UI scaling is 200% and Screen scaling is 100% to make them look the same as when US scaling is 100% and Screen scaling is 200% 2023-03-13 10:52:01 -03:00
theme.h Minor change: replace macro with inline function 2023-03-13 11:11:05 -03:00
timer.cpp Group several mouse movement in one on the Editor 2022-01-06 16:54:39 -03:00
timer.h Fix public -> private in ui::Timer 2022-04-18 18:01:39 -03:00
tooltips.cpp Merge branch 'main' into beta 2022-06-10 10:31:13 -03:00
tooltips.h Use transparent windows for tooltips & popups like toolbar (fix #2764) 2021-07-30 16:14:38 -03:00
ui.h Merge branch 'main' into beta 2022-04-05 23:16:55 -03:00
view.cpp Merge branch 'main' into beta 2022-09-28 16:20:03 -03:00
view.h
viewport.cpp Fix crash closing a MenuBox with viewport (fix #3132, fix #3133) 2022-01-14 15:09:50 -03:00
viewport.h
widget_type.h
widget_ui_tests.cpp Fix performance issues adding/deleting widgets (related to #3281) 2022-05-20 11:03:12 -03:00
widget.cpp Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
widget.h Process os::Event::MouseEnter/Leave in correct order 2023-07-10 10:54:37 -03:00
widgets_list.h Replace NULL to nullptr in ui library 2020-04-08 17:48:06 -03:00
window.cpp Avoid dialog's window relayout during an ongoing window's size change 2023-03-28 14:09:03 -03:00
window.h Avoid dialog's window relayout during an ongoing window's size change 2023-03-28 14:09:03 -03:00

Aseprite UI Library

Distributed under MIT license