diff options
-rw-r--r-- | display.c | 32 | ||||
-rw-r--r-- | display.h | 33 | ||||
-rw-r--r-- | loader.h | 6 |
3 files changed, 68 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* - * $Id: display.c,v 1.3 2004/12/21 21:22:41 lordjaxom Exp $ + * $Id: display.c,v 1.4 2005/01/02 19:55:36 lordjaxom Exp $ */ #include "render.h" @@ -7,6 +7,7 @@ #include "display.h" #include "scroller.h" #include "status.h" +#include "common.h" #include "xml/string.h" #include <vdr/menu.h> @@ -207,6 +208,9 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) : (cxType)false; case tLanguage: { +#if VDRVERSNUM >= 10318 + // TODO !!! +#else int cur; const char **tracks = cDevice::PrimaryDevice()->GetAudioTracks(&cur); if (tracks) { @@ -216,6 +220,7 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) if (cur < i) return tracks[cur]; } +#endif } return false; @@ -943,3 +948,28 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) return cText2SkinRender::GetTokenData(Token); } } + +#if VDRVERSNUM >= 10318 +cText2SkinDisplayTracks::cText2SkinDisplayTracks(cText2SkinLoader *Loader, const char *Title, + int NumTracks, const char * const *Tracks): + cText2SkinRender(Loader, cxDisplay::audioTracks), + mTitle(Title), + mItems(), + mCurrentItem((uint)-1) +{ +} + +cText2SkinDisplayTracks::~cText2SkinDisplayTracks() +{ +} + +void cText2SkinDisplayTracks::SetTrack(int Index, const char * const *Tracks) +{ +} + +cxType cText2SkinDisplayTracks::GetTokenData(const txToken &Token) +{ + return cText2SkinRender::GetTokenData(Token); +} + +#endif @@ -1,5 +1,5 @@ /* - * $Id: display.h,v 1.3 2004/12/21 22:19:58 lordjaxom Exp $ + * $Id: display.h,v 1.4 2005/01/02 19:55:36 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_SKIN_H @@ -186,4 +186,35 @@ inline bool cText2SkinDisplayMenu::HasTabText(int Index, int n) return false; } +#if VDRVERSNUM >= 10318 +class cText2SkinDisplayTracks: public cSkinDisplayTracks, public cText2SkinRender { +private: + std::string mTitle; + + struct tListItem { + std::string text; + + tListItem(const std::string &Text): text(Text) {} + + bool operator!=(const tListItem &b) { return b.text != text; } + }; + typedef std::vector<tListItem> tListItems; + + tListItems mItems; + uint mCurrentItem; + +protected: + virtual cxType GetTokenData(const txToken &Token); + +public: + cText2SkinDisplayTracks(cText2SkinLoader *Loader, const char *Title, int NumTracks, + const char * const *Tracks); + virtual ~cText2SkinDisplayTracks(); + + virtual void SetTrack(int Index, const char * const *Tracks); + + virtual void Flush(void) { cText2SkinRender::Flush(); } +}; +#endif + #endif // VDR_TEXT2SKIN_SKIN_H @@ -1,5 +1,5 @@ /* - * $Id: loader.h,v 1.1 2004/12/19 22:03:14 lordjaxom Exp $ + * $Id: loader.h,v 1.2 2005/01/02 19:56:12 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_LOADER_H @@ -32,6 +32,10 @@ public: virtual cSkinDisplayMenu *DisplayMenu(void); virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly); virtual cSkinDisplayVolume *DisplayVolume(void); +#if VDRVERSNUM >= 10318 + virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, + const char * const *Tracks); +#endif virtual cSkinDisplayMessage *DisplayMessage(void); cxSkin *Data(void) const { return mData; } |