Skip to content

Commit 2306a51

Browse files
committed
Add missing comments
1 parent 3184747 commit 2306a51

File tree

3 files changed

+55
-55
lines changed

3 files changed

+55
-55
lines changed

Editor/EditorManager.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ namespace RTEGUI {
130130
void DisableZoomCheckbox() const;
131131

132132
/// <summary>
133-
///
133+
/// Sets the frame time label text.
134134
/// </summary>
135-
/// <param name="frameTime"></param>
135+
/// <param name="frameTime">The new frame time value to set.</param>
136136
void SetFrameTimeLabelText(int64_t frameTime) const;
137137

138138
/// <summary>
139-
///
139+
/// Removes focus from whatever element currently focused in the editor controls.
140140
/// </summary>
141141
void RemoveFocus() const { m_EditorControlManager->GetManager()->SetFocus(nullptr); }
142142
#pragma endregion
@@ -155,9 +155,9 @@ namespace RTEGUI {
155155
void AddNewControlFromStoredCopyInfo() const;
156156

157157
/// <summary>
158-
///
158+
/// Remove a GUI element from the workspace.
159159
/// </summary>
160-
/// <param name="controlToRemove"></param>
160+
/// <param name="controlToRemove">The element to remove.</param>
161161
void RemoveControl(GUIControl *controlToRemove) const;
162162

163163
/// <summary>
@@ -170,35 +170,35 @@ namespace RTEGUI {
170170

171171
#pragma region Control Lists Handling
172172
/// <summary>
173-
///
173+
/// Find and set the selected entry from the parent list as the current active selection in the workspace.
174174
/// </summary>
175175
void SelectActiveControlFromParentList() const;
176176

177177
/// <summary>
178-
///
178+
/// Find and set the selected entry from the children list as the current active selection in the workspace.
179179
/// </summary>
180180
void SelectActiveControlFromChildrenList() const;
181181

182182
/// <summary>
183-
///
183+
/// Find and set the currently selected entry in the parent list to match the current active selection in the workspace.
184184
/// </summary>
185185
/// <param name="control"></param>
186186
void SelectActiveControlInParentList(GUIControl *control) const;
187187

188188
/// <summary>
189-
///
189+
/// Find and set the currently selected entry in the children list to match the current active selection in the workspace.
190190
/// </summary>
191191
void SelectActiveControlInChildrenList(GUIControl *control) const;
192192

193193
/// <summary>
194-
///
194+
/// Update and populate the parent CollectionBoxes list.
195195
/// </summary>
196196
void UpdateCollectionBoxList() const;
197197

198198
/// <summary>
199-
///
199+
/// Update and populate the specified CollectionBox's children list.
200200
/// </summary>
201-
/// <param name="collectionBox"></param>
201+
/// <param name="collectionBox">The CollectionBox to update children list for.</param>
202202
void UpdateCollectionBoxChildrenList(GUICollectionBox *collectionBox) const;
203203
#pragma endregion
204204

Editor/EditorSelection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace RTEGUI {
3838
bool result = m_GrabTriggered;
3939
if ((m_GrabbingControl || m_GrabbingHandle) && !m_GrabTriggered) {
4040
int moveDist = 4;
41-
result = std::fabs(m_ClickX - movedDistX) >= moveDist || std::fabs(m_ClickY - movedDistY) >= moveDist;
41+
result = std::abs(m_ClickX - movedDistX) >= moveDist || std::abs(m_ClickY - movedDistY) >= moveDist;
4242
}
4343
m_GrabTriggered = result;
4444
}

Editor/EditorSelection.h

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,63 +27,63 @@ namespace RTEGUI {
2727

2828
#pragma region Getters and Setters
2929
/// <summary>
30-
///
30+
/// Gets the GUI element that is currently selected by this.
3131
/// </summary>
32-
/// <returns></returns>
32+
/// <returns>Pointer to the GUIControl that is selected by this.</returns>
3333
GUIControl * GetControl() const { return m_Control; }
3434

3535
/// <summary>
36-
///
36+
/// Sets the GUI element this is currently selected by this.
3737
/// </summary>
38-
/// <param name="newControl"></param>
38+
/// <param name="newControl">The GUIControl to set as selected by this.</param>
3939
void SetControl(GUIControl *newControl) { m_Control = newControl; }
4040
#pragma endregion
4141

4242
#pragma region Grabbing and Releasing
4343
/// <summary>
44-
///
44+
/// Release any grabs made by this. Does not deselect the GUI element itself.
4545
/// </summary>
4646
void ReleaseAnyGrabs() { m_GrabbingControl = false; m_GrabbingHandle = false; m_GrabTriggered = false; }
4747

4848
/// <summary>
49-
///
49+
/// Sets the GUI element as the current grab.
5050
/// </summary>
5151
void GrabControl(GUIControl *control, int mousePosX, int mousePosY);
5252

5353
/// <summary>
54-
///
54+
/// Gets whether the GUI element is grabbed or not.
5555
/// </summary>
56-
/// <returns></returns>
56+
/// <returns>Whether the GUI element is grabbed or not.</returns>
5757
bool IsGrabbingControl() const { return m_GrabbingControl; }
5858

5959
/// <summary>
60-
///
60+
/// Gets whether the GUI element was grabbed and triggered by enough mouse movement.
6161
/// </summary>
62-
/// <returns></returns>
62+
/// <returns>True if both grabbed and moved enough to be triggered.</returns>
6363
bool ControlGrabbedAndTriggered() const { return m_GrabbingControl && m_GrabTriggered; }
6464

6565
/// <summary>
66-
///
66+
/// Sets a resize handle as the current grab.
6767
/// </summary>
6868
void GrabHandle(int handleIndex, int mousePosX, int mousePosY);
6969

7070
/// <summary>
71-
///
71+
/// Gets whether a resize handle is grabbed or not.
7272
/// </summary>
73-
/// <returns></returns>
73+
/// <returns>Whether a resize handle is grabbed or not.</returns>
7474
bool IsGrabbingHandle() const { return m_GrabbingHandle; }
7575

7676
/// <summary>
77-
///
77+
/// Gets whether a resize handle was grabbed and triggered by enough mouse movement.
7878
/// </summary>
79-
/// <returns></returns>
79+
/// <returns>True if both grabbed and moved enough to be triggered.</returns>
8080
bool HandleGrabbedAndTriggered() const { return m_GrabbingHandle && m_GrabTriggered; }
8181

8282
/// <summary>
83-
///
83+
/// Checks whether there was enough mouse movement to trigger the grab function.
8484
/// </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>
8787
void CheckMovementAndSetTriggerGrab(int movedDistX, int movedDistY);
8888
#pragma endregion
8989

@@ -96,38 +96,38 @@ namespace RTEGUI {
9696
int ProcessSnapCoord(int position) const;
9797

9898
/// <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.
100100
/// </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>
107107
void CalculateHandleResize(int mousePosX, int mousePosY, int &xPos, int &yPos, int &width, int &height);
108108

109109
/// <summary>
110-
///
110+
/// Move the selected GUI element to the specified position.
111111
/// </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>
115115
bool MoveSelection(int newPosX, int newPosY) const;
116116

117117
/// <summary>
118-
///
118+
/// Nudge the selected GUI element in the specified direction.
119119
/// </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>
123123
bool NudgeSelection(NudgeDirection nudgeDirection, bool preciseNudge) const;
124124

125125
/// <summary>
126-
///
126+
/// Resize the selected GUI element with the resize handle.
127127
/// </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>
131131
bool ResizeSelection(int xPosToCalcResize, int yPosToCalcResize);
132132

133133
/// <summary>
@@ -138,7 +138,7 @@ namespace RTEGUI {
138138

139139
#pragma region Drawing
140140
/// <summary>
141-
/// Draws the selection box around the selected control.
141+
/// Draws the selection box around the selected GUI element.
142142
/// </summary>
143143
/// <param name="Control">GUI element to draw selection box around.</param>
144144
void DrawSelectionBox(GUIScreen *screen, GUIInput *input);
@@ -155,11 +155,11 @@ namespace RTEGUI {
155155

156156
GUIControl *m_Control = nullptr;
157157

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.
161161

162-
int m_HandleIndex = 0;
162+
int m_HandleIndex = 0; //!< Resize handle index.
163163

164164
int m_GrabX = 0;
165165
int m_GrabY = 0;

0 commit comments

Comments
 (0)