diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llcheckboxctrl.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/lldraghandle.h | 1 | ||||
-rw-r--r-- | linden/indra/llui/llfloater.cpp | 28 | ||||
-rw-r--r-- | linden/indra/llui/llfloater.h | 8 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 28 | ||||
-rw-r--r-- | linden/indra/llui/llmenugl.h | 13 | ||||
-rw-r--r-- | linden/indra/llui/llmodaldialog.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llmultisliderctrl.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llmultisliderctrl.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llui/llscrollcontainer.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llscrolllistctrl.cpp | 3 | ||||
-rw-r--r-- | linden/indra/llui/lltabcontainer.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/lltexteditor.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llui.cpp | 7 | ||||
-rw-r--r-- | linden/indra/llui/llui.h | 6 | ||||
-rw-r--r-- | linden/indra/llui/llview.cpp | 4 | ||||
-rw-r--r-- | linden/indra/llui/llview.h | 8 |
18 files changed, 73 insertions, 59 deletions
diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h index 1f92708..6df0e77 100644 --- a/linden/indra/llui/llcheckboxctrl.h +++ b/linden/indra/llui/llcheckboxctrl.h | |||
@@ -83,7 +83,7 @@ public: | |||
83 | virtual void setEnabled( BOOL b ); | 83 | virtual void setEnabled( BOOL b ); |
84 | 84 | ||
85 | virtual void draw(); | 85 | virtual void draw(); |
86 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent); | 86 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
87 | 87 | ||
88 | // LLUICtrl interface | 88 | // LLUICtrl interface |
89 | virtual void setValue(const LLSD& value ); | 89 | virtual void setValue(const LLSD& value ); |
diff --git a/linden/indra/llui/lldraghandle.h b/linden/indra/llui/lldraghandle.h index cb9924d..88e16dc 100644 --- a/linden/indra/llui/lldraghandle.h +++ b/linden/indra/llui/lldraghandle.h | |||
@@ -57,7 +57,6 @@ public: | |||
57 | 57 | ||
58 | virtual void setTitle( const LLString& title ) = 0; | 58 | virtual void setTitle( const LLString& title ) = 0; |
59 | virtual const LLString& getTitle() const = 0; | 59 | virtual const LLString& getTitle() const = 0; |
60 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE) = 0; | ||
61 | 60 | ||
62 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 61 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
63 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | 62 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); |
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 493e68f..1e825d3 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -154,7 +154,7 @@ LLFloater::LLFloater(const LLString& name) | |||
154 | mButtons[i] = NULL; | 154 | mButtons[i] = NULL; |
155 | } | 155 | } |
156 | LLString title; // null string | 156 | LLString title; // null string |
157 | init(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults | 157 | initFloater(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults |
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | ||
@@ -173,7 +173,7 @@ LLFloater::LLFloater(const LLString& name, const LLRect& rect, const LLString& t | |||
173 | mButtonsEnabled[i] = FALSE; | 173 | mButtonsEnabled[i] = FALSE; |
174 | mButtons[i] = NULL; | 174 | mButtons[i] = NULL; |
175 | } | 175 | } |
176 | init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); | 176 | initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); |
177 | } | 177 | } |
178 | 178 | ||
179 | LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const LLString& title, | 179 | LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const LLString& title, |
@@ -191,12 +191,12 @@ LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const L | |||
191 | mButtonsEnabled[i] = FALSE; | 191 | mButtonsEnabled[i] = FALSE; |
192 | mButtons[i] = NULL; | 192 | mButtons[i] = NULL; |
193 | } | 193 | } |
194 | init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); | 194 | initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); |
195 | } | 195 | } |
196 | 196 | ||
197 | 197 | ||
198 | // Note: Floaters constructed from XML call init() twice! | 198 | // Note: Floaters constructed from XML call init() twice! |
199 | void LLFloater::init(const LLString& title, | 199 | void LLFloater::initFloater(const LLString& title, |
200 | BOOL resizable, S32 min_width, S32 min_height, | 200 | BOOL resizable, S32 min_width, S32 min_height, |
201 | BOOL drag_on_left, BOOL minimizable, BOOL close_btn) | 201 | BOOL drag_on_left, BOOL minimizable, BOOL close_btn) |
202 | { | 202 | { |
@@ -576,6 +576,11 @@ void LLFloater::close(bool app_quitting) | |||
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | /*virtual*/ | ||
580 | void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) | ||
581 | { | ||
582 | LLPanel::reshape(width, height, called_from_parent); | ||
583 | } | ||
579 | 584 | ||
580 | void LLFloater::releaseFocus() | 585 | void LLFloater::releaseFocus() |
581 | { | 586 | { |
@@ -777,8 +782,6 @@ void LLFloater::setMinimized(BOOL minimize) | |||
777 | { | 782 | { |
778 | mExpandedRect = getRect(); | 783 | mExpandedRect = getRect(); |
779 | 784 | ||
780 | reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE); | ||
781 | |||
782 | // If the floater has been dragged while minimized in the | 785 | // If the floater has been dragged while minimized in the |
783 | // past, then locate it at its previous minimized location. | 786 | // past, then locate it at its previous minimized location. |
784 | // Otherwise, ask the view for a minimize position. | 787 | // Otherwise, ask the view for a minimize position. |
@@ -841,6 +844,9 @@ void LLFloater::setMinimized(BOOL minimize) | |||
841 | releaseFocus(); | 844 | releaseFocus(); |
842 | 845 | ||
843 | mMinimized = TRUE; | 846 | mMinimized = TRUE; |
847 | |||
848 | // Reshape *after* setting mMinimized | ||
849 | reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE); | ||
844 | } | 850 | } |
845 | else | 851 | else |
846 | { | 852 | { |
@@ -853,7 +859,6 @@ void LLFloater::setMinimized(BOOL minimize) | |||
853 | mPreviousMinimizedBottom = currentRect.mBottom; | 859 | mPreviousMinimizedBottom = currentRect.mBottom; |
854 | } | 860 | } |
855 | 861 | ||
856 | reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); | ||
857 | setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom ); | 862 | setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom ); |
858 | 863 | ||
859 | if (mButtonsEnabled[BUTTON_RESTORE]) | 864 | if (mButtonsEnabled[BUTTON_RESTORE]) |
@@ -894,6 +899,9 @@ void LLFloater::setMinimized(BOOL minimize) | |||
894 | } | 899 | } |
895 | 900 | ||
896 | mMinimized = FALSE; | 901 | mMinimized = FALSE; |
902 | |||
903 | // Reshape *after* setting mMinimized | ||
904 | reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); | ||
897 | } | 905 | } |
898 | make_ui_sound("UISndWindowClose"); | 906 | make_ui_sound("UISndWindowClose"); |
899 | updateButtons(); | 907 | updateButtons(); |
@@ -1633,11 +1641,11 @@ LLFloaterView::LLFloaterView( const LLString& name, const LLRect& rect ) | |||
1633 | // By default, adjust vertical. | 1641 | // By default, adjust vertical. |
1634 | void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) | 1642 | void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) |
1635 | { | 1643 | { |
1636 | reshape(width, height, called_from_parent, ADJUST_VERTICAL_YES); | 1644 | reshapeFloater(width, height, called_from_parent, ADJUST_VERTICAL_YES); |
1637 | } | 1645 | } |
1638 | 1646 | ||
1639 | // When reshaping this view, make the floaters follow their closest edge. | 1647 | // When reshaping this view, make the floaters follow their closest edge. |
1640 | void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical) | 1648 | void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical) |
1641 | { | 1649 | { |
1642 | S32 old_width = getRect().getWidth(); | 1650 | S32 old_width = getRect().getWidth(); |
1643 | S32 old_height = getRect().getHeight(); | 1651 | S32 old_height = getRect().getHeight(); |
@@ -2894,7 +2902,7 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor | |||
2894 | setRect(rect); | 2902 | setRect(rect); |
2895 | setName(name); | 2903 | setName(name); |
2896 | 2904 | ||
2897 | init(title, | 2905 | initFloater(title, |
2898 | resizable, | 2906 | resizable, |
2899 | min_width, | 2907 | min_width, |
2900 | min_height, | 2908 | min_height, |
diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index 534af16..f0bbcaf 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h | |||
@@ -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 init(const LLString& title, BOOL resizable, | 122 | virtual void initFloater(const LLString& 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 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER; } | 125 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER; } |
@@ -130,6 +130,8 @@ public: | |||
130 | // If allowed, close the floater cleanly, releasing focus. | 130 | // If allowed, close the floater cleanly, releasing focus. |
131 | // app_quitting is passed to onClose() below. | 131 | // app_quitting is passed to onClose() below. |
132 | virtual void close(bool app_quitting = false); | 132 | virtual void close(bool app_quitting = false); |
133 | |||
134 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); | ||
133 | 135 | ||
134 | // Release keyboard and mouse focus | 136 | // Release keyboard and mouse focus |
135 | void releaseFocus(); | 137 | void releaseFocus(); |
@@ -303,8 +305,8 @@ public: | |||
303 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER_VIEW; } | 305 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER_VIEW; } |
304 | virtual LLString getWidgetTag() const { return LL_FLOATER_VIEW_TAG; } | 306 | virtual LLString getWidgetTag() const { return LL_FLOATER_VIEW_TAG; } |
305 | 307 | ||
306 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); | 308 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
307 | void reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); | 309 | void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); |
308 | 310 | ||
309 | /*virtual*/ void draw(); | 311 | /*virtual*/ void draw(); |
310 | /*virtual*/ LLRect getSnapRect() const; | 312 | /*virtual*/ LLRect getSnapRect() const; |
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 4a12870..cb54476 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -3068,8 +3068,7 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) | |||
3068 | class LLPieMenuBranch : public LLMenuItemGL | 3068 | class LLPieMenuBranch : public LLMenuItemGL |
3069 | { | 3069 | { |
3070 | public: | 3070 | public: |
3071 | LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch, | 3071 | LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch); |
3072 | enabled_callback ecb, void* user_data); | ||
3073 | 3072 | ||
3074 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_PIE_MENU_BRANCH; } | 3073 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_PIE_MENU_BRANCH; } |
3075 | virtual LLString getWidgetTag() const { return LL_PIE_MENU_BRANCH_TAG; } | 3074 | virtual LLString getWidgetTag() const { return LL_PIE_MENU_BRANCH_TAG; } |
@@ -3084,19 +3083,13 @@ public: | |||
3084 | 3083 | ||
3085 | protected: | 3084 | protected: |
3086 | LLPieMenu* mBranch; | 3085 | LLPieMenu* mBranch; |
3087 | enabled_callback mEnabledCallback; | ||
3088 | void* mUserData; | ||
3089 | }; | 3086 | }; |
3090 | 3087 | ||
3091 | LLPieMenuBranch::LLPieMenuBranch(const LLString& name, | 3088 | LLPieMenuBranch::LLPieMenuBranch(const LLString& name, |
3092 | const LLString& label, | 3089 | const LLString& label, |
3093 | LLPieMenu* branch, | 3090 | LLPieMenu* branch) |
3094 | enabled_callback ecb, | ||
3095 | void* user_data) | ||
3096 | : LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ), | 3091 | : LLMenuItemGL( name, label, KEY_NONE, MASK_NONE ), |
3097 | mBranch( branch ), | 3092 | mBranch( branch ) |
3098 | mEnabledCallback( ecb ), | ||
3099 | mUserData(user_data) | ||
3100 | { | 3093 | { |
3101 | mBranch->hide(FALSE); | 3094 | mBranch->hide(FALSE); |
3102 | mBranch->setParentMenuItem(this); | 3095 | mBranch->setParentMenuItem(this); |
@@ -3105,12 +3098,6 @@ LLPieMenuBranch::LLPieMenuBranch(const LLString& name, | |||
3105 | // called to rebuild the draw label | 3098 | // called to rebuild the draw label |
3106 | void LLPieMenuBranch::buildDrawLabel( void ) | 3099 | void LLPieMenuBranch::buildDrawLabel( void ) |
3107 | { | 3100 | { |
3108 | if(mEnabledCallback) | ||
3109 | { | ||
3110 | setEnabled(mEnabledCallback(mUserData)); | ||
3111 | setDrawTextDisabled(FALSE); | ||
3112 | } | ||
3113 | else | ||
3114 | { | 3101 | { |
3115 | // default enablement is this -- if any of the subitems are | 3102 | // default enablement is this -- if any of the subitems are |
3116 | // enabled, this item is enabled. JC | 3103 | // enabled, this item is enabled. JC |
@@ -3203,7 +3190,7 @@ void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *fac | |||
3203 | child->getAttributeString("label", label); | 3190 | child->getAttributeString("label", label); |
3204 | 3191 | ||
3205 | LLPieMenu *submenu = new LLPieMenu(name, label); | 3192 | LLPieMenu *submenu = new LLPieMenu(name, label); |
3206 | appendMenu(submenu); | 3193 | appendPieMenu(submenu); |
3207 | submenu->initXML(child, context, factory); | 3194 | submenu->initXML(child, context, factory); |
3208 | } | 3195 | } |
3209 | else | 3196 | else |
@@ -3585,17 +3572,14 @@ BOOL LLPieMenu::appendSeparator(const LLString &separator_name) | |||
3585 | } | 3572 | } |
3586 | 3573 | ||
3587 | 3574 | ||
3588 | // virtual | 3575 | BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu) |
3589 | BOOL LLPieMenu::appendMenu(LLPieMenu *menu, | ||
3590 | enabled_callback enabled_cb, | ||
3591 | void* user_data) | ||
3592 | { | 3576 | { |
3593 | if (menu == this) | 3577 | if (menu == this) |
3594 | { | 3578 | { |
3595 | llerrs << "Can't attach a pie menu to itself" << llendl; | 3579 | llerrs << "Can't attach a pie menu to itself" << llendl; |
3596 | } | 3580 | } |
3597 | LLPieMenuBranch *item; | 3581 | LLPieMenuBranch *item; |
3598 | item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu, enabled_cb, user_data); | 3582 | item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu); |
3599 | getParent()->addChild(item->getBranch()); | 3583 | getParent()->addChild(item->getBranch()); |
3600 | item->setFont( LLFontGL::sSansSerifSmall ); | 3584 | item->setFont( LLFontGL::sSansSerifSmall ); |
3601 | return append( item ); | 3585 | return append( item ); |
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index 4e5ac69..cd39006 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h | |||
@@ -524,8 +524,6 @@ public: | |||
524 | static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; } | 524 | static void setKeyboardMode(BOOL mode) { sKeyboardMode = mode; } |
525 | static BOOL getKeyboardMode() { return sKeyboardMode; } | 525 | static BOOL getKeyboardMode() { return sKeyboardMode; } |
526 | 526 | ||
527 | static void onFocusLost(LLView* old_focus); | ||
528 | |||
529 | static class LLMenuHolderGL* sMenuContainer; | 527 | static class LLMenuHolderGL* sMenuContainer; |
530 | 528 | ||
531 | protected: | 529 | protected: |
@@ -666,18 +664,15 @@ public: | |||
666 | virtual BOOL append(LLMenuItemGL* item); | 664 | virtual BOOL append(LLMenuItemGL* item); |
667 | virtual BOOL appendSeparator( const LLString &separator_name = "separator" ); | 665 | virtual BOOL appendSeparator( const LLString &separator_name = "separator" ); |
668 | 666 | ||
669 | // the enabled callback is meant for the submenu. The api works | 667 | BOOL appendPieMenu(LLPieMenu *menu); |
670 | // this way because the menu branch item responsible for the pie | 668 | |
671 | // submenu is constructed here. | ||
672 | virtual BOOL appendMenu(LLPieMenu *menu, | ||
673 | enabled_callback enabled_cb = NULL, | ||
674 | void* user_data = NULL ); | ||
675 | virtual void arrange( void ); | 669 | virtual void arrange( void ); |
676 | 670 | ||
677 | // Display the menu centered on this point on the screen. | 671 | // Display the menu centered on this point on the screen. |
678 | void show(S32 x, S32 y, BOOL mouse_down); | 672 | void show(S32 x, S32 y, BOOL mouse_down); |
679 | void hide(BOOL item_selected); | 673 | void hide(BOOL item_selected); |
680 | 674 | ||
675 | |||
681 | private: | 676 | private: |
682 | LLMenuItemGL *pieItemFromXY(S32 x, S32 y); | 677 | LLMenuItemGL *pieItemFromXY(S32 x, S32 y); |
683 | S32 pieItemIndexFromXY(S32 x, S32 y); | 678 | S32 pieItemIndexFromXY(S32 x, S32 y); |
@@ -763,7 +758,7 @@ public: | |||
763 | virtual LLString getWidgetTag() const { return LL_MENU_HOLDER_GL_TAG; } | 758 | virtual LLString getWidgetTag() const { return LL_MENU_HOLDER_GL_TAG; } |
764 | 759 | ||
765 | virtual BOOL hideMenus(); | 760 | virtual BOOL hideMenus(); |
766 | void reshape(S32 width, S32 height, BOOL called_from_parent); | 761 | void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
767 | void setCanHide(BOOL can_hide) { mCanHide = can_hide; } | 762 | void setCanHide(BOOL can_hide) { mCanHide = can_hide; } |
768 | 763 | ||
769 | // LLView functionality | 764 | // LLView functionality |
diff --git a/linden/indra/llui/llmodaldialog.h b/linden/indra/llui/llmodaldialog.h index dd82b25..0199498 100644 --- a/linden/indra/llui/llmodaldialog.h +++ b/linden/indra/llui/llmodaldialog.h | |||
@@ -49,7 +49,7 @@ public: | |||
49 | 49 | ||
50 | /*virtual*/ void open(); /* Flawfinder: ignore */ | 50 | /*virtual*/ void open(); /* Flawfinder: ignore */ |
51 | 51 | ||
52 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = 1); | 52 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
53 | 53 | ||
54 | /*virtual*/ void startModal(); | 54 | /*virtual*/ void startModal(); |
55 | /*virtual*/ void stopModal(); | 55 | /*virtual*/ void stopModal(); |
diff --git a/linden/indra/llui/llmultisliderctrl.cpp b/linden/indra/llui/llmultisliderctrl.cpp index 0d23dd7..47e21d8 100644 --- a/linden/indra/llui/llmultisliderctrl.cpp +++ b/linden/indra/llui/llmultisliderctrl.cpp | |||
@@ -183,7 +183,7 @@ void LLMultiSliderCtrl::setCurSlider(const LLString& name) | |||
183 | mCurValue = mMultiSlider->getCurSliderValue(); | 183 | mCurValue = mMultiSlider->getCurSliderValue(); |
184 | } | 184 | } |
185 | 185 | ||
186 | BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLString& text ) | 186 | BOOL LLMultiSliderCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) |
187 | { | 187 | { |
188 | BOOL res = FALSE; | 188 | BOOL res = FALSE; |
189 | if (mLabelBox) | 189 | if (mLabelBox) |
diff --git a/linden/indra/llui/llmultisliderctrl.h b/linden/indra/llui/llmultisliderctrl.h index 90f43df..5e2d13c 100644 --- a/linden/indra/llui/llmultisliderctrl.h +++ b/linden/indra/llui/llmultisliderctrl.h | |||
@@ -81,7 +81,7 @@ public: | |||
81 | 81 | ||
82 | virtual void setValue(const LLSD& value ); | 82 | virtual void setValue(const LLSD& value ); |
83 | virtual LLSD getValue() const { return mMultiSlider->getValue(); } | 83 | virtual LLSD getValue() const { return mMultiSlider->getValue(); } |
84 | virtual BOOL setLabelArg( const LLString& key, const LLString& text ); | 84 | virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); |
85 | 85 | ||
86 | const LLString& getCurSlider() const { return mMultiSlider->getCurSlider(); } | 86 | const LLString& getCurSlider() const { return mMultiSlider->getCurSlider(); } |
87 | F32 getCurSliderValue() const { return mCurValue; } | 87 | F32 getCurSliderValue() const { return mCurValue; } |
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 9a3f1a2..567d29e 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -715,7 +715,17 @@ LLString LLPanel::getString(const LLString& name, const LLString::format_map_t& | |||
715 | formatted_string.setArgList(args); | 715 | formatted_string.setArgList(args); |
716 | return formatted_string.getString(); | 716 | return formatted_string.getString(); |
717 | } | 717 | } |
718 | llerrs << "Failed to find string " << name << " in panel " << getName() << llendl; | 718 | LLString err_str("Failed to find string " + name + " in panel " + getName()); |
719 | // *TODO: once the QAR-369 ui-cleanup work on settings is in we need to change the following line to be | ||
720 | //if(LLUI::sConfigGroup->getBOOL("QAMode")) | ||
721 | if(LLUI::sQAMode) | ||
722 | { | ||
723 | llerrs << err_str << llendl; | ||
724 | } | ||
725 | else | ||
726 | { | ||
727 | llwarns << err_str << llendl; | ||
728 | } | ||
719 | return LLString::null; | 729 | return LLString::null; |
720 | } | 730 | } |
721 | 731 | ||
diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index d512957..51b1527 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h | |||
@@ -89,7 +89,7 @@ public: | |||
89 | BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis) const; | 89 | BOOL needsToScroll(S32 x, S32 y, SCROLL_ORIENTATION axis) const; |
90 | 90 | ||
91 | // LLView functionality | 91 | // LLView functionality |
92 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent); | 92 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
93 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | 93 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); |
94 | virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); | 94 | virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); |
95 | virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, | 95 | virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, |
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index eee2bcf..01c37d9 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp | |||
@@ -842,6 +842,9 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r | |||
842 | return not_too_big; | 842 | return not_too_big; |
843 | } | 843 | } |
844 | 844 | ||
845 | // NOTE: This is *very* expensive for large lists, especially when we are dirtying the list every frame | ||
846 | // while receiving a long list of names. | ||
847 | // *TODO: Use bookkeeping to make this an incramental cost with item additions | ||
845 | void LLScrollListCtrl::calcColumnWidths() | 848 | void LLScrollListCtrl::calcColumnWidths() |
846 | { | 849 | { |
847 | const S32 HEADING_TEXT_PADDING = 30; | 850 | const S32 HEADING_TEXT_PADDING = 30; |
diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 07554b4..152bd05 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h | |||
@@ -64,7 +64,7 @@ public: | |||
64 | /*virtual*/ void setValue(const LLSD& value); | 64 | /*virtual*/ void setValue(const LLSD& value); |
65 | /*virtual*/ EWidgetType getWidgetType() const; | 65 | /*virtual*/ EWidgetType getWidgetType() const; |
66 | /*virtual*/ LLString getWidgetTag() const; | 66 | /*virtual*/ LLString getWidgetTag() const; |
67 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); | 67 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
68 | /*virtual*/ void draw(); | 68 | /*virtual*/ void draw(); |
69 | /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); | 69 | /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); |
70 | /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask ); | 70 | /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask ); |
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 82d9069..7943129 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h | |||
@@ -95,7 +95,7 @@ public: | |||
95 | virtual void onMouseCaptureLost(); | 95 | virtual void onMouseCaptureLost(); |
96 | 96 | ||
97 | // view overrides | 97 | // view overrides |
98 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent); | 98 | virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); |
99 | virtual void draw(); | 99 | virtual void draw(); |
100 | virtual void onFocusReceived(); | 100 | virtual void onFocusReceived(); |
101 | virtual void onFocusLost(); | 101 | virtual void onFocusLost(); |
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 5904573..ec8c94e 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp | |||
@@ -81,6 +81,7 @@ LLWindow* LLUI::sWindow = NULL; | |||
81 | LLHtmlHelp* LLUI::sHtmlHelp = NULL; | 81 | LLHtmlHelp* LLUI::sHtmlHelp = NULL; |
82 | BOOL LLUI::sShowXUINames = FALSE; | 82 | BOOL LLUI::sShowXUINames = FALSE; |
83 | std::stack<LLRect> LLScreenClipRect::sClipRectStack; | 83 | std::stack<LLRect> LLScreenClipRect::sClipRectStack; |
84 | BOOL LLUI::sQAMode = FALSE; | ||
84 | 85 | ||
85 | // | 86 | // |
86 | // Functions | 87 | // Functions |
@@ -1759,6 +1760,12 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help) | |||
1759 | LLUI::sHtmlHelp = html_help; | 1760 | LLUI::sHtmlHelp = html_help; |
1760 | } | 1761 | } |
1761 | 1762 | ||
1763 | //static | ||
1764 | void LLUI::setQAMode(BOOL b) | ||
1765 | { | ||
1766 | LLUI::sQAMode = b; | ||
1767 | } | ||
1768 | |||
1762 | LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled) | 1769 | LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST), mEnabled(enabled) |
1763 | { | 1770 | { |
1764 | if (mEnabled) | 1771 | if (mEnabled) |
diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index c419cb6..9e275a5 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h | |||
@@ -201,6 +201,12 @@ public: | |||
201 | static BOOL sShowXUINames; | 201 | static BOOL sShowXUINames; |
202 | static LLHtmlHelp* sHtmlHelp; | 202 | static LLHtmlHelp* sHtmlHelp; |
203 | 203 | ||
204 | // *TODO: remove the following when QAR-369 settings clean-up work is in. | ||
205 | // Also remove the call to this method which will then be obsolete. | ||
206 | // Search for QAR-369 below to enable the proper accessing of this feature. -MG | ||
207 | static void setQAMode(BOOL b); | ||
208 | static BOOL sQAMode; | ||
209 | |||
204 | }; | 210 | }; |
205 | 211 | ||
206 | // UI widgets | 212 | // UI widgets |
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index fbcb69e..e5415f8 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp | |||
@@ -633,13 +633,13 @@ void LLView::translate(S32 x, S32 y) | |||
633 | } | 633 | } |
634 | 634 | ||
635 | // virtual | 635 | // virtual |
636 | BOOL LLView::canSnapTo(const LLView* other_view) const | 636 | BOOL LLView::canSnapTo(const LLView* other_view) |
637 | { | 637 | { |
638 | return other_view != this && other_view->getVisible(); | 638 | return other_view != this && other_view->getVisible(); |
639 | } | 639 | } |
640 | 640 | ||
641 | // virtual | 641 | // virtual |
642 | void LLView::snappedTo(LLView* snap_view) | 642 | void LLView::snappedTo(const LLView* snap_view) |
643 | { | 643 | { |
644 | } | 644 | } |
645 | 645 | ||
diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h index 52c7e3d..51c314a 100644 --- a/linden/indra/llui/llview.h +++ b/linden/indra/llui/llview.h | |||
@@ -108,9 +108,9 @@ virtual void userSetShape(const LLRect& new_rect); | |||
108 | virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0); | 108 | virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0); |
109 | virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); | 109 | virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); |
110 | LLScrollListCtrl | 110 | LLScrollListCtrl |
111 | virtual BOOL canSnapTo(const LLView* other_view) const { return other_view != this && other_view->getVisible(); } | 111 | virtual BOOL canSnapTo(const LLView* other_view) { return other_view != this && other_view->getVisible(); } |
112 | LLFloater | 112 | LLFloater |
113 | virtual void snappedTo(LLView* snap_view) {} | 113 | virtual void snappedTo(const LLView* snap_view) {} |
114 | LLFloater | 114 | LLFloater |
115 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | 115 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); |
116 | * | 116 | * |
@@ -339,9 +339,9 @@ public: | |||
339 | virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0); | 339 | virtual LLView* findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0); |
340 | virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); | 340 | virtual LLView* findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); |
341 | 341 | ||
342 | virtual BOOL canSnapTo(const LLView* other_view) const; | 342 | virtual BOOL canSnapTo(const LLView* other_view); |
343 | 343 | ||
344 | virtual void snappedTo(LLView* snap_view); | 344 | virtual void snappedTo(const LLView* snap_view); |
345 | 345 | ||
346 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | 346 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); |
347 | virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); | 347 | virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); |