The Size
class is a small class holding the width and height:
Size.h
namespace SmallWindows {
The ZeroSize
object is an object with its width and height set to zero:
class Size; extern const Size ZeroSize; class Size { public:
The default constructor initializes the width and height to zero. The size can be initialized by, and assigned to, another size. The Size
class uses the assignment operator to assign a size to another size:
Size(); Size(int width, int height); Size(const Size& size); Size& operator=(const Size& size);
A Size
object can be initialized and assigned to a value of the Win32 API SIZE
structure, and a Size
object can be converted to a SIZE
:
Size(const SIZE& size); Size& operator=(const SIZE& size); operator SIZE() const;
When comparing two sizes, the widths are compared first. If they are equal, the heights are then...