summaryrefslogtreecommitdiff
path: root/indra/newview/llscriptfloater.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llscriptfloater.h')
-rw-r--r--indra/newview/llscriptfloater.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index f7efff83f9..ec3ec4b540 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -84,16 +84,21 @@ public:
static std::string getObjectName(const LLUUID& notification_id);
- /**
- * Callback for notification toast buttons.
- */
- static void onToastButtonClick(const LLSD&notification, const LLSD&response);
-
typedef boost::signals2::signal<void(const LLSD&)> object_signal_t;
boost::signals2::connection addNewObjectCallback(const object_signal_t::slot_type& cb) { return mNewObjectSignal.connect(cb); }
boost::signals2::connection addToggleObjectFloaterCallback(const object_signal_t::slot_type& cb) { return mToggleFloaterSignal.connect(cb); }
+ struct FloaterPositionInfo
+ {
+ LLRect mRect;
+ bool mDockState;
+ };
+
+ void saveFloaterPosition(const LLUUID& object_id, const FloaterPositionInfo& fpi);
+
+ bool getFloaterPosition(const LLUUID& object_id, FloaterPositionInfo& fpi);
+
protected:
typedef std::map<std::string, EObjectType> object_type_map;
@@ -111,6 +116,11 @@ private:
object_signal_t mNewObjectSignal;
object_signal_t mToggleFloaterSignal;
+
+ // <object_id, floater position>
+ typedef std::map<LLUUID, FloaterPositionInfo> floater_position_map_t;
+
+ floater_position_map_t mFloaterPositions;
};
/**
@@ -141,7 +151,7 @@ public:
const LLUUID& getNotificationId() { return mNotificationId; }
- void setNotificationId(const LLUUID& id) { mNotificationId = id; }
+ void setNotificationId(const LLUUID& id);
/**
* Close notification if script floater is closed.
@@ -158,6 +168,14 @@ public:
*/
/*virtual*/ void setVisible(BOOL visible);
+ bool getSavePosition() { return mSaveFloaterPosition; }
+
+ void setSavePosition(bool save) { mSaveFloaterPosition = save; }
+
+ void savePosition();
+
+ void restorePosition();
+
protected:
/**
@@ -181,9 +199,13 @@ protected:
/*virtual*/ void onFocusReceived();
+ void dockToChiclet(bool dock);
+
private:
LLToastNotifyPanel* mScriptForm;
LLUUID mNotificationId;
+ LLUUID mObjectId;
+ bool mSaveFloaterPosition;
};
#endif //LL_SCRIPTFLOATER_H