Stephane Marques / Mbed OS DISCO-F746NG_LCDTS_demo

Dependencies:   BSP_DISCO_F746NG

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers view.h Source File

view.h

00001 #ifndef VIEW_H
00002 #define VIEW_H
00003 #include "mbed.h"
00004 #include "button.h"
00005 #include "stm32746g_discovery_lcd.h"
00006 #include <list>
00007 
00008 #define SCREENWIDTH 480
00009 #define SCREENHEIGHT 272
00010 
00011 class View
00012 {
00013 public:
00014     View(int width = SCREENWIDTH, int height = SCREENHEIGHT, uint32_t bgColor = LCD_COLOR_WHITE);
00015     void contain(int x, int y);
00016     void draw();
00017     int *i;
00018     ~View();
00019     void drawImage(int offsetX, int offsetY);
00020 
00021 private :
00022     int16_t m_width = SCREENWIDTH;
00023     int16_t m_height = SCREENHEIGHT;
00024     uint32_t m_bgColor = LCD_COLOR_WHITE;
00025     list<Button *> m_buttonList;
00026 
00027 };
00028 
00029 #endif