summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindowlistener.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-07-01 13:42:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-07-01 13:42:15 -0400
commitdc93fe6cc68115dd280881c0896fa3f0e8d46f2c (patch)
tree830c7f3086b938b09122ba436004f22dabffd3dc /indra/newview/llviewerwindowlistener.h
parentca798b4fb243fbd85f71ea1b384181dd07ab6f66 (diff)
DEV-31980: Wrap LLViewerWindow::saveSnapshot() with an event API.
Add LLViewerWindowListener per Incremental_Viewer_Automation/Event_API. Add LLViewerWindowListener pointer to LLViewerWindow, and initialize in ctor. Add llviewerwindowlistener.{h,cpp} to newview/CMakeLists.txt.
Diffstat (limited to 'indra/newview/llviewerwindowlistener.h')
-rw-r--r--indra/newview/llviewerwindowlistener.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindowlistener.h b/indra/newview/llviewerwindowlistener.h
new file mode 100644
index 0000000000..f756a5310f
--- /dev/null
+++ b/indra/newview/llviewerwindowlistener.h
@@ -0,0 +1,34 @@
+/**
+ * @file llviewerwindowlistener.h
+ * @author Nat Goodspeed
+ * @date 2009-06-30
+ * @brief Event API for subset of LLViewerWindow methods
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLVIEWERWINDOWLISTENER_H)
+#define LL_LLVIEWERWINDOWLISTENER_H
+
+#include "lleventdispatcher.h"
+
+class LLViewerWindow;
+class LLSD;
+
+/// Listen on an LLEventPump with specified name for LLViewerWindow request events.
+class LLViewerWindowListener: public LLDispatchListener
+{
+public:
+ /// Specify the pump name on which to listen, and bind the LLViewerWindow
+ /// instance to use (e.g. gViewerWindow).
+ LLViewerWindowListener(const std::string& pumpname, LLViewerWindow* llviewerwindow);
+
+private:
+ void saveSnapshot(const LLSD& event) const;
+
+ LLViewerWindow* mViewerWindow;
+};
+
+#endif /* ! defined(LL_LLVIEWERWINDOWLISTENER_H) */