X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fpoint.hh;h=66c3b14d039e57150587b55e7258212a5a72dad4;hb=a2de94e91e1c0e7775c97745ae11d14e5c5f5659;hp=093ad4cffe56f7b27d27f556cf34d51a7fa9a217;hpb=5dc5cc32b0c00c3bfba8ea5727599f49b56ae817;p=chaz%2Fopenbox diff --git a/otk/point.hh b/otk/point.hh index 093ad4cf..66c3b14d 100644 --- a/otk/point.hh +++ b/otk/point.hh @@ -3,23 +3,37 @@ #define __point_hh /*! @file point.hh + @brief The Point class contains an x/y pair */ namespace otk { +//! The Point class is an x/y coordinate or size pair class Point { private: - int _x, _y; + //! The x value + int _x; + //! The y value + int _y; public: + //! Constructs a new Point with 0,0 values Point() : _x(0), _y(0) {} + //! Constructs a new Point with given values Point(int x, int y) : _x(x), _y(y) {} + //! Changes the x value to the new value specified void setX(int x) { _x = x; } - void x() const { return _x; } + //! Returns the x value + int x() const { return _x; } - void setY(int x) { _x = x; } - void y() const { return _x; } + //! Changes the y value to the new value specified + void setY(int y) { _y = y; } + //! Returns the y value + int y() const { return _y; } + + //! Changes the x and y values + void setPoint(int x, int y) { _x = x; _y = y; } }; }