summaryrefslogtreecommitdiff
path: root/xml/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'xml/display.c')
-rw-r--r--xml/display.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/xml/display.c b/xml/display.c
new file mode 100644
index 0000000..4790b2d
--- /dev/null
+++ b/xml/display.c
@@ -0,0 +1,42 @@
+/*
+ * $Id: display.c,v 1.3 2004/12/08 17:13:26 lordjaxom Exp $
+ */
+
+#include "xml/display.h"
+
+static const std::string DisplayNames[] =
+ { "channelInfo", "channelSmall", "volume", "message", "replayInfo", "replaySmall", "menu" };
+
+cxDisplay::cxDisplay(cxSkin *parent):
+ mType((eType)__COUNT_DISPLAY__),
+ mNumWindows(0),
+ mSkin(parent)
+{
+}
+
+bool cxDisplay::ParseType(const std::string &Text)
+{
+ for (int i = 0; i < (int)__COUNT_DISPLAY__; ++i) {
+ if (DisplayNames[i].length() > 0 && DisplayNames[i] == Text) {
+ mType = (eType)i;
+ return true;
+ }
+ }
+ return false;
+}
+
+const std::string &cxDisplay::GetType(void) const
+{
+ return DisplayNames[mType];
+}
+
+cxDisplays::cxDisplays(void)
+{
+}
+
+cxDisplays::~cxDisplays()
+{
+ iterator it = begin();
+ while (it != end())
+ (delete (*it).second, ++it);
+}