Interfaçage NeoPixel Ring 12, LPRO MECSE, Arnaud A.

Committer:
Rhamao
Date:
Sun Jun 14 19:14:04 2020 +0000
Revision:
0:eccd33c01946
Child:
1:3ce68d55dfb8
1ere version de linterface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhamao 0:eccd33c01946 1 #ifndef BUTTON_H
Rhamao 0:eccd33c01946 2 #define BUTTON_H
Rhamao 0:eccd33c01946 3 #include "stm32746g_discovery_lcd.h"
Rhamao 0:eccd33c01946 4 class Button
Rhamao 0:eccd33c01946 5 {
Rhamao 0:eccd33c01946 6
Rhamao 0:eccd33c01946 7 public:
Rhamao 0:eccd33c01946 8 Button(int x = 50, int y = 50, int width = 50, int height = 30, uint32_t bgColor = LCD_COLOR_LIGHTGRAY, uint32_t borderWidth = 1);
Rhamao 0:eccd33c01946 9 void setText(const char *str, uint32_t textColor = LCD_COLOR_BLACK);
Rhamao 0:eccd33c01946 10 bool contain(int x, int y);
Rhamao 0:eccd33c01946 11 void draw();
Rhamao 0:eccd33c01946 12 int strlen(uint8_t *str);
Rhamao 0:eccd33c01946 13 bool etat(){return m_etat;}
Rhamao 0:eccd33c01946 14
Rhamao 0:eccd33c01946 15 private :
Rhamao 0:eccd33c01946 16 bool m_etat = false;
Rhamao 0:eccd33c01946 17 int16_t m_x = 0;
Rhamao 0:eccd33c01946 18 int16_t m_y = 0;
Rhamao 0:eccd33c01946 19 int16_t m_width = 50;
Rhamao 0:eccd33c01946 20 int16_t m_height = 30;
Rhamao 0:eccd33c01946 21 uint32_t m_bgColor = LCD_COLOR_LIGHTGRAY;
Rhamao 0:eccd33c01946 22 uint32_t m_borderColor = LCD_COLOR_GRAY;
Rhamao 0:eccd33c01946 23 uint32_t m_textColor = LCD_COLOR_BLACK;
Rhamao 0:eccd33c01946 24 uint32_t m_borderWidth = 1;
Rhamao 0:eccd33c01946 25 uint8_t m_text[30];
Rhamao 0:eccd33c01946 26 };
Rhamao 0:eccd33c01946 27 #endif