Same as original
Diff: button_group.hpp
- Revision:
- 11:204bc17f59cc
- Parent:
- 10:5ca60e724a76
- Child:
- 13:af578b53ff0e
--- a/button_group.hpp Thu Dec 31 08:32:05 2015 +0000 +++ b/button_group.hpp Wed Feb 17 06:27:45 2016 +0000 @@ -1,7 +1,7 @@ //----------------------------------------------------------- // Button group class -- Header // -// 2015/12/31, Copyright (c) 2015 MIKAMI, Naoki +// 2016/02/17, Copyright (c) 2016 MIKAMI, Naoki //----------------------------------------------------------- #ifndef F746_BUTTON_GROUP_HPP @@ -43,16 +43,13 @@ } // Redraw button with original color - void Redraw(int num, uint32_t textColor = LCD_COLOR_WHITE) - { buttons_[num]->Redraw(textColor); } + bool Redraw(int num, uint32_t textColor = LCD_COLOR_WHITE); // Erase button with selected color - void Erase(int num, uint32_t color) - { buttons_[num]->Draw(color, color); } + bool Erase(int num, uint32_t color); // Check touch detected for specified button - bool Touched(int num) - { return buttons_[num]->Touched(); } + bool Touched(int num); // Check touch detected for specified button and redraw bool Touched(int num, uint32_t color, @@ -68,6 +65,9 @@ Button **buttons_; int numberOfButtons_; + // Check range of argument + bool Range(int n); + // disallow copy constructor and assignment operator ButtonGroup(const ButtonGroup&); ButtonGroup& operator=(const ButtonGroup&);