JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Steinberg::CPluginView Class Reference

Plug-In view default implementation. More...

#include "pluginview.h"

Inheritance diagram for Steinberg::CPluginView:
Steinberg::FObject Steinberg::IPlugView Steinberg::IDependent Steinberg::FUnknown Steinberg::FUnknown Steinberg::Vst::EditorView

Public Member Functions

 CPluginView (const ViewRect *rect=nullptr)
 
const ViewRectgetRect () const
 Returns its current frame rectangle.
 
void setRect (const ViewRect &r)
 Sets a new frame rectangle.
 
bool isAttached () const
 Checks if this view is attached to its parent view.
 
virtual void attachedToParent ()
 Calls when this view will be attached to its parent view.
 
virtual void removedFromParent ()
 Calls when this view will be removed from its parent view.
 
tresult PLUGIN_API isPlatformTypeSupported (FIDString type) SMTG_OVERRIDE
 Is Platform UI Type supported.
 
tresult PLUGIN_API attached (void *parent, FIDString type) SMTG_OVERRIDE
 The parent window of the view has been created, the (platform) representation of the view should now be created as well.
 
tresult PLUGIN_API removed () SMTG_OVERRIDE
 The parent window of the view is about to be destroyed.
 
tresult PLUGIN_API onWheel (float) SMTG_OVERRIDE
 Handling of mouse wheel.
 
tresult PLUGIN_API onKeyDown (char16, int16, int16) SMTG_OVERRIDE
 Handling of keyboard events : Key Down.
 
tresult PLUGIN_API onKeyUp (char16, int16, int16) SMTG_OVERRIDE
 Handling of keyboard events : Key Up.
 
tresult PLUGIN_API getSize (ViewRect *size) SMTG_OVERRIDE
 Returns the size of the platform representation of the view.
 
tresult PLUGIN_API onSize (ViewRect *newSize) SMTG_OVERRIDE
 Resizes the platform representation of the view to the given rect.
 
tresult PLUGIN_API onFocus (TBool) SMTG_OVERRIDE
 Focus changed message.
 
tresult PLUGIN_API setFrame (IPlugFrame *frame) SMTG_OVERRIDE
 Sets IPlugFrame object to allow the plug-in to inform the host about resizing.
 
tresult PLUGIN_API canResize () SMTG_OVERRIDE
 Is view sizable by user.
 
tresult PLUGIN_API checkSizeConstraint (ViewRect *) SMTG_OVERRIDE
 On live resize this is called to check if the view can be resized to the given rect, if not adjust the rect to the allowed size.
 
- Public Member Functions inherited from Steinberg::FObject
 FObject ()=default
 default constructor...
 
 FObject (const FObject &)
 
FObjectoperator= (const FObject &)
 overloads operator "=" as the reference assignment
 
virtual ~FObject ()
 destructor...
 
virtual FClassID isA () const
 a local alternative to getFClassID ()
 
virtual bool isA (FClassID s) const
 evaluates if the passed ID is of the FObject type
 
virtual bool isTypeOf (FClassID s, bool=true) const
 evaluates if the passed ID is of the FObject type
 
int32 getRefCount ()
 returns the current interface reference count
 
FUnknownunknownCast ()
 get FUnknown interface from object
 
tresult PLUGIN_API queryInterface (const TUID _iid, void **obj) SMTG_OVERRIDE
 please refer to FUnknown::queryInterface ()
 
uint32 PLUGIN_API addRef () SMTG_OVERRIDE
 please refer to FUnknown::addref ()
 
uint32 PLUGIN_API release () SMTG_OVERRIDE
 please refer to FUnknown::release ()
 
void PLUGIN_API update (FUnknown *, int32) SMTG_OVERRIDE
 empty virtual method that should be overridden by derived classes for data updates upon changes
 
virtual void addDependent (IDependent *dep)
 adds dependency to the object
 
virtual void removeDependent (IDependent *dep)
 removes dependency from the object
 
virtual void changed (int32 msg=kChanged)
 Inform all dependents, that the object has changed.
 
