Callback messages were not being handled and since MouseEnter and
MouseLeave events were wrapped into CallbackMessages they were lost
and so never got called
This could happen when painting text with CHARWRAP, where we removed
byte by byte from the end of the string, instead of removing (or
adding) well-formed UTF-8 string spans.
Improves the way we can write text to search a font, use up/down keys
to navigate through the font list, and use Enter/Esc keys to select
the font and go back to the text box.
Added REPORT_MOUSE/PAINT/TIMER_MESSAGES macros, and change _EVENTS to
_MESSAGES to avoid confusion with the current terminology.
The output string for each message was also simplified.
Now callers can force loading a file without creating any background
layer in the doc. This is because for drag and drop operations we don't
want to generate background layers
We're compiling Lua as C++, but it seems that target_compile_options()
doesn't work for Visual Studio solutions (only for Ninja/makefiles).
The proper cmake solution to this issue is using
set_source_files_properties() to specify C++ as the language to use to
compile all Lua C files. This generates a valid Visual Studio solution.
Prior to this fix, the following particular conditions caused
an incorrect conversion of an opaque color to a transparent color
during RGBA->Indexed conversion:
- RGBA image with black color (#000000 a=255) painted on the canvas
- The black color is absent from the palette.
- The mask color is present in the palette
- Converts the sprite to indexed color mode using
Sprite > Color Mode > More Options
- Select Advanced Options, select a Color Best Fit Criteria other than
Default (for example CIELAB) and press OK
- The original black color becomes the mask color.
As font thumbnails are generated on-demand, each time a new thumbnail
is generated, the viewport will be updated (updateView() called). This
viewport update will remove the scroll bars temporarily which will
remove the mouse capture from them, but we'd like to preserve that
capture so the mouse can continue dragging the mouse/scrolling.