/////////////////////////////////////////////////////////////////////////////
// Name: position.h
-// Purpose: documentation for wxPosition class
+// Purpose: interface of wxPosition
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/**
@class wxPosition
@wxheader{position.h}
-
+
This class represents the position of an item in any kind of grid of rows and
- columns such as wxGridBagSizer, or
- wxHVScrolledWindow.
-
+ columns such as wxGridBagSizer, or wxHVScrolledWindow.
+
+ @todo rename this class to wxItemPosition or such, wxPosition is too generic
+
@library{wxbase}
- @category{FIXME}
-
- @seealso
- wxPoint, wxSize
+ @category{data}
+
+ @see wxPoint, wxSize
*/
-class wxPosition
+class wxPosition
{
public:
- //@{
+
/**
- Construct a new wxPosition, optionally setting the row and column. The
- default value is (0, 0).
+ Construct a new wxPosition, setting the row and column to the
+ default value of (0, 0).
*/
wxPosition();
- wxPosition(int row, int col);
- //@}
/**
- A synonym for GetColumn().
+ Construct a new wxPosition, setting the row and column to the
+ value of (@a row, @a col).
*/
- int GetCol();
+ wxPosition(int row, int col);
/**
- Get the current row value.
+ A synonym for GetColumn().
*/
- int GetColumn();
+ int GetCol() const;
/**
Get the current row value.
*/
- int GetRow();
+ int GetColumn() const;
- //@{
/**
-
+ Get the current row value.
*/
- bool operator ==(const wxPosition& p);
- bool operator !=(const wxPosition& p);
- wxPosition operator +=(const wxPosition& p);
- wxPosition operator -=(const wxPosition& p);
- wxPosition operator +=(const wxSize& s);
- wxPosition operator -=(const wxSize& s);
- wxPosition operator +(const wxPosition& p);
- wxPosition operator -(const wxPosition& p);
- wxPosition operator +(const wxSize& s);
- wxPosition operator -(const wxSize& s);
- //@}
+ int GetRow() const;
/**
A synonym for SetColumn().
Set a new row value.
*/
void SetRow(int row);
+
+
+ /**
+ @name Miscellaneous operators
+
+ @{
+ */
+ bool operator ==(const wxPosition& p) const;
+ bool operator !=(const wxPosition& p) const;
+ wxPosition& operator +=(const wxPosition& p) const;
+ wxPosition& operator -=(const wxPosition& p) const;
+ wxPosition& operator +=(const wxSize& s) const;
+ wxPosition& operator -=(const wxSize& s) const;
+ wxPosition& operator +(const wxPosition& p) const;
+ wxPosition& operator -(const wxPosition& p) const;
+ wxPosition& operator +(const wxSize& s) const;
+ wxPosition& operator -(const wxSize& s) const;
+ //@}
};
+