Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG
Fork of F746_GUI by
Diff: SeekBar.hpp
- Revision:
- 5:9c3ea4d4bc6b
- Parent:
- 0:a2686ef737c2
- Child:
- 6:b8f197b0012c
--- a/SeekBar.hpp Fri Apr 08 09:32:49 2016 +0000
+++ b/SeekBar.hpp Sun Apr 10 09:25:36 2016 +0000
@@ -1,7 +1,7 @@
//-----------------------------------------------------------
// SeekBar class -- Header
//
-// 2016/03/29, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/04/10, Copyright (c) 2016 MIKAMI, Naoki
//-----------------------------------------------------------
#ifndef F746_SEEKBAR_HPP
@@ -28,12 +28,15 @@
: GuiBase(x, y, Font12, 0, backColor, thumbColor),
L_(length), W_(width),
SIZE_(thumbSize), COLOR_L_(colorL), COLOR_H_(colorH),
- MIN_(min), MAX_(max), ORIENT_(hv), v_(value)
+ MIN_(min), MAX_(max), ORIENT_(hv),
+ v_(value), active_(true)
{ Draw(value); }
bool Slide();
float GetValue() { return v_; }
int GetIntValue() { return Round(v_); }
+ void Activate();
+ void Inactivate();
private:
struct Point
@@ -50,6 +53,7 @@
float v_; // value of seekbar
bool slided_;
+ bool active_;
void Draw(float value, bool fill = false);
bool IsOnThumb(uint16_t &x, uint16_t &y);