virtual void deferUpdate (int32 msg=kChanged)
 Similar to triggerUpdates, except only delivered in idle (usefull in collecting updates).
 
virtual void updateDone (int32)
 empty virtual method that should be overridden by derived classes
 
virtual bool isEqualInstance (FUnknown *d)
 

Protected Attributes

ViewRect rect
 
void * systemWindow
 
IPtr< IPlugFrameplugFrame
 
- Protected Attributes inherited from Steinberg::FObject
int32 refCount
 COM-model local reference count.
 

Additional Inherited Members

- Public Types inherited from Steinberg::IDependent
enum  ChangeMessage {
  kWillChange , kChanged , kDestroyed , kWillDestroy ,
  kStdChangeMessageLast
}
 
- Static Public Member Functions inherited from Steinberg::FObject
static FClassID getFClassID ()
 return Class ID as an ASCII string (statically)
 
static void setUpdateHandler (IUpdateHandler *handler)
 set method for the local attribute
 
static IUpdateHandlergetUpdateHandler ()
 get method for the local attribute
 
static bool classIDsEqual (FClassID ci1, FClassID ci2)
 compares (evaluates) 2 class IDs
 
static FObjectunknownToObject (FUnknown *unknown)
 pointer conversion from FUnknown to FObject
 
- Static Public Attributes inherited from Steinberg::FObject
static const FUID iid
 Special UID that is used to cast an FUnknown pointer to a FObject.
 
- Static Public Attributes inherited from Steinberg::IDependent
static const FUID iid
 
- Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid
 
- Static Public Attributes inherited from Steinberg::IPlugView
static const FUID iid
 
- Static Protected Attributes inherited from Steinberg::FObject
static IUpdateHandlergUpdateHandler
 

Detailed Description

Plug-In view default implementation.

Can be used as base class for an IPlugView implementation.

Definition at line 49 of file pluginview.h.

Constructor & Destructor Documentation

◆ CPluginView()

Steinberg::CPluginView::CPluginView ( const ViewRect rect = nullptr)

Definition at line 44 of file pluginview.cpp.

◆ ~CPluginView()

Steinberg::CPluginView::~CPluginView ( )

Definition at line 52 of file pluginview.cpp.

Member Function Documentation

◆ attached()

tresult PLUGIN_API Steinberg::CPluginView::attached ( void *  parent,
FIDString  type 
)
virtual

The parent window of the view has been created, the (platform) representation of the view should now be created as well.

Note that the parent is owned by the caller and you are not allowed to alter it in any way other than adding your own views. Note that in this call the plug-in could call a IPlugFrame::resizeView ()!

Parameters
parent: platform handle of the parent window or view
type: Platform UI Types which should be created

Implements Steinberg::IPlugView.

Definition at line 65 of file pluginview.cpp.

◆ attachedToParent()

virtual void Steinberg::CPluginView::attachedToParent ( )
virtual

Calls when this view will be attached to its parent view.

Reimplemented in Steinberg::Vst::EditorView.

Definition at line 66 of file pluginview.h.

◆ canResize()

tresult PLUGIN_API Steinberg::CPluginView::canResize ( )
virtual

Is view sizable by user.

Implements Steinberg::IPlugView.

Definition at line 96 of file pluginview.h.

◆ checkSizeConstraint()

tresult PLUGIN_API Steinberg::CPluginView::checkSizeConstraint ( ViewRect rect)
virtual

On live resize this is called to check if the view can be resized to the given rect, if not adjust the rect to the allowed size.

Implements Steinberg::IPlugView.

Definition at line 97 of file pluginview.h.

◆ getRect()

const ViewRect & Steinberg::CPluginView::getRect ( ) const

Returns its current frame rectangle.

Definition at line 57 of file pluginview.h.

◆ getSize()

tresult PLUGIN_API Steinberg::CPluginView::getSize ( ViewRect size)
virtual

Returns the size of the platform representation of the view.

Implements Steinberg::IPlugView.

Definition at line 91 of file pluginview.cpp.

