I'm developing a GUI for my mbed microcontroller and have a small question. I use a TFT class which has functions like TFTobject->drawrect(x,y,height, width)
Now I want to use classes like Button and Slider that have an abstract class InterfaceElement. But each Button or Slider needs access to the drawrect class. How can I do this the easiest without using a pointer to the TFTobject for each button/slider (Can't imagine this would be the way to do that)?
Thanks