// Name: html/htmltag.h
// Purpose: interface of wxHtmlTag
// Author: wxWidgets team
-// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
Example: tag contains \<FONT SIZE=+2 COLOR="#000000"\>.
Call to tag.GetAllParams() would return @c 'SIZE=+2 COLOR="#000000"'.
*/
- const wxString GetAllParams() const;
+ wxString GetAllParams() const;
/**
Returns beginning position of the text @e between this tag and paired
/**
Returns tag's name. The name is always in uppercase and it doesn't contain
- " or '/' characters. (So the name of \<FONT SIZE=+2\> tag is "FONT"
+ " or '/' characters. (So the name of \<FONT SIZE=+2\> tag is "FONT"
and name of \</table\> is "TABLE").
*/
wxString GetName() const;
Returns @true on success and @false if @a par is not colour specification or
if the tag has no such parameter.
+
+ @see ParseAsColour()
*/
bool GetParamAsColour(const wxString& par, wxColour* clr) const;
*/
bool HasParam(const wxString& par) const;
+ /**
+ Parses the given string as an HTML colour.
+
+ This function recognizes the standard named HTML 4 colours as well as
+ the usual RGB syntax.
+
+ @since 2.9.1
+
+ @see wxColour::Set()
+
+ @return @true if the string was successfully parsed and @a clr was
+ filled with the result or @false otherwise.
+ */
+ static bool ParseAsColour(const wxString& str, wxColour *clr);
+
+ //@{
/**
This method scans the given parameter. Usage is exactly the same as sscanf's
usage except that you don't pass a string but a parameter name as the first
@param value
pointer to a variable to store the value in
*/
- wxString ScanParam(const wxString& par, const wxChar* format, void* value) const;
+ int ScanParam(const wxString& par, const wchar_t* format, void* value) const;
+ int ScanParam(const wxString& par, const char* format, void* value) const;
+ //@}
};