VSTGUI: IViewLayouter Class Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
IViewLayouter Class Referenceabstract
New classes » Version 4.15

view layouter interface More...

`#include <iviewlayouter.h>`

Inheritance diagram for IViewLayouter:

## Public Types
using | Children = CViewContainer::ViewList

## Public Member Functions
virtual std::optional< ViewLayout > | calculateLayout (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

using Children = CViewContainer::ViewList

## Member Function Documentation

## ◆ applyLayout()

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

apply the previously calculated layout

Parameters

  view | the view to apply the layout to
  children | the children of the view
  layout | the 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

  view | the view to calculate the layout for
  children | the children of the view
  newSize | the 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:

- iviewlayouter.h