]>
Dogcows Code - chaz/openbox/blob - otk/point.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
6 @brief The Point class contains an x/y pair
11 //! The Point class is an x/y coordinate or size pair
20 //! Constructs a new Point with 0,0 values
21 Point() : _x(0), _y(0) {}
22 //! Constructs a new Point with given values
23 Point(int x
, int y
) : _x(x
), _y(y
) {}
25 //! Changes the x value to the new value specified
26 void setX(int x
) { _x
= x
; }
27 //! Returns the x value
28 int x() const { return _x
; }
30 //! Changes the y value to the new value specified
31 void setY(int y
) { _y
= y
; }
32 //! Returns the y value
33 int y() const { return _y
; }
35 //! Changes the x and y values
36 void setPoint(int x
, int y
) { _x
= x
; _y
= y
; }
41 #endif /* __point_hh */
This page took 0.034729 seconds and 4 git commands to generate.