Browse Source

Update various function descriptions and parameter names

Michael Ragazzon 1 year ago
parent
commit
01d4627b57

+ 3 - 2
Include/RmlUi/Core/Core.h

@@ -59,7 +59,8 @@ RMLUICORE_API void Shutdown();
 /// @return The version number.
 RMLUICORE_API String GetVersion();
 
-/// Sets the interface through which all system requests are made. This must be called before Initialise().
+/// Sets the interface through which all system requests are made. This is not required to be called, but if it is it
+/// must be called before Initialise().
 /// @param[in] system_interface A non-owning pointer to the application-specified logging interface.
 /// @lifetime The interface must be kept alive until after the call to Rml::Shutdown.
 RMLUICORE_API void SetSystemInterface(SystemInterface* system_interface);
@@ -132,7 +133,7 @@ RMLUICORE_API bool LoadFontFace(const String& file_path, bool fallback_face = fa
 /// @param[in] fallback_face True to use this font face for unknown characters in other font faces.
 /// @return True if the face was loaded successfully, false otherwise.
 /// @lifetime The pointed to 'data' must remain available until after the call to Rml::Shutdown.
-RMLUICORE_API bool LoadFontFace(Span<const byte> data, const String& font_family, Style::FontStyle style,
+RMLUICORE_API bool LoadFontFace(Span<const byte> data, const String& family, Style::FontStyle style,
 	Style::FontWeight weight = Style::FontWeight::Auto, bool fallback_face = false);
 
 /// Registers a generic RmlUi plugin.

+ 2 - 2
Include/RmlUi/Core/EventInstancer.h

@@ -50,8 +50,8 @@ public:
 
 	/// Instance an event object.
 	/// @param[in] target Target element of this event.
-	/// @param[in] id EventId of this event.
-	/// @param[in] name Name of this event.
+	/// @param[in] id ID of this event.
+	/// @param[in] type Name of this event type.
 	/// @param[in] parameters Additional parameters for this event.
 	/// @param[in] interruptible If the event propagation can be stopped.
 	virtual EventPtr InstanceEvent(Element* target, EventId id, const String& type, const Dictionary& parameters, bool interruptible) = 0;

+ 2 - 1
Include/RmlUi/Core/Factory.h

@@ -175,7 +175,8 @@ public:
 	static void RegisterEventInstancer(EventInstancer* instancer);
 	/// Instance an event object
 	/// @param[in] target Target element of this event.
-	/// @param[in] name Name of this event.
+	/// @param[in] id ID of this event.
+	/// @param[in] type Name of this event type.
 	/// @param[in] parameters Additional parameters for this event.
 	/// @param[in] interruptible If the event propagation can be stopped.
 	/// @return The instanced event.

+ 2 - 2
Source/Core/Core.cpp

@@ -328,9 +328,9 @@ bool LoadFontFace(const String& file_path, bool fallback_face, Style::FontWeight
 	return font_interface->LoadFontFace(file_path, fallback_face, weight);
 }
 
-bool LoadFontFace(Span<const byte> data, const String& font_family, Style::FontStyle style, Style::FontWeight weight, bool fallback_face)
+bool LoadFontFace(Span<const byte> data, const String& family, Style::FontStyle style, Style::FontWeight weight, bool fallback_face)
 {
-	return font_interface->LoadFontFace(data, font_family, style, weight, fallback_face);
+	return font_interface->LoadFontFace(data, family, style, weight, fallback_face);
 }
 
 void RegisterPlugin(Plugin* plugin)

+ 2 - 1
Source/Core/EventInstancerDefault.h

@@ -47,7 +47,8 @@ public:
 
 	/// Instance and event object
 	/// @param[in] target Target element of this event.
-	/// @param[in] name Name of this event.
+	/// @param[in] id ID of this event.
+	/// @param[in] type Name of this event type.
 	/// @param[in] parameters Additional parameters for this event.
 	/// @param[in] interruptible If the event propagation can be stopped.
 	EventPtr InstanceEvent(Element* target, EventId id, const String& type, const Dictionary& parameters, bool interruptible) override;

+ 2 - 2
Source/Core/FontEngineInterface.cpp

@@ -43,8 +43,8 @@ bool FontEngineInterface::LoadFontFace(const String& /*file_path*/, bool /*fallb
 	return false;
 }
 
-bool FontEngineInterface::LoadFontFace(Span<const byte> /*data*/, const String& /*font_family*/, Style::FontStyle /*style*/,
-	Style::FontWeight /*weight*/, bool /*fallback_face*/)
+bool FontEngineInterface::LoadFontFace(Span<const byte> /*data*/, const String& /*family*/, Style::FontStyle /*style*/, Style::FontWeight /*weight*/,
+	bool /*fallback_face*/)
 {
 	return false;
 }