diff options
Diffstat (limited to 'indra/newview/llimpanel.h')
| -rw-r--r-- | indra/newview/llimpanel.h | 69 |
1 files changed, 64 insertions, 5 deletions
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 7cd19d4872..dcb0f2416f 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -195,8 +195,9 @@ public: // Check typing timeout timer. /*virtual*/ void draw(); - /*virtual*/ void onClose(bool app_quitting = FALSE); - /*virtual*/ void onVisibilityChange(BOOL new_visibility); + + void onClose(); + void onVisibilityChange(const LLSD& new_visibility); // add target ids to the session. // Return TRUE if successful, otherwise FALSE. @@ -212,7 +213,6 @@ public: void selectAll(); void selectNone(); - void setVisible(BOOL b); S32 getNumUnreadMessages() { return mNumUnreadMessages; } @@ -250,6 +250,7 @@ public: void setSpeakers(const LLSD& speaker_list); LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } EInstantMessage getDialogType() const { return mDialog; } + void setDialogType(EInstantMessage dialog) { mDialog = dialog; } void requestAutoConnect(); @@ -356,10 +357,68 @@ private: LLFrameTimer mLastKeystrokeTimer; void disableWhileSessionStarting(); +}; + + +// Individual IM window that appears at the bottom of the screen, +// optionally "docked" to the bottom tray. +class LLIMFloater : public LLFloater +{ +public: + LLIMFloater(const LLUUID& session_id); + + virtual ~LLIMFloater(); + + // LLView overrides + /*virtual*/ BOOL postBuild(); + + // LLView overrides for drawing dock tongue + /*virtual*/ + void draw(); + + // Floater should close when user clicks away to other UI area, + // hence causing focus loss. + /*virtual*/ void onFocusLost(); + + // LLFloater overrides + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + + static LLIMFloater* show(const LLUUID& session_id); + + // get new messages from LLIMModel + void updateMessages(); + static void onSendMsg( LLUICtrl*, void*); + void sendMsg(); + + // callback for LLIMModel on new messages + // route to specific floater if it is visible + static void newIMCallback(const LLSD& data); - typedef std::map<LLUUID, LLStyleSP> styleMap; - static styleMap mStyleMap; + // called when docked floater's position has been set by chiclet + void setPositioned(bool b) { mPositioned = b; }; + + + +private: + + static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); + static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); + static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata); + void setTyping(BOOL typing); + + void onSlide(); + + LLUUID mSessionID; + S32 mLastMessageIndex; + EInstantMessage mDialog; + LLUUID mOtherParticipantUUID; + LLViewerTextEditor* mHistoryEditor; + LLLineEditor* mInputEditor; + bool mPositioned; + LLUIImagePtr mDockTongue; }; + + #endif // LL_IMPANEL_H |
