I updated Button::handler's signature from
void handler(const sf::RenderWindow& window, const sf::View& view);
to
void handler(const sf::RenderWindow& window, const sf::View& view, sf::Transformable* transformable = nullptr);
and then I am able to apply the transform to my rect
sf::FloatRect buttonRect(getPosition().x, getPosition().y, mSize.x, mSize.y);
if (transformable)
buttonRect = transformable->getTransform().transformRect(buttonRect);
This works. Now I am wondering if my motivation to use sf::Transformable is intended. The ToggleButton class inherits sf::Transformable, because I like how it "creates" a coordinate system for that object. For instance, within the ToggleButton object I can place a Button button0 at (0,0) and then I can place Button button1 at (button0.width + buffer, 0). Then I can set the position of the entire instance of the ToggleButton object in the game world. Granted, I only care about the position (and not rotation, scaling, etc), but is this the intended usage?
By the way, are you only using the transforms for position? Do you test something like sf::FloatRect::contains()?
Yes and yes.