summaryrefslogtreecommitdiff
path: root/xml/string.h
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-17 19:56:21 +0000
committerlordjaxom <lordjaxom>2004-12-17 19:56:21 +0000
commitac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d (patch)
treed572f41490e8949a5e7323bf94b59c4034438afe /xml/string.h
parentb8f29c674cc0ccca207123342c1344bbd0f13796 (diff)
downloadvdr-plugin-text2skin-ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d.tar.gz
vdr-plugin-text2skin-ac920774dee48c0a85b3c6fc8c6785c1a5dd8f6d.tar.bz2
1.0-pre5v1.0-pre5
Diffstat (limited to 'xml/string.h')
-rw-r--r--xml/string.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/xml/string.h b/xml/string.h
index 650e7f7..8e29db8 100644
--- a/xml/string.h
+++ b/xml/string.h
@@ -1,5 +1,5 @@
/*
- * $Id: string.h,v 1.7 2004/12/14 20:02:31 lordjaxom Exp $
+ * $Id: string.h,v 1.8 2004/12/17 19:56:16 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_STRING_H
@@ -25,6 +25,7 @@ enum exToken {
tPresentEndDateTime,
tPresentDuration,
tPresentProgress,
+ tPresentRemaining,
tPresentTitle,
tPresentShortText,
tPresentDescription,
@@ -52,7 +53,7 @@ enum exToken {
tVolumeTotal,
tIsMute,
- // Message Display
+ // Message Display (also in all other displays)
tMessage,
tMessageStatus,
tMessageInfo,
@@ -72,6 +73,7 @@ enum exToken {
tIsPausing,
tReplayPosition,
tReplayDuration,
+ tReplayRemaining,
tReplayMode,
// Menu Page
@@ -83,6 +85,7 @@ enum exToken {
tMenuCurrent,
tIsMenuCurrent,
tMenuText,
+ // next four also in Channel and Replay display (if supported by vdr/plugin)
tButtonRed,
tButtonGreen,
tButtonYellow,
@@ -103,9 +106,27 @@ struct txToken {
txToken(void): Index(-1), Tab(-1) {}
txToken(exToken t, uint o, const std::string &a): Type(t), Offset(o), Attrib(a), Index(-1), Tab(-1) {}
+ friend bool operator< (const txToken &A, const txToken &B);
+
static std::string Token(const txToken &Token);
};
+inline bool operator< (const txToken &A, const txToken &B)
+{
+ if (A.Type == B.Type) {
+ if (A.Attrib == B.Attrib) {
+ if (A.Index == B.Index)
+ return A.Tab < B.Tab;
+ else
+ return A.Index < B.Index;
+ }
+ else
+ return A.Attrib < B.Attrib;
+ }
+ else
+ return A.Type < B.Type;
+}
+
class cxString {
private:
std::string mText;