GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup, NumericUpDown
Dependencies: Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG
Dependents: F746_AudioOutQSPI F746_AudioPlayerSD DISCO-F746NG_test001 F746_SD_WavPlayer ... more
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 Wed Jul 13 2022 14:24:25 by 1.7.2