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