diff options
Diffstat (limited to 'linden/indra/llui/llkeywords.h')
-rw-r--r-- | linden/indra/llui/llkeywords.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/linden/indra/llui/llkeywords.h b/linden/indra/llui/llkeywords.h index e3361f6..742383a 100644 --- a/linden/indra/llui/llkeywords.h +++ b/linden/indra/llui/llkeywords.h | |||
@@ -45,23 +45,27 @@ class LLTextSegment; | |||
45 | class LLKeywordToken | 45 | class LLKeywordToken |
46 | { | 46 | { |
47 | public: | 47 | public: |
48 | enum TOKEN_TYPE { WORD, LINE, TWO_SIDED_DELIMITER, ONE_SIDED_DELIMITER }; | 48 | enum TOKEN_TYPE { WORD, LINE, TWO_SIDED_DELIMITER, ONE_SIDED_DELIMITER, TWO_SIDED_DELIMITER_ESC }; |
49 | 49 | ||
50 | LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip ) | 50 | LLKeywordToken( TOKEN_TYPE type, const LLColor3& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter ) |
51 | : | 51 | : |
52 | mType( type ), | 52 | mType( type ), |
53 | mToken( token ), | 53 | mToken( token ), // keyword or left delimiter |
54 | mColor( color ), | 54 | mColor( color ), |
55 | mToolTip( tool_tip ) | 55 | mToolTip( tool_tip ), |
56 | mDelimiter( delimiter ) // right delimiter | ||
56 | { | 57 | { |
57 | } | 58 | } |
58 | 59 | ||
59 | S32 getLength() const { return mToken.size(); } | 60 | S32 getLength() const { return mToken.size(); } |
61 | S32 getLength2() const { return mDelimiter.size(); } | ||
60 | BOOL isHead(const llwchar* s) const; | 62 | BOOL isHead(const llwchar* s) const; |
63 | BOOL isTail(const llwchar* s) const; | ||
61 | const LLWString& getToken() const { return mToken; } | 64 | const LLWString& getToken() const { return mToken; } |
62 | const LLColor3& getColor() const { return mColor; } | 65 | const LLColor3& getColor() const { return mColor; } |
63 | TOKEN_TYPE getType() const { return mType; } | 66 | TOKEN_TYPE getType() const { return mType; } |
64 | const LLWString& getToolTip() const { return mToolTip; } | 67 | const LLWString& getToolTip() const { return mToolTip; } |
68 | const LLWString& getDelimiter() const { return mDelimiter; } | ||
65 | 69 | ||
66 | #ifdef _DEBUG | 70 | #ifdef _DEBUG |
67 | void dump(); | 71 | void dump(); |
@@ -72,6 +76,7 @@ private: | |||
72 | LLWString mToken; | 76 | LLWString mToken; |
73 | LLColor3 mColor; | 77 | LLColor3 mColor; |
74 | LLWString mToolTip; | 78 | LLWString mToolTip; |
79 | LLWString mDelimiter; | ||
75 | }; | 80 | }; |
76 | 81 | ||
77 | class LLKeywords | 82 | class LLKeywords |
@@ -89,7 +94,8 @@ public: | |||
89 | void addToken(LLKeywordToken::TOKEN_TYPE type, | 94 | void addToken(LLKeywordToken::TOKEN_TYPE type, |
90 | const std::string& key, | 95 | const std::string& key, |
91 | const LLColor3& color, | 96 | const LLColor3& color, |
92 | const std::string& tool_tip = LLStringUtil::null); | 97 | const std::string& tool_tip = LLStringUtil::null, |
98 | const std::string& delimiter = LLStringUtil::null); | ||
93 | 99 | ||
94 | typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; | 100 | typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; |
95 | typedef word_token_map_t::const_iterator keyword_iterator_t; | 101 | typedef word_token_map_t::const_iterator keyword_iterator_t; |