Temporary commit to re-enable moving of detached sidebars.
Will be replaced by work coming soon, work in progress.master
parent
883f354927
commit
79f2fac886
|
|
@ -40,6 +40,7 @@
|
|||
#include "llfocusmgr.h"
|
||||
#include "llrootview.h"
|
||||
#include "llnavigationbar.h"
|
||||
#include "llsidetraytab.h"
|
||||
|
||||
#include "llaccordionctrltab.h"
|
||||
|
||||
|
|
@ -89,69 +90,6 @@ bool LLSideTray::instanceCreated ()
|
|||
return sInstance!=0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLSideTrayTab
|
||||
// Represents a single tab in the side tray, only used by LLSideTray
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class LLSideTrayTab: public LLPanel
|
||||
{
|
||||
friend class LLUICtrlFactory;
|
||||
friend class LLSideTray;
|
||||
public:
|
||||
|
||||
struct Params
|
||||
: public LLInitParam::Block<Params, LLPanel::Params>
|
||||
{
|
||||
// image name
|
||||
Optional<std::string> image;
|
||||
Optional<std::string> image_selected;
|
||||
Optional<std::string> tab_title;
|
||||
Optional<std::string> description;
|
||||
Params()
|
||||
: image("image"),
|
||||
image_selected("image_selected"),
|
||||
tab_title("tab_title","no title"),
|
||||
description("description","no description")
|
||||
{};
|
||||
};
|
||||
protected:
|
||||
LLSideTrayTab(const Params& params);
|
||||
|
||||
void dock();
|
||||
void undock(LLFloater* floater_tab);
|
||||
|
||||
LLSideTray* getSideTray();
|
||||
|
||||
public:
|
||||
virtual ~LLSideTrayTab();
|
||||
|
||||
/*virtual*/ BOOL postBuild ();
|
||||
/*virtual*/ bool addChild (LLView* view, S32 tab_group);
|
||||
|
||||
|
||||
void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
|
||||
static LLSideTrayTab* createInstance ();
|
||||
|
||||
const std::string& getDescription () const { return mDescription;}
|
||||
const std::string& getTabTitle() const { return mTabTitle;}
|
||||
|
||||
void onOpen (const LLSD& key);
|
||||
|
||||
void toggleTabDocked();
|
||||
//-TT - Patch : MinimizeSidetabs
|
||||
void minimizeTab();
|
||||
//-TT
|
||||
LLPanel *getPanel();
|
||||
private:
|
||||
std::string mTabTitle;
|
||||
std::string mImage;
|
||||
std::string mImageSelected;
|
||||
std::string mDescription;
|
||||
|
||||
LLView* mMainPanel;
|
||||
};
|
||||
|
||||
LLSideTrayTab::LLSideTrayTab(const Params& p)
|
||||
: LLPanel(),
|
||||
|
|
@ -261,7 +199,7 @@ void LLSideTrayTab::minimizeTab()
|
|||
floater_tab->setMinimized(true);
|
||||
}
|
||||
}
|
||||
//-TT
|
||||
|
||||
|
||||
void LLSideTrayTab::toggleTabDocked()
|
||||
{
|
||||
|
|
@ -323,6 +261,7 @@ static void on_minimize(LLSidepanelAppearance* panel, LLSD minimized)
|
|||
|
||||
void LLSideTrayTab::undock(LLFloater* floater_tab)
|
||||
{
|
||||
|
||||
LLSideTray* side_tray = getSideTray();
|
||||
if (!side_tray) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/**
|
||||
* @file llsidetray.cpp
|
||||
* @brief SideBartray definition, broken out from llsidebar.cpp - Arrehn
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llsidetray.h"
|
||||
#include "llpanel.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// LLSideTrayTab
|
||||
// Represents a single tab in the side tray, only used by LLSideTray
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class llSideTray;
|
||||
|
||||
|
||||
class LLSideTrayTab: public LLPanel
|
||||
{
|
||||
friend class LLUICtrlFactory;
|
||||
friend class LLSideTray;
|
||||
|
||||
public:
|
||||
|
||||
struct Params
|
||||
: public LLInitParam::Block<Params, LLPanel::Params>
|
||||
{
|
||||
// image name
|
||||
Optional<std::string> image;
|
||||
Optional<std::string> image_selected;
|
||||
Optional<std::string> tab_title;
|
||||
Optional<std::string> description;
|
||||
Params()
|
||||
: image("image"),
|
||||
image_selected("image_selected"),
|
||||
tab_title("tab_title","no title"),
|
||||
description("description","no description")
|
||||
{};
|
||||
};
|
||||
protected:
|
||||
LLSideTrayTab(const Params& params);
|
||||
|
||||
void dock();
|
||||
void undock(LLFloater* floater_tab);
|
||||
|
||||
LLSideTray* getSideTray();
|
||||
|
||||
public:
|
||||
virtual ~LLSideTrayTab();
|
||||
|
||||
/*virtual*/ BOOL postBuild ();
|
||||
/*virtual*/ bool addChild (LLView* view, S32 tab_group);
|
||||
|
||||
|
||||
void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
|
||||
|
||||
static LLSideTrayTab* createInstance ();
|
||||
|
||||
const std::string& getDescription () const { return mDescription;}
|
||||
const std::string& getTabTitle() const { return mTabTitle;}
|
||||
|
||||
void onOpen (const LLSD& key);
|
||||
|
||||
void toggleTabDocked();
|
||||
//-TT - Patch : MinimizeSidetabs
|
||||
void minimizeTab();
|
||||
void setMinimized(BOOL b);
|
||||
|
||||
LLPanel *getPanel();
|
||||
private:
|
||||
std::string mTabTitle;
|
||||
std::string mImage;
|
||||
std::string mImageSelected;
|
||||
std::string mDescription;
|
||||
|
||||
LLView* mMainPanel;
|
||||
};
|
||||
|
|
@ -2,12 +2,11 @@
|
|||
<floater
|
||||
can_close="false"
|
||||
can_minimize="false"
|
||||
legacy_header_height="0"
|
||||
header_height="0"
|
||||
can_resize="true"
|
||||
min_width="333"
|
||||
min_height="440"
|
||||
min_width="100"
|
||||
min_height="100"
|
||||
save_rect="true"
|
||||
save_visibility="true"
|
||||
header_height="20"
|
||||
>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
<floater
|
||||
can_close="false"
|
||||
can_minimize="false"
|
||||
legacy_header_height="0"
|
||||
header_height="0"
|
||||
can_resize="true"
|
||||
min_width="333"
|
||||
min_height="440"
|
||||
min_width="100"
|
||||
min_height="100"
|
||||
save_rect="true"
|
||||
save_visibility="true"
|
||||
header_height="20"
|
||||
>
|
||||
</floater>
|
||||
|
|
|
|||
Loading…
Reference in New Issue