F746 GUI other class.
Dependents: DISCO-F746NG_test001
Circle.hpp@1:c77f45e79881, 2016-07-02 (annotated)
- Committer:
- InoueTakashi
- Date:
- Sat Jul 02 05:38:45 2016 +0000
- Revision:
- 1:c77f45e79881
- Parent:
- 0:944b36823ef2
Add const
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
InoueTakashi | 0:944b36823ef2 | 1 | // |
InoueTakashi | 0:944b36823ef2 | 2 | // 2016/04/27, Copyright (c) 2016 Takashi Inoue |
InoueTakashi | 0:944b36823ef2 | 3 | // Button OverLapping Class Header |
InoueTakashi | 0:944b36823ef2 | 4 | // ver 0.9 rev 0.1 2016/5/17 |
InoueTakashi | 0:944b36823ef2 | 5 | //----------------------------------------------------------- |
InoueTakashi | 0:944b36823ef2 | 6 | |
InoueTakashi | 0:944b36823ef2 | 7 | #ifndef F746_CIRCLE_HPP |
InoueTakashi | 0:944b36823ef2 | 8 | #define F746_CIRCLE_HPP |
InoueTakashi | 0:944b36823ef2 | 9 | |
InoueTakashi | 0:944b36823ef2 | 10 | #include "GUIinit.hpp" //GUI init (TI) |
InoueTakashi | 0:944b36823ef2 | 11 | |
InoueTakashi | 0:944b36823ef2 | 12 | using namespace Mikami; |
InoueTakashi | 0:944b36823ef2 | 13 | |
InoueTakashi | 0:944b36823ef2 | 14 | namespace TakaIno |
InoueTakashi | 0:944b36823ef2 | 15 | { |
InoueTakashi | 0:944b36823ef2 | 16 | class Circle : public GUIinit |
InoueTakashi | 0:944b36823ef2 | 17 | { |
InoueTakashi | 0:944b36823ef2 | 18 | public: |
InoueTakashi | 0:944b36823ef2 | 19 | struct CircleInfo //GUI Circle Infomation |
InoueTakashi | 0:944b36823ef2 | 20 | { |
InoueTakashi | 0:944b36823ef2 | 21 | int16_t i_Xpos; |
InoueTakashi | 0:944b36823ef2 | 22 | int16_t i_Ypos; |
InoueTakashi | 0:944b36823ef2 | 23 | int16_t i_Radius; |
InoueTakashi | 0:944b36823ef2 | 24 | uint32_t i_txtColor; |
InoueTakashi | 0:944b36823ef2 | 25 | uint32_t i_bakColor; |
InoueTakashi | 0:944b36823ef2 | 26 | bool i_move_flg; |
InoueTakashi | 0:944b36823ef2 | 27 | int16_t i_Xstep; |
InoueTakashi | 0:944b36823ef2 | 28 | int16_t i_Ystep; |
InoueTakashi | 0:944b36823ef2 | 29 | bool i_disp_c_str; |
InoueTakashi | 0:944b36823ef2 | 30 | uint32_t i_c_str_col; |
InoueTakashi | 0:944b36823ef2 | 31 | int16_t i_c_str_idx; |
InoueTakashi | 0:944b36823ef2 | 32 | string i_c_str[2]; |
InoueTakashi | 0:944b36823ef2 | 33 | sFONT *i_c_fonts; |
InoueTakashi | 0:944b36823ef2 | 34 | uint16_t i_lcd_width; |
InoueTakashi | 0:944b36823ef2 | 35 | }; |
InoueTakashi | 0:944b36823ef2 | 36 | |
InoueTakashi | 0:944b36823ef2 | 37 | Circle(); |
InoueTakashi | 0:944b36823ef2 | 38 | |
InoueTakashi | 0:944b36823ef2 | 39 | Circle(struct CircleInfo cirinfo); |
InoueTakashi | 0:944b36823ef2 | 40 | |
InoueTakashi | 0:944b36823ef2 | 41 | ~Circle(); |
InoueTakashi | 0:944b36823ef2 | 42 | |
InoueTakashi | 0:944b36823ef2 | 43 | bool DrawCircle(int16_t Xpos=100, int16_t Ypos=100, int16_t Radius=50, |
InoueTakashi | 0:944b36823ef2 | 44 | uint32_t txtColor=LCD_COLOR_RED, uint32_t bakColor=LCD_COLOR_GREEN, |
InoueTakashi | 0:944b36823ef2 | 45 | bool disp_c_str_flg=false, uint32_t c_str_col=LCD_COLOR_BLACK, |
InoueTakashi | 0:944b36823ef2 | 46 | int16_t str_idx = 0, |
InoueTakashi | 0:944b36823ef2 | 47 | const string c_f_str="", const string c_b_str="", |
InoueTakashi | 0:944b36823ef2 | 48 | sFONT &c_fonts=Font16); |
InoueTakashi | 0:944b36823ef2 | 49 | |
InoueTakashi | 0:944b36823ef2 | 50 | bool DrawCircle(bool dsp_circle); |
InoueTakashi | 0:944b36823ef2 | 51 | |
InoueTakashi | 0:944b36823ef2 | 52 | bool ReverseCircleColor(); |
InoueTakashi | 0:944b36823ef2 | 53 | |
InoueTakashi | 0:944b36823ef2 | 54 | bool DispOrEraseCircle(bool disp_flg); |
InoueTakashi | 0:944b36823ef2 | 55 | |
InoueTakashi | 0:944b36823ef2 | 56 | bool CircleTouched(); |
InoueTakashi | 0:944b36823ef2 | 57 | |
InoueTakashi | 0:944b36823ef2 | 58 | bool IsOnCircle(); |
InoueTakashi | 0:944b36823ef2 | 59 | |
InoueTakashi | 0:944b36823ef2 | 60 | bool MoveCircle(bool move_flg, int16_t xstep, int16_t ystep); |
InoueTakashi | 0:944b36823ef2 | 61 | bool MoveCircle(bool move_flg); |
InoueTakashi | 0:944b36823ef2 | 62 | |
InoueTakashi | 0:944b36823ef2 | 63 | bool ChangeCirclePos(); |
InoueTakashi | 0:944b36823ef2 | 64 | |
InoueTakashi | 0:944b36823ef2 | 65 | uint16_t PosX(int16_t x, string str, sFONT &sfont); |
InoueTakashi | 0:944b36823ef2 | 66 | |
InoueTakashi | 0:944b36823ef2 | 67 | uint16_t CalX(int16_t x); |
InoueTakashi | 0:944b36823ef2 | 68 | protected: |
InoueTakashi | 0:944b36823ef2 | 69 | struct CircleInfo m_c_info; |
InoueTakashi | 0:944b36823ef2 | 70 | |
InoueTakashi | 0:944b36823ef2 | 71 | |
InoueTakashi | 0:944b36823ef2 | 72 | //sFONT &i_c_fonts; |
InoueTakashi | 0:944b36823ef2 | 73 | }; |
InoueTakashi | 0:944b36823ef2 | 74 | |
InoueTakashi | 0:944b36823ef2 | 75 | |
InoueTakashi | 0:944b36823ef2 | 76 | } |
InoueTakashi | 0:944b36823ef2 | 77 | |
InoueTakashi | 0:944b36823ef2 | 78 | #endif //F746_CIRCLE_HPP |
InoueTakashi | 0:944b36823ef2 | 79 | |
InoueTakashi | 0:944b36823ef2 | 80 |