This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.
Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.
With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.
On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
Since `_shape_line()` is called recursively, nested tables will be
calculated first, so there is no need to calculate the `max_width`
of the columns of the nested table in `_get_line_max_width()` again.
Line indentation (offset) is not taken into account when calculating
the available width of the table.
However, when drawing a table, its offset takes into account line
indentation.
- Makes `is_layout_rtl()` translation domain aware
- Makes various text-drawing controls translation domain aware
- Makes translation preview use the project's fallback locale when disabled
Fixes for cases where search results would be skipped or repeatedly found involving tables in RichTextLabel:
- If previous result was found in last cell of table, earlier cells would be skipped, since the end of the table was reached. Updated to not skip earlier cells when searching in reverse.
- When choosing next line to continue from after searching table, the inner line number within the table's cell was added, causing the search to jump forward if not on line 0 in the cell. This could cause lines to get skipped when searching forward, or searching the table again when searching in reverse. Updated to continue from the immediate next line before/after the table.
- If a table cell has multiple lines, repeated searching would only include the line where the previous result was found, then jump to the next cell. Updated to search remaining lines in the same cell first.