I’m working a lot with Point class lately, and happened to use it sometimes to store a width and a height rather than actual x and y coordinates. It worked, but I think that having a Dimension (or Size) template class with get/setWidth and get/setHeight would be more elegant.
What do you think about it?
In addition, I’ve noticed that Component::getComponentAt exists both for integer coordinates and a Point argument, while contains () only accepts integer coordinates (the same for hitTest and some other virtual functions). What do you think about adding non-virtual functions that accepts Points and call the integer arguments counterparts?