Téo DHIEN-FANE / F746_GUI

Dependencies:   Array_Matrix TS_DISCO_F746NG LCD_DISCO_F746NG BSP_DISCO_F746NG

Dependents:   dashboard_f1

Files at this revision

API Documentation at this revision

Comitter:
MikamiUitOpen
Date:
Tue Jul 12 02:23:26 2016 +0000
Parent:
15:0511a08a3c09
Child:
17:483926be0cf1
Commit message:
17

Changed in this revision

ButtonGroup.hpp Show annotated file Show diff for this revision Revisions of this file
SeekBar.cpp Show annotated file Show diff for this revision Revisions of this file
SeekBar.hpp Show annotated file Show diff for this revision Revisions of this file
SeekbarGroup.hpp Show annotated file Show diff for this revision Revisions of this file
--- a/ButtonGroup.hpp	Mon Jul 11 05:20:33 2016 +0000
+++ b/ButtonGroup.hpp	Tue Jul 12 02:23:26 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  ButtonGroup class -- Header
 //
-//  2016/07/02, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/12, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #ifndef F746_BUTTON_GROUP_HPP
@@ -30,7 +30,7 @@
                     uint32_t inactiveTextColor = GuiBase::ENUM_INACTIVE_TEXT);
 
         // Destructor
-        ~ButtonGroup();
+        virtual ~ButtonGroup();
 
         // Draw button
         bool Draw(int num, uint32_t color, uint32_t textColor);
--- a/SeekBar.cpp	Mon Jul 11 05:20:33 2016 +0000
+++ b/SeekBar.cpp	Tue Jul 12 02:23:26 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  SeekBar class
 //
-//  2016/07/11, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/12, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #include "SeekBar.hpp"
@@ -23,7 +23,6 @@
           labelOn_(true), slided_(false), active_(true)
     {
         Draw(initialValue);
-        labelLCR_ = new Label *[3];
         uint16_t y0 = y - thumbSize/2 - 13;
         labelLCR_[0] = new Label(x, y0, left, Label::CENTER);
         labelLCR_[1] = new Label(x+length/2, y0, center, Label::CENTER);
@@ -33,10 +32,7 @@
     SeekBar::~SeekBar()
     {
         if (labelOn_)
-        {
             for (int n=0; n<3; n++) delete labelLCR_[n];
-            delete[] labelLCR_;
-        }
     }
 
     // Slide thumb
@@ -188,3 +184,4 @@
         return value;
     }
 }
+
--- a/SeekBar.hpp	Mon Jul 11 05:20:33 2016 +0000
+++ b/SeekBar.hpp	Tue Jul 12 02:23:26 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  SeekBar class -- Header
 //
-//  2016/07/11, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/12, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #ifndef F746_SEEKBAR_HPP
@@ -49,7 +49,7 @@
                 uint32_t colorH = 0xFFB0B0B0,
                 uint32_t backColor = GuiBase::ENUM_BACK);
 
-        ~SeekBar();
+        virtual ~SeekBar();
         
         bool Slide();
         float GetValue() { return v_; }
@@ -75,7 +75,7 @@
         const float MIN_, MAX_;
         const Orientation ORIENT_;
 
-        Label **labelLCR_;
+        Label *labelLCR_[3];
         float v_;             // value of seekbar
         bool labelOn_;
         bool slided_;
--- a/SeekbarGroup.hpp	Mon Jul 11 05:20:33 2016 +0000
+++ b/SeekbarGroup.hpp	Tue Jul 12 02:23:26 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  SeekbarGroup class -- Header
 //
-//  2016/05/30, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/12, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #ifndef F746_SEEKBAR_GROUP_HPP
@@ -24,7 +24,7 @@
                      uint32_t colorH = 0xFFB0B0B0,
                      uint32_t backColor = GuiBase::ENUM_BACK);
 
-        ~SeekbarGroup();
+        virtual ~SeekbarGroup();
         
         bool Slide(int num) { return seekBars_[num]->Slide(); }
         float GetValue(int num) { return seekBars_[num]->GetValue(); }