diff options
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework/CLCDLabel.h')
-rw-r--r-- | plugins/MirandaG15/src/LCDFramework/CLCDLabel.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/CLCDLabel.h b/plugins/MirandaG15/src/LCDFramework/CLCDLabel.h new file mode 100644 index 0000000000..b2bcc5bc3b --- /dev/null +++ b/plugins/MirandaG15/src/LCDFramework/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<tstring> m_vLines;
+};
+
+#endif
\ No newline at end of file |