1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/html/styleparams.h
3 // Purpose: wxHtml helper code for extracting style parameters
5 // Copyright: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_HTML_STYLEPARAMS_H_
10 #define _WX_HTML_STYLEPARAMS_H_
16 #include "wx/arrstr.h"
18 class WXDLLIMPEXP_FWD_HTML wxHtmlTag
;
20 // This is a private class used by wxHTML to parse "style" attributes of HTML
21 // elements. Currently both parsing and support for the parsed values is pretty
23 class WXDLLIMPEXP_HTML wxHtmlStyleParams
26 // Construct a style parameters object corresponding to the style attribute
27 // of the given HTML tag.
28 wxHtmlStyleParams(const wxHtmlTag
& tag
);
30 // Check whether the named parameter is present or not.
31 bool HasParam(const wxString
& par
) const
33 return m_names
.Index(par
, false /* ignore case */) != wxNOT_FOUND
;
36 // Get the value of the named parameter, return empty string if none.
37 wxString
GetParam(const wxString
& par
) const
39 int index
= m_names
.Index(par
, false);
40 return index
== wxNOT_FOUND
? wxString() : m_values
[index
];
44 // Arrays if names and values of the parameters
52 #endif // _WX_HTML_STYLEPARAMS_H_