From 4d01f5f5096cb4d22c4a7ba17cc82977c7f5f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 29 Oct 2013 18:17:04 +0000 Subject: Adopted MirandaG15 plugin First compilable version and 32-bit only. git-svn-id: http://svn.miranda-ng.org/main/trunk@6681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/LCDFramework/src/CLCDLabel.h | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 plugins/MirandaG15/LCDFramework/src/CLCDLabel.h (limited to 'plugins/MirandaG15/LCDFramework/src/CLCDLabel.h') diff --git a/plugins/MirandaG15/LCDFramework/src/CLCDLabel.h b/plugins/MirandaG15/LCDFramework/src/CLCDLabel.h new file mode 100644 index 0000000000..b2bcc5bc3b --- /dev/null +++ b/plugins/MirandaG15/LCDFramework/src/CLCDLabel.h @@ -0,0 +1,52 @@ +#ifndef _CLCDLABEL_H_ +#define _CLCDLABEL_H_ + +#include "CLCDTextObject.h" + +class CLCDLabel : public CLCDTextObject +{ +public: + // constructor + CLCDLabel(); + // destructor + ~CLCDLabel(); + + // initializes the label + bool Initialize(); + // deinitializes the label + bool Shutdown(); + + // update the label + bool Update(); + // draw the label + bool Draw(CLCDGfx *pGfx); + + // sets the label's text + void SetText(tstring strText); + + // sets the cutoff mode + void SetCutOff(bool bEnable); + + // sets the wordwrap mode + void SetWordWrap(bool bEnable); + +private: + // updates the cutoff index + void UpdateCutOffIndex(); + // called when the labels size has changed + void OnSizeChanged(SIZE OldSize); + // called when the labels font has changed + void OnFontChanged(); + + bool m_bWordWrap; + + bool m_bCutOff; + int m_iCutOffIndex; + tstring m_strText; + tstring m_strCutOff; + int m_iLineCount; + + vector m_vLines; +}; + +#endif \ No newline at end of file -- cgit v1.2.3