This reverts commit a988fad9a0.
As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
This reverts #51619 and fixes the issue properly, as well as enabling
`fit_content_height` which is necessary following #57304.
Fixes#57174.
Also adds a placeholder for property and signal tooltips with no description,
factoring the code while at it.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
* The main generation could not be moved to a thread, as it instantiates
classes to get default values, interacts with ProjectSettings, etc.
* Only uncompressing documentation and merging it is threaded.
* Seems to improve editor load times by 0.5 seconds.
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Commit `e4651a4` introduced `scroll_to_paragraph` and changed the implementation
of `scroll_to_line`, which also counts lines within paragraphs.
The help editor still used the `scroll_to_line` method
while it should use the newly implemented `scroll_to_paragraph' as that is
stored in its tables.
Adds ability to add error return documetation to the binder and class reference.
Usage example:
```C++
void MyClass::_bind_method() {
[..]
BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN, ERR_FILE_UNRECOGNIZED);
}
```
One function of ConfigFile was changed as example.
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.
Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.
This is part of ongoing work to optimize GUI and the editor.
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"