1 // This may look like C code, but it's really -*- C++ -*- 2 /* 3 * Copyright (C) 2016 Emweb bv, Herent, Belgium. 4 * 5 * See the LICENSE file for terms of use. 6 */ 7 #ifndef WLINKED_CSS_STYLE_SHEET_H_ 8 #define WLINKED_CSS_STYLE_SHEET_H_ 9 10 #include <vector> 11 #include <set> 12 #include <string> 13 14 #include <Wt/WGlobal.h> 15 #include <Wt/WLink.h> 16 17 namespace Wt { 18 19 class WStringStream; 20 21 /*! \class WLinkedCssStyleSheet Wt/WLinkedCssStyleSheet.h Wt/WLinkedCssStyleSheet.h 22 * \brief An external CSS style sheet. 23 * 24 * \sa WApplication::useStyleSheet() 25 * 26 * \ingroup style 27 */ 28 class WT_API WLinkedCssStyleSheet 29 { 30 public: 31 /*! \brief Creates a new (external) style sheet reference. 32 */ 33 WLinkedCssStyleSheet(const WLink& link, const std::string& media = "all"); 34 link()35 const WLink& link() const { return link_; } media()36 const std::string& media() const { return media_; } 37 38 void cssText(WStringStream& out) const; 39 40 private: 41 WLink link_; 42 std::string media_; 43 }; 44 45 } 46 47 #endif // WCSS_STYLE_SHEET_H_ 48