Documentation button class adafruit gfx

Hi, I searched a while but didn't find any documentation für the adafruit_gfx_button class!
Thanks for help in advance!

Hi, I searched a while but didn't find any documentation für the adafruit_gfx_button class!

You have the source code. What more do you need?

PaulS:
You have the source code. What more do you need?

I'm not exactly sure what "isPressed()", "justPressed()" and "justReleased()" is good for as these seem not to be connected to the touch interface!?

Joegi:
I'm not exactly sure what "isPressed()", "justPressed()" and "justReleased()" is good for as these seem not to be connected to the touch interface!?

They don't? Whet do you think the Adafruit_GFX instance is for, that you supplied to the initButton() method?

PaulS:
They don't? Whet do you think the Adafruit_GFX instance is for, that you supplied to the initButton() method?

I think (but I have not much idea about c++) the gfx instance is only used for the graphics!?

I found this, so it seems that the state of the button has to be set manually!?

void TFT_eSPI_Button::press(boolean p) {
  laststate = currstate;
  currstate = p;
}

boolean TFT_eSPI_Button::isPressed()    { return currstate; }
boolean TFT_eSPI_Button::justPressed()  { return (currstate && !laststate); }
boolean TFT_eSPI_Button::justReleased() { return (!currstate && laststate); }