@@ -27,63 +27,63 @@ namespace RTEGUI {
27
27
28
28
#pragma region Getters and Setters
29
29
// / <summary>
30
- // /
30
+ // / Gets the GUI element that is currently selected by this.
31
31
// / </summary>
32
- // / <returns></returns>
32
+ // / <returns>Pointer to the GUIControl that is selected by this. </returns>
33
33
GUIControl * GetControl () const { return m_Control; }
34
34
35
35
// / <summary>
36
- // /
36
+ // / Sets the GUI element this is currently selected by this.
37
37
// / </summary>
38
- // / <param name="newControl"></param>
38
+ // / <param name="newControl">The GUIControl to set as selected by this. </param>
39
39
void SetControl (GUIControl *newControl) { m_Control = newControl; }
40
40
#pragma endregion
41
41
42
42
#pragma region Grabbing and Releasing
43
43
// / <summary>
44
- // /
44
+ // / Release any grabs made by this. Does not deselect the GUI element itself.
45
45
// / </summary>
46
46
void ReleaseAnyGrabs () { m_GrabbingControl = false ; m_GrabbingHandle = false ; m_GrabTriggered = false ; }
47
47
48
48
// / <summary>
49
- // /
49
+ // / Sets the GUI element as the current grab.
50
50
// / </summary>
51
51
void GrabControl (GUIControl *control, int mousePosX, int mousePosY);
52
52
53
53
// / <summary>
54
- // /
54
+ // / Gets whether the GUI element is grabbed or not.
55
55
// / </summary>
56
- // / <returns></returns>
56
+ // / <returns>Whether the GUI element is grabbed or not. </returns>
57
57
bool IsGrabbingControl () const { return m_GrabbingControl; }
58
58
59
59
// / <summary>
60
- // /
60
+ // / Gets whether the GUI element was grabbed and triggered by enough mouse movement.
61
61
// / </summary>
62
- // / <returns></returns>
62
+ // / <returns>True if both grabbed and moved enough to be triggered. </returns>
63
63
bool ControlGrabbedAndTriggered () const { return m_GrabbingControl && m_GrabTriggered; }
64
64
65
65
// / <summary>
66
- // /
66
+ // / Sets a resize handle as the current grab.
67
67
// / </summary>
68
68
void GrabHandle (int handleIndex, int mousePosX, int mousePosY);
69
69
70
70
// / <summary>
71
- // /
71
+ // / Gets whether a resize handle is grabbed or not.
72
72
// / </summary>
73
- // / <returns></returns>
73
+ // / <returns>Whether a resize handle is grabbed or not. </returns>
74
74
bool IsGrabbingHandle () const { return m_GrabbingHandle; }
75
75
76
76
// / <summary>
77
- // /
77
+ // / Gets whether a resize handle was grabbed and triggered by enough mouse movement.
78
78
// / </summary>
79
- // / <returns></returns>
79
+ // / <returns>True if both grabbed and moved enough to be triggered. </returns>
80
80
bool HandleGrabbedAndTriggered () const { return m_GrabbingHandle && m_GrabTriggered; }
81
81
82
82
// / <summary>
83
- // /
83
+ // / Checks whether there was enough mouse movement to trigger the grab function.
84
84
// / </summary>
85
- // / <param name="movedDistX"></param>
86
- // / <param name="movedDistY"></param>
85
+ // / <param name="movedDistX">Mouse X distance moved from grab position. </param>
86
+ // / <param name="movedDistY">Mouse Y distance moved from grab position. </param>
87
87
void CheckMovementAndSetTriggerGrab (int movedDistX, int movedDistY);
88
88
#pragma endregion
89
89
@@ -96,38 +96,38 @@ namespace RTEGUI {
96
96
int ProcessSnapCoord (int position) const ;
97
97
98
98
// / <summary>
99
- // / Calculates new position/size of a control given a handle movement.
99
+ // / Calculates new position/size of a GUI element given a handle movement.
100
100
// / </summary>
101
- // / <param name="MouseX">Mouse .</param>
102
- // / <param name="MouseY"></param>
103
- // / <param name="X">Position .</param>
104
- // / <param name="Y"></param>
105
- // / <param name="Width">Size .</param>
106
- // / <param name="Height"></param>
101
+ // / <param name="MouseX">X position of the mouse .</param>
102
+ // / <param name="MouseY">Y position of the mouse. </param>
103
+ // / <param name="X">X position of the element. Will be updated with the new position .</param>
104
+ // / <param name="Y">Y position of the element. Will be updated with the new position. </param>
105
+ // / <param name="Width">Width of the element. Will be updated with the new width .</param>
106
+ // / <param name="Height">Height of the element. Will be update with the new height. </param>
107
107
void CalculateHandleResize (int mousePosX, int mousePosY, int &xPos, int &yPos, int &width, int &height);
108
108
109
109
// / <summary>
110
- // /
110
+ // / Move the selected GUI element to the specified position.
111
111
// / </summary>
112
- // / <param name="newPosX"></param>
113
- // / <param name="newPosY"></param>
114
- // / <returns></returns>
112
+ // / <param name="newPosX">New X position of the element in the workspace. </param>
113
+ // / <param name="newPosY">New Y position of the element in the workspace. </param>
114
+ // / <returns>True to indicate the change was made. </returns>
115
115
bool MoveSelection (int newPosX, int newPosY) const ;
116
116
117
117
// / <summary>
118
- // /
118
+ // / Nudge the selected GUI element in the specified direction.
119
119
// / </summary>
120
- // / <param name="nudgeDirection"></param>
121
- // / <param name="preciseNudge"></param>
122
- // / <returns></returns>
120
+ // / <param name="nudgeDirection">The direction to nudge the element. </param>
121
+ // / <param name="preciseNudge">Whether precise nudge (1px) is enabled or not. </param>
122
+ // / <returns>True to indicate the change was made. </returns>
123
123
bool NudgeSelection (NudgeDirection nudgeDirection, bool preciseNudge) const ;
124
124
125
125
// / <summary>
126
- // /
126
+ // / Resize the selected GUI element with the resize handle.
127
127
// / </summary>
128
- // / <param name="xPosToCalcResize"></param>
129
- // / <param name="yPosToCalcResize"></param>
130
- // / <returns></returns>
128
+ // / <param name="xPosToCalcResize">X position of the mouse to calculate the new size with. </param>
129
+ // / <param name="yPosToCalcResize">Y position of the mouse to calculate the new size with. </param>
130
+ // / <returns>True to indicate the change was made. </returns>
131
131
bool ResizeSelection (int xPosToCalcResize, int yPosToCalcResize);
132
132
133
133
// / <summary>
@@ -138,7 +138,7 @@ namespace RTEGUI {
138
138
139
139
#pragma region Drawing
140
140
// / <summary>
141
- // / Draws the selection box around the selected control .
141
+ // / Draws the selection box around the selected GUI element .
142
142
// / </summary>
143
143
// / <param name="Control">GUI element to draw selection box around.</param>
144
144
void DrawSelectionBox (GUIScreen *screen, GUIInput *input);
@@ -155,11 +155,11 @@ namespace RTEGUI {
155
155
156
156
GUIControl *m_Control = nullptr ;
157
157
158
- bool m_GrabbingControl = false ;
159
- bool m_GrabbingHandle = false ;
160
- bool m_GrabTriggered = false ;
158
+ bool m_GrabbingControl = false ; // !< Indicates the element itself is grabbed by the mouse.
159
+ bool m_GrabbingHandle = false ; // !< Indicates a resize handle is grabbed by the mouse.
160
+ bool m_GrabTriggered = false ; // !< Indicates there was enough mouse movement from the grab position to trigger it's function.
161
161
162
- int m_HandleIndex = 0 ;
162
+ int m_HandleIndex = 0 ; // !< Resize handle index.
163
163
164
164
int m_GrabX = 0 ;
165
165
int m_GrabY = 0 ;
0 commit comments