GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup, NumericUpDown

Dependencies:   Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG

Dependents:   F746_AudioOutQSPI F746_AudioPlayerSD DISCO-F746NG_test001 F746_SD_WavPlayer ... more

Committer:
MikamiUitOpen
Date:
Mon Jan 16 00:23:53 2017 +0000
Revision:
27:115219bcd9f5
Parent:
22:fa0181712d9c
Child:
29:551a5f1b52b9
28

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MikamiUitOpen 4:cbf7ed9092a3 1 //-----------------------------------------------------------
MikamiUitOpen 4:cbf7ed9092a3 2 // BlinkLabel class -- derived class of Label class
MikamiUitOpen 6:b8f197b0012c 3 // For displaying error message
MikamiUitOpen 4:cbf7ed9092a3 4 //
MikamiUitOpen 27:115219bcd9f5 5 // 2017/01/16, Copyright (c) 2017 MIKAMI, Naoki
MikamiUitOpen 4:cbf7ed9092a3 6 //-----------------------------------------------------------
MikamiUitOpen 4:cbf7ed9092a3 7
MikamiUitOpen 4:cbf7ed9092a3 8 #ifndef F746_BLINK_LABEL_HPP
MikamiUitOpen 4:cbf7ed9092a3 9 #define F746_BLINK_LABEL_HPP
MikamiUitOpen 4:cbf7ed9092a3 10
MikamiUitOpen 4:cbf7ed9092a3 11 #include "Label.hpp"
MikamiUitOpen 22:fa0181712d9c 12 #include "ResetButton.hpp"
MikamiUitOpen 4:cbf7ed9092a3 13
MikamiUitOpen 4:cbf7ed9092a3 14 namespace Mikami
MikamiUitOpen 4:cbf7ed9092a3 15 {
MikamiUitOpen 4:cbf7ed9092a3 16 class BlinkLabel : public Label
MikamiUitOpen 4:cbf7ed9092a3 17 {
MikamiUitOpen 4:cbf7ed9092a3 18 public:
MikamiUitOpen 4:cbf7ed9092a3 19 // Constructor
MikamiUitOpen 4:cbf7ed9092a3 20 BlinkLabel(uint16_t x, uint16_t y, const string str,
MikamiUitOpen 4:cbf7ed9092a3 21 TextAlignMode mode = LEFT,
MikamiUitOpen 4:cbf7ed9092a3 22 sFONT &fonts = Font20,
MikamiUitOpen 4:cbf7ed9092a3 23 uint32_t textColor = LCD_COLOR_RED,
MikamiUitOpen 4:cbf7ed9092a3 24 uint32_t backColor = GuiBase::ENUM_BACK,
MikamiUitOpen 4:cbf7ed9092a3 25 uint32_t on = 500, uint32_t off = 200)
MikamiUitOpen 4:cbf7ed9092a3 26 : Label(x, y, str, mode, fonts, textColor, backColor)
MikamiUitOpen 4:cbf7ed9092a3 27 {
MikamiUitOpen 22:fa0181712d9c 28 ResetButton *reset = new ResetButton();
MikamiUitOpen 4:cbf7ed9092a3 29 while (true) // Blinking here
MikamiUitOpen 4:cbf7ed9092a3 30 {
MikamiUitOpen 4:cbf7ed9092a3 31 wait_ms(on);
MikamiUitOpen 4:cbf7ed9092a3 32 Draw(backColor);
MikamiUitOpen 4:cbf7ed9092a3 33 wait_ms(off);
MikamiUitOpen 4:cbf7ed9092a3 34 Draw(textColor);
MikamiUitOpen 27:115219bcd9f5 35 reset->DoIfTouched();
MikamiUitOpen 4:cbf7ed9092a3 36 }
MikamiUitOpen 4:cbf7ed9092a3 37 }
MikamiUitOpen 4:cbf7ed9092a3 38
MikamiUitOpen 4:cbf7ed9092a3 39 private:
MikamiUitOpen 4:cbf7ed9092a3 40 // disallow copy constructor and assignment operator
MikamiUitOpen 4:cbf7ed9092a3 41 BlinkLabel(const BlinkLabel&);
MikamiUitOpen 4:cbf7ed9092a3 42 BlinkLabel& operator=(const BlinkLabel&);
MikamiUitOpen 4:cbf7ed9092a3 43 };
MikamiUitOpen 4:cbf7ed9092a3 44 }
MikamiUitOpen 4:cbf7ed9092a3 45 #endif // F746_BLINK_LABEL_HPP