Slider class on LCD / Touch screen
Diff: Slider.h
- Revision:
- 0:89d154d0806c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Slider.h Fri Apr 07 11:40:27 2017 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "stm32746g_discovery_lcd.h" + +#define maxWidth 480 +#define maxHeight 272 + +class Slider +{ +public: + Slider(uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint32_t c1, uint32_t c2); + void Move(uint16_t x, uint16_t y); + uint16_t GetValue(void); + void SetValue(uint16_t v); + void Show(void); + ~Slider(void); + +private: + uint16_t xpos; + uint16_t ypos; + uint16_t width; + uint16_t height; + uint16_t value; + uint32_t color1; + uint32_t color2; +}; + \ No newline at end of file