|
Wt
3.2.1
|
A progress bar. More...

Public Member Functions | |
| WProgressBar (WContainerWidget *parent=0) | |
| Creates a progress bar. | |
| void | setMinimum (double minimum) |
| Sets the minimum value. | |
| double | minimum () const |
| Returns the minimum value. | |
| void | setMaximum (double maximum) |
| Sets the maximum value. | |
| double | maximum () const |
| Returns the maximum value. | |
| void | setRange (double minimum, double maximum) |
| Sets the range. | |
| void | setValue (double value) |
| Sets the current progress. | |
| double | value () const |
| Returns the current progress. | |
| void | setFormat (const WString &format) |
| Sets the progress format string. | |
| const WString & | format () const |
| Returns the progress format string. | |
| virtual WString | text () const |
| Returns the text displayed inside the progress bar. | |
| Signal< double > & | valueChanged () |
| A signal that indicates when the value has changed. | |
| Signal & | progressCompleted () |
| A signal that indicates when 100% is reached. | |
| virtual void | resize (const WLength &width, const WLength &height) |
| Resizes the widget. | |
Public Member Functions inherited from Wt::WInteractWidget | |
| WInteractWidget (WContainerWidget *parent=0) | |
| Create an InteractWidget with optional parent. | |
| EventSignal< WKeyEvent > & | keyWentDown () |
| Event signal emitted when a keyboard key is pushed down. | |
| EventSignal< WKeyEvent > & | keyPressed () |
| Event signal emitted when a "character" was entered. | |
| EventSignal< WKeyEvent > & | keyWentUp () |
| Event signal emitted when a keyboard key is released. | |
| EventSignal & | enterPressed () |
| Event signal emitted when enter was pressed. | |
| EventSignal & | escapePressed () |
| Event signal emitted when escape was pressed. | |
| EventSignal< WMouseEvent > & | clicked () |
| Event signal emitted when a mouse key was clicked on this widget. | |
| EventSignal< WMouseEvent > & | doubleClicked () |
| Event signal emitted when a mouse key was double clicked on this widget. | |
| EventSignal< WMouseEvent > & | mouseWentDown () |
| Event signal emitted when a mouse key was pushed down on this widget. | |
| EventSignal< WMouseEvent > & | mouseWentUp () |
| Event signal emitted when a mouse key was released on this widget. | |
| EventSignal< WMouseEvent > & | mouseWentOut () |
| Event signal emitted when the mouse went out of this widget. | |
| EventSignal< WMouseEvent > & | mouseWentOver () |
| Event signal emitted when the mouse entered this widget. | |
| EventSignal< WMouseEvent > & | mouseMoved () |
| Event signal emitted when the mouse moved over this widget. | |
| EventSignal< WMouseEvent > & | mouseDragged () |
| Event signal emitted when the mouse is dragged over this widget. | |
| EventSignal< WMouseEvent > & | mouseWheel () |
| Event signal emitted when the mouse scroll wheel was used. | |
| EventSignal< WTouchEvent > & | touchStarted () |
| Event signal emitted when a finger is placed on the screen. | |
| EventSignal< WTouchEvent > & | touchEnded () |
| Event signal emitted when a finger is removed from the screen. | |
| EventSignal< WTouchEvent > & | touchMoved () |
| Event signal emitted when a finger, which is already placed on the screen, is moved across the screen. | |
| EventSignal< WGestureEvent > & | gestureStarted () |
| Event signal emitted when a gesture is started. | |
| EventSignal< WGestureEvent > & | gestureChanged () |
| Event signal emitted when a gesture is changed. | |
| EventSignal< WGestureEvent > & | gestureEnded () |
| Event signal emitted when a gesture is ended. | |
| void | setDraggable (const std::string &mimeType, WWidget *dragWidget=0, bool isDragWidgetOnly=false, WObject *sourceWidget=0) |
| Configure dragging for drag and drop. | |
| virtual void | load () |
| Loads content just before the widget is used. | |
| virtual bool | isEnabled () const |
| Returns whether the widget is enabled. | |
Public Member Functions inherited from Wt::WWebWidget | |
| WWebWidget (WContainerWidget *parent=0) | |
| Construct a WebWidget with a given parent. | |
| virtual void | setPositionScheme (PositionScheme scheme) |
| Sets the CSS position scheme. | |
| virtual PositionScheme | positionScheme () const |
| Returns the CSS position scheme. | |
| virtual void | setOffsets (const WLength &offset, WFlags< Side > sides=All) |
| Sets CSS offsets for a non-statically positioned widget. | |
| virtual WLength | offset (Side s) const |
| Returns a CSS offset. | |
| virtual WLength | width () const |
| Returns the width. | |
| virtual WLength | height () const |
| Returns the height. | |
| virtual void | setMinimumSize (const WLength &width, const WLength &height) |
| Sets a minimum size. | |
| virtual WLength | minimumWidth () const |
| Returns the minimum width. | |
| virtual WLength | minimumHeight () const |
| Returns the minimum height. | |
| virtual void | setMaximumSize (const WLength &width, const WLength &height) |
| Sets a maximum size. | |
| virtual WLength | maximumWidth () const |
| Returns the maximum width. | |
| virtual WLength | maximumHeight () const |
| Returns the maximum height. | |
| virtual void | setLineHeight (const WLength &height) |
| Sets the CSS line height for contained text. | |
| virtual WLength | lineHeight () const |
| Returns the CSS line height for contained text. | |
| virtual void | setFloatSide (Side s) |
| Specifies a CSS float side. | |
| virtual Side | floatSide () const |
| Returns the CSS float side. | |
| virtual void | setClearSides (WFlags< Side > sides) |
| Sets the sides that should be cleared of floats. | |
| virtual WFlags< Side > | clearSides () const |
| Returns the sides that should remain empty. | |
| virtual void | setMargin (const WLength &margin, WFlags< Side > sides=All) |
| Sets CSS margins around the widget. | |
| virtual WLength | margin (Side side) const |
| Returns a CSS margin set. | |
| virtual void | setHiddenKeepsGeometry (bool enabled) |
| Sets whether the widget keeps its geometry when hidden. | |
| virtual bool | hiddenKeepsGeometry () const |
| Returns whether the widget keeps its geometry when hidden. | |
| virtual void | setHidden (bool hidden, const WAnimation &animation=WAnimation()) |
| Hides or shows the widget. | |
| virtual bool | isHidden () const |
| Returns whether the widget is set hidden. | |
| virtual bool | isVisible () const |
| Returns whether the widget is visible. | |
| virtual void | setDisabled (bool disabled) |
| Sets whether the widget is disabled. | |
| virtual bool | isDisabled () const |
| Returns whether the widget is set disabled. | |
| virtual void | setPopup (bool popup) |
| Lets the widget overlay over other sibling widgets. | |
| virtual bool | isPopup () const |
| Returns whether the widget is overlayed. | |
| virtual void | setInline (bool isInline) |
| Sets whether the widget is displayed inline or as a block. | |
| virtual bool | isInline () const |
| Returns whether the widget is displayed inline or as block. | |
| virtual void | setDecorationStyle (const WCssDecorationStyle &style) |
| Sets a CSS decoration style. | |
| virtual WCssDecorationStyle & | decorationStyle () |
| Returns the decoration style of this widget. | |
| virtual void | setStyleClass (const WString &styleClass) |
| Sets (one or more) CSS style classes. | |
| virtual WString | styleClass () const |
| Returns the CSS style class. | |
| virtual void | addStyleClass (const WString &styleClass, bool force=false) |
| Adds a CSS style class. | |
| virtual void | removeStyleClass (const WString &styleClass, bool force=false) |
| Removes a CSS style class. | |
| virtual void | setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength()) |
| Sets the vertical alignment. | |
| virtual AlignmentFlag | verticalAlignment () const |
| Returns the vertical alignment. | |
| virtual WLength | verticalAlignmentLength () const |
| Returns the fixed vertical alignment that was set. | |
| virtual void | setToolTip (const WString &text, TextFormat textFormat=PlainText) |
| Sets a tooltip. | |
| virtual WString | toolTip () const |
| Returns the tooltip. | |
| virtual void | refresh () |
| Refresh the widget. | |
| virtual void | setAttributeValue (const std::string &name, const WString &value) |
| Sets an attribute value. | |
| virtual WString | attributeValue (const std::string &name) const |
| Returns an attribute value. | |
| virtual void | setJavaScriptMember (const std::string &name, const std::string &value) |
| Sets a JavaScript member. | |
| virtual std::string | javaScriptMember (const std::string &name) const |
| Returns the value of a JavaScript member. | |
| virtual void | callJavaScriptMember (const std::string &name, const std::string &args) |
| Calls a JavaScript member. | |
| virtual bool | loaded () const |
| Returns whether this widget has been loaded. | |
| virtual void | setTabIndex (int index) |
| Sets the tab index. | |
| virtual int | tabIndex () const |
| Returns the tab index. | |
| virtual void | setId (const std::string &id) |
| Sets the CSS Id. | |
| virtual WWidget * | find (const std::string &name) |
| Finds a descendent widget by name. | |
| virtual void | setSelectable (bool selectable) |
| Sets as selectable. | |
| virtual void | doJavaScript (const std::string &javascript) |
| Executes the given JavaScript statements when the widget is rendered or updated. | |
| virtual const std::string | id () const |
| Returns the (unique) identifier for this object. | |
| void | setLoadLaterWhenInvisible (bool) |
| Change the way the widget is loaded when invisible. | |
| const std::vector< WWidget * > & | children () const |
| Returns contained widgets. | |
| Signal & | childrenChanged () |
| Signal emitted when children have been added or removed. | |
| bool | isRendered () const |
| Returns whether the widget is rendered. | |
Public Member Functions inherited from Wt::WWidget | |
| virtual | ~WWidget () |
| Destructor. | |
| WWidget * | parent () const |
| Returns the parent widget. | |
| void | setWidth (const WLength &width) |
| Sets the width. | |
| void | setHeight (const WLength &height) |
| Sets the height. | |
| virtual void | positionAt (const WWidget *widget, Orientation orientation=Vertical) |
| Positions a widget next to another widget. | |
| std::string | jsRef () const |
| Returns a JavaScript expression to the corresponding DOM node. | |
| virtual void | acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString()) |
| Sets a mime type to be accepted for dropping. | |
| virtual void | stopAcceptDrops (const std::string &mimeType) |
| Indicates that a mime type is no longer accepted for dropping. | |
| virtual void | htmlText (std::ostream &out) |
| Streams the (X)HTML representation. | |
| void | hide () |
| Hides the widget. | |
| void | animateHide (const WAnimation &animation) |
| Hides the widget using an animation. | |
| void | show () |
| Shows the widget. | |
| void | animateShow (const WAnimation &animation) |
| Shows the widget using an animation. | |
| void | enable () |
| Enables the widget. | |
| void | disable () |
| Disable thes widget. | |
| bool | layoutSizeAware () const |
| Returns whether the widget is layout size aware. | |
Public Member Functions inherited from Wt::WObject | |
| WObject (WObject *parent=0) | |
| Create a WObject with a given parent object. | |
| virtual | ~WObject () |
| Destructor. | |
| 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. | |
Additional Inherited Members | |
Public Types inherited from Wt::WObject | |
| typedef void(WObject::* | Method )() |
| Typedef for a WObject method without arguments. | |
Static Public Member Functions inherited from Wt::WWebWidget | |
| static WString | escapeText (const WString &text, bool newlinesToo=false) |
| Escape HTML control characters in the text, to display literally (deprecated). | |
| static std::string & | escapeText (std::string &text, bool newlinestoo=false) |
| Escape HTML control characters in the text, to display literally (deprecated). | |
| static bool | removeScript (WString &text) |
| Remove tags/attributes from text that are not passive (deprecated). | |
| static std::string | jsStringLiteral (const std::string &v, char delimiter= '\'') |
| Turn a UTF8 encoded string into a JavaScript string literal. | |
Protected Member Functions inherited from Wt::WInteractWidget | |
| virtual void | propagateSetEnabled (bool enabled) |
| Propagates that a widget was enabled or disabled through children. | |
Static Protected Member Functions inherited from Wt::WObject | |
| static WObject * | sender () |
| Returns the sender of the current slot call. | |
A progress bar.
The progress bar can be used to indicate the progress of a certain operation. The text displayed in the progress bar can be customized by specializing text().
To use the progress bar, you need to give it a range (minimum and maximum value), and update the progress using setValue().
WProgressBar is an inline widget.
Using HTML4, the widget is implemented using a set of nested DIVs. The element can be styled using the Wt-progressbar style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.
| const WString& Wt::WProgressBar::format | ( | ) | const |
Returns the progress format string.
| double Wt::WProgressBar::maximum | ( | ) | const |
Returns the maximum value.
| double Wt::WProgressBar::minimum | ( | ) | const |
Returns the minimum value.
| Signal& Wt::WProgressBar::progressCompleted | ( | ) |
A signal that indicates when 100% is reached.
This signal is emitted when setValue(maximum()) is called.
Resizes the widget.
Specify a new size for this widget, by specifying width and height. By default a widget has automatic width and height, see WLength::isAuto().
This applies to CSS-based layout, and only block widgets can be given a size reliably.
When inserted in a layout manager, the widget may be informed about its current size using setLayoutSizeAware(). If you have defined a "wtResize()" JavaScript method for the widget, then this method will also be called. operation.
Reimplemented from Wt::WWebWidget.
| void Wt::WProgressBar::setFormat | ( | const WString & | format | ) |
Sets the progress format string.
The format is used by text() to indicate the progress value.
The default value is "%.0f %%"
| void Wt::WProgressBar::setMaximum | ( | double | maximum | ) |
Sets the maximum value.
The maximum value is the value that corresponds to 100%.
The default value is 100.
| void Wt::WProgressBar::setMinimum | ( | double | minimum | ) |
Sets the minimum value.
The minimum value is the value that corresponds to 0%.
The default value is 0.
| void Wt::WProgressBar::setRange | ( | double | minimum, |
| double | maximum | ||
| ) |
Sets the range.
| void Wt::WProgressBar::setValue | ( | double | value | ) |
|
virtual |
| Signal<double>& Wt::WProgressBar::valueChanged | ( | ) |
A signal that indicates when the value has changed.
This signal is emitted when setValue() is called.
1.8.1.2