Wt
3.3.8
|
An abstract interface for a loading indicator. More...
#include <Wt/WLoadingIndicator>
Public Member Functions | |
WLoadingIndicator (WObject *parent=0) | |
Constructor. | |
virtual | ~WLoadingIndicator () |
Destructor. More... | |
virtual WWidget * | widget ()=0 |
Returns the widget that visually represents the indicator. More... | |
virtual void | setMessage (const WString &text)=0 |
Sets the message that you want to be displayed. More... | |
Public Member Functions inherited from Wt::WObject | |
WObject (WObject *parent=0) | |
Create a WObject with a given parent object. More... | |
virtual | ~WObject () |
Destructor. More... | |
virtual const std::string | id () const |
Returns the (unique) identifier for this object. More... | |
virtual void | setObjectName (const std::string &name) |
Sets an object name. More... | |
virtual std::string | objectName () const |
Returns the object name. More... | |
void | resetLearnedSlots () |
Resets learned stateless slot implementations. More... | |
template<class T > | |
void | resetLearnedSlot (void(T::*method)()) |
Resets a learned stateless slot implementation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)()) |
Declares a slot to be stateless and learn client-side behaviour on first invocation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
Declares a slot to be stateless and learn client-side behaviour in advance. More... | |
void | isNotStateless () |
Marks the current function as not stateless. More... | |
template<class T > | |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
Provides a JavaScript implementation for a method. More... | |
void | addChild (WObject *child) |
Adds a child object. More... | |
virtual void | removeChild (WObject *child) |
Removes a child object. More... | |
const std::vector< WObject * > & | children () const |
Returns the children. | |
WObject * | parent () 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. More... | |
Static Protected Member Functions inherited from Wt::WObject | |
static WObject * | sender () |
Returns the sender of the current slot call. More... | |
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).
|
virtual |
Destructor.
The destructor must delete the widget().
|
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.
|
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).
Implemented in Wt::WOverlayLoadingIndicator, and Wt::WDefaultLoadingIndicator.