Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
GuiBase.cpp
00001 //----------------------------------------------------------- 00002 // GuiBase class (abstract base class) 00003 // 00004 // 2016/03/29, Copyright (c) 2016 MIKAMI, Naoki 00005 //----------------------------------------------------------- 00006 00007 #include "GuiBase.hpp" 00008 00009 namespace Mikami 00010 { 00011 GuiBase::GuiBase( 00012 uint16_t x, uint16_t y, sFONT &fonts, 00013 uint32_t textColor, uint32_t backColor, 00014 uint32_t createdColor, uint32_t touchedColor, 00015 uint32_t inactiveColor, uint32_t inactiveTextColor) 00016 : X_(x), Y_(y), FONTS_(&fonts), 00017 TEXT_COLOR_(textColor), BACK_COLOR_(backColor), 00018 CREATED_COLOR_(createdColor), 00019 TOUCHED_COLOR_(touchedColor), 00020 INACTIVE_COLOR_(inactiveColor), 00021 INACTIVE_TEXT_COLOR_(inactiveTextColor) 00022 { 00023 if (first_) 00024 { 00025 lcd_.Clear(backColor); 00026 first_ = false; 00027 } 00028 } 00029 00030 // If panel touched, return true 00031 bool GuiBase::PanelTouched() 00032 { 00033 ts_.GetState(&state_); 00034 return (bool)(state_.touchDetected); 00035 } 00036 00037 LCD_DISCO_F746NG GuiBase::lcd_; 00038 TS_DISCO_F746NG GuiBase::ts_; 00039 00040 TS_StateTypeDef GuiBase::state_; 00041 00042 bool GuiBase::multiTouch_ = false; 00043 bool GuiBase::first_ = true; 00044 }
Generated on Tue Jul 12 2022 15:39:21 by
1.7.2