Browse Source

Merge pull request #19 from andryblack/master

some cosmetic fixes for cleared my binding code
Lloyd Weehuizen 14 years ago
parent
commit
a6d5308393

+ 3 - 0
Include/Rocket/Core/Element.h

@@ -422,6 +422,9 @@ public:
 	/// Gets the markup and content of the element.
 	/// Gets the markup and content of the element.
 	/// @param[out] content The content of the element.
 	/// @param[out] content The content of the element.
 	virtual void GetInnerRML(String& content) const;
 	virtual void GetInnerRML(String& content) const;
+	/// Gets the markup and content of the element.
+	/// @return The content of the element.
+	String GetInnerRML() const;
 	/// Sets the markup and content of the element. All existing children will be replaced.
 	/// Sets the markup and content of the element. All existing children will be replaced.
 	/// @param[in] rml The new content of the element.
 	/// @param[in] rml The new content of the element.
 	void SetInnerRML(const String& rml);
 	void SetInnerRML(const String& rml);

+ 1 - 1
Include/Rocket/Core/ElementDocument.h

@@ -70,7 +70,7 @@ public:
 
 
 	/// Sets the document's title.
 	/// Sets the document's title.
 	/// @param[in] title The new title of the document.
 	/// @param[in] title The new title of the document.
-	void SetTitle(String& title);
+	void SetTitle(const String& title);
 	/// Returns the title of this document.
 	/// Returns the title of this document.
 	/// @return The document's title.
 	/// @return The document's title.
 	const String& GetTitle() const;
 	const String& GetTitle() const;

+ 7 - 0
Source/Core/Element.cpp

@@ -880,6 +880,13 @@ void Element::GetInnerRML(String& content) const
 	}
 	}
 }
 }
 
 
+// Gets the markup and content of the element.
+String Element::GetInnerRML() const {
+	String result;
+	GetInnerRML(result);
+	return result;
+}
+
 // Sets the markup and content of the element. All existing children will be replaced.
 // Sets the markup and content of the element. All existing children will be replaced.
 void Element::SetInnerRML(const String& rml)
 void Element::SetInnerRML(const String& rml)
 {
 {

+ 1 - 1
Source/Core/ElementDocument.cpp

@@ -163,7 +163,7 @@ Context* ElementDocument::GetContext()
 }
 }
 
 
 // Sets the document's title.
 // Sets the document's title.
-void ElementDocument::SetTitle(String& _title)
+void ElementDocument::SetTitle(const String& _title)
 {
 {
 	title = _title;
 	title = _title;
 }
 }