STORM-1831 merging in previous work
parent
1407f4f11a
commit
7183cecd14
|
|
@ -1,25 +1,25 @@
|
|||
/**
|
||||
/**
|
||||
* @file llkeywords.cpp
|
||||
* @brief Keyword list for LSL
|
||||
*
|
||||
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
|
@ -29,12 +29,12 @@
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "lldir.h"
|
||||
#include "llkeywords.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltexteditor.h"
|
||||
#include "llstl.h"
|
||||
#include <boost/tokenizer.hpp>
|
||||
|
||||
const U32 KEYWORD_FILE_CURRENT_VERSION = 2;
|
||||
|
||||
inline BOOL LLKeywordToken::isHead(const llwchar* s) const
|
||||
{
|
||||
|
|
@ -53,10 +53,6 @@ inline BOOL LLKeywordToken::isHead(const llwchar* s) const
|
|||
return res;
|
||||
}
|
||||
|
||||
LLKeywords::LLKeywords() : mLoaded(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
inline BOOL LLKeywordToken::isTail(const llwchar* s) const
|
||||
{
|
||||
BOOL res = TRUE;
|
||||
|
|
@ -73,6 +69,12 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const
|
|||
return res;
|
||||
}
|
||||
|
||||
LLKeywords::LLKeywords() : mLoaded(FALSE)
|
||||
{
|
||||
setFilenameColors( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords_lsl_colors.xml") );
|
||||
setFilenameSyntax( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords_lsl_tokens.xml") );
|
||||
}
|
||||
|
||||
LLKeywords::~LLKeywords()
|
||||
{
|
||||
std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer());
|
||||
|
|
@ -80,148 +82,12 @@ LLKeywords::~LLKeywords()
|
|||
std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer());
|
||||
}
|
||||
|
||||
BOOL LLKeywords::loadFromFile( const std::string& filename )
|
||||
|
||||
|
||||
void LLKeywords::addColorGroup(const std::string key_in, const LLColor3 color)
|
||||
{
|
||||
mLoaded = FALSE;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// File header
|
||||
|
||||
const S32 BUFFER_SIZE = 1024;
|
||||
char buffer[BUFFER_SIZE]; /* Flawfinder: ignore */
|
||||
|
||||
llifstream file;
|
||||
file.open(filename); /* Flawfinder: ignore */
|
||||
if( file.fail() )
|
||||
{
|
||||
llinfos << "LLKeywords::loadFromFile() Unable to open file: " << filename << llendl;
|
||||
return mLoaded;
|
||||
}
|
||||
|
||||
// Identifying string
|
||||
file >> buffer;
|
||||
if( strcmp( buffer, "llkeywords" ) )
|
||||
{
|
||||
llinfos << filename << " does not appear to be a keyword file" << llendl;
|
||||
return mLoaded;
|
||||
}
|
||||
|
||||
// Check file version
|
||||
file >> buffer;
|
||||
U32 version_num;
|
||||
file >> version_num;
|
||||
if( strcmp(buffer, "version") || version_num != (U32)KEYWORD_FILE_CURRENT_VERSION )
|
||||
{
|
||||
llinfos << filename << " does not appear to be a version " << KEYWORD_FILE_CURRENT_VERSION << " keyword file" << llendl;
|
||||
return mLoaded;
|
||||
}
|
||||
|
||||
// start of line (SOL)
|
||||
std::string SOL_COMMENT("#");
|
||||
std::string SOL_WORD("[word ");
|
||||
std::string SOL_LINE("[line ");
|
||||
std::string SOL_ONE_SIDED_DELIMITER("[one_sided_delimiter ");
|
||||
std::string SOL_TWO_SIDED_DELIMITER("[two_sided_delimiter ");
|
||||
std::string SOL_DOUBLE_QUOTATION_MARKS("[double_quotation_marks ");
|
||||
|
||||
LLColor3 cur_color( 1, 0, 0 );
|
||||
LLKeywordToken::TOKEN_TYPE cur_type = LLKeywordToken::WORD;
|
||||
|
||||
while (!file.eof())
|
||||
{
|
||||
buffer[0] = 0;
|
||||
file.getline( buffer, BUFFER_SIZE );
|
||||
std::string line(buffer);
|
||||
if( line.find(SOL_COMMENT) == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if( line.find(SOL_WORD) == 0 )
|
||||
{
|
||||
cur_color = readColor( line.substr(SOL_WORD.size()) );
|
||||
cur_type = LLKeywordToken::WORD;
|
||||
continue;
|
||||
}
|
||||
else if( line.find(SOL_LINE) == 0 )
|
||||
{
|
||||
cur_color = readColor( line.substr(SOL_LINE.size()) );
|
||||
cur_type = LLKeywordToken::LINE;
|
||||
continue;
|
||||
}
|
||||
else if( line.find(SOL_TWO_SIDED_DELIMITER) == 0 )
|
||||
{
|
||||
cur_color = readColor( line.substr(SOL_TWO_SIDED_DELIMITER.size()) );
|
||||
cur_type = LLKeywordToken::TWO_SIDED_DELIMITER;
|
||||
continue;
|
||||
}
|
||||
else if( line.find(SOL_DOUBLE_QUOTATION_MARKS) == 0 )
|
||||
{
|
||||
cur_color = readColor( line.substr(SOL_DOUBLE_QUOTATION_MARKS.size()) );
|
||||
cur_type = LLKeywordToken::DOUBLE_QUOTATION_MARKS;
|
||||
continue;
|
||||
}
|
||||
else if( line.find(SOL_ONE_SIDED_DELIMITER) == 0 )
|
||||
{
|
||||
cur_color = readColor( line.substr(SOL_ONE_SIDED_DELIMITER.size()) );
|
||||
cur_type = LLKeywordToken::ONE_SIDED_DELIMITER;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string token_buffer( line );
|
||||
LLStringUtil::trim(token_buffer);
|
||||
|
||||
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
||||
boost::char_separator<char> sep_word("", " \t");
|
||||
tokenizer word_tokens(token_buffer, sep_word);
|
||||
tokenizer::iterator token_word_iter = word_tokens.begin();
|
||||
|
||||
if( !token_buffer.empty() && token_word_iter != word_tokens.end() )
|
||||
{
|
||||
// first word is the keyword or a left delimiter
|
||||
std::string keyword = (*token_word_iter);
|
||||
LLStringUtil::trim(keyword);
|
||||
|
||||
// second word may be a right delimiter
|
||||
std::string delimiter;
|
||||
if (cur_type == LLKeywordToken::TWO_SIDED_DELIMITER)
|
||||
{
|
||||
while (delimiter.length() == 0 && ++token_word_iter != word_tokens.end())
|
||||
{
|
||||
delimiter = *token_word_iter;
|
||||
LLStringUtil::trim(delimiter);
|
||||
}
|
||||
}
|
||||
else if (cur_type == LLKeywordToken::DOUBLE_QUOTATION_MARKS)
|
||||
{
|
||||
// Closing delimiter is identical to the opening one.
|
||||
delimiter = keyword;
|
||||
}
|
||||
|
||||
// following words are tooltip
|
||||
std::string tool_tip;
|
||||
while (++token_word_iter != word_tokens.end())
|
||||
{
|
||||
tool_tip += (*token_word_iter);
|
||||
}
|
||||
LLStringUtil::trim(tool_tip);
|
||||
|
||||
if( !tool_tip.empty() )
|
||||
{
|
||||
// Replace : with \n for multi-line tool tips.
|
||||
LLStringUtil::replaceChar( tool_tip, ':', '\n' );
|
||||
addToken(cur_type, keyword, cur_color, tool_tip, delimiter );
|
||||
}
|
||||
else
|
||||
{
|
||||
addToken(cur_type, keyword, cur_color, LLStringUtil::null, delimiter );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
||||
mLoaded = TRUE;
|
||||
return mLoaded;
|
||||
WStringMapIndex key ( utf8str_to_wstring(key_in) );
|
||||
mColorGroupMap[key] = color;
|
||||
}
|
||||
|
||||
// Add the token as described
|
||||
|
|
@ -231,22 +97,37 @@ void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type,
|
|||
const std::string& tool_tip_in,
|
||||
const std::string& delimiter_in)
|
||||
{
|
||||
std::string tip_text = tool_tip_in;
|
||||
LLStringUtil::replaceString(tip_text, "\\n", "\n" );
|
||||
LLStringUtil::replaceString(tip_text, "\t", " " );
|
||||
if (tip_text =="")
|
||||
{
|
||||
tip_text = "[no info]";
|
||||
}
|
||||
LLWString tool_tip = utf8str_to_wstring(tip_text);
|
||||
|
||||
LLWString key = utf8str_to_wstring(key_in);
|
||||
LLWString tool_tip = utf8str_to_wstring(tool_tip_in);
|
||||
LLWString delimiter = utf8str_to_wstring(delimiter_in);
|
||||
switch(type)
|
||||
{
|
||||
case LLKeywordToken::WORD:
|
||||
case LLKeywordToken::TT_CONSTANT:
|
||||
case LLKeywordToken::TT_EVENT:
|
||||
case LLKeywordToken::TT_FLOW:
|
||||
case LLKeywordToken::TT_FUNCTION:
|
||||
case LLKeywordToken::TT_LABEL:
|
||||
case LLKeywordToken::TT_SECTION:
|
||||
case LLKeywordToken::TT_TYPE:
|
||||
case LLKeywordToken::TT_WORD:
|
||||
mWordTokenMap[key] = new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null);
|
||||
break;
|
||||
|
||||
case LLKeywordToken::LINE:
|
||||
case LLKeywordToken::TT_LINE:
|
||||
mLineTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, LLWStringUtil::null));
|
||||
break;
|
||||
|
||||
case LLKeywordToken::TWO_SIDED_DELIMITER:
|
||||
case LLKeywordToken::DOUBLE_QUOTATION_MARKS:
|
||||
case LLKeywordToken::ONE_SIDED_DELIMITER:
|
||||
case LLKeywordToken::TT_TWO_SIDED_DELIMITER:
|
||||
case LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS:
|
||||
case LLKeywordToken::TT_ONE_SIDED_DELIMITER:
|
||||
mDelimiterTokenList.push_front(new LLKeywordToken(type, color, key, tool_tip, delimiter));
|
||||
break;
|
||||
|
||||
|
|
@ -254,6 +135,365 @@ void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type,
|
|||
llassert(0);
|
||||
}
|
||||
}
|
||||
|
||||
std::string LLKeywords::getArguments(LLSD& arguments)
|
||||
{
|
||||
std::string args = "";
|
||||
if (arguments.isArray())
|
||||
{
|
||||
int count = 0;
|
||||
do
|
||||
{
|
||||
LLSD arg = arguments[count];
|
||||
args += arg.get("type").asString() + " " + arg.get("name").asString();
|
||||
++count;
|
||||
if (arguments.size() - count > 0)
|
||||
{
|
||||
args += ", ";
|
||||
}
|
||||
} while (count < arguments.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Arguments") << "Not an array! Invalid LLSD passed to function.\n" << arguments << LL_ENDL;
|
||||
}
|
||||
return args == "" ? " void " : args;
|
||||
}
|
||||
|
||||
std::string LLKeywords::getAttribute(const std::string& key)
|
||||
{
|
||||
attribute_iterator_t it = mAttributes.find(key);
|
||||
return (it != mAttributes.end()) ? it->second : "";
|
||||
}
|
||||
|
||||
LLColor3 LLKeywords::getColorGroup(const std::string key_in)
|
||||
{
|
||||
// LLColor3 initialises to Black (0,0,0)
|
||||
LLColor3 Colour;
|
||||
WStringMapIndex key ( utf8str_to_wstring(key_in) );
|
||||
group_color_map_t::iterator it = mColorGroupMap.find(key);
|
||||
if (it == mColorGroupMap.end())
|
||||
{
|
||||
LL_WARNS("Colour lookup") << "'" << key_in << "' not found!" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
Colour = it->second;
|
||||
}
|
||||
|
||||
return Colour;
|
||||
}
|
||||
|
||||
BOOL LLKeywords::initialise()
|
||||
{
|
||||
mReady = false;
|
||||
|
||||
if (! loadIntoLLSD(mFilenameColors, mColors) )
|
||||
{
|
||||
LL_ERRS("") << "Failed to load color data, cannot continue!" << LL_ENDL;
|
||||
}
|
||||
else if (! loadIntoLLSD(mFilenameSyntax, mSyntax) )
|
||||
{
|
||||
LL_ERRS("") << "Failed to load syntax data from '" << mFilenameSyntax << "', cannot continue!" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mReady = true;
|
||||
}
|
||||
|
||||
if (ready())
|
||||
{
|
||||
processColors();
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("") << LL_ENDL;
|
||||
LL_ERRS("") << "Failed to load one or both data files, cannot continue!" << LL_ENDL;
|
||||
}
|
||||
return mReady;
|
||||
}
|
||||
|
||||
BOOL LLKeywords::loadFromFile()
|
||||
{
|
||||
processTokens();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load xml serialised LLSD
|
||||
* @desc Opens the specified filespec and attempts to deserialise the
|
||||
* contained data to the specified LLSD object.
|
||||
* @return Returns boolean true/false indicating success or failure.
|
||||
*/
|
||||
BOOL LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data)
|
||||
{
|
||||
mLoaded = false;
|
||||
llifstream file;
|
||||
file.open(filename);
|
||||
if(file.is_open())
|
||||
{
|
||||
mLoaded = (BOOL)LLSDSerialize::fromXML(data, file);
|
||||
if (!mLoaded)
|
||||
{
|
||||
LL_WARNS("") << "Unable to deserialise file: " << filename << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("") << "Deserialised file: " << filename << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("") << "Unable to open file: " << filename << LL_ENDL;
|
||||
}
|
||||
return mLoaded;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start processing the colour LLSD from its beginning.
|
||||
*
|
||||
*/
|
||||
std::string LLKeywords::processColors()
|
||||
{
|
||||
return processColors(mColors, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Recursively process the colour LLSD from an arbitrary level.
|
||||
* @desc Process the supplied LLSD for colour data. The strPrefix is a string
|
||||
* of hyphen separated keys from previous levels.
|
||||
*/
|
||||
std::string LLKeywords::processColors(LLSD &settings, const std::string strPrefix)
|
||||
{
|
||||
if (settings.isMap() || (! settings.isMap() && strPrefix != "") )
|
||||
{
|
||||
LLSD llsd_map = settings;
|
||||
|
||||
LLSD::map_iterator my_iter = llsd_map.beginMap();
|
||||
for ( ; my_iter != llsd_map.endMap(); ++my_iter)
|
||||
{
|
||||
std::string strGroup = strPrefix;
|
||||
const LLSD::String& key = my_iter->first;
|
||||
LLSD& value = my_iter->second;
|
||||
|
||||
if (key == "color")
|
||||
{
|
||||
if (value.isMap() || value.isArray())
|
||||
{
|
||||
addColorGroup(strGroup, readColor(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Invalid Color") << "Invalid Color Entry - first: '" << key << "' second: '" << value << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if (value.isMap())
|
||||
{
|
||||
strGroup += (strGroup.length() == 0) ? my_iter->first : "-" + my_iter->first;
|
||||
strGroup = processColors(value, strGroup);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("Invalid Color") << "Invalid Color Entry - first: '" << key << "' second: '" << value << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return strPrefix;
|
||||
}
|
||||
|
||||
void LLKeywords::processTokens()
|
||||
{
|
||||
// Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD
|
||||
std::string delimiter;
|
||||
addToken(LLKeywordToken::TT_LINE, "@", getColorGroup("misc-flow-label"), "Label\nTarget for jump statement", delimiter );
|
||||
addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", getColorGroup("misc-comments_1_sided"), "Comment\nNon-functional commentary or disabled code", delimiter );
|
||||
addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", getColorGroup("misc-comments_2_sided"), "Comment\nNon-functional commentary or disabled code (multi-line)", "*/" );
|
||||
addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", getColorGroup("misc-double_quotation_marks"), "String literal", "\"" );
|
||||
|
||||
LLSD::map_iterator outerIt = mSyntax.beginMap();
|
||||
for ( ; outerIt != mSyntax.endMap(); ++outerIt)
|
||||
{
|
||||
// TODO Collapse the 'if's into two, those that call 'processTokens' directly and an else if (for 'misc') that doesn't
|
||||
if (outerIt->first == "constants")
|
||||
{
|
||||
if (outerIt->second.isMap())
|
||||
{
|
||||
processTokensGroup(outerIt->second, "constants");
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens-Constants") << "No constants map to process!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if(outerIt->first == "misc")
|
||||
{
|
||||
if (outerIt->second.isMap())
|
||||
{
|
||||
LLSD::map_iterator innerIt = outerIt->second.beginMap();
|
||||
for ( ; innerIt != outerIt->second.endMap(); ++innerIt)
|
||||
{
|
||||
processTokensGroup(innerIt->second, "misc-" + innerIt->first);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens-Misc") << "No misc map to process!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if(outerIt->first == "events")
|
||||
{
|
||||
if (outerIt->second.isMap())
|
||||
{
|
||||
processTokensGroup(outerIt->second, "events");
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens-Events") << "No event map to process!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if(outerIt->first == "functions")
|
||||
{
|
||||
if (outerIt->second.isMap())
|
||||
{
|
||||
processTokensGroup(outerIt->second, "functions");
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens-Functions") << "No function map to process!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else if(outerIt->first == "types")
|
||||
{
|
||||
if (outerIt->second.isArray())
|
||||
{
|
||||
processTokensGroup(outerIt->second, "types");
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens-Types") << "No types array to process!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Tokens") << "Unknown token group '" << outerIt->first << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
LL_INFOS("") << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group)
|
||||
{
|
||||
LLColor3 Color = getColorGroup(Group);
|
||||
LL_INFOS("Tokens") << "Group: '" << Group << "', using colour: '" << Color << "'" << LL_ENDL;
|
||||
|
||||
LLKeywordToken::TOKEN_TYPE token_type = LLKeywordToken::TT_UNKNOWN;
|
||||
// If a new token type is added here, it must also be added to the 'addToken' method
|
||||
if (Group == "constants")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_CONSTANT;
|
||||
}
|
||||
else if (Group == "events")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_EVENT;
|
||||
}
|
||||
else if (Group == "misc-flow-control")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_FLOW;
|
||||
}
|
||||
else if (Group == "functions")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_FUNCTION;
|
||||
}
|
||||
else if (Group == "misc-flow-label")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_LABEL;
|
||||
}
|
||||
else if (Group == "misc-sections")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_SECTION;
|
||||
}
|
||||
else if (Group == "types")
|
||||
{
|
||||
token_type = LLKeywordToken::TT_TYPE;
|
||||
}
|
||||
|
||||
if (Tokens.isMap()) // constants, events, functions, and misc
|
||||
{
|
||||
LLSD::map_iterator outerIt = Tokens.beginMap();
|
||||
for ( ; outerIt != Tokens.endMap(); ++outerIt)
|
||||
{
|
||||
if (outerIt->second.isMap())
|
||||
{
|
||||
mAttributes.clear();
|
||||
LLSD arguments = LLSD ();
|
||||
LLSD::map_iterator innerIt = outerIt->second.beginMap();
|
||||
for ( ; innerIt != outerIt->second.endMap(); ++innerIt)
|
||||
{
|
||||
if (innerIt->first != "arguments")
|
||||
{
|
||||
mAttributes[innerIt->first] = innerIt->second.asString();
|
||||
}
|
||||
else if (innerIt->second.isArray())
|
||||
{
|
||||
arguments = innerIt->second;
|
||||
}
|
||||
}
|
||||
|
||||
std::string tooltip = "";
|
||||
if (token_type == LLKeywordToken::TT_CONSTANT)
|
||||
{
|
||||
Color = getColorGroup(Group + "-" + getAttribute("type"));
|
||||
tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value");
|
||||
}
|
||||
else if (token_type == LLKeywordToken::TT_EVENT)
|
||||
{
|
||||
tooltip = outerIt->first + "(" + getArguments(arguments) + ")";
|
||||
}
|
||||
else if (token_type == LLKeywordToken::TT_FLOW)
|
||||
{
|
||||
tooltip = "flow baby";
|
||||
}
|
||||
else if (token_type == LLKeywordToken::TT_FUNCTION)
|
||||
{
|
||||
tooltip = getAttribute("return") + " " + outerIt->first + "(" + getArguments(arguments) + ");";
|
||||
tooltip += "\nEnergy: ";
|
||||
tooltip += getAttribute("energy") == "" ? "0.0" : getAttribute("energy");
|
||||
if (getAttribute("sleep") != "")
|
||||
{
|
||||
tooltip += ", Sleep: " + getAttribute("sleep");
|
||||
}
|
||||
}
|
||||
else if (token_type == LLKeywordToken::TT_SECTION)
|
||||
{
|
||||
tooltip = "section";
|
||||
}
|
||||
|
||||
if (getAttribute("summry") != "")
|
||||
{
|
||||
tooltip += "\n" + getAttribute("summary");
|
||||
}
|
||||
else if (getAttribute("description") != "")
|
||||
{
|
||||
tooltip += "\n" + getAttribute("description");
|
||||
}
|
||||
|
||||
addToken(token_type, outerIt->first, Color, tooltip);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Tokens.isArray()) // types
|
||||
{
|
||||
for (int count = 0; count < Tokens.size(); ++count)
|
||||
{
|
||||
addToken(token_type, Tokens[count], Color, "");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_INFOS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
LLKeywords::WStringMapIndex::WStringMapIndex(const WStringMapIndex& other)
|
||||
{
|
||||
if(other.mOwner)
|
||||
|
|
@ -298,13 +538,13 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o
|
|||
{
|
||||
// NOTE: Since this is only used to organize a std::map, it doesn't matter if it uses correct collate order or not.
|
||||
// The comparison only needs to strictly order all possible strings, and be stable.
|
||||
|
||||
|
||||
bool result = false;
|
||||
const llwchar* self_iter = mData;
|
||||
const llwchar* self_end = mData + mLength;
|
||||
const llwchar* other_iter = other.mData;
|
||||
const llwchar* other_end = other.mData + other.mLength;
|
||||
|
||||
|
||||
while(true)
|
||||
{
|
||||
if(other_iter >= other_end)
|
||||
|
|
@ -319,7 +559,7 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o
|
|||
{
|
||||
// self is shorter than other.
|
||||
result = true;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
else if(*self_iter != *other_iter)
|
||||
{
|
||||
|
|
@ -331,7 +571,7 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o
|
|||
self_iter++;
|
||||
other_iter++;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -347,6 +587,22 @@ LLColor3 LLKeywords::readColor( const std::string& s )
|
|||
return LLColor3( r, g, b );
|
||||
}
|
||||
|
||||
LLColor3 LLKeywords::readColor(LLSD& sd)
|
||||
{
|
||||
if (sd.isArray())
|
||||
{
|
||||
return LLColor3 (sd);
|
||||
}
|
||||
else if (sd.isMap())
|
||||
{
|
||||
return LLColor3 ( sd.get("x").asReal(), sd.get("y").asReal(), sd.get("z").asReal() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLColor3::black;
|
||||
}
|
||||
}
|
||||
|
||||
LLFastTimer::DeclareTimer FTM_SYNTAX_COLORING("Syntax Coloring");
|
||||
|
||||
// Walk through a string, applying the rules specified by the keyword token list and
|
||||
|
|
@ -360,10 +616,10 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
S32 text_len = wtext.size() + 1;
|
||||
|
||||
seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) );
|
||||
seg_list->push_back( new LLNormalTextSegment( defaultColor, 0, text_len, editor ) );
|
||||
|
||||
const llwchar* base = wtext.c_str();
|
||||
const llwchar* cur = base;
|
||||
|
|
@ -398,7 +654,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
continue;
|
||||
}
|
||||
|
||||
// cur is now at the first non-whitespace character of a new line
|
||||
// cur is now at the first non-whitespace character of a new line
|
||||
|
||||
// Line start tokens
|
||||
{
|
||||
|
|
@ -416,7 +672,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
cur++;
|
||||
}
|
||||
S32 seg_end = cur - base;
|
||||
|
||||
|
||||
//create segments from seg_start to seg_end
|
||||
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
|
||||
line_done = TRUE; // to break out of second loop.
|
||||
|
|
@ -461,14 +717,14 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
|
||||
seg_start = cur - base;
|
||||
cur += cur_delimiter->getLengthHead();
|
||||
|
||||
|
||||
LLKeywordToken::TOKEN_TYPE type = cur_delimiter->getType();
|
||||
if( type == LLKeywordToken::TWO_SIDED_DELIMITER || type == LLKeywordToken::DOUBLE_QUOTATION_MARKS )
|
||||
if( type == LLKeywordToken::TT_TWO_SIDED_DELIMITER || type == LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS )
|
||||
{
|
||||
while( *cur && !cur_delimiter->isTail(cur))
|
||||
{
|
||||
// Check for an escape sequence.
|
||||
if (type == LLKeywordToken::DOUBLE_QUOTATION_MARKS && *cur == '\\')
|
||||
if (type == LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS && *cur == '\\')
|
||||
{
|
||||
// Count the number of backslashes.
|
||||
S32 num_backslashes = 0;
|
||||
|
|
@ -515,7 +771,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
}
|
||||
else
|
||||
{
|
||||
llassert( cur_delimiter->getType() == LLKeywordToken::ONE_SIDED_DELIMITER );
|
||||
llassert( cur_delimiter->getType() == LLKeywordToken::TT_ONE_SIDED_DELIMITER );
|
||||
// Left side is the delimiter. Right side is eol or eof.
|
||||
while( *cur && ('\n' != *cur) )
|
||||
{
|
||||
|
|
@ -561,7 +817,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
|
||||
insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor);
|
||||
}
|
||||
cur += seg_len;
|
||||
cur += seg_len;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
@ -577,7 +833,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
|
|||
void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor )
|
||||
{
|
||||
std::string::size_type pos = wtext.find('\n',seg_start);
|
||||
|
||||
|
||||
while (pos!=-1 && pos < (std::string::size_type)seg_end)
|
||||
{
|
||||
if (pos!=seg_start)
|
||||
|
|
@ -656,7 +912,7 @@ void LLKeywords::dump()
|
|||
|
||||
void LLKeywordToken::dump()
|
||||
{
|
||||
llinfos << "[" <<
|
||||
llinfos << "[" <<
|
||||
mColor.mV[VX] << ", " <<
|
||||
mColor.mV[VY] << ", " <<
|
||||
mColor.mV[VZ] << "] [" <<
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
/**
|
||||
/**
|
||||
* @file llkeywords.h
|
||||
* @brief Keyword list for LSL
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
|
@ -41,26 +41,35 @@ typedef LLPointer<LLTextSegment> LLTextSegmentPtr;
|
|||
class LLKeywordToken
|
||||
{
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* @brief Types of tokens/delimters being parsed.
|
||||
*
|
||||
* @desc Tokens/delimiters that need to be identified/highlighted. All are terminated if an EOF is encountered.
|
||||
* - WORD are keywords in the normal sense, i.e. constants, events, etc.
|
||||
* - LINE are for entire lines (currently only flow control labels use this).
|
||||
* - ONE_SIDED_DELIMITER are for open-ended delimiters which are terminated by EOL.
|
||||
* - TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with.
|
||||
* - DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close.
|
||||
* - TT_WORD are keywords in the normal sense, i.e. constants, events, etc.
|
||||
* - TT_LINE are for entire lines (currently only flow control labels use this).
|
||||
* - TT_ONE_SIDED_DELIMITER are for open-ended delimiters which are terminated by EOL.
|
||||
* - TT_TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with.
|
||||
* - TT_DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close.
|
||||
*/
|
||||
enum TOKEN_TYPE
|
||||
{
|
||||
WORD,
|
||||
LINE,
|
||||
TWO_SIDED_DELIMITER,
|
||||
ONE_SIDED_DELIMITER,
|
||||
DOUBLE_QUOTATION_MARKS
|
||||
TT_UNKNOWN,
|
||||
TT_WORD,
|
||||
TT_LINE,
|
||||
TT_TWO_SIDED_DELIMITER,
|
||||
TT_ONE_SIDED_DELIMITER,
|
||||
TT_DOUBLE_QUOTATION_MARKS,
|
||||
// Following constants are more specific versions of the preceding ones
|
||||
TT_CONSTANT, // WORD
|
||||
TT_EVENT, // WORD
|
||||
TT_FLOW, // WORD
|
||||
TT_FUNCTION, // WORD
|
||||
TT_LABEL, // LINE
|
||||
TT_SECTION, // WORD
|
||||
TT_TYPE // WORD
|
||||
};
|
||||
|
||||
LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
|
||||
LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
|
||||
:
|
||||
mType( type ),
|
||||
mToken( token ),
|
||||
|
|
@ -98,10 +107,19 @@ public:
|
|||
LLKeywords();
|
||||
~LLKeywords();
|
||||
|
||||
void addColorGroup(const std::string key_in, const LLColor3 color);
|
||||
LLColor3 getColorGroup(const std::string key_in);
|
||||
BOOL loadFromFile();
|
||||
BOOL loadFromFile(const std::string& filename);
|
||||
BOOL isLoaded() const { return mLoaded; }
|
||||
void setFilenameColors(const std::string filename) { mFilenameColors = filename; }
|
||||
void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; }
|
||||
|
||||
void findSegments(std::vector<LLTextSegmentPtr> *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor );
|
||||
BOOL initialise();
|
||||
std::string processColors();
|
||||
std::string processColors(LLSD &data, const std::string strGroup);
|
||||
void processTokens();
|
||||
|
||||
// Add the token as described
|
||||
void addToken(LLKeywordToken::TOKEN_TYPE type,
|
||||
|
|
@ -109,7 +127,7 @@ public:
|
|||
const LLColor3& color,
|
||||
const std::string& tool_tip = LLStringUtil::null,
|
||||
const std::string& delimiter = LLStringUtil::null);
|
||||
|
||||
|
||||
// This class is here as a performance optimization.
|
||||
// The word token map used to be defined as std::map<LLWString, LLKeywordToken*>.
|
||||
// This worked, but caused a performance bottleneck due to memory allocation and string copies
|
||||
|
|
@ -133,6 +151,9 @@ public:
|
|||
const llwchar *mData;
|
||||
size_t mLength;
|
||||
bool mOwner;
|
||||
|
||||
|
||||
LLColor3 mColor;
|
||||
};
|
||||
|
||||
typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t;
|
||||
|
|
@ -140,20 +161,42 @@ public:
|
|||
keyword_iterator_t begin() const { return mWordTokenMap.begin(); }
|
||||
keyword_iterator_t end() const { return mWordTokenMap.end(); }
|
||||
|
||||
typedef std::map<WStringMapIndex, LLColor3> group_color_map_t;
|
||||
typedef group_color_map_t::const_iterator color_iterator_t;
|
||||
group_color_map_t mColorGroupMap;
|
||||
|
||||
#ifdef _DEBUG
|
||||
void dump();
|
||||
#endif
|
||||
|
||||
private:
|
||||
protected:
|
||||
void processTokensGroup(LLSD& Tokens, const std::string Group);
|
||||
LLColor3 readColor(const std::string& s);
|
||||
LLColor3 readColor(LLSD& sd);
|
||||
void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor);
|
||||
void insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor);
|
||||
BOOL loadIntoLLSD( const std::string& filename, LLSD& data );
|
||||
|
||||
LLSD mColors;
|
||||
BOOL mLoaded;
|
||||
LLSD mSyntax;
|
||||
word_token_map_t mWordTokenMap;
|
||||
typedef std::deque<LLKeywordToken*> token_list_t;
|
||||
token_list_t mLineTokenList;
|
||||
token_list_t mDelimiterTokenList;
|
||||
|
||||
typedef std::map<std::string, std::string> element_attributes_t;
|
||||
typedef element_attributes_t::const_iterator attribute_iterator_t;
|
||||
element_attributes_t mAttributes;
|
||||
std::string getAttribute(const std::string& key);
|
||||
|
||||
std::string getArguments(LLSD& args);
|
||||
|
||||
private:
|
||||
BOOL ready() { return mReady; };
|
||||
BOOL mReady;
|
||||
std::string mFilenameColors;
|
||||
std::string mFilenameSyntax;
|
||||
};
|
||||
|
||||
#endif // LL_LLKEYWORDS_H
|
||||
|
|
|
|||
|
|
@ -2416,14 +2416,8 @@ void LLTextEditor::loadKeywords(const std::string& filename,
|
|||
const LLColor3& color)
|
||||
{
|
||||
LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING);
|
||||
if(mKeywords.loadFromFile(filename))
|
||||
if(mKeywords.loadFromFile())
|
||||
{
|
||||
S32 count = llmin(funcs.size(), tooltips.size());
|
||||
for(S32 i = 0; i < count; i++)
|
||||
{
|
||||
std::string name = utf8str_trim(funcs[i]);
|
||||
mKeywords.addToken(LLKeywordToken::WORD, name, color, tooltips[i] );
|
||||
}
|
||||
segment_vec_t segment_list;
|
||||
mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
/**
|
||||
/**
|
||||
* @file lltexteditor.h
|
||||
* @brief LLTextEditor base class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
|
@ -131,7 +131,7 @@ public:
|
|||
virtual BOOL canCopy() const;
|
||||
virtual void paste();
|
||||
virtual BOOL canPaste() const;
|
||||
|
||||
|
||||
virtual void updatePrimary();
|
||||
virtual void copyPrimary();
|
||||
virtual void pastePrimary();
|
||||
|
|
@ -147,7 +147,7 @@ public:
|
|||
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
|
||||
BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE);
|
||||
void replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive);
|
||||
|
||||
|
||||
// Undo/redo stack
|
||||
void blockUndo();
|
||||
|
||||
|
|
@ -179,6 +179,7 @@ public:
|
|||
|
||||
void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap );
|
||||
|
||||
LLKeywords mKeywords;
|
||||
void loadKeywords(const std::string& filename,
|
||||
const std::vector<std::string>& funcs,
|
||||
const std::vector<std::string>& tooltips,
|
||||
|
|
@ -186,6 +187,9 @@ public:
|
|||
LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); }
|
||||
LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); }
|
||||
|
||||
void loadKeywords(const std::string& filename_keywords,
|
||||
const std::string& filename_colors);
|
||||
|
||||
// Hacky methods to make it into a word-wrapping, potentially scrolling,
|
||||
// read-only text box.
|
||||
void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; }
|
||||
|
|
@ -207,7 +211,7 @@ protected:
|
|||
void drawPreeditMarker();
|
||||
|
||||
void assignEmbedded(const std::string &s);
|
||||
|
||||
|
||||
void removeCharOrTab();
|
||||
|
||||
void indentSelectedLines( S32 spaces );
|
||||
|
|
@ -226,12 +230,12 @@ protected:
|
|||
S32 nextWordPos(S32 cursorPos) const;
|
||||
|
||||
void autoIndent();
|
||||
|
||||
|
||||
void findEmbeddedItemSegments(S32 start, S32 end);
|
||||
void getSegmentsInRange(segment_vec_t& segments, S32 start, S32 end, bool include_partial) const;
|
||||
|
||||
virtual llwchar pasteEmbeddedItem(llwchar ext_char) { return ext_char; }
|
||||
|
||||
|
||||
|
||||
// Here's the method that takes and applies text commands.
|
||||
S32 execute(TextCmd* cmd);
|
||||
|
|
@ -245,7 +249,7 @@ protected:
|
|||
S32 removeChar(S32 pos);
|
||||
S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment);
|
||||
S32 remove(S32 pos, S32 length, bool group_with_next_op);
|
||||
|
||||
|
||||
void updateAllowingLanguageInput();
|
||||
BOOL hasPreeditString() const;
|
||||
|
||||
|
|
@ -262,14 +266,14 @@ protected:
|
|||
//
|
||||
// Protected data
|
||||
//
|
||||
// Probably deserves serious thought to hiding as many of these
|
||||
// Probably deserves serious thought to hiding as many of these
|
||||
// as possible behind protected accessor methods.
|
||||
//
|
||||
|
||||
// Use these to determine if a click on an embedded item is a drag or not.
|
||||
S32 mMouseDownX;
|
||||
S32 mMouseDownY;
|
||||
|
||||
|
||||
LLWString mPreeditWString;
|
||||
LLWString mPreeditOverwrittenWString;
|
||||
std::vector<S32> mPreeditPositions;
|
||||
|
|
@ -293,11 +297,6 @@ private:
|
|||
|
||||
void onKeyStroke();
|
||||
|
||||
//
|
||||
// Data
|
||||
//
|
||||
LLKeywords mKeywords;
|
||||
|
||||
// Concrete TextCmd sub-classes used by the LLTextEditor base class
|
||||
class TextCmdInsert;
|
||||
class TextCmdAddChar;
|
||||
|
|
|
|||
|
|
@ -1467,7 +1467,8 @@ set(viewer_APPSETTINGS_FILES
|
|||
app_settings/high_graphics.xml
|
||||
app_settings/ignorable_dialogs.xml
|
||||
app_settings/keys.xml
|
||||
app_settings/keywords.ini
|
||||
app_settings/keywords_lsl_colors.xml
|
||||
app_settings/keywords_lsl_tokens.xml
|
||||
app_settings/logcontrol.xml
|
||||
app_settings/low_graphics.xml
|
||||
app_settings/mid_graphics.xml
|
||||
|
|
@ -1785,7 +1786,7 @@ elseif (DARWIN)
|
|||
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Xlinker -dead_strip -Xlinker -map -Xlinker ${CMAKE_CURRENT_BINARY_DIR}/${VIEWER_BINARY_NAME}.MAP"
|
||||
)
|
||||
else (WINDOWS)
|
||||
# Linux
|
||||
# Linux
|
||||
set_target_properties(${VIEWER_BINARY_NAME}
|
||||
PROPERTIES
|
||||
LINK_FLAGS_RELEASE "${LINK_FLAGS_RELEASE} -Wl,--Map=${VIEWER_BINARY_NAME}.MAP"
|
||||
|
|
@ -1961,7 +1962,7 @@ if (DARWIN)
|
|||
)
|
||||
|
||||
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit mac-updater mac-crash-logger)
|
||||
|
||||
|
||||
if (ENABLE_SIGNING)
|
||||
set(SIGNING_SETTING "--signature=${SIGNING_IDENTITY}")
|
||||
else (ENABLE_SIGNING)
|
||||
|
|
|
|||
|
|
@ -1,706 +0,0 @@
|
|||
llkeywords version 2
|
||||
|
||||
# sections
|
||||
[word .5, .1, .3]
|
||||
default Name of default state that all scripts must have
|
||||
state Keyword to indicate state block or state transition
|
||||
|
||||
# data types
|
||||
[word .1, .3, .1]
|
||||
integer Integer type
|
||||
float Floating-point type
|
||||
string String type
|
||||
key Key type. Use NULL_KEY to test for empty keys
|
||||
vector Vector type of 3 floats. Used to represent 3D motion, Euler angles, and color.:Access components by .x, .y. or .z
|
||||
rotation Rotation type of 4 floats. Used to represent rotation.:Access components by .x, .y., .z, or .w
|
||||
list List of various data types
|
||||
|
||||
# events
|
||||
[word 0, .3, .5]
|
||||
state_entry state_entry():Triggered on any state transition and startup
|
||||
state_exit state_exit():Triggered on any state transition
|
||||
touch_start touch_start(integer num_detected):Triggered by the start of agent clicking on task
|
||||
touch touch(integer num_detected):Triggered while agent is clicking on task
|
||||
touch_end touch_end(integer num_detected):Triggered when agent stops clicking on task
|
||||
collision_start collision_start(integer num_detected):Triggered when task starts colliding with another task
|
||||
collision collision(integer num_detected):Triggered while task is colliding with another task
|
||||
collision_end collision_end(integer num_detected):Triggered when task stops colliding with another task
|
||||
land_collision_start land_collision_start(vector pos):Triggered when task starts colliding with land
|
||||
land_collision land_collision(vector pos):Triggered when task is colliding with land
|
||||
land_collision_end land_collision_end(vector pos):Triggered when task stops colliding with land
|
||||
timer timer():Result of the llSetTimerEvent library function call
|
||||
listen listen(integer channel, string name, key id, string message):Result of the llListen library function call
|
||||
sensor sensor(integer num_detected):Result of the llSensor library function call
|
||||
no_sensor no_sensor():Result of the llSensor library function call
|
||||
control control(key id, integer level, integer edge):Result of llTakeControls library function call
|
||||
at_target at_target(integer tnum, vector targetpos, vector ourpos):Result of llTarget library function call
|
||||
not_at_target not_at_target():Result of llTarget library function call
|
||||
at_rot_target at_rot_target(integer tnum, rotation targetrot, rotation ourrot):Result of LLRotTarget library function call
|
||||
not_at_rot_target not_at_rot_target():Result of LLRotTarget library function call
|
||||
money money(key id, integer amount):Triggered when L$ is given to task
|
||||
email email(string time, string address, string subj, string message, integer num_left):Triggered when task receives email
|
||||
run_time_permissions run_time_permissions(integer perm):Triggered when an agent grants run time permissions to task
|
||||
attach attach(key id):Triggered when task attaches or detaches from agent
|
||||
dataserver dataserver(key queryid, string data):Triggered when task receives asynchronous data
|
||||
moving_start moving_start():Triggered when task begins moving
|
||||
moving_end moving_end():Triggered when task stops moving
|
||||
on_rez on_rez(integer start_param):Triggered when task is rezzed in from inventory or another task
|
||||
object_rez object_rez(key id):Triggered when task rezzes in another task
|
||||
link_message link_message(integer sender_num, integer num, string str, key id):Triggered when task receives a link message via LLMessageLinked library function call
|
||||
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT, CHANGED_REGION_START, CHANGED_MEDIA)
|
||||
remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY)
|
||||
http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests
|
||||
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
|
||||
|
||||
# integer constants
|
||||
[word .1, .1, .5]
|
||||
TRUE Integer constant for Boolean operations
|
||||
FALSE Integer constant for Boolean operations
|
||||
STATUS_PHYSICS Passed in the llSetStatus library function. If TRUE, object moves physically
|
||||
STATUS_PHANTOM Passed in the llSetStatus library function. If TRUE, object doesn't collide with other objects
|
||||
STATUS_ROTATE_X Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local X axis
|
||||
STATUS_ROTATE_Y Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Y axis
|
||||
STATUS_ROTATE_Z Passed in the llSetStatus library function. If FALSE, object doesn't rotate around local Z axis
|
||||
STATUS_SANDBOX Passed in the llSetStatus library function. If TRUE, object can't cross region boundaries or move more than 10 meters from its start location
|
||||
STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object can't be grabbed and physically dragged
|
||||
STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner
|
||||
STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set
|
||||
STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects
|
||||
AGENT Passed in llSensor library function to look for other Agents
|
||||
ACTIVE Passed in llSensor library function to look for moving objects
|
||||
PASSIVE Passed in llSensor library function to look for objects that aren't moving
|
||||
SCRIPTED Passed in llSensor library function to look for scripted objects
|
||||
CONTROL_FWD Passed to llTakeControls library function and used control event handler to test for agent forward control
|
||||
CONTROL_BACK Passed to llTakeControls library function and used control event handler to test for agent back control
|
||||
CONTROL_LEFT Passed to llTakeControls library function and used control event handler to test for agent left control
|
||||
CONTROL_RIGHT Passed to llTakeControls library function and used control event handler to test for agent right control
|
||||
CONTROL_ROT_LEFT Passed to llTakeControls library function and used control event handler to test for agent rotate left control
|
||||
CONTROL_ROT_RIGHT Passed to llTakeControls library function and used control event handler to test for agent rotate right control
|
||||
CONTROL_UP Passed to llTakeControls library function and used control event handler to test for agent up control
|
||||
CONTROL_DOWN Passed to llTakeControls library function and used control event handler to test for agent down control
|
||||
CONTROL_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control
|
||||
CONTROL_ML_LBUTTON Passed to llTakeControls library function and used control event handler to test for agent left button control with the agent in mouse look
|
||||
PERMISSION_DEBIT Passed to llRequestPermissions library function to request permission to take L$ from agent's account
|
||||
PERMISSION_TAKE_CONTROLS Passed to llRequestPermissions library function to request permission to take agent's controls
|
||||
# PERMISSION_REMAP_CONTROLS Passed to llRequestPermissions library function to request permission to remap agent's controls (not implemented yet)
|
||||
PERMISSION_TRIGGER_ANIMATION Passed to llRequestPermissions library function to request permission to trigger animation on agent
|
||||
PERMISSION_ATTACH Passed to llRequestPermissions library function to request permission to attach/detach from agent
|
||||
# PERMISSION_RELEASE_OWNERSHIP Passed to llRequestPermissions library function to request permission to release ownership (not implemented)
|
||||
PERMISSION_CHANGE_LINKS Passed to llRequestPermissions library function to request permission to change links
|
||||
# PERMISSION_CHANGE_JOINTS Passed to llRequestPermissions library function to request permission to change joints (not implemented)
|
||||
# PERMISSION_CHANGE_PERMISSIONS Passed to llRequestPermissions library function to request permission to change permissions
|
||||
PERMISSION_TRACK_CAMERA Passed to llRequestPermissions library function to request permission to track agent's camera
|
||||
PERMISSION_CONTROL_CAMERA Passed to llRequestPermissions library function to request permission to change agent's camera
|
||||
PERMISSION_TELEPORT Passed to llRequestPermissions library function to request permission to teleport agent
|
||||
|
||||
DEBUG_CHANNEL Chat channel reserved for debug and error messages from scripts
|
||||
PUBLIC_CHANNEL Chat channel that broadcasts to all nearby users
|
||||
|
||||
AGENT_FLYING Returned by llGetAgentInfo if the Agent is flying
|
||||
AGENT_ATTACHMENTS Returned by llGetAgentInfo if the Agent has attachments
|
||||
AGENT_SCRIPTED Returned by llGetAgentInfo if the Agent has scripted attachments
|
||||
AGENT_SITTING Returned by llGetAgentInfo if the Agent is sitting
|
||||
AGENT_ON_OBJECT Returned by llGetAgentInfo if the Agent is sitting on an object
|
||||
AGENT_MOUSELOOK Returned by llGetAgentInfo if the Agent is in mouselook
|
||||
AGENT_AWAY Returned by llGetAgentInfo if the Agent is in away mode
|
||||
AGENT_WALKING Returned by llGetAgentInfo if the Agent is walking
|
||||
AGENT_IN_AIR Returned by llGetAgentInfo if the Agent is in the air
|
||||
AGENT_TYPING Returned by llGetAgentInfo if the Agent is typing
|
||||
AGENT_CROUCHING Returned by llGetAgentInfo if the Agent is crouching
|
||||
AGENT_BUSY Returned by llGetAgentInfo if the Agent is busy
|
||||
AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enabled
|
||||
AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control
|
||||
|
||||
PSYS_PART_FLAGS
|
||||
PSYS_PART_START_COLOR
|
||||
PSYS_PART_START_ALPHA
|
||||
PSYS_PART_START_SCALE
|
||||
PSYS_PART_END_COLOR
|
||||
PSYS_PART_END_ALPHA
|
||||
PSYS_PART_END_SCALE
|
||||
PSYS_PART_MAX_AGE
|
||||
|
||||
PSYS_PART_BOUNCE_MASK
|
||||
PSYS_PART_WIND_MASK
|
||||
PSYS_PART_INTERP_COLOR_MASK
|
||||
PSYS_PART_INTERP_SCALE_MASK
|
||||
PSYS_PART_FOLLOW_SRC_MASK
|
||||
PSYS_PART_FOLLOW_VELOCITY_MASK
|
||||
PSYS_PART_TARGET_POS_MASK
|
||||
PSYS_PART_EMISSIVE_MASK
|
||||
PSYS_PART_TARGET_LINEAR_MASK
|
||||
|
||||
PSYS_SRC_PATTERN
|
||||
PSYS_SRC_INNERANGLE Deprecated -- Use PSYS_SRC_ANGLE_BEGIN
|
||||
PSYS_SRC_OUTERANGLE Deprecated -- Use PSYS_SRC_ANGLE_END
|
||||
PSYS_SRC_ANGLE_BEGIN
|
||||
PSYS_SRC_ANGLE_END
|
||||
PSYS_SRC_BURST_RATE
|
||||
PSYS_SRC_BURST_PART_COUNT
|
||||
PSYS_SRC_BURST_RADIUS
|
||||
PSYS_SRC_BURST_SPEED_MIN
|
||||
PSYS_SRC_BURST_SPEED_MAX
|
||||
PSYS_SRC_MAX_AGE
|
||||
PSYS_SRC_ACCEL
|
||||
PSYS_SRC_TEXTURE
|
||||
PSYS_SRC_TARGET_KEY
|
||||
PSYS_SRC_OMEGA
|
||||
|
||||
PSYS_SRC_PATTERN_DROP
|
||||
PSYS_SRC_PATTERN_EXPLODE
|
||||
PSYS_SRC_PATTERN_ANGLE
|
||||
PSYS_SRC_PATTERN_ANGLE_CONE
|
||||
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
|
||||
|
||||
OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type
|
||||
OBJECT_NAME Used with llGetObjectDetails to get an object's name
|
||||
OBJECT_DESC Used with llGetObjectDetails to get an object's description
|
||||
OBJECT_POS Used with llGetObjectDetails to get an object's position
|
||||
OBJECT_ROT Used with llGetObjectDetails to get an object's rotation
|
||||
OBJECT_VELOCITY Used with llGetObjectDetails to get an object's velocity
|
||||
OBJECT_OWNER Used with llGetObjectDetails to get an object's owner's key. Will be NULL_KEY if group owned
|
||||
OBJECT_GROUP Used with llGetObjectDetails to get an object's group's key
|
||||
OBJECT_CREATOR Used with llGetObjectDetails to get an object's creator's key
|
||||
|
||||
# some vehicle params
|
||||
VEHICLE_TYPE_NONE
|
||||
VEHICLE_TYPE_SLED
|
||||
VEHICLE_TYPE_CAR
|
||||
VEHICLE_TYPE_BOAT
|
||||
VEHICLE_TYPE_AIRPLANE
|
||||
VEHICLE_TYPE_BALLOON
|
||||
|
||||
VEHICLE_REFERENCE_FRAME Rotation of vehicle axes relative to local frame
|
||||
|
||||
VEHICLE_LINEAR_FRICTION_TIMESCALE A vector of timescales for exponential decay of linear velocity along the three vehicle axes
|
||||
VEHICLE_ANGULAR_FRICTION_TIMESCALE A vector of timescales for exponential decay of angular velocity about the three vehicle axes
|
||||
VEHICLE_LINEAR_MOTOR_DIRECTION The linear velocity that the vehicle will try to achieve
|
||||
VEHICLE_LINEAR_MOTOR_OFFSET An offset from the center of mass of the vehicle where the linear motor is applied
|
||||
VEHICLE_ANGULAR_MOTOR_DIRECTION The angular velocity that the vehicle will try to achieve
|
||||
|
||||
VEHICLE_HOVER_HEIGHT The height the vehicle will try to hover
|
||||
VEHICLE_HOVER_EFFICIENCY A slider between 0 (bouncy) and 1 (critically damped) hover behavior
|
||||
VEHICLE_HOVER_TIMESCALE The period of time for the vehicle to achieve its hover height
|
||||
VEHICLE_BUOYANCY A slider between 0 (no anti-gravity) and 1 (full anti-gravity)
|
||||
|
||||
VEHICLE_LINEAR_DEFLECTION_EFFICIENCY A slider between 0 (no deflection) and 1 (maximum strength)
|
||||
VEHICLE_LINEAR_DEFLECTION_TIMESCALE The exponential timescale for the vehicle to redirect its velocity to be along its x-axis
|
||||
|
||||
VEHICLE_LINEAR_MOTOR_TIMESCALE The exponential timescale for the vehicle to achive its full linear motor velocity
|
||||
VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE The exponential timescale for the linear motor's effectiveness to decay toward zero
|
||||
|
||||
VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY A slider between 0 (no deflection) and 1 (maximum strength)
|
||||
VEHICLE_ANGULAR_DEFLECTION_TIMESCALE The exponential timescale for the vehicle to achieve full angular deflection
|
||||
|
||||
VEHICLE_ANGULAR_MOTOR_TIMESCALE The exponential timescale for the vehicle to achive its full angular motor velocity
|
||||
VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE The exponential timescale for the angular motor's effectiveness to decay toward zero
|
||||
|
||||
VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY A slider between 0 (bouncy) and 1 (critically damped) attraction of vehicle z-axis to world z-axis (vertical)
|
||||
VEHICLE_VERTICAL_ATTRACTION_TIMESCALE The exponential timescale for the vehicle to align its z-axis to the world z-axis (vertical)
|
||||
|
||||
VEHICLE_BANKING_EFFICIENCY A slider between -1 (leans out of turns), 0 (no banking), and +1 (leans into turns)
|
||||
VEHICLE_BANKING_MIX A slider between 0 (static banking) and 1 (dynamic banking)
|
||||
VEHICLE_BANKING_TIMESCALE The exponential timescale for the banking behavior to take full effect
|
||||
|
||||
VEHICLE_FLAG_NO_DEFLECTION_UP Prevents linear deflection along world-z axis
|
||||
VEHICLE_FLAG_LIMIT_ROLL_ONLY Removes vertical attraction for changes in vehicle pitch
|
||||
VEHICLE_FLAG_HOVER_WATER_ONLY Hover only pays attention to water level
|
||||
VEHICLE_FLAG_HOVER_TERRAIN_ONLY Hover only pays attention to terrain height
|
||||
VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT Hover only pays attention to global height
|
||||
VEHICLE_FLAG_HOVER_UP_ONLY Hover only pushes up
|
||||
VEHICLE_FLAG_LIMIT_MOTOR_UP Prevents ground vehicles from motoring into the sky
|
||||
VEHICLE_FLAG_MOUSELOOK_STEER Makes vehicle try to turn toward mouselook direction
|
||||
VEHICLE_FLAG_MOUSELOOK_BANK Makes vehicle try to turn toward mouselook direction assuming banking is enabled
|
||||
VEHICLE_FLAG_CAMERA_DECOUPLED Causes the camera look-at axis to NOT move when the vehicle rotates
|
||||
|
||||
CAMERA_PITCH (-45 to 80) (Adjusts the angular amount that the camera aims straight ahead vs. straight down, maintaining the same distance. Analogous to 'incidence'.")
|
||||
CAMERA_FOCUS_OFFSET (-10 to 10) A vector that adjusts the position of the camera focus position relative to the subject
|
||||
CAMERA_POSITION_LAG (0.0 to 3.0) How much the camera lags as it tries to move towards its 'ideal' position
|
||||
CAMERA_FOCUS_LAG (0.0 to 3.0) How much the camera lags as it tries to aim towards the subject
|
||||
CAMERA_DISTANCE (0.5 to 10) Sets how far away the camera wants to be from its subject
|
||||
CAMERA_BEHINDNESS_ANGLE (0 to 180) Sets the angle in degrees within which the camera is not constrained by changes in subject rotation
|
||||
CAMERA_BEHINDNESS_LAG (0.0 to 3.0) Sets how strongly the camera is forced to stay behind the target if outside of behindness angle
|
||||
CAMERA_POSITION_THRESHOLD (0.0 to 4.0) Sets the radius of a sphere around the camera's ideal position within which it is not affected by subject motion
|
||||
CAMERA_FOCUS_THRESHOLD (0.0 to 4.0) Sets the radius of a sphere around the camera's subject position within which its focus is not affected by subject motion
|
||||
CAMERA_ACTIVE (0 or 1) Turns on or off scripted control of the camera
|
||||
CAMERA_POSITION Sets the position of the camera
|
||||
CAMERA_FOCUS Sets the focus (target position) of the camera
|
||||
CAMERA_POSITION_LOCKED (0 or 1) Locks the camera position so it will not move
|
||||
CAMERA_FOCUS_LOCKED (0 or 1) Locks the camera focus so it will not move
|
||||
|
||||
INVENTORY_TEXTURE Passed to task inventory library functions to reference textures
|
||||
INVENTORY_SOUND Passed to task inventory library functions to reference sounds
|
||||
INVENTORY_OBJECT Passed to task inventory library functions to reference objects
|
||||
INVENTORY_SCRIPT Passed to task inventory library functions to reference scripts
|
||||
INVENTORY_LANDMARK Passed to task inventory library functions to reference landmarks
|
||||
INVENTORY_CLOTHING Passed to task inventory library functions to reference clothing
|
||||
INVENTORY_NOTECARD Passed to task inventory library functions to reference notecards
|
||||
INVENTORY_BODYPART Passed to task inventory library functions to reference body parts
|
||||
INVENTORY_ANIMATION Passed to task inventory library functions to reference animations
|
||||
INVENTORY_GESTURE Passed to task inventory library functions to reference gestures
|
||||
INVENTORY_ALL Passed to task inventory library functions to reference all inventory items
|
||||
INVENTORY_NONE Returned by llGetInventoryType when no item is found
|
||||
|
||||
ATTACH_CHEST Passed to llAttachToAvatar to attach task to chest
|
||||
ATTACH_HEAD Passed to llAttachToAvatar to attach task to head
|
||||
ATTACH_LSHOULDER Passed to llAttachToAvatar to attach task to left shoulder
|
||||
ATTACH_RSHOULDER Passed to llAttachToAvatar to attach task to right shoulder
|
||||
ATTACH_LHAND Passed to llAttachToAvatar to attach task to left hand
|
||||
ATTACH_RHAND Passed to llAttachToAvatar to attach task to right hand
|
||||
ATTACH_LFOOT Passed to llAttachToAvatar to attach task to left foot
|
||||
ATTACH_RFOOT Passed to llAttachToAvatar to attach task to right foot
|
||||
ATTACH_BACK Passed to llAttachToAvatar to attach task to back
|
||||
ATTACH_PELVIS Passed to llAttachToAvatar to attach task to pelvis
|
||||
ATTACH_MOUTH Passed to llAttachToAvatar to attach task to mouth
|
||||
ATTACH_CHIN Passed to llAttachToAvatar to attach task to chin
|
||||
ATTACH_LEAR Passed to llAttachToAvatar to attach task to left ear
|
||||
ATTACH_REAR Passed to llAttachToAvatar to attach task to right ear
|
||||
ATTACH_LEYE Passed to llAttachToAvatar to attach task to left eye
|
||||
ATTACH_REYE Passed to llAttachToAvatar to attach task to right eye
|
||||
ATTACH_NOSE Passed to llAttachToAvatar to attach task to nose
|
||||
ATTACH_RUARM Passed to llAttachToAvatar to attach task to right upper arm
|
||||
ATTACH_RLARM Passed to llAttachToAvatar to attach task to right lower arm
|
||||
ATTACH_LUARM Passed to llAttachToAvatar to attach task to left upper arm
|
||||
ATTACH_LLARM Passed to llAttachToAvatar to attach task to left lower arm
|
||||
ATTACH_RHIP Passed to llAttachToAvatar to attach task to right hip
|
||||
ATTACH_RULEG Passed to llAttachToAvatar to attach task to right upper leg
|
||||
ATTACH_RLLEG Passed to llAttachToAvatar to attach task to right lower leg
|
||||
ATTACH_LHIP Passed to llAttachToAvatar to attach task to left hip
|
||||
ATTACH_LULEG Passed to llAttachToAvatar to attach task to left upper leg
|
||||
ATTACH_LLLEG Passed to llAttachToAvatar to attach task to left lower leg
|
||||
ATTACH_BELLY Passed to llAttachToAvatar to attach task to belly
|
||||
ATTACH_LEFT_PEC Passed to llAttachToAvatar to attach task to left pectoral
|
||||
ATTACH_RIGHT_PEC Passed to llAttachToAvatar to attach task to right pectoral
|
||||
|
||||
LAND_LEVEL Passed to llModifyLand to level terrain
|
||||
LAND_RAISE Passed to llModifyLand to raise terrain
|
||||
LAND_LOWER Passed to llModifyLand to lower terrain
|
||||
LAND_SMOOTH Passed to llModifyLand to smooth terrain
|
||||
LAND_NOISE Passed to llModifyLand to randomize terrain
|
||||
LAND_REVERT Passed to llModifyLand to revert terrain toward original state
|
||||
LAND_SMALL_BRUSH Passed to llModifyLand to modify small land areas
|
||||
LAND_MEDIUM_BRUSH Passed to llModifyLand to modify medium land areas
|
||||
LAND_LARGE_BRUSH Passed to llModifyLand to modify large land areas
|
||||
|
||||
DATA_PAYINFO Passed to llRequestAgentData to get payment status of an agent
|
||||
DATA_ONLINE Passed to llRequestAgentData to determine if agent is online
|
||||
DATA_NAME Passed to llRequestAgentData to get full agent name
|
||||
DATA_BORN Passed to llRequestAgentData to get born on date as a string
|
||||
DATA_RATING Passed to llRequestAgentData to get a comma separated sting of integer ratings
|
||||
DATA_SIM_POS Passed to llRequestSimulatorData to get a string (cast to vector) of a simulator's global position
|
||||
DATA_SIM_STATUS Passed to llRequestSimulatorData to get the status of a simulator
|
||||
DATA_SIM_RATING Passed to llRequestSimulatorData to get the rating of a simulator
|
||||
|
||||
PAYMENT_INFO_ON_FILE Used with llRequestAgentData to tell if Agent is of "Payment Info On File" status
|
||||
PAYMENT_INFO_USED Used with llRequestAgentData to tell if Agent is of "Payment Info Used" status
|
||||
|
||||
ANIM_ON Enable texture animation
|
||||
LOOP Loop when animating textures
|
||||
REVERSE Animate in the reverse direction
|
||||
PING_PONG Animate forward, then reverse
|
||||
SMOOTH Textures slides, instead of stepping
|
||||
ROTATE Rotates the texture, instead of using frames
|
||||
SCALE Scales the texture, instead of using frames
|
||||
|
||||
ALL_SIDES Passed to various texture and color library functions to modify all sides
|
||||
|
||||
LINK_SET Passed to various link functions to modify all blocks in the object
|
||||
LINK_ROOT Passed to various link functions to modify only the root block (no effect on single block objects)
|
||||
LINK_ALL_OTHERS Passed to various link functions to modify all other blocks in the object
|
||||
LINK_ALL_CHILDREN Passed to various link functions to modify all child blocks in the object
|
||||
LINK_THIS Passed to various link functions to modify only the calling block
|
||||
|
||||
CHANGED_INVENTORY Parameter of changed event handler used to indicate change to task's inventory
|
||||
CHANGED_COLOR Parameter of changed event handler used to indicate change to task's color
|
||||
CHANGED_SHAPE Parameter of changed event handler used to indicate change to task's shape parameters
|
||||
CHANGED_SCALE Parameter of changed event handler used to indicate change to task's scale
|
||||
CHANGED_TEXTURE Parameter of changed event handler used to indicate change to task's texture
|
||||
CHANGED_LINK Parameter of changed event handler used to indicate change to task's link status
|
||||
CHANGED_ALLOWED_DROP Parameter of changed event handler used to indicate a user dropped an inventory item:onto task that was allowed only by llAllowInventoryDrop function call
|
||||
CHANGED_OWNER Parameter of changed event handler used to indicate change to task's owner ONLY when an object is sold as original or deeded to group
|
||||
CHANGED_REGION Parameter of changed event handler used to indicate the region has changed
|
||||
CHANGED_TELEPORT Parameter of changed event handler used to indicate teleport has completed
|
||||
CHANGED_REGION_START Parameter of changed event handler used to indicate the region has been restarted
|
||||
CHANGED_MEDIA Parameter of changed event handler used to indicate that media has changed on a face of the task
|
||||
|
||||
TYPE_INTEGER Indicates that the list entry is holding an integer
|
||||
TYPE_FLOAT Indicates that the list entry is holding an float
|
||||
TYPE_STRING Indicates that the list entry is holding an string
|
||||
TYPE_KEY Indicates that the list entry is holding an key
|
||||
TYPE_VECTOR Indicates that the list entry is holding an vector
|
||||
TYPE_ROTATION Indicates that the list entry is holding an rotation
|
||||
TYPE_INVALID Indicates that this wasn't a valid list entry
|
||||
|
||||
|
||||
REMOTE_DATA_CHANNEL Value of event_type in remote_event after successful llOpenRemoteDataChannel
|
||||
REMOTE_DATA_REQUEST Value of event_type in remote_event if XML-RPC request is received
|
||||
REMOTE_DATA_REPLY Value of event_type in remote_event if XML-RPC reply is received
|
||||
|
||||
|
||||
PRIM_TYPE Followed by PRIM_TYPE_BOX, PRIM_TYPE_CYLINDER, PRIM_TYPE_PRISM, PRIM_TYPE_SPHERE, PRIM_TYPE_TORUS, PRIM_TYPE_TUBE, or PRIM_TYPE_SCULPT and their arguments
|
||||
PRIM_MATERIAL Followed by PRIM_MATERIAL_STONE, PRIM_MATERIAL_METAL, PRIM_MATERIAL_GLASS, PRIM_MATERIAL_WOOD, PRIM_MATERIAL_FLESH, PRIM_MATERIAL_PLASTIC, or PRIM_MATERIAL_RUBBER
|
||||
PRIM_PHYSICS Sets physics to TRUE or FALSE
|
||||
PRIM_FLEXIBLE Followed by TRUE or FALSE, integer softness, float gravity, float friction, float wind, float tension, and vector force
|
||||
PRIM_POINT_LIGHT Followed by TRUE or FALSE, vector color, float intensity, float radius, float falloff
|
||||
PRIM_TEMP_ON_REZ Sets temporay on rez to TRUE or FALSE
|
||||
PRIM_PHANTOM Sets phantom to TRUE or FALSE
|
||||
PRIM_CAST_SHADOWS DEPRECATED. Takes 1 parameter, an integer, but has no effect when set and always returns 0 if used in llGetPrimitiveParams
|
||||
PRIM_POSITION Sets primitive position to a vector position
|
||||
PRIM_SIZE Sets primitive size to a vector size
|
||||
PRIM_ROTATION Sets primitive rotation
|
||||
PRIM_TEXTURE Followed by an integer face, key id, vector repeats, vector offsets,:and float rotation in radians
|
||||
PRIM_COLOR Followed by an integer face, vector color, and float alpha
|
||||
PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY_LOW,:PRIM_SHINY_MEDIUM, or PRIM_SHINY_HIGH,:and one of PRIM_BUMP_NONE, PRIM_BUMP_BRIGHT, PRIM_BUMP_DARK, etc
|
||||
PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE
|
||||
PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR
|
||||
PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount
|
||||
|
||||
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
|
||||
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
|
||||
PRIM_TYPE_PRISM Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
|
||||
PRIM_TYPE_SPHERE Followed by integer hole shape, vector cut, float hollow, vector twist,:and vector dimple
|
||||
PRIM_TYPE_TORUS Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew
|
||||
PRIM_TYPE_TUBE Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew
|
||||
PRIM_TYPE_RING Followed by integer hole shape, vector cut, float hollow, vector twist,:vector hole size, vector top shear, vector advanced cut, vector taper,:float revolutions, float radius offset, and float skew
|
||||
PRIM_TYPE_SCULPT Followed by a key/string texture uuid, and one of PRIM_SCULPT_TYPE_SPHERE, PRIM_SCULPT_TYPE_TORUS, PRIM_SCULPT_TYPE_PLANE, or PRIM_SCULPT_TYPE_CYLINDER
|
||||
|
||||
PRIM_HOLE_DEFAULT Sets hole type to match the prim type
|
||||
PRIM_HOLE_SQUARE Sets hole type to square
|
||||
PRIM_HOLE_CIRCLE Sets hole type to circle
|
||||
PRIM_HOLE_TRIANGLE Sets hole type to triangle
|
||||
|
||||
PRIM_MATERIAL_STONE Sets material to stone
|
||||
PRIM_MATERIAL_METAL Sets material to metal
|
||||
PRIM_MATERIAL_GLASS Sets material to glass
|
||||
PRIM_MATERIAL_WOOD Sets material to wood
|
||||
PRIM_MATERIAL_FLESH Sets material to flesh
|
||||
PRIM_MATERIAL_PLASTIC Sets material to plastic
|
||||
PRIM_MATERIAL_RUBBER Sets material to rubber
|
||||
PRIM_MATERIAL_LIGHT Sets material to light
|
||||
|
||||
PRIM_SHINY_NONE No shininess
|
||||
PRIM_SHINY_LOW Low shininess
|
||||
PRIM_SHINY_MEDIUM Medium shininess
|
||||
PRIM_SHINY_HIGH High shininess
|
||||
|
||||
PRIM_BUMP_NONE No bump map
|
||||
PRIM_BUMP_BRIGHT Generate bump map from highlights
|
||||
PRIM_BUMP_DARK Generate bump map from lowlights
|
||||
PRIM_BUMP_WOOD Wood bump map
|
||||
PRIM_BUMP_BARK Bark bump map
|
||||
PRIM_BUMP_BRICKS Brick bump map
|
||||
PRIM_BUMP_CHECKER Checker bump map
|
||||
PRIM_BUMP_CONCRETE Concrete bump map
|
||||
PRIM_BUMP_TILE Tile bump map
|
||||
PRIM_BUMP_STONE Stone bump map
|
||||
PRIM_BUMP_DISKS Disk bump map
|
||||
PRIM_BUMP_GRAVEL Gravel bump map
|
||||
PRIM_BUMP_BLOBS Blob bump map
|
||||
PRIM_BUMP_SIDING Siding bump map
|
||||
PRIM_BUMP_LARGETILE Large tile bump map
|
||||
PRIM_BUMP_STUCCO Stucco bump map
|
||||
PRIM_BUMP_SUCTION Suction cup bump map
|
||||
PRIM_BUMP_WEAVE Weave bump map
|
||||
|
||||
PRIM_TEXGEN_DEFAULT Default texture mapping
|
||||
PRIM_TEXGEN_PLANAR Planar texture mapping
|
||||
|
||||
PRIM_SCULPT_TYPE_SPHERE Stitch edges in a sphere-like way
|
||||
PRIM_SCULPT_TYPE_TORUS Stitch edges in a torus-like way
|
||||
PRIM_SCULPT_TYPE_PLANE Do not stitch edges
|
||||
PRIM_SCULPT_TYPE_CYLINDER Stitch edges in a cylinder-like way
|
||||
PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type
|
||||
PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted
|
||||
PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis
|
||||
|
||||
MASK_BASE Base permissions
|
||||
MASK_OWNER Owner permissions
|
||||
MASK_GROUP Group permissions
|
||||
MASK_EVERYONE Everyone permissions
|
||||
MASK_NEXT Next owner permissions
|
||||
|
||||
PERM_TRANSFER Transfer permission
|
||||
PERM_MODIFY Modify permission
|
||||
PERM_COPY Copy permission
|
||||
PERM_MOVE Move permission
|
||||
PERM_ALL Move/Modify/Copy/Transfer permissions
|
||||
|
||||
PARCEL_MEDIA_COMMAND_STOP Stop media stream
|
||||
PARCEL_MEDIA_COMMAND_PAUSE Pause media stream
|
||||
PARCEL_MEDIA_COMMAND_PLAY Play media stream
|
||||
PARCEL_MEDIA_COMMAND_LOOP Loop media stream
|
||||
PARCEL_MEDIA_COMMAND_TEXTURE Get or set the parcel's media texture
|
||||
PARCEL_MEDIA_COMMAND_URL Get or set the parcel's media url
|
||||
PARCEL_MEDIA_COMMAND_TYPE Get or set the parcel's media mimetype
|
||||
PARCEL_MEDIA_COMMAND_DESC Get or set the parcel's media description
|
||||
PARCEL_MEDIA_COMMAND_TIME Set media stream to specific time
|
||||
PARCEL_MEDIA_COMMAND_SIZE Get or set the parcel's media pixel resolution
|
||||
PARCEL_MEDIA_COMMAND_AGENT Allows media stream commands to apply to only one agent
|
||||
PARCEL_MEDIA_COMMAND_UNLOAD Unloads the media stream
|
||||
PARCEL_MEDIA_COMMAND_AUTO_ALIGN Auto aligns the media stream to the texture size. May cause a performance hit and loss of some visual quality
|
||||
|
||||
PAY_HIDE Used with llSetPayPrice to hide a button
|
||||
PAY_DEFAULT Used with llSetPayPrice to use the default price for a button
|
||||
|
||||
LIST_STAT_MAX Used with llListStatistics to find the largest number in a list
|
||||
LIST_STAT_MIN Used with llListStatistics to find the smallest number in a list
|
||||
LIST_STAT_MEAN Used with llListStatistics to find the mean of the numbers in a list
|
||||
LIST_STAT_MEDIAN Used with llListStatistics to find the median of the numbers in a list
|
||||
LIST_STAT_STD_DEV Used with llListStatistics to find the standard deviation of the numbers in a list
|
||||
LIST_STAT_SUM Used with llListStatistics to find the sum of the numbers in a list
|
||||
LIST_STAT_SUM_SQUARES Used with llListStatistics to find the sum of the squares of the numbers in a list
|
||||
LIST_STAT_NUM_COUNT Used with llListStatistics to find how many numbers are in a list
|
||||
LIST_STAT_GEOMETRIC_MEAN Used with llListStatistics to find the geometric mean of the numbers in a list (all numbers must be > 0)
|
||||
LIST_STAT_RANGE Used with llListStatistics to find the range of the numbers in a list
|
||||
|
||||
PARCEL_FLAG_ALLOW_FLY Used with llGetParcelFlags to find if a parcel allows flying
|
||||
PARCEL_FLAG_ALLOW_GROUP_SCRIPTS Used with llGetParcelFlags to find if a parcel allows group scripts
|
||||
PARCEL_FLAG_ALLOW_SCRIPTS Used with llGetParcelFlags to find if a parcel allows outside scripts
|
||||
PARCEL_FLAG_ALLOW_LANDMARK Used with llGetParcelFlags to find if a parcel allows landmarks to be created
|
||||
PARCEL_FLAG_ALLOW_TERRAFORM Used with llGetParcelFlags to find if a parcel allows anyone to terraform the land
|
||||
PARCEL_FLAG_ALLOW_DAMAGE Used with llGetParcelFlags to find if a parcel allows damage
|
||||
PARCEL_FLAG_ALLOW_CREATE_OBJECTS Used with llGetParcelFlags to find if a parcel allows anyone to create objects
|
||||
PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS Used with llGetParcelFlags to find if a parcel allows group members or objects to create objects
|
||||
PARCEL_FLAG_USE_ACCESS_GROUP Used with llGetParcelFlags to find if a parcel limits access to a group
|
||||
PARCEL_FLAG_USE_ACCESS_LIST Used with llGetParcelFlags to find if a parcel limits access to a list of residents
|
||||
PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a ban list
|
||||
PARCEL_FLAG_USE_LAND_PASS_LIST Used with llGetParcelFlags to find if a parcel allows passes to be purchased
|
||||
PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel
|
||||
PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls
|
||||
PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel allows all objects to enter
|
||||
PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel only allows group (and owner) objects to enter
|
||||
|
||||
REGION_FLAG_ALLOW_DAMAGE Used with llGetRegionFlags to find if a region is entirely damage enabled
|
||||
REGION_FLAG_FIXED_SUN Used with llGetRegionFlags to find if a region has a fixed sun position
|
||||
REGION_FLAG_BLOCK_TERRAFORM Used with llGetRegionFlags to find if a region terraforming disabled
|
||||
REGION_FLAG_SANDBOX Used with llGetRegionFlags to find if a region is a sandbox
|
||||
REGION_FLAG_DISABLE_COLLISIONS Used with llGetRegionFlags to find if a region has disabled collisions
|
||||
REGION_FLAG_DISABLE_PHYSICS Used with llGetRegionFlags to find if a region has disabled physics
|
||||
REGION_FLAG_BLOCK_FLY Used with llGetRegionFlags to find if a region blocks flying
|
||||
REGION_FLAG_ALLOW_DIRECT_TELEPORT Used with llGetRegionFlags to find if a region allows direct teleports
|
||||
REGION_FLAG_RESTRICT_PUSHOBJECT Used with llGetRegionFlags to find if a region restricts llPushObject() calls
|
||||
|
||||
HTTP_METHOD Used with llHTTPRequest to specify the method, such as "GET" or "POST"
|
||||
HTTP_MIMETYPE Used with llHTTPRequest to specify the MIME type, defaults to "text/plain"
|
||||
HTTP_BODY_MAXLENGTH Used with llHTTPRequest to specify the maximum response body to return
|
||||
HTTP_VERIFY_CERT Used with llHTTPRequest to specify SSL certificate verification
|
||||
HTTP_BODY_TRUNCATED Used with http_response to indicate truncation point in bytes
|
||||
|
||||
PARCEL_COUNT_TOTAL Used with llGetParcelPrimCount to get the total number of prims on the parcel
|
||||
PARCEL_COUNT_OWNER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the owner
|
||||
PARCEL_COUNT_GROUP Used with llGetParcelPrimCount to get the number of prims on the parcel owned by the group
|
||||
PARCEL_COUNT_OTHER Used with llGetParcelPrimCount to get the number of prims on the parcel owned by others
|
||||
PARCEL_COUNT_SELECTED Used with llGetParcelPrimCount to get the number of prims on the parcel currently selected or sat upon
|
||||
PARCEL_COUNT_TEMP Used with llGetParcelPrimCount to get the number of prims on the parcel that are temp on rez
|
||||
|
||||
PARCEL_DETAILS_NAME Used with llGetParcelDetails to get the parcel name
|
||||
PARCEL_DETAILS_DESC Used with llGetParcelDetails to get the parcel description
|
||||
PARCEL_DETAILS_OWNER Used with llGetParcelDetails to get the parcel owner id
|
||||
PARCEL_DETAILS_GROUP Used with llGetParcelDetails to get the parcel group id
|
||||
PARCEL_DETAILS_AREA Used with llGetParcelDetails to get the parcel area in square meters
|
||||
PARCEL_DETAILS_ID Used with llGetParcelDetails to get the parcel id
|
||||
PARCEL_DETAILS_SEE_AVATARS Used with llGetParcelDetails to get the avatars visibility setting
|
||||
|
||||
STRING_TRIM_HEAD Used with llStringTrim to trim leading spaces from a string
|
||||
STRING_TRIM_TAIL Used with llStringTrim to trim trailing spaces from a string
|
||||
STRING_TRIM Used with llStringTrim to trim both leading and trailing spaces from a string
|
||||
|
||||
CLICK_ACTION_NONE Used with llSetClickAction to disable the click action
|
||||
CLICK_ACTION_TOUCH Used with llSetClickAction to set touch as the default action when object is clicked
|
||||
CLICK_ACTION_SIT Used with llSetClickAction to set sit as the default action when object is clicked
|
||||
CLICK_ACTION_BUY Used with llSetClickAction to set buy as the default action when object is clicked
|
||||
CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default action when object is clicked
|
||||
CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked
|
||||
CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked
|
||||
CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked
|
||||
CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked
|
||||
|
||||
TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid
|
||||
TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid
|
||||
TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid
|
||||
|
||||
PRIM_MEDIA_ALT_IMAGE_ENABLE Used with ll{Get,Set}PrimMediaParams to enable the default alt image for media
|
||||
PRIM_MEDIA_CONTROLS Used with ll{Get,Set}PrimMediaParams to determine the controls shown for media
|
||||
PRIM_MEDIA_CURRENT_URL Used with ll{Get,Set}PrimMediaParams to navigate/access the current URL
|
||||
PRIM_MEDIA_HOME_URL Used with ll{Get,Set}PrimMediaParams to access the home URL
|
||||
PRIM_MEDIA_AUTO_LOOP Used with ll{Get,Set}PrimMediaParams to determine if media should auto-loop (if applicable)
|
||||
PRIM_MEDIA_AUTO_PLAY Used with ll{Get,Set}PrimMediaParams to determine if media should start playing as soon as it is created
|
||||
PRIM_MEDIA_AUTO_SCALE Used with ll{Get,Set}PrimMediaParams to determine if media should scale to fit the face it is on
|
||||
PRIM_MEDIA_AUTO_ZOOM Used with ll{Get,Set}PrimMediaParams to determine if the user would zoom in when viewing media
|
||||
PRIM_MEDIA_FIRST_CLICK_INTERACT Used with ll{Get,Set}PrimMediaParams to determine whether the user interacts with media or not when she first clicks it (versus selection)
|
||||
PRIM_MEDIA_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's width in pixels
|
||||
PRIM_MEDIA_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's height in pixels
|
||||
PRIM_MEDIA_WHITELIST_ENABLE Used with ll{Get,Set}PrimMediaParams to determine if the domain whitelist is enabled
|
||||
PRIM_MEDIA_WHITELIST Used with ll{Get,Set}PrimMediaParams to access the media's list of allowable URL prefixes to navigate to
|
||||
PRIM_MEDIA_PERMS_INTERACT Used with ll{Get,Set}PrimMediaParams to determine the permissions for who can interact with the media
|
||||
PRIM_MEDIA_PERMS_CONTROL Used with ll{Get,Set}PrimMediaParams to determine the permissions for who has controls
|
||||
PRIM_MEDIA_PARAM_MAX The value of the largest media param
|
||||
|
||||
PRIM_MEDIA_CONTROLS_STANDARD Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "standard controls"
|
||||
PRIM_MEDIA_CONTROLS_MINI Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "mini controls"
|
||||
|
||||
PRIM_MEDIA_PERM_NONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, no permissions
|
||||
PRIM_MEDIA_PERM_OWNER Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, owner permissions
|
||||
PRIM_MEDIA_PERM_GROUP Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, group permissions
|
||||
PRIM_MEDIA_PERM_ANYONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, anyone has permissions
|
||||
|
||||
PRIM_MEDIA_MAX_URL_LENGTH Used with ll{Get,Set}PrimMediaParams, the maximum length of PRIM_MEDIA_CURRENT_URL or PRIM_MEDIA_HOME_URL
|
||||
PRIM_MEDIA_MAX_WHITELIST_SIZE Used with ll{Get,Set}PrimMediaParams, the maximum length, in bytes, of PRIM_MEDIA_WHITELIST
|
||||
PRIM_MEDIA_MAX_WHITELIST_COUNT Used with ll{Get,Set}PrimMediaParams, the maximum number of items allowed in PRIM_MEDIA_WHITELIST
|
||||
PRIM_MEDIA_MAX_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_WIDTH_PIXELS
|
||||
PRIM_MEDIA_MAX_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_HEIGHT_PIXELS
|
||||
|
||||
STATUS_OK Result of function call was success
|
||||
STATUS_MALFORMED_PARAMS Function was called with malformed params
|
||||
STATUS_TYPE_MISMATCH Argument(s) passed to function had a type mismatch
|
||||
STATUS_BOUNDS_ERROR Argument(s) passed to function had a bounds error
|
||||
STATUS_NOT_FOUND Object or other item was not found
|
||||
STATUS_NOT_SUPPORTED Feature not supported
|
||||
STATUS_INTERNAL_ERROR An internal error occurred
|
||||
STATUS_WHITELIST_FAILED URL failed to pass whitelist
|
||||
|
||||
PROFILE_NONE Disables profiling
|
||||
PROFILE_SCRIPT_MEMORY Enables memory profiling
|
||||
|
||||
RC_DATA_FLAGS TODO: add documentation
|
||||
RC_DETECT_PHANTOM TODO: add documentation
|
||||
RC_GET_LINK_NUM TODO: add documentation
|
||||
RC_GET_NORMAL TODO: add documentation
|
||||
RC_GET_ROOT_KEY TODO: add documentation
|
||||
RC_MAX_HITS TODO: add documentation
|
||||
RC_REJECT_TYPES Optional parameter set in llCastRay() to reject hit against certain object types.
|
||||
RC_REJECT_AGENTS Bit mask for RC_REJECT_TYPES, rejects hits against avatars.
|
||||
RC_REJECT_PHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against moving objects.
|
||||
RC_REJECT_NONPHYSICAL Bit mask for RC_REJECT_TYPES, rejects hits against non-moving objects.
|
||||
RC_REJECT_LAND Bit mask for RC_REJECT_TYPES, rejects hits against the terrian.
|
||||
|
||||
RCERR_CAST_TIME_EXCEEDED TODO: add documentation
|
||||
RCERR_SIM_PERF_LOW TODO: add documentation
|
||||
RCERR_UNKNOWN TODO: add documentation
|
||||
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_AGENT_REMOVE TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_ALLOWED_GROUP_REMOVE TODO: add documentation
|
||||
ESTATE_ACCESS_BANNED_AGENT_ADD TODO: add documentation
|
||||
ESTATE_ACCESS_BANNED_AGENT_REMOVE TODO: add documentation
|
||||
|
||||
DENSITY TODO: add documentation
|
||||
FRICTION TODO: add documentation
|
||||
RESTITUTION TODO: add documentation
|
||||
GRAVITY_MULTIPLIER TODO: add documentation
|
||||
|
||||
KFM_COMMAND TODO: add documentation
|
||||
KFM_CMD_PLAY TODO: add documentation
|
||||
KFM_CMD_STOP TODO: add documentation
|
||||
KFM_CMD_PAUSE TODO: add documentation
|
||||
KFM_CMD_SET_MODE TODO: add documentation
|
||||
KFM_MODE TODO: add documentation
|
||||
KFM_FORWARD TODO: add documentation
|
||||
KFM_LOOP TODO: add documentation
|
||||
KFM_PING_PONG TODO: add documentation
|
||||
KFM_REVERSE TODO: add documentation
|
||||
KFM_DATA TODO: add documentation
|
||||
KFM_ROTATION TODO: add documentation
|
||||
KFM_TRANSLATION TODO: add documentation
|
||||
|
||||
CHARACTER_CMD_STOP TODO: add documentation
|
||||
CHARACTER_CMD_JUMP TODO: add documentation
|
||||
|
||||
CHARACTER_DESIRED_SPEED TODO: add documentation
|
||||
CHARACTER_RADIUS TODO: add documentation
|
||||
CHARACTER_LENGTH TODO: add documentation
|
||||
CHARACTER_ORIENTATION TODO: add documentation
|
||||
CHARACTER_AVOIDANCE_MODE TODO: add documentation
|
||||
PURSUIT_OFFSET TODO: add documentation
|
||||
REQUIRE_LINE_OF_SIGHT TODO: add documentation
|
||||
PURSUIT_FUZZ_FACTOR TODO: add documentation
|
||||
PURSUIT_INTERCEPT TODO: add documentation
|
||||
FORCE_DIRECT_PATH TODO: add documentation
|
||||
VERTICAL TODO: add documentation
|
||||
HORIZONTAL TODO: add documentation
|
||||
AVOID_CHARACTERS TODO: add documentation
|
||||
AVOID_DYNAMIC_OBSTACLES TODO: add documentation
|
||||
|
||||
PU_EVADE_HIDDEN Triggered when an llEvade character thinks it has hidden from its pursuer.
|
||||
PU_EVADE_SPOTTED Triggered when an llEvade character switches from hiding to running
|
||||
PU_FAILURE_INVALID_GOAL Goal is not on the navigation-mesh and cannot be reached.
|
||||
PU_FAILURE_INVALID_START Character cannot navigate from the current location - e.g., the character is off the navmesh or too high above it.
|
||||
PU_FAILURE_NO_VALID_DESTINATION There's no good place for the character to go - e.g., it is patrolling and all the patrol points are now unreachable.
|
||||
PU_FAILURE_OTHER Unknown failure
|
||||
PU_FAILURE_TARGET_GONE Target (for llPursue or llEvade) can no longer be tracked - e.g., it left the region or is an avatar that is now more than about 30m outside the region.
|
||||
PU_FAILURE_UNREACHABLE Goal is no longer reachable for some reason - e.g., an obstacle blocks the path.
|
||||
PU_GOAL_REACHED Character has reached the goal and will stop or choose a new goal (if wandering).
|
||||
PU_SLOWDOWN_DISTANCE_REACHED Character is near current goal.
|
||||
|
||||
CHARACTER_TYPE TODO: add documentation
|
||||
CHARACTER_TYPE_A TODO: add documentation
|
||||
CHARACTER_TYPE_B TODO: add documentation
|
||||
CHARACTER_TYPE_C TODO: add documentation
|
||||
CHARACTER_TYPE_D TODO: add documentation
|
||||
CHARACTER_TYPE_NONE TODO: add documentation
|
||||
|
||||
TRAVERSAL_TYPE TODO: add documentation
|
||||
TRAVERSAL_TYPE_SLOW TODO: add documentation
|
||||
TRAVERSAL_TYPE_FAST TODO: add documentation
|
||||
TRAVERSAL_TYPE_NONE TODO: add documentation
|
||||
|
||||
CHARACTER_MAX_ACCEL TODO: add documentation
|
||||
CHARACTER_MAX_DECEL TODO: add documentation
|
||||
CHARACTER_MAX_ANGULAR_SPEED TODO: add documentation
|
||||
CHARACTER_MAX_ANGULAR_ACCEL TODO: add documentation
|
||||
CHARACTER_TURN_SPEED_MULTIPLIER TODO: add documentation
|
||||
|
||||
# string constants
|
||||
[word .1, .3, .5]
|
||||
NULL_KEY Indicates an empty key
|
||||
EOF Indicates the last line of a notecard was read
|
||||
TEXTURE_BLANK UUID for the "Blank" texture
|
||||
TEXTURE_DEFAULT Alias for TEXTURE_PLYWOOD
|
||||
TEXTURE_MEDIA UUID for the "Default Media" texture
|
||||
TEXTURE_PLYWOOD UUID for the default "Plywood" texture
|
||||
TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture
|
||||
|
||||
URL_REQUEST_GRANTED Used with http_request when a public URL is successfully granted
|
||||
URL_REQUEST_DENIED Used with http_request when a public URL is not available
|
||||
|
||||
# float constants
|
||||
[word .3, .1, .5]
|
||||
PI 3.1415926535897932384626433832795
|
||||
TWO_PI 6.283185307179586476925286766559
|
||||
PI_BY_TWO 1.5707963267948966192313216916398
|
||||
DEG_TO_RAD To convert from degrees to radians
|
||||
RAD_TO_DEG To convert from radians to degrees
|
||||
SQRT2 1.4142135623730950488016887242097
|
||||
|
||||
# compound constants
|
||||
[word .4, .2, .4]
|
||||
ZERO_VECTOR <0.0, 0.0, 0.0>
|
||||
ZERO_ROTATION <0.0, 0.0, 0.0, 1.0>
|
||||
|
||||
|
||||
# flow control keywords
|
||||
[word 0, 0, .8]
|
||||
for for loop:for (initializer; test; iteration):{: statements:}
|
||||
do do loop:do:{: statements:} while (test);
|
||||
while while loop:while (test):{ statements:}
|
||||
if if statement:if (test):{ statements:}
|
||||
else else clause:if (test):{ statements:}:else:{ statements:}
|
||||
jump jump statement:jump label;:
|
||||
return Leave current function or event handler
|
||||
|
||||
# flow control label
|
||||
[line 0, 0, .8]
|
||||
@ Label:Target for jump statement
|
||||
|
||||
# Comment
|
||||
[one_sided_delimiter .8, .3, .15]
|
||||
// Comment:Non-functional commentary or disabled code
|
||||
[two_sided_delimiter .8, .3, .15]
|
||||
/* */ Comment:Non-functional commentary or disabled code
|
||||
|
||||
# String literals
|
||||
[double_quotation_marks 0, .2, 0]
|
||||
" String literal
|
||||
|
||||
#functions are supplied by the program now
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-model href="llsd.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
|
||||
<llsd>
|
||||
<map>
|
||||
<key>types</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.1</real>
|
||||
<real>0.3</real>
|
||||
<real>0.1</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>constants</key>
|
||||
<map>
|
||||
<key>float</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.3</real>
|
||||
<real>0.1</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>integer</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.1</real>
|
||||
<real>0.1</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>key</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.1</real>
|
||||
<real>0.3</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>rotation</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.4</real>
|
||||
<real>0.2</real>
|
||||
<real>0.4</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>string</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.1</real>
|
||||
<real>0.3</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>vector</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.4</real>
|
||||
<real>0.2</real>
|
||||
<real>0.4</real>
|
||||
</array>
|
||||
</map>
|
||||
</map>
|
||||
|
||||
<key>misc</key>
|
||||
<map>
|
||||
<key>flow-control</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.8</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>comments_1_sided</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.8</real>
|
||||
<real>0.3</real>
|
||||
<real>0.15</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>comments_2_sided</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.8</real>
|
||||
<real>0.3</real>
|
||||
<real>0.15</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>flow-label</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.8</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>double_quotation_marks</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.2</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>sections</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.5</real>
|
||||
<real>0.1</real>
|
||||
<real>0.3</real>
|
||||
</array>
|
||||
</map>
|
||||
</map>
|
||||
|
||||
<key>events</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.3</real>
|
||||
<real>0.5</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>functions</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.5</real>
|
||||
<real>0.0</real>
|
||||
<real>0.15</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>deprecated</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.9</real>
|
||||
<real>0.4</real>
|
||||
<real>0.55</real>
|
||||
</array>
|
||||
</map>
|
||||
|
||||
<key>god_mode</key>
|
||||
<map>
|
||||
<key>color</key>
|
||||
<array>
|
||||
<real>0.7</real>
|
||||
<real>0.2</real>
|
||||
<real>0.35</real>
|
||||
</array>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -50,11 +50,9 @@
|
|||
#include "llscrolllistctrl.h"
|
||||
#include "llscrolllistitem.h"
|
||||
#include "llscrolllistcell.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llslider.h"
|
||||
#include "lscript_rt_interface.h"
|
||||
#include "lscript_library.h"
|
||||
#include "lscript_export.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llvfile.h"
|
||||
|
||||
|
|
@ -386,39 +384,11 @@ BOOL LLScriptEdCore::postBuild()
|
|||
|
||||
initMenu();
|
||||
|
||||
mEditor->mKeywords.initialise();
|
||||
|
||||
// FIX: Refactor LLTextEditor::loadKeywords so these can be removed.
|
||||
std::vector<std::string> funcs;
|
||||
std::vector<std::string> tooltips;
|
||||
for (std::vector<LLScriptLibraryFunction>::const_iterator i = gScriptLibrary.mFunctions.begin();
|
||||
i != gScriptLibrary.mFunctions.end(); ++i)
|
||||
{
|
||||
// Make sure this isn't a god only function, or the agent is a god.
|
||||
if (!i->mGodOnly || gAgent.isGodlike())
|
||||
{
|
||||
std::string name = i->mName;
|
||||
funcs.push_back(name);
|
||||
|
||||
std::string desc_name = "LSLTipText_";
|
||||
desc_name += name;
|
||||
std::string desc = LLTrans::getString(desc_name);
|
||||
|
||||
F32 sleep_time = i->mSleepTime;
|
||||
if( sleep_time )
|
||||
{
|
||||
desc += "\n";
|
||||
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[SLEEP_TIME]"] = llformat("%.1f", sleep_time );
|
||||
desc += LLTrans::getString("LSLTipSleepTime", args);
|
||||
}
|
||||
|
||||
// A \n linefeed is not part of xml. Let's add one to keep all
|
||||
// the tips one-per-line in strings.xml
|
||||
LLStringUtil::replaceString( desc, "\\n", "\n" );
|
||||
|
||||
tooltips.push_back(desc);
|
||||
}
|
||||
}
|
||||
|
||||
LLColor3 color(0.5f, 0.0f, 0.15f);
|
||||
mEditor->loadKeywords(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords.ini"), funcs, tooltips, color);
|
||||
|
|
@ -430,6 +400,7 @@ BOOL LLScriptEdCore::postBuild()
|
|||
for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it)
|
||||
{
|
||||
token = token_it->second;
|
||||
// FIX: change this to use the new Token Type enum entries.
|
||||
if (token->getColor() == color) // Wow, what a disgusting hack.
|
||||
{
|
||||
primary_keywords.push_back( wstring_to_utf8str(token->getToken()) );
|
||||
|
|
@ -655,7 +626,7 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
|
|||
std::vector<LLTextSegmentPtr>::iterator segment_iter;
|
||||
for (segment_iter = selected_segments.begin(); segment_iter != selected_segments.end(); ++segment_iter)
|
||||
{
|
||||
if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::WORD)
|
||||
if((*segment_iter)->getToken() && (*segment_iter)->getToken()->getType() == LLKeywordToken::TT_WORD)
|
||||
{
|
||||
segment = *segment_iter;
|
||||
break;
|
||||
|
|
@ -666,7 +637,7 @@ void LLScriptEdCore::updateDynamicHelp(BOOL immediate)
|
|||
if (!segment)
|
||||
{
|
||||
const LLTextSegmentPtr test_segment = mEditor->getPreviousSegment();
|
||||
if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::WORD)
|
||||
if(test_segment->getToken() && test_segment->getToken()->getType() == LLKeywordToken::TT_WORD)
|
||||
{
|
||||
segment = test_segment;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue