diff options
Diffstat (limited to 'setup.h')
-rw-r--r-- | setup.h | 69 |
1 files changed, 69 insertions, 0 deletions
@@ -0,0 +1,69 @@ +/* + * targavfd plugin for VDR (C++) + * + * (C) 2010 Andreas Brachold <vdr07 AT deltab de> + * + * This targavfd plugin is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published + * by the Free Software Foundation, version 3 of the License. + * + * See the files README and COPYING for details. + * + */ + +#ifndef __VFD_SETUP_H___ +#define __VFD_SETUP_H___ + +#include <vdr/menuitems.h> +#define memberof(x) (sizeof(x)/sizeof(*x)) + +enum eOnExitMode { + eOnExitMode_SHOWMSG /**< Do nothing - just leave the "last" message there */ + ,eOnExitMode_SHOWCLOCK /**< Show the big clock */ + ,eOnExitMode_BLANKSCREEN /**< Blank the device completely */ + ,eOnExitMode_NEXTTIMER /**< Show next active timer */ + ,eOnExitMode_LASTITEM +}; + +struct cVFDSetup +{ + int m_nOnExit; + int m_nBrightness; + + const int m_cWidth; + const int m_cHeight; + + char m_szFont[256]; + + int m_bTwoLineMode; /** enable two line mode */ + + cVFDSetup(void); + cVFDSetup(const cVFDSetup& x); + cVFDSetup& operator = (const cVFDSetup& x); + + /// Parse our own setup parameters and store their values. + bool SetupParse(const char *szName, const char *szValue); + +}; + +class cVFDWatch; +class cVFDMenuSetup + :public cMenuSetupPage +{ + cVFDSetup m_tmpSetup; + cVFDWatch* m_pDev; + cStringList fontNames; + int fontIndex; +protected: + virtual void Store(void); + virtual eOSState ProcessKey(eKeys nKey); +public: + cVFDMenuSetup(cVFDWatch* pDev); +}; + + +/// The exported one and only Stored setup data +extern cVFDSetup theSetup; + +#endif //__VFD_SETUP_H___ + |