◆ isAttached()

bool Steinberg::CPluginView::isAttached ( ) const

Checks if this view is attached to its parent view.

Definition at line 63 of file pluginview.h.

◆ isPlatformTypeSupported()

tresult PLUGIN_API Steinberg::CPluginView::isPlatformTypeSupported ( FIDString  type)
virtual

Is Platform UI Type supported.

Parameters
type: IDString of Platform UI Types

Implements Steinberg::IPlugView.

Definition at line 59 of file pluginview.cpp.

◆ onFocus()

tresult PLUGIN_API Steinberg::CPluginView::onFocus ( TBool  state)
virtual

Focus changed message.

Implements Steinberg::IPlugView.

Definition at line 89 of file pluginview.h.

◆ onKeyDown()

tresult PLUGIN_API Steinberg::CPluginView::onKeyDown ( char16  key,
int16  keyCode,
int16  modifiers 
)
virtual

Handling of keyboard events : Key Down.

Parameters
key: unicode code of key
keyCode: virtual keycode for non ascii keys - see VirtualKeyCodes in keycodes.h
modifiers: any combination of modifiers - see KeyModifier in keycodes.h
Returns
kResultTrue if the key is handled, otherwise kResultFalse.
Please note that kResultTrue must only be returned if the key has really been handled. Otherwise key command handling of the host might be blocked!

Implements Steinberg::IPlugView.

Definition at line 77 of file pluginview.h.

◆ onKeyUp()

tresult PLUGIN_API Steinberg::CPluginView::onKeyUp ( char16  key,
int16  keyCode,
int16  modifiers 
)
virtual

Handling of keyboard events : Key Up.

Parameters
key: unicode code of key
keyCode: virtual keycode for non ascii keys - see VirtualKeyCodes in keycodes.h
modifiers: any combination of KeyModifier - see KeyModifier in keycodes.h
Returns
kResultTrue if the key is handled, otherwise return kResultFalse.

Implements Steinberg::IPlugView.

Definition at line 82 of file pluginview.h.

◆ onSize()

tresult PLUGIN_API Steinberg::CPluginView::onSize ( ViewRect newSize)
virtual

Resizes the platform representation of the view to the given rect.

Note that if the plug-in requests a resize (IPlugFrame::resizeView ()) onSize has to be called afterward.

Implements Steinberg::IPlugView.

Definition at line 83 of file pluginview.cpp.

◆ onWheel()

tresult PLUGIN_API Steinberg::CPluginView::onWheel ( float  distance)
virtual

Handling of mouse wheel.

Implements Steinberg::IPlugView.

Definition at line 76 of file pluginview.h.

◆ removed()

tresult PLUGIN_API Steinberg::CPluginView::removed ( )
virtual

The parent window of the view is about to be destroyed.

You have to remove all your own views from the parent window or view.

Implements Steinberg::IPlugView.

Definition at line 74 of file pluginview.cpp.

◆ removedFromParent()

virtual void Steinberg::CPluginView::removedFromParent ( )
virtual

Calls when this view will be removed from its parent view.

Reimplemented in Steinberg::Vst::EditorView.

Definition at line 69 of file pluginview.h.

◆ setFrame()

tresult PLUGIN_API Steinberg::CPluginView::setFrame ( IPlugFrame frame)
virtual

Sets IPlugFrame object to allow the plug-in to inform the host about resizing.

Implements Steinberg::IPlugView.

Definition at line 90 of file pluginview.h.

◆ setRect()

void Steinberg::CPluginView::setRect ( const ViewRect r)

Sets a new frame rectangle.

Definition at line 60 of file pluginview.h.

Member Data Documentation

◆ plugFrame

IPtr<IPlugFrame> Steinberg::CPluginView::plugFrame
protected

Definition at line 112 of file pluginview.h.

◆ rect

ViewRect Steinberg::CPluginView::rect
protected

Definition at line 110 of file pluginview.h.

◆ systemWindow

void* Steinberg::CPluginView::systemWindow
protected

Definition at line 111 of file pluginview.h.


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