VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
ViewAdapter Struct Reference

adapter for the IView interface More...

#include <iexternalview.h>

+ Inheritance diagram for ViewAdapter:

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from IView
using TookFocusCallback = std::function< void()>
 

Detailed Description

adapter for the IView interface

Member Function Documentation

◆ attach()

bool attach ( void *  parent,
PlatformViewType  parentViewType 
)
inlineoverridevirtual

attach the view to the parent

Implements IView.

◆ looseFocus()

void looseFocus ( )
inlineoverridevirtual

the view should loose focus

Implements IView.

◆ platformViewTypeSupported()

bool platformViewTypeSupported ( PlatformViewType  type)
inlineoverridevirtual

check if the view supports the platform view type

Implements IView.

◆ remove()

bool remove ( )
inlineoverridevirtual

remove the view from its parent

Implements IView.

◆ setContentScaleFactor()

void setContentScaleFactor ( double  scaleFactor)
inlineoverridevirtual

set the scale factor in use

Implements IView.

◆ setMouseEnabled()

void setMouseEnabled ( bool  state)
inlineoverridevirtual

enable or disable mouse handling for the view

Implements IView.

◆ setTookFocusCallback()

void setTookFocusCallback ( const TookFocusCallback callback)
inlineoverridevirtual

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

Implements IView.

◆ setViewSize()

void setViewSize ( IntRect  frame,
IntRect  visible 
)
inlineoverridevirtual

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.

Implements IView.

◆ takeFocus()

void takeFocus ( )
inlineoverridevirtual

the view should take focus

Implements IView.


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