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$
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@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.
|
|
|
|
|
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
|
|
|
|
|
|
|
|
@{
|
|
|
|
*/
|
2011-12-21 20:25:18 -05:00
|
|
|
bool operator ==(const wxPosition& pos) const;
|
|
|
|
bool operator !=(const wxPosition& pos) const;
|
2012-02-15 10:40:18 -05:00
|
|
|
wxPosition& operator +=(const wxPosition& pos);
|
|
|
|
wxPosition& operator -=(const wxPosition& pos);
|
|
|
|
wxPosition& operator +=(const wxSize& size);
|
|
|
|
wxPosition& operator -=(const wxSize& size);
|
2011-12-21 20:25:18 -05: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 17:16:38 -04:00
|
|
|
//@}
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|