]>
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 | @wxheader{position.h} | |
12 | ||
13 | This class represents the position of an item in any kind of grid of rows and | |
14 | columns such as wxGridBagSizer, or wxHVScrolledWindow. | |
15 | ||
16 | @todo rename this class to wxItemPosition or such, wxPosition is too generic | |
17 | ||
18 | @library{wxbase} | |
19 | @category{data} | |
20 | ||
21 | @see wxPoint, wxSize | |
22 | */ | |
23 | class wxPosition | |
24 | { | |
25 | public: | |
26 | ||
27 | /** | |
28 | Construct a new wxPosition, setting the row and column to the | |
29 | default value of (0, 0). | |
30 | */ | |
31 | wxPosition(); | |
32 | ||
33 | /** | |
34 | Construct a new wxPosition, setting the row and column to the | |
35 | value of (@a row, @a col). | |
36 | */ | |
37 | wxPosition(int row, int col); | |
38 | ||
39 | /** | |
40 | A synonym for GetColumn(). | |
41 | */ | |
42 | int GetCol() const; | |
43 | ||
44 | /** | |
45 | Get the current row value. | |
46 | */ | |
47 | int GetColumn() const; | |
48 | ||
49 | /** | |
50 | Get the current row value. | |
51 | */ | |
52 | int GetRow() const; | |
53 | ||
54 | /** | |
55 | A synonym for SetColumn(). | |
56 | */ | |
57 | void SetCol(int column); | |
58 | ||
59 | /** | |
60 | Set a new column value. | |
61 | */ | |
62 | void SetColumn(int column); | |
63 | ||
64 | /** | |
65 | Set a new row value. | |
66 | */ | |
67 | void SetRow(int row); | |
68 | ||
69 | ||
70 | /** | |
71 | @name Miscellaneous operators | |
72 | ||
73 | @{ | |
74 | */ | |
75 | bool operator ==(const wxPosition& p) const; | |
76 | bool operator !=(const wxPosition& p) const; | |
77 | wxPosition& operator +=(const wxPosition& p) const; | |
78 | wxPosition& operator -=(const wxPosition& p) const; | |
79 | wxPosition& operator +=(const wxSize& s) const; | |
80 | wxPosition& operator -=(const wxSize& s) const; | |
81 | wxPosition& operator +(const wxPosition& p) const; | |
82 | wxPosition& operator -(const wxPosition& p) const; | |
83 | wxPosition& operator +(const wxSize& s) const; | |
84 | wxPosition& operator -(const wxSize& s) const; | |
85 | //@} | |
86 | }; | |
87 |