toggle method

bool toggle()

Implementation

bool toggle() {
  selected = !selected;
  shouldRepaint = true;
  return selected;
}