PageRenderTime 28ms CodeModel.GetById 10ms app.highlight 14ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llui/llmultifloater.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 101 lines | 51 code | 22 blank | 28 comment | 1 complexity | dcd28734a254f834d23cd6b21af8ba5f MD5 | raw file
  1/** 
  2 * @file llmultifloater.h
  3 * @brief LLFloater that hosts other floaters
  4 *
  5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
  6 * Second Life Viewer Source Code
  7 * Copyright (C) 2010, Linden Research, Inc.
  8 * 
  9 * This library is free software; you can redistribute it and/or
 10 * modify it under the terms of the GNU Lesser General Public
 11 * License as published by the Free Software Foundation;
 12 * version 2.1 of the License only.
 13 * 
 14 * This library is distributed in the hope that it will be useful,
 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 17 * Lesser General Public License for more details.
 18 * 
 19 * You should have received a copy of the GNU Lesser General Public
 20 * License along with this library; if not, write to the Free Software
 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 22 * 
 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 24 * $/LicenseInfo$
 25 */
 26
 27// Floating "windows" within the GL display, like the inventory floater,
 28// mini-map floater, etc.
 29
 30
 31#ifndef LL_MULTI_FLOATER_H
 32#define LL_MULTI_FLOATER_H
 33
 34#include "llfloater.h"
 35#include "lltabcontainer.h" // for LLTabContainer::eInsertionPoint
 36
 37// https://wiki.lindenlab.com/mediawiki/index.php?title=LLMultiFloater&oldid=81376
 38class LLMultiFloater : public LLFloater
 39{
 40public:
 41	LLMultiFloater(const LLSD& key, const Params& params = getDefaultParams());
 42	virtual ~LLMultiFloater() {};
 43	
 44	void buildTabContainer();
 45	
 46	virtual BOOL postBuild();
 47	/*virtual*/ void onOpen(const LLSD& key);
 48	/*virtual*/ void draw();
 49	/*virtual*/ void setVisible(BOOL visible);
 50	/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
 51	/*virtual*/ bool addChild(LLView* view, S32 tab_group = 0);
 52
 53	virtual void setCanResize(BOOL can_resize);
 54	virtual void growToFit(S32 content_width, S32 content_height);
 55	virtual void addFloater(LLFloater* floaterp, BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
 56
 57	virtual void showFloater(LLFloater* floaterp, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
 58	virtual void removeFloater(LLFloater* floaterp);
 59
 60	virtual void tabOpen(LLFloater* opened_floater, bool from_click);
 61	virtual void tabClose();
 62
 63	virtual BOOL selectFloater(LLFloater* floaterp);
 64	virtual void selectNextFloater();
 65	virtual void selectPrevFloater();
 66
 67	virtual LLFloater*	getActiveFloater();
 68	virtual BOOL		isFloaterFlashing(LLFloater* floaterp);
 69	virtual S32			getFloaterCount();
 70
 71	virtual void setFloaterFlashing(LLFloater* floaterp, BOOL flashing);
 72	virtual BOOL closeAllFloaters();	//Returns FALSE if the floater could not be closed due to pending confirmation dialogs
 73	void setTabContainer(LLTabContainer* tab_container) { if (!mTabContainer) mTabContainer = tab_container; }
 74	void onTabSelected();
 75
 76	virtual void updateResizeLimits();
 77	virtual void updateFloaterTitle(LLFloater* floaterp);
 78
 79protected:
 80	struct LLFloaterData
 81	{
 82		S32		mWidth;
 83		S32		mHeight;
 84		BOOL	mCanMinimize;
 85		BOOL	mCanResize;
 86	};
 87
 88	LLTabContainer*		mTabContainer;
 89	
 90	typedef std::map<LLHandle<LLFloater>, LLFloaterData> floater_data_map_t;
 91	floater_data_map_t	mFloaterDataMap;
 92	
 93	LLTabContainer::TabPosition mTabPos;
 94	BOOL				mAutoResize;
 95	S32					mOrigMinWidth, mOrigMinHeight;  // logically const but initialized late
 96};
 97
 98#endif  // LL_MULTI_FLOATER_H
 99
100
101