VSTGUI: GridLayouter 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
GridLayouter Class Reference
New classes » Version 4.15

grid view layouter More...

`#include <gridlayouter.h>`

Inheritance diagram for GridLayouter:

## Public Types
using | LayoutData = std::vector<std::pair<CRect, std::optional<ViewLayout>>>
Public Types inherited from IViewLayouter
using | Children = CViewContainer::ViewList

## Public Member Functions
| GridLayouter (const GridLayoutProperties &props={})
void | setProperties (const GridLayoutProperties &props)
const GridLayoutProperties & | getProperties () const
GridLayoutProperties & | getProperties ()
bool | applyLayout (CViewContainer &container, const Children &children, const ViewLayout &layout) override
| apply the previously calculated layout
std::optional< ViewLayout > | calculateLayout (const CViewContainer &view, const Children &children, const CRect &newSize) override
| calculate the layout of the view.
Public Member Functions inherited from ReferenceCounted< int32_t >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
| ReferenceCounted ()=default
| ReferenceCounted (const ReferenceCounted &)
virtual | ~ReferenceCounted () noexcept=default
ReferenceCounted & | operator= (const ReferenceCounted &)
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount
void | forget () override
| decrease refcount and delete object if refcount == 0
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount

## Detailed Description

grid view layouter

## Member Typedef Documentation

## ◆ LayoutData

using LayoutData = std::vector<std::pair<CRect, std::optional<ViewLayout>>>

## Constructor & Destructor Documentation

## ◆ GridLayouter()

GridLayouter | ( | const GridLayoutProperties & | props = {} | ) |

## Member Function Documentation

## ◆ applyLayout()

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

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

Implements IViewLayouter.

## ◆ calculateLayout()

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

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

Implements IViewLayouter.

## ◆ getProperties() [1/2]

GridLayoutProperties & getProperties | ( |  | ) |

## ◆ getProperties() [2/2]

const GridLayoutProperties & getProperties | ( |  | ) | const

## ◆ setProperties()

void setProperties | ( | const GridLayoutProperties & | props | ) |

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

- gridlayouter.h
- gridlayouter.cpp