VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
Loading...
Searching...
No Matches
IViewLayouter Class Referenceabstract

view layouter interface More...

#include <iviewlayouter.h>

+ Inheritance diagram for IViewLayouter:

Public Types

using Children = CViewContainer::ViewList
 

Public Member Functions

virtual std::optional< ViewLayoutcalculateLayout (const CViewContainer &view, const Children &children, const CRect &newSize)=0
 calculate the layout of the view.
 
virtual bool applyLayout (CViewContainer &view, const Children &children, const ViewLayout &layout)=0
 apply the previously calculated layout
 
- Public Member Functions inherited from IReference
virtual void forget ()=0
 decrease refcount and delete object if refcount == 0
 
virtual void remember ()=0
 increase refcount
 

Detailed Description

view layouter interface

a view layouter is used to calculate and set the size and position of the child views in a view container.

Member Typedef Documentation

◆ Children

Member Function Documentation

◆ applyLayout()

virtual bool applyLayout ( CViewContainer & view,
const Children & children,
const ViewLayout & layout )
pure virtual

apply the previously calculated layout

Parameters
viewthe view to apply the layout to
childrenthe children of the view
layoutthe layout to apply
Returns
true if the layout was applied successfully, false otherwise

Implemented in BaseViewLayouter, and GridLayouter.

◆ calculateLayout()

virtual std::optional< ViewLayout > calculateLayout ( const CViewContainer & view,
const Children & children,
const CRect & newSize )
pure virtual

calculate the layout of the view.

Note that the returned layout may have a different size than the newSize parameter when the layout is not possible with the given size.

Parameters
viewthe view to calculate the layout for
childrenthe children of the view
newSizethe new size of the view
Returns
the calculated layout or std::nullopt if the layout could not be calculated

Implemented in GridLayouter, and NoViewLayouter.


The documentation for this class was generated from the following file: