* This lets the user override the default application font.
* Unfortunately Qt seems to behave inconsistently with font scaling from the
system, so we take the font size initially from QApplication::font() (which
doesn't always pick up the font size) and scale from there. While this might
cause some font scaling to be lost it does mean at least we have a consistent
scale, as otherwise you get some text scaling and others not.
* Mostly moving includes from common headers to cpp where possible, and removing
includes of the whole thing where only enums or rdcstr etc are needed.
* This is only lightly tested and may break heavily. It is disabled by default
and must be explicitly enabled.
* In particular this is only known to work for Wayland use at capture time.
Wayland on replay is still unsupported. Known issues include: EGL pbuffer
surfaces are not implemented on Wayland, Wayland cannot get window dimensions,
and there are hangs/failures with GL and vulkan presentation with Wayland.
* On GL addressing modes are called wrap modes, and the wrap value is then known
as repeat. If we don't 'localise' this then it can be confusing to show that
it is "Wrap".
* Most cases don't have other text together with a ResourceId, so handle an
isolated ResourceId specially and manually render it.
* Further work - we could cache the name the same way as the RichResourceText
does. So far it doesn't seem to appear on profiling.
* This means it outputs natively/properly to stdout/stderr and its output can be
redirected with pipes.
* It does mean we need to be very careful whenever it's run internally to not
pop up a command window, which happens by default.
* This allows us to add rich text support much more easily into other itemviews
like RDTableView.
* We set it up for debug messages so that resource links in debug messages can
be linked.
* The GUIInvoke object takes a QObject, and uses QPointer to check that
it hasn't been deleted when the callback fires. This prevents delayed
callbacks from executing after the object has been deleted and
crashing.
* In most cases the pointer is just 'this'.
* For unsigned integers this notices UINT16/32/64_MAX and displays as
a text string for easier consumption.
* Also for numbers over a given threshold we display them as hex instead
of decimal.