Wt  3.3.0
Public Member Functions
Wt::WTheme Class Reference

#include <Wt/WTheme>

Inheritance diagram for Wt::WTheme:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WTheme (WObject *parent=0)
 Constructor.
virtual ~WTheme ()
 Destructor.
virtual std::string name () const =0
 Returns a theme name.
virtual std::string resourcesUrl () const
 Returns the URL where theme-related resources are stored.
virtual void serveCss (WStringStream &out) const
 Serves the CSS for the theme.
virtual std::vector
< WCssStyleSheet
styleSheets () const =0
 Returns a vector with stylesheets for the theme.
virtual void apply (WWidget *widget, WWidget *child, int widgetRole) const =0
 Applies the theme to a child of a composite widget.
virtual void apply (WWidget *widget, DomElement &element, int elementRole) const =0
 Applies the theme to a DOM element that renders a widget.
virtual std::string disabledClass () const =0
 Returns a generic CSS class name for a disabled element.
virtual std::string activeClass () const =0
 Returns a generic CSS class name for an active element.
virtual bool canStyleAnchorAsButton () const =0
 Returns whether the theme allows for an anchor to be styled as a button.
virtual void applyValidationStyle (WWidget *widget, const Wt::WValidator::Result &validation, WFlags< ValidationStyleFlag > flags) const =0
 Applies a style that indicates the result of validation.

Detailed Description

Abstract base class for themes in Wt.

See also:
WApplication::setTheme()

Member Function Documentation

virtual void Wt::WTheme::apply ( WWidget widget,
WWidget child,
int  widgetRole 
) const [pure virtual]

Applies the theme to a child of a composite widget.

The widgetRole indicates the role that child has within the implementation of the widget.

Implemented in Wt::WCssTheme, and Wt::WBootstrapTheme.

virtual void Wt::WTheme::apply ( WWidget widget,
DomElement &  element,
int  elementRole 
) const [pure virtual]

Applies the theme to a DOM element that renders a widget.

The element is a rendered representation of the widget, and may be further customized to reflect the theme.

Implemented in Wt::WCssTheme, and Wt::WBootstrapTheme.

virtual std::string Wt::WTheme::name ( ) const [pure virtual]

Returns a theme name.

Returns a unique name for the theme. This name is used by the default implementation of resourcesUrl() to compute a location for the theme's resources.

Implemented in Wt::WCssTheme, and Wt::WBootstrapTheme.

std::string Wt::WTheme::resourcesUrl ( ) const [virtual]

Returns the URL where theme-related resources are stored.

The default implementation considers a folder within Wt's resource directory, based on the theme name().

void Wt::WTheme::serveCss ( WStringStream out) const [virtual]

Serves the CSS for the theme.

This must serve CSS declarations for the theme.

The default implementation serves all the styleSheets().

virtual std::vector<WCssStyleSheet> Wt::WTheme::styleSheets ( ) const [pure virtual]

Returns a vector with stylesheets for the theme.

This should return a vector with stylesheets that implement the theme. This list may be tailored to the current user agent, which is read from the application environment.

Implemented in Wt::WCssTheme, and Wt::WBootstrapTheme.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Mon Apr 8 2013 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1