Wt examples
3.7.1
|
An edit field for an email addressee. More...
#include <AddresseeEdit.h>
Public Member Functions | |
AddresseeEdit (const WString &label, WContainerWidget *parent, WContainerWidget *labelParent) | |
Create a new addressee edit with the given label. More... | |
void | setAddressees (const std::vector< Contact > &contacts) |
Set a list of addressees. More... | |
std::vector< Contact > | addressees () const |
Get a list of addressees. More... | |
virtual void | setHidden (bool hidden, const WAnimation &animation) |
Reimplement hide() and show() to also hide() and show() the label. More... | |
![]() | |
WTextArea () | |
WTextArea (const WString &content) | |
void | setColumns (int cols) |
void | setRows (int rows) |
int | columns () const |
int | rows () const |
const WString & | text () const |
virtual void | setText (const WString &text) |
int | selectionStart () const |
WString | selectedText () const |
bool | hasSelectedText () const |
int | cursorPosition () const |
virtual WString | valueText () const override |
virtual void | setValueText (const WString &text) override |
EventSignal & | textInput () |
![]() | |
WFormWidget () | |
~WFormWidget () | |
WLabel * | label () const |
void | setValidator (const std::shared_ptr< WValidator > &validator) |
virtual std::shared_ptr< WValidator > | validator () const |
virtual ValidationState | validate () |
void | setEnabled (bool enabled) |
virtual void | setReadOnly (bool readOnly) |
bool | isReadOnly () const |
virtual void | setPlaceholderText (const WString &placeholder) |
const WString & | placeholderText () const |
EventSignal & | changed () |
Signal< WValidator::Result > & | validated () |
virtual void | refresh () override |
virtual void | setToolTip (const WString &text, TextFormat textFormat=TextFormat::Plain) override |
virtual bool | canReceiveFocus () const override |
virtual int | tabIndex () const override |
![]() | |
WInteractWidget () | |
EventSignal< WKeyEvent > & | keyWentDown () |
EventSignal< WKeyEvent > & | keyPressed () |
EventSignal< WKeyEvent > & | keyWentUp () |
EventSignal & | enterPressed () |
EventSignal & | escapePressed () |
EventSignal< WMouseEvent > & | clicked () |
EventSignal< WMouseEvent > & | doubleClicked () |
EventSignal< WMouseEvent > & | mouseWentDown () |
EventSignal< WMouseEvent > & | mouseWentUp () |
EventSignal< WMouseEvent > & | mouseWentOut () |
EventSignal< WMouseEvent > & | mouseWentOver () |
EventSignal< WMouseEvent > & | mouseMoved () |
EventSignal< WMouseEvent > & | mouseDragged () |
EventSignal< WMouseEvent > & | mouseWheel () |
EventSignal< WTouchEvent > & | touchStarted () |
EventSignal< WTouchEvent > & | touchEnded () |
EventSignal< WTouchEvent > & | touchMoved () |
EventSignal< WGestureEvent > & | gestureStarted () |
EventSignal< WGestureEvent > & | gestureChanged () |
EventSignal< WGestureEvent > & | gestureEnded () |
void | setDraggable (const std::string &mimeType, WWidget *dragWidget=nullptr, bool isDragWidgetOnly=false, WObject *sourceWidget=nullptr) |
void | unsetDraggable () |
void | setMouseOverDelay (int delay) |
int | mouseOverDelay () const |
virtual void | setPopup (bool popup) override |
virtual void | load () override |
virtual bool | isEnabled () const override |
![]() | |
WWebWidget () | |
virtual std::vector< WWidget *> | children () const override |
Signal & | childrenChanged () |
virtual void | setPositionScheme (PositionScheme scheme) override |
virtual PositionScheme | positionScheme () const override |
virtual void | setOffsets (const WLength &offset, WFlags< Side > sides=AllSides) override |
virtual WLength | offset (Side s) const override |
virtual void | resize (const WLength &width, const WLength &height) override |
virtual WLength | width () const override |
virtual WLength | height () const override |
virtual void | setMinimumSize (const WLength &width, const WLength &height) override |
virtual WLength | minimumWidth () const override |
virtual WLength | minimumHeight () const override |
virtual void | setMaximumSize (const WLength &width, const WLength &height) override |
virtual WLength | maximumWidth () const override |
virtual WLength | maximumHeight () const override |
virtual void | setLineHeight (const WLength &height) override |
virtual WLength | lineHeight () const override |
virtual void | setFloatSide (Side s) override |
virtual Side | floatSide () const override |
virtual void | setClearSides (WFlags< Side > sides) override |
virtual WFlags< Side > | clearSides () const override |
virtual void | setMargin (const WLength &margin, WFlags< Side > sides=AllSides) override |
virtual WLength | margin (Side side) const override |
virtual void | setHiddenKeepsGeometry (bool enabled) override |
virtual bool | hiddenKeepsGeometry () const override |
virtual bool | isHidden () const override |
virtual bool | isVisible () const override |
virtual void | setDisabled (bool disabled) override |
virtual bool | isDisabled () const override |
virtual bool | isPopup () const override |
virtual void | setInline (bool isInline) override |
virtual bool | isInline () const override |
virtual void | setDecorationStyle (const WCssDecorationStyle &style) override |
virtual WCssDecorationStyle & | decorationStyle () override |
virtual void | setStyleClass (const WString &styleClass) override |
virtual WString | styleClass () const override |
virtual void | addStyleClass (const WString &styleClass, bool force=false) override |
virtual void | removeStyleClass (const WString &styleClass, bool force=false) override |
virtual bool | hasStyleClass (const WString &styleClass) const override |
virtual void | setVerticalAlignment (AlignmentFlag alignment, const WLength &length=WLength()) override |
virtual AlignmentFlag | verticalAlignment () const override |
virtual WLength | verticalAlignmentLength () const override |
virtual void | setDeferredToolTip (bool enable, TextFormat textFormat=TextFormat::Plain) override |
virtual WString | toolTip () const override |
virtual void | setAttributeValue (const std::string &name, const WString &value) override |
virtual WString | attributeValue (const std::string &name) const override |
virtual void | setJavaScriptMember (const std::string &name, const std::string &value) override |
virtual std::string | javaScriptMember (const std::string &name) const override |
virtual void | callJavaScriptMember (const std::string &name, const std::string &args) override |
virtual bool | loaded () const override |
virtual void | setId (const std::string &id) override |
virtual WWidget * | find (const std::string &name) override |
virtual WWidget * | findById (const std::string &id) override |
virtual void | setSelectable (bool selectable) override |
virtual void | doJavaScript (const std::string &javascript) override |
virtual const std::string | id () const override |
void | setLoadLaterWhenInvisible (bool) |
std::string | htmlTagName () const |
void | setHtmlTagName (const std::string &tag) |
virtual void | setCanReceiveFocus (bool enabled) override |
virtual bool | setFirstFocus () override |
virtual void | setFocus (bool focus) override |
virtual bool | hasFocus () const override |
virtual void | setTabIndex (int index) override |
EventSignal & | blurred () |
EventSignal & | focussed () |
virtual bool | scrollVisibilityEnabled () const final override |
virtual void | setScrollVisibilityEnabled (bool enabled) final override |
virtual int | scrollVisibilityMargin () const final override |
virtual void | setScrollVisibilityMargin (int margin) final override |
virtual Signal< bool > & | scrollVisibilityChanged () final override |
virtual bool | isScrollVisible () const final override |
virtual void | setThemeStyleEnabled (bool enabled) final override |
virtual bool | isThemeStyleEnabled () const final override |
virtual void | setObjectName (const std::string &name) override |
![]() | |
virtual | ~WWidget () |
WWidget * | parent () const |
virtual std::unique_ptr< WWidget > | removeWidget (WWidget *widget) |
std::unique_ptr< Widget > | removeWidget (Widget *widget) |
std::unique_ptr< WWidget > | removeFromParent () |
void | setWidth (const WLength &width) |
void | setHeight (const WLength &height) |
virtual void | positionAt (const WWidget *widget, Orientation orientation=Orientation::Vertical) |
virtual void | toggleStyleClass (const WString &styleClass, bool add, bool force=false) |
std::string | jsRef () const |
void | setFocus () |
virtual void | acceptDrops (const std::string &mimeType, const WString &hoverStyleClass=WString()) |
virtual void | stopAcceptDrops (const std::string &mimeType) |
virtual void | htmlText (std::ostream &out) |
bool | isRendered () const |
void | hide () |
void | animateHide (const WAnimation &animation) |
void | show () |
void | animateShow (const WAnimation &animation) |
void | enable () |
void | disable () |
bool | layoutSizeAware () const |
![]() | |
void | addChild (std::unique_ptr< WObject > child) |
Child * | addChild (std::unique_ptr< Child > child) |
std::unique_ptr< WObject > | removeChild (WObject *child) |
std::unique_ptr< Child > | removeChild (Child *child) |
virtual std::string | objectName () const |
void | resetLearnedSlots () |
void | resetLearnedSlot (void(T::*method)()) |
WStatelessSlot * | implementStateless (void(T::*method)()) |
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
void | isNotStateless () |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
![]() | |
observable () noexcept | |
virtual | ~observable () |
auto | bindSafe (void(C::*method)(Args...)) noexcept |
auto | bindSafe (void(C::*method)(Args...) const) const noexcept |
auto | bindSafe (const Function &function) noexcept |
Private Member Functions | |
bool | parse (std::vector< Contact > &contacts) const |
Parse the addressees into a list of contacts. More... | |
Private Attributes | |
Label * | label_ |
The label associated with this edit. More... | |
Additional Inherited Members | |
![]() | |
typedef void(WObject::* | Method) () |
![]() | |
static std::string | jsStringLiteral (const std::string &v, char delimiter='\'') |
![]() | |
static WString | tr (const char *key) |
![]() | |
virtual int | boxPadding (Orientation orientation) const override |
virtual int | boxBorder (Orientation orientation) const override |
![]() | |
virtual void | enableAjax () override |
virtual void | render (WFlags< RenderFlag > flags) override |
virtual void | propagateSetEnabled (bool enabled) override |
![]() | |
virtual WStatelessSlot * | getStateless (Method method) override |
![]() | |
void | setLayoutSizeAware (bool sizeAware) |
virtual void | layoutSizeChanged (int width, int height) |
WWidget () | |
virtual void | dropEvent (WDropEvent dropEvent) |
void | scheduleRender (WFlags< RepaintFlag > flags=None) |
An edit field for an email addressee.
This widget is part of the Wt composer example.
Definition at line 31 of file AddresseeEdit.h.
AddresseeEdit::AddresseeEdit | ( | const WString & | label, |
WContainerWidget * | parent, | ||
WContainerWidget * | labelParent | ||
) |
Create a new addressee edit with the given label.
Constructs also a widget to hold the label in the labelParent. The label will be hidden and shown together with this field.
Definition at line 15 of file AddresseeEdit.C.
std::vector< Contact > AddresseeEdit::addressees | ( | ) | const |
Get a list of addressees.
Definition at line 74 of file AddresseeEdit.C.
|
private |
Parse the addressees into a list of contacts.
Definition at line 40 of file AddresseeEdit.C.
void AddresseeEdit::setAddressees | ( | const std::vector< Contact > & | contacts | ) |
Set a list of addressees.
Definition at line 27 of file AddresseeEdit.C.
|
virtual |
Reimplement hide() and show() to also hide() and show() the label.
Reimplemented from Wt::WFormWidget.
Definition at line 82 of file AddresseeEdit.C.
|
private |
The label associated with this edit.
Definition at line 55 of file AddresseeEdit.h.