Add wxSize::IsAtLeast() helper

This function is trivial but still useful and it doesn't cost much to
have it.
This commit is contained in:
Vadim Zeitlin 2023-08-25 17:41:28 +02:00
parent cc5f5f90b0
commit 15f19d5d0f
3 changed files with 25 additions and 0 deletions

View file

@ -332,6 +332,10 @@ public:
bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
// Check that this size object is at least as big as the other one in both
// directions.
bool IsAtLeast(const wxSize& sz) const { return x >= sz.x && y >= sz.y; }
// combine this size with the other one replacing the default (i.e. equal
// to wxDefaultCoord) components of this object with those of the other
void SetDefaults(const wxSize& size)