F746 GUI other class.
Dependents: DISCO-F746NG_test001
GUIinit.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/18 |
InoueTakashi | 0:944b36823ef2 | 5 | //----------------------------------------------------------- |
InoueTakashi | 0:944b36823ef2 | 6 | |
InoueTakashi | 0:944b36823ef2 | 7 | #ifndef F746_GUIINIT_HPP |
InoueTakashi | 0:944b36823ef2 | 8 | #define F746_GUIINIT_HPP |
InoueTakashi | 0:944b36823ef2 | 9 | |
InoueTakashi | 0:944b36823ef2 | 10 | #include "mbed.h" |
InoueTakashi | 0:944b36823ef2 | 11 | #include "TS_DISCO_F746NG.h" |
InoueTakashi | 0:944b36823ef2 | 12 | #include "LCD_DISCO_F746NG.h" |
InoueTakashi | 0:944b36823ef2 | 13 | #include "GuiBase.hpp" |
InoueTakashi | 0:944b36823ef2 | 14 | |
InoueTakashi | 0:944b36823ef2 | 15 | using namespace Mikami; |
InoueTakashi | 0:944b36823ef2 | 16 | |
InoueTakashi | 0:944b36823ef2 | 17 | namespace TakaIno |
InoueTakashi | 0:944b36823ef2 | 18 | { |
InoueTakashi | 0:944b36823ef2 | 19 | class GUIinit: public GuiBase |
InoueTakashi | 0:944b36823ef2 | 20 | { |
InoueTakashi | 0:944b36823ef2 | 21 | |
InoueTakashi | 0:944b36823ef2 | 22 | public: |
InoueTakashi | 0:944b36823ef2 | 23 | |
InoueTakashi | 0:944b36823ef2 | 24 | struct BackInfo //GUI Back Infomation |
InoueTakashi | 0:944b36823ef2 | 25 | { |
InoueTakashi | 0:944b36823ef2 | 26 | uint32_t i_txtColor; |
InoueTakashi | 0:944b36823ef2 | 27 | uint32_t i_bakColor; |
InoueTakashi | 0:944b36823ef2 | 28 | }; |
InoueTakashi | 0:944b36823ef2 | 29 | |
InoueTakashi | 0:944b36823ef2 | 30 | GUIinit( // if (No arg) then set default values |
InoueTakashi | 0:944b36823ef2 | 31 | uint16_t x =0, uint16_t y =0, |
InoueTakashi | 0:944b36823ef2 | 32 | sFONT &fonts = Font12, |
InoueTakashi | 0:944b36823ef2 | 33 | uint32_t textColor = LCD_COLOR_RED, |
InoueTakashi | 0:944b36823ef2 | 34 | uint32_t backColor = LCD_COLOR_BLUE, |
InoueTakashi | 0:944b36823ef2 | 35 | uint32_t createdColor = LCD_COLOR_GRAY, |
InoueTakashi | 0:944b36823ef2 | 36 | uint32_t touchedColor = LCD_COLOR_WHITE, |
InoueTakashi | 0:944b36823ef2 | 37 | uint32_t inactiveColor = LCD_COLOR_ORANGE, |
InoueTakashi | 0:944b36823ef2 | 38 | uint32_t inactiveTextColor = LCD_COLOR_GRAY |
InoueTakashi | 0:944b36823ef2 | 39 | |
InoueTakashi | 0:944b36823ef2 | 40 | ); |
InoueTakashi | 0:944b36823ef2 | 41 | |
InoueTakashi | 0:944b36823ef2 | 42 | ~GUIinit(); |
InoueTakashi | 0:944b36823ef2 | 43 | |
InoueTakashi | 0:944b36823ef2 | 44 | void SetInit(sFONT &title_font, uint16_t btn_width); |
InoueTakashi | 0:944b36823ef2 | 45 | |
InoueTakashi | 0:944b36823ef2 | 46 | LCD_DISCO_F746NG* GetLcdPtrOth(); |
InoueTakashi | 0:944b36823ef2 | 47 | TS_DISCO_F746NG* GetTsPtrOth(); |
InoueTakashi | 0:944b36823ef2 | 48 | TS_StateTypeDef GetTsStateOth(); |
InoueTakashi | 0:944b36823ef2 | 49 | |
InoueTakashi | 0:944b36823ef2 | 50 | bool PanelTouchedOth(); |
InoueTakashi | 0:944b36823ef2 | 51 | |
InoueTakashi | 0:944b36823ef2 | 52 | protected: |
InoueTakashi | 0:944b36823ef2 | 53 | static LCD_DISCO_F746NG *lcd_p; // for LCD display pointer |
InoueTakashi | 0:944b36823ef2 | 54 | static TS_DISCO_F746NG *ts_p; // for touch pannel pointer |
InoueTakashi | 0:944b36823ef2 | 55 | static TS_StateTypeDef ts_state; |
InoueTakashi | 0:944b36823ef2 | 56 | |
InoueTakashi | 0:944b36823ef2 | 57 | static uint16_t g_width; |
InoueTakashi | 0:944b36823ef2 | 58 | static uint16_t g_height_offset; |
InoueTakashi | 0:944b36823ef2 | 59 | |
InoueTakashi | 0:944b36823ef2 | 60 | static uint16_t g_lcd_width; |
InoueTakashi | 0:944b36823ef2 | 61 | static uint16_t g_lcd_height; |
InoueTakashi | 0:944b36823ef2 | 62 | |
InoueTakashi | 0:944b36823ef2 | 63 | bool ts_touch_detected; |
InoueTakashi | 0:944b36823ef2 | 64 | |
InoueTakashi | 0:944b36823ef2 | 65 | BackInfo bk_info; |
InoueTakashi | 0:944b36823ef2 | 66 | |
InoueTakashi | 0:944b36823ef2 | 67 | //member variable |
InoueTakashi | 0:944b36823ef2 | 68 | uint16_t m_x, m_y; |
InoueTakashi | 0:944b36823ef2 | 69 | sFONT *m_fonts; |
InoueTakashi | 0:944b36823ef2 | 70 | uint32_t m_text_color; |
InoueTakashi | 0:944b36823ef2 | 71 | uint32_t m_back_color; |
InoueTakashi | 0:944b36823ef2 | 72 | uint32_t m_created_color; |
InoueTakashi | 0:944b36823ef2 | 73 | uint32_t m_touched_color; |
InoueTakashi | 0:944b36823ef2 | 74 | uint32_t m_inactive_color; |
InoueTakashi | 0:944b36823ef2 | 75 | uint32_t m_inactive_text_color; |
InoueTakashi | 0:944b36823ef2 | 76 | |
InoueTakashi | 0:944b36823ef2 | 77 | }; |
InoueTakashi | 0:944b36823ef2 | 78 | } |
InoueTakashi | 0:944b36823ef2 | 79 | |
InoueTakashi | 0:944b36823ef2 | 80 | #endif //F746_GUIINIT_HPP |
InoueTakashi | 0:944b36823ef2 | 81 | |
InoueTakashi | 0:944b36823ef2 | 82 |