diff options
Diffstat (limited to 'linden/indra/llui/llfloater.h')
-rw-r--r-- | linden/indra/llui/llfloater.h | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index 7b4e003..636125e 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h | |||
@@ -86,8 +86,8 @@ public: | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | LLFloater(); | 88 | LLFloater(); |
89 | LLFloater(const LLString& name); //simple constructor for data-driven initialization | 89 | LLFloater(const std::string& name); //simple constructor for data-driven initialization |
90 | LLFloater( const LLString& name, const LLRect& rect, const LLString& title, | 90 | LLFloater( const std::string& name, const LLRect& rect, const std::string& title, |
91 | BOOL resizable = FALSE, | 91 | BOOL resizable = FALSE, |
92 | S32 min_width = DEFAULT_MIN_WIDTH, | 92 | S32 min_width = DEFAULT_MIN_WIDTH, |
93 | S32 min_height = DEFAULT_MIN_HEIGHT, | 93 | S32 min_height = DEFAULT_MIN_HEIGHT, |
@@ -96,7 +96,7 @@ public: | |||
96 | BOOL close_btn = TRUE, | 96 | BOOL close_btn = TRUE, |
97 | BOOL bordered = BORDER_NO); | 97 | BOOL bordered = BORDER_NO); |
98 | 98 | ||
99 | LLFloater( const LLString& name, const LLString& rect_control, const LLString& title, | 99 | LLFloater( const std::string& name, const std::string& rect_control, const std::string& title, |
100 | BOOL resizable = FALSE, | 100 | BOOL resizable = FALSE, |
101 | S32 min_width = DEFAULT_MIN_WIDTH, | 101 | S32 min_width = DEFAULT_MIN_WIDTH, |
102 | S32 min_height = DEFAULT_MIN_HEIGHT, | 102 | S32 min_height = DEFAULT_MIN_HEIGHT, |
@@ -119,7 +119,7 @@ public: | |||
119 | 119 | ||
120 | // Can be called multiple times to reset floater parameters. | 120 | // Can be called multiple times to reset floater parameters. |
121 | // Deletes all children of the floater. | 121 | // Deletes all children of the floater. |
122 | virtual void initFloater(const LLString& title, BOOL resizable, | 122 | virtual void initFloater(const std::string& title, BOOL resizable, |
123 | S32 min_width, S32 min_height, BOOL drag_on_left, | 123 | S32 min_width, S32 min_height, BOOL drag_on_left, |
124 | BOOL minimizable, BOOL close_btn); | 124 | BOOL minimizable, BOOL close_btn); |
125 | 125 | ||
@@ -142,17 +142,19 @@ public: | |||
142 | 142 | ||
143 | LLMultiFloater* getHost() { return (LLMultiFloater*)mHostHandle.get(); } | 143 | LLMultiFloater* getHost() { return (LLMultiFloater*)mHostHandle.get(); } |
144 | 144 | ||
145 | void setTitle( const LLString& title ); | 145 | void applyTitle(); |
146 | const LLString& getTitle() const; | 146 | const std::string& getCurrentTitle() const; |
147 | void setShortTitle( const LLString& short_title ); | 147 | void setTitle( const std::string& title); |
148 | LLString getShortTitle(); | 148 | std::string getTitle(); |
149 | void setShortTitle( const std::string& short_title ); | ||
150 | std::string getShortTitle(); | ||
149 | void setTitleVisible(bool visible); | 151 | void setTitleVisible(bool visible); |
150 | virtual void setMinimized(BOOL b); | 152 | virtual void setMinimized(BOOL b); |
151 | void moveResizeHandlesToFront(); | 153 | void moveResizeHandlesToFront(); |
152 | void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); | 154 | void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); |
153 | void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE); | 155 | void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE); |
154 | LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } | 156 | LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } |
155 | void removeDependentFloater(LLFloater* dependent); | 157 | void removeDependentFloater(LLFloater* dependent); |
156 | BOOL isMinimized() { return mMinimized; } | 158 | BOOL isMinimized() { return mMinimized; } |
157 | BOOL isFrontmost(); | 159 | BOOL isFrontmost(); |
158 | BOOL isDependent() { return !mDependeeHandle.isDead(); } | 160 | BOOL isDependent() { return !mDependeeHandle.isDead(); } |
@@ -221,8 +223,8 @@ protected: | |||
221 | virtual void bringToFront(S32 x, S32 y); | 223 | virtual void bringToFront(S32 x, S32 y); |
222 | virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE); | 224 | virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE); |
223 | 225 | ||
224 | void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized | 226 | void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized |
225 | const LLRect& getExpandedRect() const { return mExpandedRect; } | 227 | const LLRect& getExpandedRect() const { return mExpandedRect; } |
226 | 228 | ||
227 | void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened | 229 | void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened |
228 | LLDragHandle* getDragHandle() const { return mDragHandle; } | 230 | LLDragHandle* getDragHandle() const { return mDragHandle; } |
@@ -236,17 +238,19 @@ private: | |||
236 | void createMinimizeButton(); | 238 | void createMinimizeButton(); |
237 | void updateButtons(); | 239 | void updateButtons(); |
238 | void buildButtons(); | 240 | void buildButtons(); |
241 | BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButtons index); | ||
239 | 242 | ||
240 | LLRect mExpandedRect; | 243 | LLRect mExpandedRect; |
241 | LLDragHandle* mDragHandle; | 244 | LLDragHandle* mDragHandle; |
242 | LLResizeBar* mResizeBar[4]; | 245 | LLResizeBar* mResizeBar[4]; |
243 | LLResizeHandle* mResizeHandle[4]; | 246 | LLResizeHandle* mResizeHandle[4]; |
244 | LLButton *mMinimizeButton; | 247 | LLButton *mMinimizeButton; |
245 | BOOL mCanTearOff; | 248 | BOOL mCanTearOff; |
246 | BOOL mMinimized; | 249 | BOOL mMinimized; |
247 | BOOL mForeground; | 250 | BOOL mForeground; |
248 | LLHandle<LLFloater> mDependeeHandle; | 251 | LLHandle<LLFloater> mDependeeHandle; |
249 | LLString mShortTitle; | 252 | std::string mTitle; |
253 | std::string mShortTitle; | ||
250 | 254 | ||
251 | BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible. | 255 | BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible. |
252 | 256 | ||
@@ -259,7 +263,7 @@ private: | |||
259 | typedef std::set<LLHandle<LLFloater> > handle_set_t; | 263 | typedef std::set<LLHandle<LLFloater> > handle_set_t; |
260 | typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t; | 264 | typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t; |
261 | handle_set_t mDependents; | 265 | handle_set_t mDependents; |
262 | bool mDragOnLeft; | 266 | bool mDragOnLeft; |
263 | 267 | ||
264 | BOOL mButtonsEnabled[BUTTON_COUNT]; | 268 | BOOL mButtonsEnabled[BUTTON_COUNT]; |
265 | LLButton* mButtons[BUTTON_COUNT]; | 269 | LLButton* mButtons[BUTTON_COUNT]; |
@@ -272,11 +276,11 @@ private: | |||
272 | 276 | ||
273 | static LLMultiFloater* sHostp; | 277 | static LLMultiFloater* sHostp; |
274 | static BOOL sEditModeEnabled; | 278 | static BOOL sEditModeEnabled; |
275 | static LLString sButtonActiveImageNames[BUTTON_COUNT]; | 279 | static std::string sButtonActiveImageNames[BUTTON_COUNT]; |
276 | static LLString sButtonInactiveImageNames[BUTTON_COUNT]; | 280 | static std::string sButtonInactiveImageNames[BUTTON_COUNT]; |
277 | static LLString sButtonPressedImageNames[BUTTON_COUNT]; | 281 | static std::string sButtonPressedImageNames[BUTTON_COUNT]; |
278 | static LLString sButtonNames[BUTTON_COUNT]; | 282 | static std::string sButtonNames[BUTTON_COUNT]; |
279 | static LLString sButtonToolTips[BUTTON_COUNT]; | 283 | static std::string sButtonToolTips[BUTTON_COUNT]; |
280 | typedef void (*click_callback)(void *); | 284 | typedef void (*click_callback)(void *); |
281 | static click_callback sButtonCallbacks[BUTTON_COUNT]; | 285 | static click_callback sButtonCallbacks[BUTTON_COUNT]; |
282 | 286 | ||
@@ -301,7 +305,7 @@ private: | |||
301 | class LLFloaterView : public LLUICtrl | 305 | class LLFloaterView : public LLUICtrl |
302 | { | 306 | { |
303 | public: | 307 | public: |
304 | LLFloaterView( const LLString& name, const LLRect& rect ); | 308 | LLFloaterView( const std::string& name, const LLRect& rect ); |
305 | 309 | ||
306 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); | 310 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
307 | void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); | 311 | void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); |
@@ -361,9 +365,9 @@ class LLMultiFloater : public LLFloater | |||
361 | public: | 365 | public: |
362 | LLMultiFloater(); | 366 | LLMultiFloater(); |
363 | LLMultiFloater(LLTabContainer::TabPosition tab_pos); | 367 | LLMultiFloater(LLTabContainer::TabPosition tab_pos); |
364 | LLMultiFloater(const LLString& name); | 368 | LLMultiFloater(const std::string& name); |
365 | LLMultiFloater(const LLString& name, const LLRect& rect, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); | 369 | LLMultiFloater(const std::string& name, const LLRect& rect, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); |
366 | LLMultiFloater(const LLString& name, const LLString& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); | 370 | LLMultiFloater(const std::string& name, const std::string& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = TRUE); |
367 | virtual ~LLMultiFloater() {}; | 371 | virtual ~LLMultiFloater() {}; |
368 | 372 | ||
369 | virtual BOOL postBuild(); | 373 | virtual BOOL postBuild(); |
@@ -387,8 +391,8 @@ public: | |||
387 | virtual void selectNextFloater(); | 391 | virtual void selectNextFloater(); |
388 | virtual void selectPrevFloater(); | 392 | virtual void selectPrevFloater(); |
389 | 393 | ||
390 | virtual LLFloater* getActiveFloater(); | 394 | virtual LLFloater* getActiveFloater(); |
391 | virtual BOOL isFloaterFlashing(LLFloater* floaterp); | 395 | virtual BOOL isFloaterFlashing(LLFloater* floaterp); |
392 | virtual S32 getFloaterCount(); | 396 | virtual S32 getFloaterCount(); |
393 | 397 | ||
394 | virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing); | 398 | virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing); |