diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2010-04-17 19:16:26 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2010-04-17 19:16:26 +0200 |
commit | 68ac6628a31cb1472275b5282c5cf9a971d9bddd (patch) | |
tree | 0ef788b563efab6688b0381cedd43baaefbc66cc /glcdskin/display.h | |
parent | 1011961a8af0615ee25b79d2bbd7e6820b851556 (diff) | |
download | graphlcd-base-68ac6628a31cb1472275b5282c5cf9a971d9bddd.tar.gz graphlcd-base-68ac6628a31cb1472275b5282c5cf9a971d9bddd.tar.bz2 |
backport of skin-support from 0.2.x to 0.1.x, changes for gcc 4.3 conformity
Diffstat (limited to 'glcdskin/display.h')
-rw-r--r-- | glcdskin/display.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/glcdskin/display.h b/glcdskin/display.h new file mode 100644 index 0000000..af50179 --- /dev/null +++ b/glcdskin/display.h @@ -0,0 +1,57 @@ +/* + * GraphLCD skin library + * + * display.h - display class + * + * This file is released under the GNU General Public License. Refer + * to the COPYING file distributed with this package. + * + * based on text2skin + * + */ + +#ifndef _GLCDSKIN_DISPLAY_H_ +#define _GLCDSKIN_DISPLAY_H_ + +#include <string> +#include <vector> + +#include "object.h" + +namespace GLCD +{ + +class cSkin; + +class cSkinDisplay +{ + friend bool StartElem(const std::string &name, std::map<std::string,std::string> &attrs); + friend bool EndElem(const std::string &name); + +private: + cSkin * mSkin; + std::string mId; + cSkinObjects mObjects; + +public: + cSkinDisplay(cSkin * Parent); + + cSkin * Skin(void) const { return mSkin; } + const std::string & Id(void) const { return mId; } + + uint32_t NumObjects(void) const { return mObjects.size(); } + cSkinObject * GetObject(uint32_t n) const { return mObjects[n]; } + + void Render(cBitmap * screen); +}; + +class cSkinDisplays: public std::vector<cSkinDisplay *> +{ +public: + cSkinDisplays(void); + ~cSkinDisplays(void); +}; + +} // end of namespace + +#endif |