]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/wx/position.h
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / interface / wx / position.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: position.h
3// Purpose: interface of wxPosition
4// Author: wxWidgets team
5// Licence: wxWindows licence
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9 @class wxPosition
10
11 This class represents the position of an item in any kind of grid of rows and
12 columns such as wxGridBagSizer, or wxHVScrolledWindow.
13
14 @library{wxbase}
15 @category{data}
16
17 @see wxPoint, wxSize
18*/
19class wxPosition
20{
21public:
22
23 /**
24 Construct a new wxPosition, setting the row and column to the
25 default value of (0, 0).
26 */
27 wxPosition();
28
29 /**
30 Construct a new wxPosition, setting the row and column to the
31 value of (@a row, @a col).
32 */
33 wxPosition(int row, int col);
34
35 /**
36 A synonym for GetColumn().
37 */
38 int GetCol() const;
39
40 /**
41 Get the current row value.
42 */
43 int GetColumn() const;
44
45 /**
46 Get the current row value.
47 */
48 int GetRow() const;
49
50 /**
51 A synonym for SetColumn().
52 */
53 void SetCol(int column);
54
55 /**
56 Set a new column value.
57 */
58 void SetColumn(int column);
59
60 /**
61 Set a new row value.
62 */
63 void SetRow(int row);
64
65
66 /**
67 @name Miscellaneous operators
68
69 @{
70 */
71 bool operator ==(const wxPosition& pos) const;
72 bool operator !=(const wxPosition& pos) const;
73 wxPosition& operator +=(const wxPosition& pos);
74 wxPosition& operator -=(const wxPosition& pos);
75 wxPosition& operator +=(const wxSize& size);
76 wxPosition& operator -=(const wxSize& size);
77 wxPosition operator +(const wxPosition& pos) const;
78 wxPosition operator -(const wxPosition& pos) const;
79 wxPosition operator +(const wxSize& size) const;
80 wxPosition operator -(const wxSize& size) const;
81 //@}
82};
83