summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.h
diff options
context:
space:
mode:
authorcallum <none@none>2011-10-28 11:01:11 -0700
committercallum <none@none>2011-10-28 11:01:11 -0700
commitb94f45db81fa6a4625d58301a13f964996fa65bd (patch)
tree1c9134e08ce22f4e122c48e3a746259a8f7ef470 /indra/newview/llscreenchannel.h
parentd08d018323272866b189979d0e772d50cdece4b2 (diff)
parentf84a69a7e00f0eed49894e14336126849a9e7b29 (diff)
Merge with head
Diffstat (limited to 'indra/newview/llscreenchannel.h')
-rw-r--r--indra/newview/llscreenchannel.h41
1 files changed, 25 insertions, 16 deletions
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index d207d13981..2f23552828 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -53,22 +53,32 @@ class LLScreenChannelBase : public LLUICtrl
{
friend class LLChannelManager;
public:
- LLScreenChannelBase(const LLUUID& id);
- ~LLScreenChannelBase();
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Mandatory<LLUUID> id;
+ Optional<bool> display_toasts_always;
+ Optional<EToastAlignment> toast_align;
+ Optional<EChannelAlignment> channel_align;
+
+ Params()
+ : id("id", LLUUID("")),
+ display_toasts_always("display_toasts_always", false),
+ toast_align("toast_align", NA_BOTTOM),
+ channel_align("channel_align", CA_LEFT)
+ {}
+ };
+
+ LLScreenChannelBase(const Params&);
+
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
// Channel's outfit-functions
// update channel's size and position in the World View
- virtual void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
- void resetPositionAndSize();
+ virtual void updatePositionAndSize(LLRect rect);
// initialization of channel's shape and position
virtual void init(S32 channel_left, S32 channel_right);
-
- virtual void setToastAlignment(EToastAlignment align) {mToastAlignment = align;}
-
- virtual void setChannelAlignment(EChannelAlignment align) {mChannelAlignment = align;}
-
// kill or modify a toast by its ID
virtual void killToastByNotificationID(LLUUID id) {};
virtual void modifyToastNotificationByID(LLUUID id, LLSD data) {};
@@ -91,7 +101,6 @@ public:
void setCanStoreToasts(bool store) { mCanStoreToasts = store; }
- void setDisplayToastsAlways(bool display_toasts) { mDisplayToastsAlways = display_toasts; }
bool getDisplayToastsAlways() { return mDisplayToastsAlways; }
// get number of hidden notifications from a channel
@@ -106,9 +115,11 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
+ LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
protected:
- void updateBottom();
+ void updateRect();
+ LLRect getChannelRect();
// Channel's flags
bool mControlHovering;
@@ -117,6 +128,7 @@ protected:
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
+ LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;
@@ -125,9 +137,6 @@ protected:
// channel's ID
LLUUID mID;
-
- // store a connection to prevent futher crash that is caused by sending a signal to a destroyed channel
- boost::signals2::connection mWorldViewRectConnection;
};
@@ -138,7 +147,7 @@ class LLScreenChannel : public LLScreenChannelBase
{
friend class LLChannelManager;
public:
- LLScreenChannel(LLUUID& id);
+ LLScreenChannel(const Params&);
virtual ~LLScreenChannel();
class Matcher
@@ -153,7 +162,7 @@ public:
// Channel's outfit-functions
// update channel's size and position in the World View
- void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
+ void updatePositionAndSize(LLRect new_rect);
// initialization of channel's shape and position
void init(S32 channel_left, S32 channel_right);