VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Public Types | Public Member Functions | List of all members
IView Struct Referenceabstract

interface for embedding views from external view systems More...

`#include <iexternalview.h>`

Inheritance diagram for IView:

## Public Types
using | TookFocusCallback = std::function< void()>

## Public Member Functions
virtual | ~IView () noexcept=default
virtual bool | platformViewTypeSupported (PlatformViewType type)=0
| check if the view supports the platform view type More...
virtual bool | attach (void *parent, PlatformViewType parentViewType)=0
| attach the view to the parent More...
virtual bool | remove ()=0
| remove the view from its parent More...
virtual void | setViewSize (IntRect frame, IntRect visible)=0
| set the size and position of the view More...
virtual void | setContentScaleFactor (double scaleFactor)=0
| set the scale factor in use More...
virtual void | setMouseEnabled (bool state)=0
| enable or disable mouse handling for the view More...
virtual void | takeFocus ()=0
| the view should take focus More...
virtual void | looseFocus ()=0
| the view should loose focus More...
virtual void | setTookFocusCallback (const TookFocusCallback &callback)=0
| a callback the embedder sets on the view to get notified when the view took focus More...

## Detailed Description

interface for embedding views from external view systems

## Member Typedef Documentation

## ◆ TookFocusCallback

using TookFocusCallback = std::function<void ()>

## Constructor & Destructor Documentation

## ◆ ~IView()

virtual ~IView | ( |  | ) |
| virtual default noexcept

## Member Function Documentation

## ◆ attach()

virtual bool attach | ( | void * | parent,
|  | PlatformViewType | parentViewType
| ) |  |
| pure virtual

attach the view to the parent

Implemented in ViewAdapter.

## ◆ looseFocus()

virtual void looseFocus | ( |  | ) |
| pure virtual

the view should loose focus

Implemented in ViewAdapter.

## ◆ platformViewTypeSupported()

virtual bool platformViewTypeSupported | ( | PlatformViewType | type | ) |
| pure virtual

check if the view supports the platform view type

Implemented in ViewAdapter.

## ◆ remove()

virtual bool remove | ( |  | ) |
| pure virtual

remove the view from its parent

Implemented in ViewAdapter.

## ◆ setContentScaleFactor()

virtual void setContentScaleFactor | ( | double | scaleFactor | ) |
| pure virtual

set the scale factor in use

Implemented in ViewAdapter.

## ◆ setMouseEnabled()

virtual void setMouseEnabled | ( | bool | state | ) |
| pure virtual

enable or disable mouse handling for the view

Implemented in ViewAdapter.

## ◆ setTookFocusCallback()

virtual void setTookFocusCallback | ( | const TookFocusCallback & | callback | ) |
| pure virtual

a callback the embedder sets on the view to get notified when the view took focus

Implemented in ViewAdapter.

## ◆ setViewSize()

virtual void setViewSize | ( | IntRect | frame,
|  | IntRect | visible
| ) |  |
| pure virtual

set the size and position of the view

the coordinate system for the parameters used are system native, this means on Windows the scale factor is already applied to the coordinates and on macOS they are not (as with all NSViews)

the visible rectangle is the rectangle clipped to all its parent views while the frame rectangle is the full size of the view if it would not be clipped. this way it is possible to support views inside of scroll views and the like. See the examples how this is done.

Implemented in ViewAdapter.

## ◆ takeFocus()

virtual void takeFocus | ( |  | ) |
| pure virtual

the view should take focus

Implemented in ViewAdapter.

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

- iexternalview.h