diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-02-13 12:24:13 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-02-13 12:24:13 -0500 |
commit | 3044a6e62e628fdb3c4b8832fd23e566216d7bb9 (patch) | |
tree | 9a398d435bf16afae597add1204cc1e9742778ef /indra/llui/lldraghandle.cpp | |
parent | c8ca31de41b29a43789a8213645fcdf52c9a29a9 (diff) |
Add help() function to Lua "builtins."
help() with no argument lists all our viewer builtins.
help(function, function, ...) shows help text for each named function. Each
argument can be either a string or the function in question (e.g. help(help)).
To support Lua-related text containing line breaks, make LLTextEditor::
pasteTextWithLinebreaks() a public template method. Change the existing
implementation, which specifically accepts (const LLWString&), into its
LLWString specialization. The generic template passes llconvert(arg) to that
specialization, the one real implementation.
Make LLFloaterLUADebug methods call pasteTextWithLinebreaks() instead of
insertText(), which ignores newline characters.
To allow help() to accept an actual function as well as a string name, add a
lookup-by-function-pointer map to LuaFunction. (A Lua function does not store
a name.) Make the constructor store an entry in the new lookup map as well as
in the original registry map.
Change LuaFunction::getRegistry() and getRegistered() to getState() and
getRState(), respectively. Each returns a std::pair, but the first binds
non-const references while the second binds const references.
Diffstat (limited to 'indra/llui/lldraghandle.cpp')
0 files changed, 0 insertions, 0 deletions