|
Nol.A SDK Library 26.11.2
For IoT System Software Development
|
Drawable button geometry with application-supplied press state. More...
#include <Adafruit_GFX.hpp>
Public Member Functions | |
| Adafruit_GFX_Button (void) | |
| Construct an unconfigured button; call initButton() or initButtonUL() before drawing. | |
| void | initButton (Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize) |
| Configure a button using center x/y and width/height in pixels. The graphics surface must outlive the button; at most nine label characters are stored. | |
| void | initButtonUL (Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize) |
| Configure a button using upper-left x1/y1 and width/height in pixels. The graphics surface must outlive the button; at most nine label characters are stored. | |
| void | drawButton (boolean inverted=false) |
| Render the button, exchanging fill/text colors when inverted is true. | |
| void | press (boolean p) |
| Store the current pressed state and retain the previous state for edge queries. | |
| boolean | contains (int16_t x, int16_t y) |
| Return whether the pixel coordinate x/y lies inside the button rectangle. | |
| boolean | isPressed () |
| Return the last state supplied to press(). | |
| boolean | justPressed () |
| Return true for a released-to-pressed transition in the last press() update. | |
| boolean | justReleased () |
| Return true for a pressed-to-released transition in the last press() update. | |
Drawable button geometry with application-supplied press state.