Select one of the symbols to view example projects that use it.
 
Outline
#include <gui/menu_screen/MenuView.hpp>
#include <BitmapDatabase.hpp>
#include <gui/common/FrontendApplication.hpp>
#include <touchgfx/Color.hpp>
MenuView::MenuView()
MenuView::setupScreen()
MenuView::tearDownScreen()
MenuView::buttonPressedhandler(const AbstractButton &)
MenuView::addRoomToHomeAutomationTile(RoomTemperatureInfo &)
MenuView::initializeTiles()
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/gui/src/menu_screen/MenuView.cpp
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ #include <gui/menu_screen/MenuView.hpp> #include <BitmapDatabase.hpp> #include <gui/common/FrontendApplication.hpp> #include <touchgfx/Color.hpp> MenuView::MenuView() : onButtonPressed(this, &MenuView::buttonPressedhandler) { }{ ... } void MenuView::setupScreen() { backgroundTop.setBitmap(Bitmap(BITMAP_BACKGROUND_TOP_ID)); backgroundTop.setXY(0, 0); backgroundBottom.setBitmap(Bitmap(BITMAP_BACKGROUND_BOTTOM_ID)); backgroundBottom.setXY(0, HAL::DISPLAY_HEIGHT - backgroundBottom.getHeight()); liveDataDisplayTile.setXY(TILE_OFFSET, HAL::DISPLAY_HEIGHT - liveDataDisplayTile.getHeight() - TILE_OFFSET); homeAutomationTile.setXY(TILE_OFFSET, TILE_OFFSET); animatedGraphicsTile.setXY(TILE_OFFSET, homeAutomationTile.getY() + homeAutomationTile.getHeight() + TILE_OFFSET); chromArtTile.setXY(animatedGraphicsTile.getX() + animatedGraphicsTile.getWidth() + TILE_OFFSET - 3, animatedGraphicsTile.getY()); add(backgroundTop); add(liveDataDisplayTile); add(homeAutomationTile); add(animatedGraphicsTile); add(chromArtTile); add(backgroundBottom); }{ ... } void MenuView::tearDownScreen() { }{ ... } void MenuView::buttonPressedhandler(const AbstractButton& button) { }{ ... } void MenuView::addRoomToHomeAutomationTile(RoomTemperatureInfo& room) { homeAutomationTile.getTile().addRoom(room); }{ ... } void MenuView::initializeTiles() { homeAutomationTile.getTile().initialize(); }{ ... }