2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: position.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxPosition
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxPosition
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
This class represents the position of an item in any kind of grid of rows and
|
2008-04-10 21:16:38 +00:00
|
|
|
columns such as wxGridBagSizer, or wxHVScrolledWindow.
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxbase}
|
2008-04-10 21:16:38 +00:00
|
|
|
@category{data}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-10 15:24:38 +00:00
|
|
|
@see wxPoint, wxSize
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
class wxPosition
|
2008-03-08 13:52:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-04-10 21:16:38 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
2008-04-10 21:16:38 +00:00
|
|
|
Construct a new wxPosition, setting the row and column to the
|
|
|
|
default value of (0, 0).
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
wxPosition();
|
2008-04-10 21:16:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Construct a new wxPosition, setting the row and column to the
|
|
|
|
value of (@a row, @a col).
|
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
wxPosition(int row, int col);
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
A synonym for GetColumn().
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
int GetCol() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the current row value.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
int GetColumn() const;
|
2008-03-08 13:52:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
Get the current row value.
|
|
|
|
*/
|
2008-03-09 16:24:26 +00:00
|
|
|
int GetRow() const;
|
2008-03-08 13:52:38 +00: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 21:16:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@name Miscellaneous operators
|
|
|
|
|
|
|
|
@{
|
|
|
|
*/
|
2011-12-22 01:25:18 +00:00
|
|
|
bool operator ==(const wxPosition& pos) const;
|
|
|
|
bool operator !=(const wxPosition& pos) const;
|
2012-02-15 15:40:18 +00:00
|
|
|
wxPosition& operator +=(const wxPosition& pos);
|
|
|
|
wxPosition& operator -=(const wxPosition& pos);
|
|
|
|
wxPosition& operator +=(const wxSize& size);
|
|
|
|
wxPosition& operator -=(const wxSize& size);
|
2011-12-22 01:25:18 +00:00
|
|
|
wxPosition operator +(const wxPosition& pos) const;
|
|
|
|
wxPosition operator -(const wxPosition& pos) const;
|
|
|
|
wxPosition operator +(const wxSize& size) const;
|
|
|
|
wxPosition operator -(const wxSize& size) const;
|
2008-04-10 21:16:38 +00:00
|
|
|
//@}
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|