GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup, NumericUpDown
Dependencies: Array_Matrix TS_DISCO_F746NG LCD_DISCO_F746NG BSP_DISCO_F746NG
Diff: BlinkLabel.hpp
- Revision:
- 4:cbf7ed9092a3
- Child:
- 6:b8f197b0012c
diff -r fe6ff954824a -r cbf7ed9092a3 BlinkLabel.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BlinkLabel.hpp Fri Apr 08 09:32:49 2016 +0000 @@ -0,0 +1,43 @@ +//----------------------------------------------------------- +// BlinkLabel class -- derived class of Label class +// This class for displaying error message +// +// 2016/04/07, Copyright (c) 2016 MIKAMI, Naoki +//----------------------------------------------------------- + +#ifndef F746_BLINK_LABEL_HPP +#define F746_BLINK_LABEL_HPP + +#include "Label.hpp" + +namespace Mikami +{ + class BlinkLabel : public Label + { + public: + // Constructor + BlinkLabel(uint16_t x, uint16_t y, const string str, + TextAlignMode mode = LEFT, + sFONT &fonts = Font20, + uint32_t textColor = LCD_COLOR_RED, + uint32_t backColor = GuiBase::ENUM_BACK, + uint32_t on = 500, uint32_t off = 200) + : Label(x, y, str, mode, fonts, textColor, backColor) + { + while (true) // Blinking here + { + wait_ms(on); + Draw(backColor); + wait_ms(off); + Draw(textColor); + } + } + + private: + // disallow copy constructor and assignment operator + BlinkLabel(const BlinkLabel&); + BlinkLabel& operator=(const BlinkLabel&); + }; +} +#endif // F746_BLINK_LABEL_HPP +