@@ -51,7 +51,7 @@ class TextInputHandler;
5151enum class EventId : uint16_t ;
5252
5353/* *
54- A context for storing, rendering and processing RML documents. Multiple contexts can exist simultaneously.
54+ A context for storing, rendering, and processing RML documents. Multiple contexts can exist simultaneously.
5555
5656 @author Peter Curry
5757 */
@@ -85,7 +85,7 @@ class RMLUICORE_API Context : public ScriptInterface {
8585 float GetDensityIndependentPixelRatio () const ;
8686
8787 // / Updates all elements in the context's documents.
88- // / This must be called before Context::Render, but after any elements have been changed, added or removed.
88+ // / This must be called before Context::Render, but after any elements have been changed, added, or removed.
8989 bool Update ();
9090 // / Renders all visible elements in the context's documents.
9191 bool Render ();
@@ -117,7 +117,7 @@ class RMLUICORE_API Context : public ScriptInterface {
117117 void UnloadAllDocuments ();
118118
119119 // / Enable or disable handling of the mouse cursor from this context.
120- // / When enabled, changes to the cursor name is transmitted through the system interface.
120+ // / When enabled, changes to the cursor name are passed to the system interface.
121121 // / @param[in] enable True to enable mouse cursor handling, false to disable.
122122 void EnableMouseCursor (bool enable);
123123
@@ -151,11 +151,11 @@ class RMLUICORE_API Context : public ScriptInterface {
151151 // / @return The root element.
152152 Element* GetRootElement ();
153153
154- // Returns the youngest descendent of the given element which is under the given point in screen coordinates.
155- // @param[in] point The point to test.
156- // @param[in] ignore_element If set, this element and its descendents will be ignored.
157- // @param[in] element Used internally.
158- // @return The element under the point, or nullptr if nothing is.
154+ // / Returns the youngest descendent of the given element which is under the given point in screen coordinates.
155+ // / @param[in] point The point to test.
156+ // / @param[in] ignore_element If set, this element and its descendents will be ignored.
157+ // / @param[in] element Used internally.
158+ // / @return The element under the point, or nullptr if nothing is.
159159 Element* GetElementAtPoint (Vector2f point, const Element* ignore_element = nullptr , Element* element = nullptr ) const ;
160160
161161 // / Brings the document to the front of the document stack.
@@ -181,19 +181,19 @@ class RMLUICORE_API Context : public ScriptInterface {
181181
182182 // / Sends a key down event into this context.
183183 // / @param[in] key_identifier The key pressed.
184- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
184+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
185185 // / members of the Input::KeyModifier enumeration.
186186 // / @return True if the event was not consumed (ie, was prevented from propagating by an element), false if it was.
187187 bool ProcessKeyDown (Input::KeyIdentifier key_identifier, int key_modifier_state);
188188 // / Sends a key up event into this context.
189189 // / @param[in] key_identifier The key released.
190- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
190+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
191191 // / members of the Input::KeyModifier enumeration.
192192 // / @return True if the event was not consumed (ie, was prevented from propagating by an element), false if it was.
193193 bool ProcessKeyUp (Input::KeyIdentifier key_identifier, int key_modifier_state);
194194
195- // / Sends a single unicode character as text input into this context.
196- // / @param[in] character The unicode code point to send into this context.
195+ // / Sends a single Unicode character as text input into this context.
196+ // / @param[in] character The Unicode code point to send into this context.
197197 // / @return True if the event was not consumed (ie, was prevented from propagating by an element), false if it was.
198198 bool ProcessTextInput (Character character);
199199 // / Sends a single ascii character as text input into this context.
@@ -206,19 +206,19 @@ class RMLUICORE_API Context : public ScriptInterface {
206206 // / Sends a mouse movement event into this context.
207207 // / @param[in] x The x-coordinate of the mouse cursor, in window-coordinates (ie, 0 should be the left of the client area).
208208 // / @param[in] y The y-coordinate of the mouse cursor, in window-coordinates (ie, 0 should be the top of the client area).
209- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
209+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
210210 // / members of the Input::KeyModifier enumeration.
211211 // / @return True if the mouse is not interacting with any elements in the context (see 'IsMouseInteracting'), otherwise false.
212212 bool ProcessMouseMove (int x, int y, int key_modifier_state);
213213 // / Sends a mouse-button down event into this context.
214- // / @param[in] button_index The index of the button that was pressed; 0 for the left button, 1 for right, and 2 for middle button .
215- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
214+ // / @param[in] button_index The index of the button that was pressed. Left: 0, Right: 1, Middle: 2 .
215+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
216216 // / members of the Input::KeyModifier enumeration.
217217 // / @return True if the mouse is not interacting with any elements in the context (see 'IsMouseInteracting'), otherwise false.
218218 bool ProcessMouseButtonDown (int button_index, int key_modifier_state);
219219 // / Sends a mouse-button up event into this context.
220- // / @param[in] button_index The index of the button that was release; 0 for the left button, 1 for right, and 2 for middle button .
221- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
220+ // / @param[in] button_index The index of the button that was release. Left: 0, Right: 1, Middle: 2 .
221+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
222222 // / members of the Input::KeyModifier enumeration.
223223 // / @return True if the mouse is not interacting with any elements in the context (see 'IsMouseInteracting'), otherwise false.
224224 bool ProcessMouseButtonUp (int button_index, int key_modifier_state);
@@ -227,14 +227,14 @@ class RMLUICORE_API Context : public ScriptInterface {
227227 bool ProcessMouseWheel (float wheel_delta, int key_modifier_state);
228228 // / Sends a mousescroll event into this context, and scrolls the document unless the event was stopped from propagating.
229229 // / @param[in] wheel_delta The mouse-wheel movement this frame, with positive values being directed right and down.
230- // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc) keys; this should be generated by ORing together
230+ // / @param[in] key_modifier_state The state of key modifiers (shift, control, caps-lock, etc. ) keys; this should be generated by ORing together
231231 // / members of the Input::KeyModifier enumeration.
232232 // / @return True if the event was not consumed (ie, was prevented from propagating by an element), false if it was.
233233 bool ProcessMouseWheel (Vector2f wheel_delta, int key_modifier_state);
234234 // / Tells the context the mouse has left the window. This removes any hover state from all elements and prevents 'Update()' from setting the hover
235235 // / state for elements under the mouse.
236236 // / @return True if the mouse is not interacting with any elements in the context (see 'IsMouseInteracting'), otherwise false.
237- // / @note The mouse is considered activate again after the next call to 'ProcessMouseMove()'.
237+ // / @note The mouse is considered activated again after the next call to 'ProcessMouseMove()'.
238238 bool ProcessMouseLeave ();
239239
240240 // / Returns a hint on whether the mouse is currently interacting with any elements in this context, based on previously submitted
@@ -252,7 +252,7 @@ class RMLUICORE_API Context : public ScriptInterface {
252252 // / Retrieves the render manager which can be used to submit changes to the render state.
253253 RenderManager& GetRenderManager ();
254254
255- // / Obtains the text input handler.
255+ // / Retrieves the text input handler.
256256 TextInputHandler* GetTextInputHandler () const ;
257257
258258 // / Sets the instancer to use for releasing this object.
@@ -271,32 +271,29 @@ class RMLUICORE_API Context : public ScriptInterface {
271271 // / @return A constructor for the data model, or empty if it could not be found.
272272 DataModelConstructor GetDataModel (const String& name);
273273 // / Removes the given data model.
274- // / This also removes all data views, controllers and bindings contained by the data model.
274+ // / This also removes all data views, controllers, and bindings contained by the data model.
275275 // / @warning Invalidates all handles and constructors pointing to the data model.
276276 // / @param[in] name The name of the data model.
277- // / @return True if succesfully removed, false if no data model was found.
277+ // / @return True if successfully removed, false if no data model was found.
278278 bool RemoveDataModel (const String& name);
279279
280- // / This will set the documents base < tag> before creation. Default = "body"
280+ // / Sets the base tag name of documents before creation. Default: "body".
281281 // / @param[in] tag The name of the base tag. Example: "html"
282282 void SetDocumentsBaseTag (const String& tag);
283- // / Gets the name of the documents base tag .
284- // / @return The current documents base tag name.
283+ // / Gets the base tag name of documents.
284+ // / @return The current base tag name of documents .
285285 const String& GetDocumentsBaseTag ();
286286
287- // / Updates the time until Update should get called again. This can be used by elements
288- // / and the app to implement on demand rendering and thus drastically save CPU/GPU and
289- // / reduce power consumption during inactivity. The context stores the lowest requested
290- // / timestamp, which can later retrieved using GetNextUpdateDelay().
291- // / @param[in] delay Maximum time until next update
287+ // / Updates the time until Update() should get called again. This can be used by elements and the application to
288+ // / implement on-demand rendering and thus drastically save CPU/GPU and reduce power consumption during inactivity.
289+ // / The context stores the lowest requested timestamp, which can later be retrieved using GetNextUpdateDelay().
290+ // / @param[in] delay Maximum time until next update.
292291 void RequestNextUpdate (double delay);
293-
294- // / Get the max delay until update and render should get called again. An application can choose
295- // / to only call update and render once the time has elapsed, but theres no harm in doing so
296- // / more often. The returned value can be infinity, in which case update should be invoked after
297- // / user input was received. A value of 0 means "render as fast as possible", for example if
298- // / an animation is playing.
299- // / @return Time until next update is expected.
292+ // / Get the max delay until Update() and Render() should get called again. An application can choose to only call
293+ // / update and render once the time has elapsed, but there's no harm in doing so more often. The returned value can
294+ // / be infinity, in which case Update() should be invoked after user input was received. A value of 0 means "render
295+ // / as fast as possible", for example if an animation is playing.
296+ // / @return Time until the next update is expected.
300297 double GetNextUpdateDelay () const ;
301298
302299protected:
@@ -365,7 +362,7 @@ class RMLUICORE_API Context : public ScriptInterface {
365362 // Used when dragging a cloned object.
366363 Element* drag_clone;
367364
368- // The element currently being dragged over; this is equivalent to hover, but only set while an element is being
365+ // The element currently being dragged over. This is equivalent to hover, but only set while an element is being
369366 // dragged, and excludes the dragged element.
370367 Element* drag_hover;
371368 // Set of elements that are currently being dragged over; this differs from the hover state as the dragged element
@@ -397,7 +394,7 @@ class RMLUICORE_API Context : public ScriptInterface {
397394
398395 // Creates the drag clone from the given element. The old drag clone will be released if necessary.
399396 void CreateDragClone (Element* element);
400- // Releases the drag clone, if one exists.
397+ // Releases the drag clone if one exists.
401398 void ReleaseDragClone ();
402399
403400 // Scroll the target by the given amount, using smooth scrolling.
0 commit comments