| 
    Wt
    4.12.1
    
   | 
 
An abstract base class for implementing layout managers. More...
#include <Wt/StdLayoutImpl.h>
Public Member Functions | |
| StdLayoutImpl (WLayout *layout) | |
| Constructor.  More... | |
| virtual | ~StdLayoutImpl () | 
| Destructor.  | |
| virtual void | updateDom (DomElement &parent)=0 | 
| Updates the DomElements in the WLayout.  More... | |
| virtual bool | itemResized (WLayoutItem *item)=0 | 
| Called when a WLayoutItem in the WLayout is resized.  More... | |
| virtual bool | parentResized ()=0 | 
| Called when the parent is resized.  More... | |
| WLayoutItem * | layoutItem () const override | 
| Returns the WLayout as a WLayoutItem.  | |
| void | update () override | 
| Updates the layout.  More... | |
| virtual void | setObjectName (const std::string &name) | 
| Sets an object name.  More... | |
  Public Member Functions inherited from Wt::StdLayoutItemImpl | |
| StdLayoutItemImpl () | |
| Constructor.  | |
| virtual | ~StdLayoutItemImpl () | 
| Destructor.  | |
| WContainerWidget * | container () const | 
| Returns the container of the of the parent layout.  | |
| virtual int | minimumWidth () const =0 | 
| Returns the minimum width of the item.  | |
| virtual int | minimumHeight () const =0 | 
| Returns the minimum height of the item.  | |
| virtual int | maximumWidth () const =0 | 
| Returns the maximum width of the item.  | |
| virtual int | maximumHeight () const =0 | 
| Returns the maximum height of the item.  | |
| StdLayoutImpl * | parentLayoutImpl () const | 
| Returns the parent layout of the item.  More... | |
  Public Member Functions inherited from Wt::WObject | |
| void | addChild (std::unique_ptr< WObject > child) | 
| Add a child WObject whose lifetime is determined by this WObject.  | |
| template<typename Child > | |
| Child * | addChild (std::unique_ptr< Child > child) | 
| Add a child WObject, returning a raw pointer.  More... | |
| std::unique_ptr< WObject > | removeChild (WObject *child) | 
| Remove a child WObject, so its lifetime is no longer determined by this WObject.  | |
| template<typename Child > | |
| std::unique_ptr< Child > | removeChild (Child *child) | 
| Remove a child WObject, so its lifetime is no longer determined by this WObject.  More... | |
| virtual const std::string | id () const | 
| Returns the (unique) identifier for this object.  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... | |
  Public Member Functions inherited from Wt::Core::observable | |
| observable () noexcept | |
| Default constructor.  | |
| virtual | ~observable () | 
| Destructor.  More... | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...)) noexcept | 
| Protects a method call against object destruction.  More... | |
| template<typename... Args, typename C > | |
| auto | bindSafe (void(C::*method)(Args...) const) const noexcept | 
| Protects a const method call against object destruction.  More... | |
| template<typename Function > | |
| auto | bindSafe (const Function &function) noexcept | 
| Protects a function against object destruction.  More... | |
  Public Member Functions inherited from Wt::WLayoutItemImpl | |
| virtual | ~WLayoutItemImpl () | 
| Destructor.  | |
  Public Member Functions inherited from Wt::WLayoutImpl | |
| virtual | ~WLayoutImpl () | 
| Destructor.  | |
| virtual void | itemAdded (WLayoutItem *item)=0 | 
| Adds a layout item.  More... | |
| virtual void | itemRemoved (WLayoutItem *item)=0 | 
| Removes a layout item.  | |
Protected Member Functions | |
| WLayout * | layout () const | 
| Returns the WLayout.  | |
  Protected Member Functions inherited from Wt::WObject | |
| virtual WStatelessSlot * | getStateless (Method method) | 
| On-demand stateless slot implementation.  More... | |
Static Protected Member Functions | |
| static StdLayoutItemImpl * | getImpl (WLayoutItem *item) | 
| Returns a WLayoutItem implementation.  More... | |
Additional Inherited Members | |
  Public Types inherited from Wt::WObject | |
| typedef void(WObject::* | Method) () | 
| Typedef for a WObject method without arguments.  | |
An abstract base class for implementing layout managers.
| Wt::StdLayoutImpl::StdLayoutImpl | ( | WLayout * | layout | ) | 
Constructor.
Creates a new StdLayoutImpl for the given WLayout.
      
  | 
  staticprotected | 
Returns a WLayoutItem implementation.
Returns a WLayoutItem implementation if the implementation is a subclass of StdLayoutItemImpl. Otherwise returns nullptr. 
      
  | 
  pure virtual | 
Called when a WLayoutItem in the WLayout is resized.
When a WLayoutItem is resized, it may be necessary to update the whole layout. Items may have moved in such a way, that it would push other items of screen, requiring other items to adapt to it.
If it returns true, a subsequent updateDom() may be necessary.
      
  | 
  pure virtual | 
Called when the parent is resized.
When the parent is resized, it may be necessary to update the whole layout. More or less items could not potentially fit in the layout, or the layout's boundaries may have changed.
If it returns true, a subsequent updateDom() may be necessary.
      
  | 
  virtual | 
Sets an object name.
The object name can be used to easily identify a type of object in the DOM, and does not need to be unique. It will usually reflect the widget type or role.
If a WWidget has an object name, the object name is reflected in the data-object-name attribute. You can use this to find widgets in JavaScript (e.g. for automated testing) using:
The default object name is empty (no object name).
Reimplemented from Wt::WObject.
      
  | 
  overridevirtual | 
Updates the layout.
By default, this will trigger a call to updateDom().
Implements Wt::WLayoutImpl.
      
  | 
  pure virtual | 
Updates the DomElements in the WLayout.
This function should update the DomElements in the WLayout. This means creating DomElements for newly added StdLayoutItemImpl, deleting DomElements from deleted StdLayoutItemImpl and updating the placement and size of the DomElements.