diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llkeywords.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llkeywords.h')
-rw-r--r-- | linden/indra/llui/llkeywords.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/linden/indra/llui/llkeywords.h b/linden/indra/llui/llkeywords.h index d5d7302..61c3c57 100644 --- a/linden/indra/llui/llkeywords.h +++ b/linden/indra/llui/llkeywords.h | |||
@@ -56,11 +56,12 @@ public: | |||
56 | { | 56 | { |
57 | } | 57 | } |
58 | 58 | ||
59 | S32 getLength() { return mToken.size(); } | 59 | S32 getLength() const { return mToken.size(); } |
60 | BOOL isHead(const llwchar* s); | 60 | BOOL isHead(const llwchar* s) const; |
61 | const LLColor3& getColor() { return mColor; } | 61 | const LLWString& getToken() const { return mToken; } |
62 | TOKEN_TYPE getType() { return mType; } | 62 | const LLColor3& getColor() const { return mColor; } |
63 | const LLWString& getToolTip() { return mToolTip; } | 63 | TOKEN_TYPE getType() const { return mType; } |
64 | const LLWString& getToolTip() const { return mToolTip; } | ||
64 | 65 | ||
65 | #ifdef _DEBUG | 66 | #ifdef _DEBUG |
66 | void dump(); | 67 | void dump(); |
@@ -68,10 +69,8 @@ public: | |||
68 | 69 | ||
69 | private: | 70 | private: |
70 | TOKEN_TYPE mType; | 71 | TOKEN_TYPE mType; |
71 | public: | ||
72 | LLWString mToken; | 72 | LLWString mToken; |
73 | LLColor3 mColor; | 73 | LLColor3 mColor; |
74 | private: | ||
75 | LLWString mToolTip; | 74 | LLWString mToolTip; |
76 | }; | 75 | }; |
77 | 76 | ||
@@ -82,30 +81,31 @@ public: | |||
82 | ~LLKeywords(); | 81 | ~LLKeywords(); |
83 | 82 | ||
84 | BOOL loadFromFile(const LLString& filename); | 83 | BOOL loadFromFile(const LLString& filename); |
85 | BOOL isLoaded() { return mLoaded; } | 84 | BOOL isLoaded() const { return mLoaded; } |
86 | 85 | ||
87 | void findSegments(std::vector<LLTextSegment *> *seg_list, const LLWString& text, const LLColor4 &defaultColor ); | 86 | void findSegments(std::vector<LLTextSegment *> *seg_list, const LLWString& text, const LLColor4 &defaultColor ); |
88 | 87 | ||
89 | #ifdef _DEBUG | ||
90 | void dump(); | ||
91 | #endif | ||
92 | |||
93 | // Add the token as described | 88 | // Add the token as described |
94 | void addToken(LLKeywordToken::TOKEN_TYPE type, | 89 | void addToken(LLKeywordToken::TOKEN_TYPE type, |
95 | const LLString& key, | 90 | const LLString& key, |
96 | const LLColor3& color, | 91 | const LLColor3& color, |
97 | const LLString& tool_tip = LLString::null); | 92 | const LLString& tool_tip = LLString::null); |
98 | 93 | ||
94 | typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; | ||
95 | typedef word_token_map_t::const_iterator keyword_iterator_t; | ||
96 | keyword_iterator_t begin() const { return mWordTokenMap.begin(); } | ||
97 | keyword_iterator_t end() const { return mWordTokenMap.end(); } | ||
98 | |||
99 | #ifdef _DEBUG | ||
100 | void dump(); | ||
101 | #endif | ||
102 | |||
99 | private: | 103 | private: |
100 | LLColor3 readColor(const LLString& s); | 104 | LLColor3 readColor(const LLString& s); |
101 | void insertSegment(std::vector<LLTextSegment *> *seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor); | 105 | void insertSegment(std::vector<LLTextSegment *> *seg_list, LLTextSegment* new_segment, S32 text_len, const LLColor4 &defaultColor); |
102 | 106 | ||
103 | private: | 107 | BOOL mLoaded; |
104 | BOOL mLoaded; | ||
105 | public: | ||
106 | typedef std::map<LLWString, LLKeywordToken*> word_token_map_t; | ||
107 | word_token_map_t mWordTokenMap; | 108 | word_token_map_t mWordTokenMap; |
108 | private: | ||
109 | typedef std::deque<LLKeywordToken*> token_list_t; | 109 | typedef std::deque<LLKeywordToken*> token_list_t; |
110 | token_list_t mLineTokenList; | 110 | token_list_t mLineTokenList; |
111 | token_list_t mDelimiterTokenList; | 111 | token_list_t mDelimiterTokenList; |