Wt  4.14.3
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Wt::WWidgetItem Class Reference

A layout item that holds a single widget. More...

#include <Wt/WWidgetItem.h>

Inheritance diagram for Wt::WWidgetItem:
[legend]

Public Member Functions

 WWidgetItem (std::unique_ptr< WWidget > widget)
 Creates a new item for the given widget.
 
virtual WWidget * widget () override
 Returns the widget that is held by this WLayoutItem.
 
virtual WLayout * layout () override
 Returns the layout that implements this WLayoutItem.
 
virtual WLayout * parentLayout () const override
 Returns the layout in which this item is contained.
 
virtual WWidgetItem * findWidgetItem (WWidget *widget) override
 Finds the widget item corresponding to the given widget
 
- Public Member Functions inherited from Wt::WLayoutItem
virtual ~WLayoutItem ()
 Destructor.
 

Private Member Functions

virtual void setParentWidget (WWidget *parent) override
 Internal method.
 
virtual void setParentLayout (WLayout *layout) override
 Internal method.
 

Detailed Description

A layout item that holds a single widget.

See also
WLayout::addWidget(WWidget *)

Member Function Documentation

◆ findWidgetItem()

WWidgetItem * Wt::WWidgetItem::findWidgetItem ( WWidget *  widget)
overridevirtual

Finds the widget item corresponding to the given widget

The widget is searched for recursively inside nested layouts.

Implements Wt::WLayoutItem.

◆ layout()

virtual WLayout * Wt::WWidgetItem::layout ( )
overridevirtual

Returns the layout that implements this WLayoutItem.

This implements a type-safe upcasting mechanism to a WLayout.

Implements Wt::WLayoutItem.

◆ widget()

virtual WWidget * Wt::WWidgetItem::widget ( )
overridevirtual

Returns the widget that is held by this WLayoutItem.

This implements a type-safe upcasting mechanism to a WWidgetItem.

Implements Wt::WLayoutItem.