Wt: Wt::WLoadingIndicator Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::WLoadingIndicator Class Reference

An abstract interface for a loading indicator. More...

`#include <Wt/WLoadingIndicator>`

Inheritance diagram for Wt::WLoadingIndicator:
[legend]

List of all members.

## Public Member Functions
virtual | ~WLoadingIndicator ()
| Destructor.
virtual WWidget * | widget ()=0
| Returns the widget that visually represents the indicator.
virtual void | setMessage (const WString &text)=0
| Sets the message that you want to be displayed.

## Detailed Description

An abstract interface for a loading indicator.

The loading indicator displays a message while a response from the server is pending.

By providing a custom implementation of this interface, you may use a custom loading indicator using WApplication::setLoadingIndicator(),instead of the default implementation (WDefaultLoadingIndicator).

See also:
  WApplication::setLoadingIndicator()

## Constructor & Destructor Documentation

Wt::WLoadingIndicator::~WLoadingIndicator | ( |  | ) | `[virtual]`

Destructor.

The destructor must delete the widget().

## Member Function Documentation

virtual void Wt::WLoadingIndicator::setMessage | ( | const WString & | text | ) | `[pure virtual]`

Sets the message that you want to be displayed.

If the indicator is capable of displaying a text message, then you should reimplement this method to allow this message to be modified.

Implemented in Wt::WOverlayLoadingIndicator, and Wt::WDefaultLoadingIndicator.

virtual WWidget* Wt::WLoadingIndicator::widget | ( |  | ) | `[pure virtual]`

Returns the widget that visually represents the indicator.

You should reimplement this method to return a widget that will be shown to indicate that a response is pending. The widget should be positioned using CSS.

The widget will be shown and hidden using WWidget::show() and WWidget::hide(). If you want to customize this behaviour, you should reimplement the WWidget::setHidden() method. Note that show() and hide() are stateless slots, and thus you need to make sure that your implementation comforms to that contract, so that it may be optimized to JavaScript (the server-side implementation will only be called during stateless slot prelearning).

Note:
  The widget will not be added to the WApplication::root() container.

Implemented in Wt::WOverlayLoadingIndicator, and Wt::WDefaultLoadingIndicator.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator