summaryrefslogtreecommitdiff
path: root/indra/newview/llviewchildren.h
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
committerJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
commit420b91db29485df39fd6e724e782c449158811cb (patch)
treeb471a94563af914d3ed3edd3e856d21cb1b69945 /indra/newview/llviewchildren.h
Print done when done.
Diffstat (limited to 'indra/newview/llviewchildren.h')
-rw-r--r--indra/newview/llviewchildren.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/indra/newview/llviewchildren.h b/indra/newview/llviewchildren.h
new file mode 100644
index 0000000000..1a7238127f
--- /dev/null
+++ b/indra/newview/llviewchildren.h
@@ -0,0 +1,49 @@
+/**
+ * @file llviewchildren.h
+ * @brief LLViewChildren class header file
+ *
+ * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#ifndef LL_LLVIEWCHILDREN_H
+#define LL_LLVIEWCHILDREN_H
+
+class LLPanel;
+
+class LLViewChildren
+ // makes it easy to manipulate children of a view by id safely
+ // encapsulates common operations into simple, one line calls
+{
+public:
+ LLViewChildren(LLPanel& parent);
+
+ // all views
+ void show(const char* id, bool visible = true);
+ void hide(const char* id) { show(id, false); }
+
+ void enable(const char* id, bool enabled = true);
+ void disable(const char* id) { enable(id, false); };
+
+ //
+ // LLTextBox
+ void setText(const char* id,
+ const std::string& text, bool visible = true);
+ void setWrappedText(const char* id,
+ const std::string& text, bool visible = true);
+
+ // LLIconCtrl
+ enum Badge { BADGE_OK, BADGE_NOTE, BADGE_WARN, BADGE_ERROR };
+
+ void setBadge(const char* id, Badge b, bool visible = true);
+
+
+ // LLButton
+ void setAction(const char* id, void(*function)(void*), void* value);
+
+
+private:
+ LLPanel& mParent;
+};
+
+#endif