Wt  3.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
Wt::WBootstrapTheme Class Reference

Theme based on the Twitter Bootstrap CSS framework. More...

#include <Wt/WBootstrapTheme>

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

Public Member Functions

 WBootstrapTheme (WObject *parent=0)
 Constructor.
virtual std::string name () const
 Returns a theme name.
virtual std::vector
< WCssStyleSheet
styleSheets () const
 Returns a vector with stylesheets for the theme.
virtual void apply (WWidget *widget, WWidget *child, int widgetRole) const
 Applies the theme to a child of a composite widget.
virtual void apply (WWidget *widget, DomElement &element, int elementRole) const
 Applies the theme to a DOM element that renders a widget.
virtual std::string disabledClass () const
 Returns a generic CSS class name for a disabled element.
virtual std::string activeClass () const
 Returns a generic CSS class name for an active element.
virtual bool canStyleAnchorAsButton () const
 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 > styles) const
 Applies a style that indicates the result of validation.
- Public Member Functions inherited from Wt::WTheme
 WTheme (WObject *parent=0)
 Constructor.
virtual ~WTheme ()
 Destructor.
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.
- Public Member Functions inherited from Wt::WObject
 WObject (WObject *parent=0)
 Create a WObject with a given parent object.
virtual ~WObject ()
 Destructor.
virtual const std::string id () const
 Returns the (unique) identifier for this object.
void setObjectName (const std::string &name)
 Sets an object name.
virtual std::string objectName () const
 Returns the object name.
void resetLearnedSlots ()
 Resets learned stateless slot implementations.
template<class T >
void resetLearnedSlot (void(T::*method)())
 Resets a learned stateless slot implementation.
template<class T >
WStatelessSlot * implementStateless (void(T::*method)())
 Declares a slot to be stateless and learn client-side behaviour on first invocation.
template<class T >
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 Declares a slot to be stateless and learn client-side behaviour in advance.
template<class T >
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 Provides a JavaScript implementation for a method.
void addChild (WObject *child)
 Adds a child object.
virtual void removeChild (WObject *child)
 Removes a child object.
const std::vector< WObject * > & children () const
 Returns the children.
WObjectparent () const
 Returns the parent object.

Additional Inherited Members

- Public Types inherited from Wt::WObject
typedef void(WObject::* Method )()
 Typedef for a WObject method without arguments.
- Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation.
- Static Protected Member Functions inherited from Wt::WObject
static WObjectsender ()
 Returns the sender of the current slot call.

Detailed Description

Theme based on the Twitter Bootstrap CSS framework.

By default, the theme will use CSS resources that are shipped together with the Wt distribution.

See Also
WApplication::setTheme()

Member Function Documentation

void Wt::WBootstrapTheme::apply ( WWidget widget,
WWidget child,
int  widgetRole 
) const
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.

Implements Wt::WTheme.

void Wt::WBootstrapTheme::apply ( WWidget widget,
DomElement &  element,
int  elementRole 
) const
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.

Implements Wt::WTheme.

std::string Wt::WBootstrapTheme::name ( ) const
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.

Implements Wt::WTheme.

std::vector< WCssStyleSheet > Wt::WBootstrapTheme::styleSheets ( ) const
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.

Implements Wt::WTheme.


Generated on Thu May 30 2013 for the C++ Web Toolkit (Wt) by doxygen 1.8.1.2