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