2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: position.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxPosition
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxPosition
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
This class represents the position of an item in any kind of grid of rows and
|
2008-04-10 17:16:38 -04:00
|
|
|
columns such as wxGridBagSizer, or wxHVScrolledWindow.
|
|
|
|
|
|
|
|
@todo rename this class to wxItemPosition or such, wxPosition is too generic
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
2008-04-10 17:16:38 -04:00
|
|
|
@category{data}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxPoint, wxSize
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxPosition
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
2008-04-10 17:16:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
2008-04-10 17:16:38 -04:00
|
|
|
Construct a new wxPosition, setting the row and column to the
|
|
|
|
default value of (0, 0).
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxPosition();
|
2008-04-10 17:16:38 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
Construct a new wxPosition, setting the row and column to the
|
|
|
|
value of (@a row, @a col).
|
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxPosition(int row, int col);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
A synonym for GetColumn().
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetCol() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the current row value.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetColumn() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the current row value.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetRow() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
A synonym for SetColumn().
|
|
|
|
*/
|
|
|
|
void SetCol(int column);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set a new column value.
|
|
|
|
*/
|
|
|
|
void SetColumn(int column);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Set a new row value.
|
|
|
|
*/
|
|
|
|
void SetRow(int row);
|
2008-04-10 17:16:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@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;
|
|
|
|
//@}
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|