Callback functions when using a class
The ESP8266WebServer uses callback functions to handle HTTP request by your code. This callback functions can't be members of a class. But you can use anonymous functions to implement this callbacks. And if you like you can implement them as 'redirects' to functions of your objects.

server.on("/leftbutton", []() {
  currentgui.leftbutton(server); 
}


Note: this anonymous functions are called lambda functions and they can do some tricks with parameters too