Takashi Inoue / F746_GUI_Other

Dependents:   DISCO-F746NG_test001

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GUIinit.hpp Source File

GUIinit.hpp

00001 //
00002 //  2016/04/27, Copyright (c) 2016 Takashi Inoue 
00003 //  Button OverLapping Class Header
00004 //  ver 0.9 rev 0.1 2016/5/18
00005 //-----------------------------------------------------------
00006 
00007 #ifndef F746_GUIINIT_HPP
00008 #define F746_GUIINIT_HPP
00009 
00010 #include "mbed.h"
00011 #include "TS_DISCO_F746NG.h"
00012 #include "LCD_DISCO_F746NG.h"
00013 #include "GuiBase.hpp"
00014 
00015 using namespace Mikami;
00016 
00017 namespace TakaIno
00018 {
00019     class GUIinit: public GuiBase
00020     {
00021       
00022         public:
00023         
00024           struct BackInfo       //GUI Back Infomation
00025             {
00026                 uint32_t i_txtColor;
00027                 uint32_t i_bakColor;
00028             };   
00029                
00030              GUIinit(           // if (No arg) then set default values
00031                 uint16_t x =0, uint16_t y =0,
00032                 sFONT &fonts = Font12,
00033                 uint32_t textColor         = LCD_COLOR_RED, 
00034                 uint32_t backColor         = LCD_COLOR_BLUE,
00035                 uint32_t createdColor      = LCD_COLOR_GRAY,
00036                 uint32_t touchedColor      = LCD_COLOR_WHITE,
00037                 uint32_t inactiveColor     = LCD_COLOR_ORANGE,
00038                 uint32_t inactiveTextColor = LCD_COLOR_GRAY
00039  
00040                    );
00041   
00042             ~GUIinit();
00043  
00044             void SetInit(sFONT &title_font, uint16_t btn_width);
00045                 
00046             LCD_DISCO_F746NG* GetLcdPtrOth();
00047             TS_DISCO_F746NG* GetTsPtrOth();
00048            TS_StateTypeDef GetTsStateOth();      
00049                     
00050             bool PanelTouchedOth();
00051                    
00052         protected:
00053             static LCD_DISCO_F746NG *lcd_p;  // for LCD display pointer
00054             static TS_DISCO_F746NG *ts_p;    // for touch pannel pointer
00055             static TS_StateTypeDef ts_state;
00056               
00057             static uint16_t g_width;
00058             static uint16_t g_height_offset; 
00059             
00060             static uint16_t g_lcd_width;
00061             static uint16_t g_lcd_height; 
00062                        
00063             bool ts_touch_detected;
00064             
00065             BackInfo bk_info;
00066             
00067             //member variable
00068             uint16_t m_x, m_y;
00069             sFONT *m_fonts;
00070             uint32_t m_text_color;
00071             uint32_t m_back_color;
00072             uint32_t m_created_color;
00073             uint32_t m_touched_color;
00074             uint32_t m_inactive_color;
00075             uint32_t m_inactive_text_color;  
00076  
00077     };
00078 }
00079 
00080 #endif //F746_GUIINIT_HPP
00081     
00082