From df404c42d00b0048161a700d1e8ef30d5a0fbb0c Mon Sep 17 00:00:00 2001 From: Shyotl Date: Fri, 17 May 2013 16:46:40 -0500 Subject: [PATCH] Migrated baser LLStat* classes and their LLContainerView dependency to llui library and renamed LLScrollableContainerView to LLScrollContainer --- indra/llui/CMakeLists.txt | 8 +++ indra/{newview => llui}/llcontainerview.cpp | 5 +- indra/{newview => llui}/llcontainerview.h | 17 +++--- indra/llui/llscrollcontainer.cpp | 67 +++++++++++---------- indra/llui/llscrollcontainer.h | 8 +-- indra/{newview => llui}/llstatbar.cpp | 8 ++- indra/{newview => llui}/llstatbar.h | 1 - indra/{newview => llui}/llstatgraph.cpp | 7 ++- indra/{newview => llui}/llstatgraph.h | 0 indra/{newview => llui}/llstatview.cpp | 10 ++- indra/{newview => llui}/llstatview.h | 0 indra/llui/llui.cpp | 17 +++--- indra/llui/llui.h | 3 + indra/llui/llview.cpp | 2 +- indra/newview/CMakeLists.txt | 10 --- indra/newview/llfloatercustomize.cpp | 4 +- indra/newview/llfloatercustomize.h | 4 +- indra/newview/llfloatergesture.h | 2 +- indra/newview/llfloaterpermissionsmgr.cpp | 2 +- indra/newview/llfloaterpermissionsmgr.h | 4 +- indra/newview/llfloaterstats.cpp | 2 +- indra/newview/llfloaterstats.h | 4 +- indra/newview/llfloatertest.cpp | 2 +- indra/newview/llfolderview.cpp | 2 +- indra/newview/llfolderview.h | 6 +- indra/newview/llinventorypanel.cpp | 2 +- indra/newview/llinventorypanel.h | 6 +- indra/newview/llpanelobjectinventory.cpp | 2 +- indra/newview/llpanelobjectinventory.h | 4 +- indra/newview/llstartup.cpp | 1 - indra/newview/llviewerwindow.cpp | 1 + 31 files changed, 109 insertions(+), 102 deletions(-) rename indra/{newview => llui}/llcontainerview.cpp (98%) rename indra/{newview => llui}/llcontainerview.h (84%) rename indra/{newview => llui}/llstatbar.cpp (97%) rename indra/{newview => llui}/llstatbar.h (98%) rename indra/{newview => llui}/llstatgraph.cpp (94%) rename indra/{newview => llui}/llstatgraph.h (100%) rename indra/{newview => llui}/llstatview.cpp (93%) rename indra/{newview => llui}/llstatview.h (100%) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 8878c2a1f..54ebcb504 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -29,6 +29,7 @@ set(llui_SOURCE_FILES llcheckboxctrl.cpp llclipboard.cpp llcombobox.cpp + llcontainerview.cpp llctrlselectioninterface.cpp lldraghandle.cpp lleditmenuhandler.cpp @@ -62,6 +63,9 @@ set(llui_SOURCE_FILES llslider.cpp llsliderctrl.cpp llspinctrl.cpp + llstatbar.cpp + llstatgraph.cpp + llstatview.cpp llstyle.cpp lltabcontainer.cpp lltextbox.cpp @@ -90,6 +94,7 @@ set(llui_HEADER_FILES llcheckboxctrl.h llclipboard.h llcombobox.h + llcontainerview.h llctrlselectioninterface.h lldraghandle.h lleditmenuhandler.h @@ -127,6 +132,9 @@ set(llui_HEADER_FILES llslider.h llsliderctrl.h llspinctrl.h + llstatbar.h + llstatgraph.h + llstatview.h llstyle.h lltabcontainer.h lltextbox.h diff --git a/indra/newview/llcontainerview.cpp b/indra/llui/llcontainerview.cpp similarity index 98% rename from indra/newview/llcontainerview.cpp rename to indra/llui/llcontainerview.cpp index 0ccbd26ec..04ede8942 100644 --- a/indra/newview/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -30,7 +30,7 @@ * $/LicenseInfo$ */ -#include "llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llcontainerview.h" @@ -41,6 +41,7 @@ #include "llresmgr.h" #include "llstring.h" #include "llscrollcontainer.h" +#include "lluictrlfactory.h" LLContainerView::LLContainerView(const LLContainerView::Params& p) : LLView(p), @@ -287,7 +288,7 @@ void LLContainerView::setDisplayChildren(const BOOL displayChildren) } } -void LLContainerView::setScrollContainer(LLScrollableContainerView* scroll) +void LLContainerView::setScrollContainer(LLScrollContainer* scroll) { mScrollContainer = scroll; scroll->setPassBackToChildren(false); diff --git a/indra/newview/llcontainerview.h b/indra/llui/llcontainerview.h similarity index 84% rename from indra/newview/llcontainerview.h rename to indra/llui/llcontainerview.h index 39c4c83e6..be340581d 100644 --- a/indra/newview/llcontainerview.h +++ b/indra/llui/llcontainerview.h @@ -36,8 +36,9 @@ #include "stdtypes.h" #include "lltextbox.h" #include "llstatbar.h" +#include "llview.h" -class LLScrollableContainerView; +class LLScrollContainer; class LLContainerView : public LLView { @@ -62,21 +63,21 @@ public: ~LLContainerView(); /*virtual*/ BOOL postBuild(); - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); - virtual void draw(); - virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - virtual LLRect getRequiredRect(); // Return the height of this object, given the set options. + /*virtual*/ void draw(); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. void setLabel(const std::string& label); void showLabel(BOOL show) { mShowLabel = show; } void setDisplayChildren(const BOOL displayChildren); BOOL getDisplayChildren() { return mDisplayChildren; } - void setScrollContainer(LLScrollableContainerView* scroll); + void setScrollContainer(LLScrollContainer* scroll); private: - LLScrollableContainerView* mScrollContainer; + LLScrollContainer* mScrollContainer; void arrange(S32 width, S32 height, BOOL called_from_parent = TRUE); BOOL mShowLabel; diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 6132ec9f4..f8998e40a 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -1,6 +1,6 @@ /** * @file llscrollcontainer.cpp - * @brief LLScrollableContainerView base class + * @brief LLScrollContainer base class * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -33,8 +33,10 @@ #include "linden_common.h" -#include "llrender.h" #include "llscrollcontainer.h" + +#include "llrender.h" +#include "llcontainerview.h" #include "lllocalcliprect.h" #include "llscrollbar.h" #include "llui.h" @@ -44,6 +46,7 @@ #include "llfocusmgr.h" #include "llframetimer.h" #include "lluictrlfactory.h" +#include "llpanel.h" #include "llfontgl.h" ///---------------------------------------------------------------------------- @@ -57,13 +60,13 @@ static const F32 MAX_AUTO_SCROLL_RATE = 500.f; static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f; ///---------------------------------------------------------------------------- -/// Class LLScrollableContainerView +/// Class LLScrollContainer ///---------------------------------------------------------------------------- -static LLRegisterWidget r("scroll_container"); +static LLRegisterWidget r("scroll_container"); // Default constructor -LLScrollableContainerView::LLScrollableContainerView( const std::string& name, +LLScrollContainer::LLScrollContainer( const std::string& name, const LLRect& rect, LLView* scrolled_view, BOOL is_opaque, @@ -128,7 +131,7 @@ LLScrollableContainerView::LLScrollableContainerView( const std::string& name, } // Destroys the object -LLScrollableContainerView::~LLScrollableContainerView( void ) +LLScrollContainer::~LLScrollContainer( void ) { // mScrolledView and mScrollbar are child views, so the LLView // destructor takes care of memory deallocation. @@ -141,9 +144,9 @@ LLScrollableContainerView::~LLScrollableContainerView( void ) // internal scrollbar handlers // virtual -void LLScrollableContainerView::scrollHorizontal( S32 new_pos ) +void LLScrollContainer::scrollHorizontal( S32 new_pos ) { - //llinfos << "LLScrollableContainerView::scrollHorizontal()" << llendl; + //llinfos << "LLScrollContainer::scrollHorizontal()" << llendl; if( mScrolledView ) { LLRect doc_rect = mScrolledView->getRect(); @@ -153,9 +156,9 @@ void LLScrollableContainerView::scrollHorizontal( S32 new_pos ) } // virtual -void LLScrollableContainerView::scrollVertical( S32 new_pos ) +void LLScrollContainer::scrollVertical( S32 new_pos ) { - // llinfos << "LLScrollableContainerView::scrollVertical() " << new_pos << llendl; + // llinfos << "LLScrollContainer::scrollVertical() " << new_pos << llendl; if( mScrolledView ) { LLRect doc_rect = mScrolledView->getRect(); @@ -165,7 +168,7 @@ void LLScrollableContainerView::scrollVertical( S32 new_pos ) } // LLView functionality -void LLScrollableContainerView::reshape(S32 width, S32 height, +void LLScrollContainer::reshape(S32 width, S32 height, BOOL called_from_parent) { LLUICtrl::reshape( width, height, called_from_parent ); @@ -192,7 +195,7 @@ void LLScrollableContainerView::reshape(S32 width, S32 height, } } -BOOL LLScrollableContainerView::handleKeyHere(KEY key, MASK mask) +BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask) { // allow scrolled view to handle keystrokes in case it delegated keyboard focus // to the scroll container. @@ -215,7 +218,7 @@ BOOL LLScrollableContainerView::handleKeyHere(KEY key, MASK mask) return FALSE; } -BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) +BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks ) { // Give event to my child views - they may have scroll bars // (Bad UI design, but technically possible.) @@ -252,7 +255,7 @@ BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) return FALSE; } -BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, +BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -273,7 +276,7 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask, return TRUE; } -bool LLScrollableContainerView::autoScroll(S32 x, S32 y) +bool LLScrollContainer::autoScroll(S32 x, S32 y) { S32 scrollbar_size = SCROLLBAR_SIZE; @@ -346,7 +349,7 @@ bool LLScrollableContainerView::autoScroll(S32 x, S32 y) } -BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect) +BOOL LLScrollContainer::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect) { S32 local_x, local_y; for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) @@ -373,7 +376,7 @@ BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, std::string& msg, LL return TRUE; } -void LLScrollableContainerView::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const +void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const { const LLRect& doc_rect = getScrolledViewRect(); S32 scrollbar_size = SCROLLBAR_SIZE; @@ -410,7 +413,7 @@ void LLScrollableContainerView::calcVisibleSize( S32 *visible_width, S32 *visibl } } -void LLScrollableContainerView::draw() +void LLScrollContainer::draw() { S32 scrollbar_size = SCROLLBAR_SIZE; if (mAutoScrolling) @@ -503,7 +506,7 @@ void LLScrollableContainerView::draw() } // end draw -bool LLScrollableContainerView::addChild(LLView* view, S32 tab_group) +bool LLScrollContainer::addChild(LLView* view, S32 tab_group) { if (!mScrolledView) { @@ -520,7 +523,7 @@ bool LLScrollableContainerView::addChild(LLView* view, S32 tab_group) return ret_val; } -void LLScrollableContainerView::updateScroll() +void LLScrollContainer::updateScroll() { if (!mScrolledView) { @@ -607,7 +610,7 @@ void LLScrollableContainerView::updateScroll() mScrollbar[VERTICAL]->setPageSize( visible_height ); } // end updateScroll -void LLScrollableContainerView::setBorderVisible(BOOL b) +void LLScrollContainer::setBorderVisible(BOOL b) { mBorder->setVisible( b ); // Recompute inner rect, as border visibility changes it @@ -615,7 +618,7 @@ void LLScrollableContainerView::setBorderVisible(BOOL b) mInnerRect.stretch( -getBorderWidth() ); } -LLRect LLScrollableContainerView::getVisibleContentRect() +LLRect LLScrollContainer::getVisibleContentRect() { updateScroll(); LLRect visible_rect = getContentWindowRect(); @@ -623,7 +626,7 @@ LLRect LLScrollableContainerView::getVisibleContentRect() visible_rect.translate(-contents_rect.mLeft, -contents_rect.mBottom); return visible_rect; } -LLRect LLScrollableContainerView::getContentWindowRect() +LLRect LLScrollContainer::getContentWindowRect() { updateScroll(); LLRect scroller_view_rect; @@ -641,7 +644,7 @@ LLRect LLScrollableContainerView::getContentWindowRect() } // rect is in document coordinates, constraint is in display coordinates relative to content window rect -void LLScrollableContainerView::scrollToShowRect(const LLRect& rect, const LLRect& constraint) +void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& constraint) { if (!mScrolledView) { @@ -692,31 +695,31 @@ void LLScrollableContainerView::scrollToShowRect(const LLRect& rect, const LLRec notifyParent(LLSD().with("scrollToShowRect",screen_rc.getValue())); } -void LLScrollableContainerView::pageUp(S32 overlap) +void LLScrollContainer::pageUp(S32 overlap) { mScrollbar[VERTICAL]->pageUp(overlap); updateScroll(); } -void LLScrollableContainerView::pageDown(S32 overlap) +void LLScrollContainer::pageDown(S32 overlap) { mScrollbar[VERTICAL]->pageDown(overlap); updateScroll(); } -void LLScrollableContainerView::goToTop() +void LLScrollContainer::goToTop() { mScrollbar[VERTICAL]->setDocPos(0); updateScroll(); } -void LLScrollableContainerView::goToBottom() +void LLScrollContainer::goToBottom() { mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocSize()); updateScroll(); } -S32 LLScrollableContainerView::getBorderWidth() const +S32 LLScrollContainer::getBorderWidth() const { if (mBorder && mBorder->getVisible()) { @@ -727,7 +730,7 @@ S32 LLScrollableContainerView::getBorderWidth() const } // virtual -LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const +LLXMLNodePtr LLScrollContainer::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); @@ -751,7 +754,7 @@ LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const return node; } -LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) +LLView* LLScrollContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { std::string name("scroll_container"); node->getAttributeString("name", name); @@ -766,7 +769,7 @@ LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LL LLUICtrlFactory::getAttributeColor(node,"color", color); // Create the scroll view - LLScrollableContainerView *ret = new LLScrollableContainerView(name, rect, (LLPanel*)NULL, opaque, color); + LLScrollContainer *ret = new LLScrollContainer(name, rect, (LLPanel*)NULL, opaque, color); LLPanel* panelp = NULL; diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h index 2e1cf1dd3..8239789b3 100644 --- a/indra/llui/llscrollcontainer.h +++ b/indra/llui/llscrollcontainer.h @@ -1,6 +1,6 @@ /** * @file llscrollcontainer.h - * @brief LLScrollableContainerView class header file. + * @brief LLScrollContainer class header file. * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -53,17 +53,17 @@ class LLUICtrlFactory; * the width and height of the view you're scrolling. * *****************************************************************************/ -class LLScrollableContainerView : public LLUICtrl +class LLScrollContainer : public LLUICtrl { public: // Note: vertical comes before horizontal because vertical // scrollbars have priority for mouse and keyboard events. enum SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT }; - LLScrollableContainerView( const std::string& name, const LLRect& rect, + LLScrollContainer( const std::string& name, const LLRect& rect, LLView* scrolled_view, BOOL is_opaque = FALSE, const LLColor4& bg_color = LLColor4(0,0,0,0) ); - virtual ~LLScrollableContainerView( void ); + virtual ~LLScrollContainer( void ); void setScrolledView(LLView* view) { mScrolledView = view; } diff --git a/indra/newview/llstatbar.cpp b/indra/llui/llstatbar.cpp similarity index 97% rename from indra/newview/llstatbar.cpp rename to indra/llui/llstatbar.cpp index 86a790bd6..9b4a98f93 100644 --- a/indra/newview/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -30,7 +30,8 @@ * $/LicenseInfo$ */ -#include "llviewerprecompiledheaders.h" +//#include "llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llstatbar.h" @@ -40,6 +41,7 @@ #include "llfontgl.h" #include "llstat.h" +#include "lluictrlfactory.h" /////////////////////////////////////////////////////////////////////////////////// @@ -63,7 +65,7 @@ LLStatBar::LLStatBar(const std::string& name, const LLRect& rect, const std::str S32 mode = -1; if (mSetting.length() > 0) { - mode = gSavedSettings.getS32(mSetting); + mode = LLUI::sConfigGroup->getS32(mSetting); } @@ -114,7 +116,7 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) mode |= STAT_HISTORY_FLAG; } - gSavedSettings.setS32(mSetting, mode); + LLUI::sConfigGroup->setS32(mSetting, mode); } diff --git a/indra/newview/llstatbar.h b/indra/llui/llstatbar.h similarity index 98% rename from indra/newview/llstatbar.h rename to indra/llui/llstatbar.h index 381cd1eaf..53640af2b 100644 --- a/indra/newview/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -35,7 +35,6 @@ #include "llview.h" #include "llframetimer.h" -#include "llviewercontrol.h" class LLStat; diff --git a/indra/newview/llstatgraph.cpp b/indra/llui/llstatgraph.cpp similarity index 94% rename from indra/newview/llstatgraph.cpp rename to indra/llui/llstatgraph.cpp index 1249e71b1..2e3be1803 100644 --- a/indra/newview/llstatgraph.cpp +++ b/indra/llui/llstatgraph.cpp @@ -30,7 +30,8 @@ * $/LicenseInfo$ */ -#include "llviewerprecompiledheaders.h" +//#include "llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llstatgraph.h" #include "llrender.h" @@ -40,7 +41,7 @@ #include "llstat.h" #include "llgl.h" #include "llglheaders.h" -#include "llviewercontrol.h" +//#include "llviewercontrol.h" /////////////////////////////////////////////////////////////////////////////////// @@ -109,7 +110,7 @@ void LLStatGraph::draw() // gColors.getColor("ColorDropShadow"), // (S32) gSavedSettings.getF32("DropShadowFloater") ); - static const LLCachedControl menu_default_color(gColors,"MenuDefaultBgColor",LLColor4(0.f,0.f,0.f,1.f)); + static const LLCachedControl menu_default_color(*LLUI::sColorsGroup,"MenuDefaultBgColor",LLColor4(0.f,0.f,0.f,1.f)); color = menu_default_color; gGL.color4fv(color.mV); gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, TRUE); diff --git a/indra/newview/llstatgraph.h b/indra/llui/llstatgraph.h similarity index 100% rename from indra/newview/llstatgraph.h rename to indra/llui/llstatgraph.h diff --git a/indra/newview/llstatview.cpp b/indra/llui/llstatview.cpp similarity index 93% rename from indra/newview/llstatview.cpp rename to indra/llui/llstatview.cpp index 013dfcf4f..9cd5ceb7e 100644 --- a/indra/newview/llstatview.cpp +++ b/indra/llui/llstatview.cpp @@ -30,7 +30,7 @@ * $/LicenseInfo$ */ -#include "llviewerprecompiledheaders.h" +#include "linden_common.h" #include "llstatview.h" @@ -39,11 +39,9 @@ #include "llfontgl.h" #include "llgl.h" #include "llui.h" +#include "lluictrlfactory.h" #include "llstatbar.h" -#include "llviewercontrol.h" - -#include "lluictrlfactory.h" LLStatView::LLStatView(const LLStatView::Params& p) : LLContainerView(p), @@ -53,7 +51,7 @@ LLStatView::LLStatView(const LLStatView::Params& p) BOOL isopen = getDisplayChildren(); if (mSetting.length() > 0) { - isopen = gSavedSettings.getBOOL(mSetting); + isopen = LLUI::sConfigGroup->getBOOL(mSetting); } setDisplayChildren(isopen); } @@ -64,7 +62,7 @@ LLStatView::~LLStatView() if (mSetting.length() > 0) { BOOL isopen = getDisplayChildren(); - gSavedSettings.setBOOL(mSetting, isopen); /* Flawfinder: ignore */ + LLUI::sConfigGroup->setBOOL(mSetting, isopen); /* Flawfinder: ignore */ } } diff --git a/indra/newview/llstatview.h b/indra/llui/llstatview.h similarity index 100% rename from indra/newview/llstatview.h rename to indra/llui/llstatview.h diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 24e57f790..056a21a6c 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -60,14 +60,15 @@ BOOL gShowTextEditCursor = TRUE; std::map gTranslation; std::list gUntranslated; -LLControlGroup* LLUI::sConfigGroup = NULL; -LLControlGroup* LLUI::sIgnoresGroup = NULL; -LLControlGroup* LLUI::sColorsGroup = NULL; -LLUIAudioCallback LLUI::sAudioCallback = NULL; -LLWindow* LLUI::sWindow = NULL; -LLHtmlHelp* LLUI::sHtmlHelp = NULL; -BOOL LLUI::sShowXUINames = FALSE; -BOOL LLUI::sQAMode = FALSE; +/*static*/ LLControlGroup* LLUI::sConfigGroup = NULL; +/*static*/ LLControlGroup* LLUI::sIgnoresGroup = NULL; +/*static*/ LLControlGroup* LLUI::sColorsGroup = NULL; +/*static*/ LLUIAudioCallback LLUI::sAudioCallback = NULL; +/*static*/ LLWindow* LLUI::sWindow = NULL; +/*static*/ LLView* LLUI::sRootView = NULL; +/*static*/ LLHtmlHelp* LLUI::sHtmlHelp = NULL; +/*static*/ BOOL LLUI::sShowXUINames = FALSE; +/*static*/ BOOL LLUI::sQAMode = FALSE; // // Functions diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 3123092f9..a24159e2c 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -80,6 +80,8 @@ public: static std::string getLanguage(); //helper functions (should probably move free standing rendering helper functions here) + static LLView* getRootView() { return sRootView; } + static void setRootView(LLView* view) { sRootView = view; } static std::string locateSkin(const std::string& filename); static void setMousePositionScreen(S32 x, S32 y); static void getMousePositionScreen(S32 *x, S32 *y); @@ -107,6 +109,7 @@ public: static LLControlGroup* sColorsGroup; static LLUIAudioCallback sAudioCallback; static LLWindow* sWindow; + static LLView* sRootView; static BOOL sShowXUINames; static LLHtmlHelp* sHtmlHelp; diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 129ecd695..7b6202a79 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1164,7 +1164,7 @@ void LLView::drawChildren() }*/ if (!mChildList.empty()) { - LLView* rootp = getRootView(); + LLView* rootp = LLUI::getRootView(); ++sDepth; for (child_list_const_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend(); ++child_iter) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f3cc6d444..28611bdb6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -135,7 +135,6 @@ set(viewer_SOURCE_FILES llcompilequeue.cpp llconfirmationmanager.cpp llconsole.cpp - llcontainerview.cpp llcurrencyuimanager.cpp llcylinder.cpp lldaycyclemanager.cpp @@ -417,12 +416,8 @@ set(viewer_SOURCE_FILES llsky.cpp llspatialpartition.cpp llsprite.cpp - llsrv.cpp llstartup.cpp - llstatbar.cpp - llstatgraph.cpp llstatusbar.cpp - llstatview.cpp llstylemap.cpp llsurface.cpp llsurfacepatch.cpp @@ -639,7 +634,6 @@ set(viewer_HEADER_FILES llcompilequeue.h llconfirmationmanager.h llconsole.h - llcontainerview.h llcurrencyuimanager.h llcylinder.h lldaycyclemanager.h @@ -923,12 +917,8 @@ set(viewer_HEADER_FILES llsky.h llspatialpartition.h llsprite.h - llsrv.h llstartup.h - llstatbar.h - llstatgraph.h llstatusbar.h - llstatview.h llstylemap.h llsurface.h llsurfacepatch.h diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 0c3046680..b29558af3 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -558,8 +558,8 @@ const S32 HEADER_HEIGHT = 3 * (LINE_HEIGHT + LLFLOATER_VPAD) + (2 * LLPANEL_BORD void LLFloaterCustomize::initScrollingPanelList() { - LLScrollableContainerView* scroll_container = - getChild("panel_container"); + LLScrollContainer* scroll_container = + getChild("panel_container"); // LLScrollingPanelList's do not import correctly // mScrollingPanelList = LLUICtrlFactory::getScrollingPanelList(this, "panel_list"); mScrollingPanelList = new LLScrollingPanelList(std::string("panel_list"), LLRect()); diff --git a/indra/newview/llfloatercustomize.h b/indra/newview/llfloatercustomize.h index 39bc8ec67..34eee55fe 100644 --- a/indra/newview/llfloatercustomize.h +++ b/indra/newview/llfloatercustomize.h @@ -54,7 +54,7 @@ class LLJoint; class LLLineEditor; class LLMakeOutfitDialog; class LLRadioGroup; -class LLScrollableContainerView; +class LLScrollContainer; class LLScrollingPanelList; class LLTabContainer; class LLTextBox; @@ -142,7 +142,7 @@ private: LLWearableType::EType mCurrentWearableType; LLScrollingPanelList* mScrollingPanelList; - LLScrollableContainerView* mScrollContainer; + LLScrollContainer* mScrollContainer; LLPointer mResetParams; LLInventoryObserver* mInventoryObserver; diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 487990a43..0ded59467 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -41,7 +41,7 @@ #include "lldarray.h" -class LLScrollableContainerView; +class LLScrollContainer; class LLView; class LLButton; class LLLineEditor; diff --git a/indra/newview/llfloaterpermissionsmgr.cpp b/indra/newview/llfloaterpermissionsmgr.cpp index c7d867c70..14025ff72 100644 --- a/indra/newview/llfloaterpermissionsmgr.cpp +++ b/indra/newview/llfloaterpermissionsmgr.cpp @@ -81,7 +81,7 @@ LLFloaterPermissionsMgr::LLFloaterPermissionsMgr() : LLRect scrollable_container_rect(0, y, getRect().getWidth(), 0); LLRect permissions_rect(0, 0, getRect().getWidth() - HPAD - HPAD, 0); mPermissions = new LLPermissionsView(permissions_rect); - mScroller = new LLScrollableContainerView( + mScroller = new LLScrollContainer( std::string("permissions container"), scrollable_container_rect, mPermissions diff --git a/indra/newview/llfloaterpermissionsmgr.h b/indra/newview/llfloaterpermissionsmgr.h index 7ebe409d3..ac933e3f1 100644 --- a/indra/newview/llfloaterpermissionsmgr.h +++ b/indra/newview/llfloaterpermissionsmgr.h @@ -36,7 +36,7 @@ #include "llfloater.h" #include -class LLScrollableContainerView; +class LLScrollContainer; class LLPermissionsView; class LLFloaterPermissionsMgr @@ -59,7 +59,7 @@ public: LLPermissionsView* mPermissions; protected: - LLScrollableContainerView* mScroller; + LLScrollContainer* mScroller; static LLFloaterPermissionsMgr* sInstance; }; diff --git a/indra/newview/llfloaterstats.cpp b/indra/newview/llfloaterstats.cpp index 1c5cb40ea..eac963a3f 100644 --- a/indra/newview/llfloaterstats.cpp +++ b/indra/newview/llfloaterstats.cpp @@ -728,7 +728,7 @@ LLFloaterStats::LLFloaterStats(const LLSD& val) LLRect scroll_rect(LL_SCROLL_BORDER, getRect().getHeight() - LLFLOATER_HEADER_SIZE - LL_SCROLL_BORDER, getRect().getWidth() - LL_SCROLL_BORDER, LL_SCROLL_BORDER); - mScrollContainer = new LLScrollableContainerView(std::string("statistics_scroll"), scroll_rect, mStatsContainer); + mScrollContainer = new LLScrollContainer(std::string("statistics_scroll"), scroll_rect, mStatsContainer); mScrollContainer->setFollowsAll(); mScrollContainer->setReserveScrollCorner(TRUE); diff --git a/indra/newview/llfloaterstats.h b/indra/newview/llfloaterstats.h index 64721bda1..f1f5f04a5 100644 --- a/indra/newview/llfloaterstats.h +++ b/indra/newview/llfloaterstats.h @@ -38,7 +38,7 @@ class LLContainerView; class LLStatView; -class LLScrollableContainerView; +class LLScrollContainer; class LLFloaterStats : public LLFloater, @@ -58,7 +58,7 @@ class LLFloaterStats private: void buildStats(); LLContainerView* mStatsContainer; - LLScrollableContainerView* mScrollContainer; + LLScrollContainer* mScrollContainer; }; #endif diff --git a/indra/newview/llfloatertest.cpp b/indra/newview/llfloatertest.cpp index 4582280b0..22628dc09 100644 --- a/indra/newview/llfloatertest.cpp +++ b/indra/newview/llfloatertest.cpp @@ -83,7 +83,7 @@ private: LLRadioGroup* mRadioGroup; LLRadioCtrl* mRadio1; LLRadioCtrl* mRadio2; - LLScrollableContainerView* mScroll; + LLScrollContainer* mScroll; LLScrollListCtrl* mScrollList; LLTabContainer* mTab; LLTextEditor* mTextEditor; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6d484c816..4b6142a39 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2062,7 +2062,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr } } -void LLFolderView::setScrollContainer(LLScrollableContainerView* parent) +void LLFolderView::setScrollContainer(LLScrollContainer* parent) { mScrollContainer = parent; parent->setPassBackToChildren(false); diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index eb7956633..f441e8995 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -60,7 +60,7 @@ class LLInventoryModel; class LLPanel; class LLLineEditor; class LLMenuGL; -class LLScrollableContainerView; +class LLScrollContainer; class LLUICtrl; class LLTextBox; @@ -217,7 +217,7 @@ public: void scrollToShowSelection(); void scrollToShowItem(LLFolderViewItem* item, const LLRect& constraint_rect); - void setScrollContainer(LLScrollableContainerView* parent); + void setScrollContainer(LLScrollContainer* parent); LLRect getVisibleRect(); BOOL search(LLFolderViewItem* first_item, const std::string &search_string, BOOL backward); @@ -258,7 +258,7 @@ private: void updateRenamerPosition(); protected: - LLScrollableContainerView* mScrollContainer; // NULL if this is not a child of a scroll container. + LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container. void commitRename( ); void onRenamerLost(); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 1503e9402..1a15523cc 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -201,7 +201,7 @@ BOOL LLInventoryPanel::postBuild() // scroller LLRect scroller_view_rect = getRect(); scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); - mScroller = new LLScrollableContainerView(std::string("Inventory Scroller"), + mScroller = new LLScrollContainer(std::string("Inventory Scroller"), scroller_view_rect, mFolderRoot); mScroller->setFollowsAll(); diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 9aff00059..e3d3c54f9 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -57,7 +57,7 @@ class LLInventoryFVBridgeBuilder; class LLMenuBarGL; class LLCheckBoxCtrl; class LLSpinCtrl; -class LLScrollableContainerView; +class LLScrollContainer; class LLTextBox; class LLIconCtrl; class LLSaveFolderState; @@ -126,7 +126,7 @@ public: // This method is called when something has changed about the inventory. void modelChanged(U32 mask); LLFolderView* getRootFolder(); - LLScrollableContainerView* getScrollableContainer() { return mScroller; } + LLScrollContainer* getScrollableContainer() { return mScroller; } void onSelectionChange(const std::deque &items, BOOL user_action); @@ -164,7 +164,7 @@ protected: BOOL mAllowMultiSelect; LLFolderView* mFolderRoot; - LLScrollableContainerView* mScroller; + LLScrollContainer* mScroller; /** * Pointer to LLInventoryFVBridgeBuilder. diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 41563bfc1..53ca90be4 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1629,7 +1629,7 @@ void LLPanelObjectInventory::reset() mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); LLRect scroller_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - mScroller = new LLScrollableContainerView(std::string("task inventory scroller"), scroller_rect, mFolders ); + mScroller = new LLScrollContainer(std::string("task inventory scroller"), scroller_rect, mFolders ); mScroller->setFollowsAll(); addChild(mScroller); diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 74a8ff7d3..736900c76 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -32,7 +32,7 @@ #include "llinventory.h" -class LLScrollableContainerView; +class LLScrollContainer; class LLFolderView; class LLFolderViewFolder; class LLViewerObject; @@ -81,7 +81,7 @@ protected: void clearContents(); private: - LLScrollableContainerView* mScroller; + LLScrollContainer* mScroller; LLFolderView* mFolders; LLUUID mTaskUUID; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index f0919f372..66718b34d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -157,7 +157,6 @@ #include "llsecondlifeurls.h" #include "llselectmgr.h" #include "llsky.h" -#include "llsrv.h" #include "llstatview.h" #include "llstatusbar.h" // sendMoneyBalanceRequest(), owns L$ balance #include "llsurface.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8feb609de..58d34766b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1662,6 +1662,7 @@ LLViewerWindow::LLViewerWindow( rvp.mouse_opaque(false); rvp.follows.flags(FOLLOWS_NONE); mRootView = LLUICtrlFactory::create(rvp); + LLUI::setRootView(mRootView); // Make avatar head look forward at start mCurrentMousePoint.mX = getWindowWidthScaled() / 2;