summaryrefslogtreecommitdiff
path: root/indra/newview/lltransientfloatermgr.h
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-22 15:18:08 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-22 15:18:08 -0800
commit9e0920df2c8ada63397ea6e439b02ee5b40d1bf6 (patch)
tree26f6af13d1dcd9d02c48bd7897b3604481f3734c /indra/newview/lltransientfloatermgr.h
parentb96e52b72ab598a57d981c850b5f14b1ac406325 (diff)
parent4cf79224d099c4fc8bdfd9617e95a776d5a028d4 (diff)
Merge from v2 trunk.
Diffstat (limited to 'indra/newview/lltransientfloatermgr.h')
-rw-r--r--indra/newview/lltransientfloatermgr.h47
1 files changed, 40 insertions, 7 deletions
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index cef6e1fe45..1f99325a7f 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -37,27 +37,60 @@
#include "llsingleton.h"
#include "llfloater.h"
+class LLTransientFloater;
/**
* Provides functionality to hide transient floaters.
*/
class LLTransientFloaterMgr: public LLSingleton<LLTransientFloaterMgr>
{
-public:
+protected:
LLTransientFloaterMgr();
- void registerTransientFloater(LLFloater* floater);
- void unregisterTransientFloater(LLFloater* floater);
+ friend class LLSingleton<LLTransientFloaterMgr>;
+
+public:
+ enum ETransientGroup
+ {
+ GLOBAL, IM
+ };
+
+ void registerTransientFloater(LLTransientFloater* floater);
+ void unregisterTransientFloater(LLTransientFloater* floater);
+ void addControlView(ETransientGroup group, LLView* view);
+ void removeControlView(ETransientGroup group, LLView* view);
void addControlView(LLView* view);
void removeControlView(LLView* view);
private:
- void hideTransientFloaters();
+ void hideTransientFloaters(S32 x, S32 y);
void leftMouseClickCallback(S32 x, S32 y, MASK mask);
-
+ bool isControlClicked(std::set<LLView*>& set, S32 x, S32 y);
private:
- std::set<LLFloater*> mTransSet;
+ std::set<LLTransientFloater*> mTransSet;
+
typedef std::set<LLView*> controls_set_t;
- controls_set_t mControlsSet;
+ typedef std::map<ETransientGroup, std::set<LLView*> > group_controls_t;
+ group_controls_t mGroupControls;
+};
+
+/**
+ * An abstract class declares transient floater interfaces.
+ */
+class LLTransientFloater
+{
+protected:
+ /**
+ * Class initialization method.
+ * Should be called from descendant constructor.
+ */
+ void init(LLFloater* thiz);
+public:
+ virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0;
+ bool isTransientDocked() { return mFloater->isDocked(); };
+ void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); }
+
+private:
+ LLFloater* mFloater;
};
#endif // LL_LLTRANSIENTFLOATERMGR_H