diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llui/llbutton.h | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llui/llbutton.h')
-rw-r--r-- | linden/indra/llui/llbutton.h | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index a101a3c..e9497bd 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h | |||
@@ -72,25 +72,25 @@ class LLButton | |||
72 | { | 72 | { |
73 | public: | 73 | public: |
74 | // simple button with text label | 74 | // simple button with text label |
75 | LLButton(const LLString& name, const LLRect &rect, const LLString& control_name = LLString(), | 75 | LLButton(const std::string& name, const LLRect &rect, const std::string& control_name = std::string(), |
76 | void (*on_click)(void*) = NULL, void *data = NULL); | 76 | void (*on_click)(void*) = NULL, void *data = NULL); |
77 | 77 | ||
78 | LLButton(const LLString& name, const LLRect& rect, | 78 | LLButton(const std::string& name, const LLRect& rect, |
79 | const LLString &unselected_image, | 79 | const std::string &unselected_image, |
80 | const LLString &selected_image, | 80 | const std::string &selected_image, |
81 | const LLString& control_name, | 81 | const std::string& control_name, |
82 | void (*click_callback)(void*), | 82 | void (*click_callback)(void*), |
83 | void *callback_data = NULL, | 83 | void *callback_data = NULL, |
84 | const LLFontGL* mGLFont = NULL, | 84 | const LLFontGL* mGLFont = NULL, |
85 | const LLString& unselected_label = LLString::null, | 85 | const std::string& unselected_label = LLStringUtil::null, |
86 | const LLString& selected_label = LLString::null ); | 86 | const std::string& selected_label = LLStringUtil::null ); |
87 | 87 | ||
88 | virtual ~LLButton(); | 88 | virtual ~LLButton(); |
89 | void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const LLString& control_name); | 89 | void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const std::string& control_name); |
90 | 90 | ||
91 | 91 | ||
92 | void addImageAttributeToXML(LLXMLNodePtr node, const LLString& imageName, | 92 | void addImageAttributeToXML(LLXMLNodePtr node, const std::string& imageName, |
93 | const LLUUID& imageID,const LLString& xmlTagName) const; | 93 | const LLUUID& imageID,const std::string& xmlTagName) const; |
94 | virtual LLXMLNodePtr getXML(bool save_children = true) const; | 94 | virtual LLXMLNodePtr getXML(bool save_children = true) const; |
95 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | 95 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); |
96 | 96 | ||
@@ -130,24 +130,24 @@ public: | |||
130 | void setLeftHPad( S32 pad ) { mLeftHPad = pad; } | 130 | void setLeftHPad( S32 pad ) { mLeftHPad = pad; } |
131 | void setRightHPad( S32 pad ) { mRightHPad = pad; } | 131 | void setRightHPad( S32 pad ) { mRightHPad = pad; } |
132 | 132 | ||
133 | const LLString getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); } | 133 | const std::string getLabelUnselected() const { return wstring_to_utf8str(mUnselectedLabel); } |
134 | const LLString getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); } | 134 | const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); } |
135 | 135 | ||
136 | void setImageColor(const LLString& color_control); | 136 | void setImageColor(const std::string& color_control); |
137 | void setImageColor(const LLColor4& c); | 137 | void setImageColor(const LLColor4& c); |
138 | virtual void setColor(const LLColor4& c); | 138 | virtual void setColor(const LLColor4& c); |
139 | 139 | ||
140 | void setImages(const LLString &image_name, const LLString &selected_name); | 140 | void setImages(const std::string &image_name, const std::string &selected_name); |
141 | void setDisabledImages(const LLString &image_name, const LLString &selected_name); | 141 | void setDisabledImages(const std::string &image_name, const std::string &selected_name); |
142 | void setDisabledImages(const LLString &image_name, const LLString &selected_name, const LLColor4& c); | 142 | void setDisabledImages(const std::string &image_name, const std::string &selected_name, const LLColor4& c); |
143 | 143 | ||
144 | void setHoverImages(const LLString &image_name, const LLString &selected_name); | 144 | void setHoverImages(const std::string &image_name, const std::string &selected_name); |
145 | 145 | ||
146 | void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; } | 146 | void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; } |
147 | 147 | ||
148 | void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; } | 148 | void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; } |
149 | 149 | ||
150 | void setImageOverlay(const LLString &image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white); | 150 | void setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white); |
151 | LLPointer<LLUIImage> getImageOverlay() { return mImageOverlay; } | 151 | LLPointer<LLUIImage> getImageOverlay() { return mImageOverlay; } |
152 | 152 | ||
153 | 153 | ||
@@ -155,7 +155,7 @@ public: | |||
155 | virtual LLSD getValue() const; | 155 | virtual LLSD getValue() const; |
156 | 156 | ||
157 | void setLabel( const LLStringExplicit& label); | 157 | void setLabel( const LLStringExplicit& label); |
158 | virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); | 158 | virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); |
159 | void setLabelUnselected(const LLStringExplicit& label); | 159 | void setLabelUnselected(const LLStringExplicit& label); |
160 | void setLabelSelected(const LLStringExplicit& label); | 160 | void setLabelSelected(const LLStringExplicit& label); |
161 | void setDisabledLabel(const LLStringExplicit& disabled_label); | 161 | void setDisabledLabel(const LLStringExplicit& disabled_label); |
@@ -175,14 +175,14 @@ public: | |||
175 | 175 | ||
176 | void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; } | 176 | void setHoverGlowStrength(F32 strength) { mHoverGlowStrength = strength; } |
177 | 177 | ||
178 | void setImageUnselected(const LLString &image_name); | 178 | void setImageUnselected(const std::string &image_name); |
179 | const LLString& getImageUnselectedName() const { return mImageUnselectedName; } | 179 | const std::string& getImageUnselectedName() const { return mImageUnselectedName; } |
180 | void setImageSelected(const LLString &image_name); | 180 | void setImageSelected(const std::string &image_name); |
181 | const LLString& getImageSelectedName() const { return mImageSelectedName; } | 181 | const std::string& getImageSelectedName() const { return mImageSelectedName; } |
182 | void setImageHoverSelected(const LLString &image_name); | 182 | void setImageHoverSelected(const std::string &image_name); |
183 | void setImageHoverUnselected(const LLString &image_name); | 183 | void setImageHoverUnselected(const std::string &image_name); |
184 | void setImageDisabled(const LLString &image_name); | 184 | void setImageDisabled(const std::string &image_name); |
185 | void setImageDisabledSelected(const LLString &image_name); | 185 | void setImageDisabledSelected(const std::string &image_name); |
186 | 186 | ||
187 | void setImageUnselected(LLPointer<LLUIImage> image); | 187 | void setImageUnselected(LLPointer<LLUIImage> image); |
188 | void setImageSelected(LLPointer<LLUIImage> image); | 188 | void setImageSelected(LLPointer<LLUIImage> image); |
@@ -194,8 +194,8 @@ public: | |||
194 | void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } | 194 | void setCommitOnReturn(BOOL commit) { mCommitOnReturn = commit; } |
195 | BOOL getCommitOnReturn() const { return mCommitOnReturn; } | 195 | BOOL getCommitOnReturn() const { return mCommitOnReturn; } |
196 | 196 | ||
197 | void setHelpURLCallback(const LLString &help_url); | 197 | void setHelpURLCallback(const std::string &help_url); |
198 | const LLString& getHelpURL() const { return mHelpURL; } | 198 | const std::string& getHelpURL() const { return mHelpURL; } |
199 | 199 | ||
200 | protected: | 200 | protected: |
201 | 201 | ||
@@ -257,16 +257,17 @@ private: | |||
257 | LLUUID mImageHoverUnselectedID; | 257 | LLUUID mImageHoverUnselectedID; |
258 | LLUUID mImageDisabledID; | 258 | LLUUID mImageDisabledID; |
259 | LLUUID mImageDisabledSelectedID; | 259 | LLUUID mImageDisabledSelectedID; |
260 | LLString mImageUnselectedName; | 260 | std::string mImageUnselectedName; |
261 | LLString mImageSelectedName; | 261 | std::string mImageSelectedName; |
262 | LLString mImageHoverSelectedName; | 262 | std::string mImageHoverSelectedName; |
263 | LLString mImageHoverUnselectedName; | 263 | std::string mImageHoverUnselectedName; |
264 | LLString mImageDisabledName; | 264 | std::string mImageDisabledName; |
265 | LLString mImageDisabledSelectedName; | 265 | std::string mImageDisabledSelectedName; |
266 | 266 | ||
267 | LLColor4 mHighlightColor; | 267 | LLColor4 mHighlightColor; |
268 | LLColor4 mUnselectedBgColor; | 268 | LLColor4 mUnselectedBgColor; |
269 | LLColor4 mSelectedBgColor; | 269 | LLColor4 mSelectedBgColor; |
270 | LLColor4 mFlashBgColor; | ||
270 | 271 | ||
271 | LLColor4 mImageColor; | 272 | LLColor4 mImageColor; |
272 | LLColor4 mDisabledImageColor; | 273 | LLColor4 mDisabledImageColor; |
@@ -291,7 +292,7 @@ private: | |||
291 | BOOL mNeedsHighlight; | 292 | BOOL mNeedsHighlight; |
292 | BOOL mCommitOnReturn; | 293 | BOOL mCommitOnReturn; |
293 | 294 | ||
294 | LLString mHelpURL; | 295 | std::string mHelpURL; |
295 | 296 | ||
296 | LLPointer<LLUIImage> mImagep; | 297 | LLPointer<LLUIImage> mImagep; |
297 | 298 | ||