VSTGUI 4.10
Graphical User Interface Framework not only for VST plugins
AspectRatioVST3Editor Class Reference

An extended VST3 Editor which scales its contents when resized. More...

#include <vst3editor.h>

+ Inheritance diagram for AspectRatioVST3Editor:

Public Member Functions

void setMinZoomFactor (double factor)
 
double getMinZoomFactor () const
 
 VST3Editor (Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile)
 
 VST3Editor (UIDescription *desc, Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile=nullptr)
 
- Public Member Functions inherited from VST3Editor
 VST3Editor (Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile)
 
 VST3Editor (UIDescription *desc, Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile=nullptr)
 
bool exchangeView (UTF8StringPtr templateName)
 
void enableTooltips (bool state)
 
bool setEditorSizeConstrains (const CPoint &newMinimumSize, const CPoint &newMaximumSize)
 
void getEditorSizeConstrains (CPoint &minimumSize, CPoint &maximumSize) const
 
bool requestResize (const CPoint &newSize)
 
void setZoomFactor (double factor)
 
double getZoomFactor () const
 
void setAllowedZoomFactors (std::vector< double > zoomFactors)
 
void setDelegate (IVST3EditorDelegate *delegate)
 set the delegate of the editor. More...
 
IVST3EditorDelegategetDelegate () const
 
UIDescriptiongetUIDescription () const
 
Steinberg::tresult PLUGIN_API queryInterface (const ::Steinberg::TUID iid, void **obj) override
 
- Public Member Functions inherited from IController
virtual int32_t getTagForName (UTF8StringPtr name, int32_t registeredTag) const
 
virtual IControlListenergetControlListener (UTF8StringPtr controlTagName)
 
virtual CViewcreateView (const UIAttributes &attributes, const IUIDescription *description)
 
virtual CViewverifyView (CView *view, const UIAttributes &attributes, const IUIDescription *description)
 
virtual IControllercreateSubController (UTF8StringPtr name, const IUIDescription *description)
 
- Public Member Functions inherited from IControlListener
virtual ~IControlListener () noexcept=default
 
virtual void valueChanged (CControl *pControl)=0
 
virtual int32_t controlModifierClicked (CControl *pControl, CButtonState button)
 return 1 if you want the control to not handle it, otherwise 0 More...
 
virtual void controlBeginEdit (CControl *pControl)
 
virtual void controlEndEdit (CControl *pControl)
 
virtual void controlTagWillChange (CControl *pControl)
 
virtual void controlTagDidChange (CControl *pControl)
 
- Public Member Functions inherited from IViewAddedRemovedObserver
virtual ~IViewAddedRemovedObserver () noexcept=default
 
virtual void onViewAdded (CFrame *frame, CView *view)=0
 
virtual void onViewRemoved (CFrame *frame, CView *view)=0
 
- Public Member Functions inherited from IMouseObserver
virtual ~IMouseObserver () noexcept=default
 
virtual void onMouseEntered (CView *view, CFrame *frame)=0
 
virtual void onMouseExited (CView *view, CFrame *frame)=0
 
virtual void onMouseEvent (MouseEvent &event, CFrame *frame)=0
 
bool validateCommandMenuItem (CCommandMenuItem *item) override
 called before the item is shown to validate its state More...
 
bool onCommandMenuItemSelected (CCommandMenuItem *item) override
 called when the item was selected More...
 
virtual bool validateCommandMenuItem (CCommandMenuItem *item)=0
 called before the item is shown to validate its state More...
 
virtual bool onCommandMenuItemSelected (CCommandMenuItem *item)=0
 called when the item was selected More...
 
- Public Member Functions inherited from IReference
virtual void forget ()=0
 decrease refcount and delete object if refcount == 0 More...
 
virtual void remember ()=0
 increase refcount More...
 

Protected Member Functions

bool canCalculateAspectRatio () const
 
bool PLUGIN_API open (void *parent, const PlatformType &type) override
 
Steinberg::tresult PLUGIN_API onSize (Steinberg::ViewRect *newSize) override
 
Steinberg::tresult PLUGIN_API checkSizeConstraint (Steinberg::ViewRect *rect) override
 
- Protected Member Functions inherited from VST3Editor
 ~VST3Editor () override
 
void init ()
 
double getAbsScaleFactor () const
 
double getContentScaleFactor () const
 
ParameterChangeListenergetParameterChangeListener (int32_t tag) const
 
void recreateView ()
 
void requestRecreateView ()
 
void syncParameterTags ()
 
void save (bool saveAs=false)
 
bool enableEditing (bool state)
 
void saveScreenshot ()
 
bool enableShowEditButton () const
 
void enableShowEditButton (bool state)
 
void showEditButton (bool state)
 
bool inEditMode () const
 
bool PLUGIN_API open (void *parent, const PlatformType &type) override
 
void PLUGIN_API close () override
 
void beginEdit (int32_t index) override
 
void endEdit (int32_t index) override
 
CViewcreateView (const UIAttributes &attributes, const IUIDescription *description) override
 
CViewverifyView (CView *view, const UIAttributes &attributes, const IUIDescription *description) override
 
IControllercreateSubController (UTF8StringPtr name, const IUIDescription *description) override
 
bool beforeSizeChange (const CRect &newSize, const CRect &oldSize) override
 
Steinberg::tresult PLUGIN_API onSize (Steinberg::ViewRect *newSize) override
 
Steinberg::tresult PLUGIN_API canResize () override
 
Steinberg::tresult PLUGIN_API checkSizeConstraint (Steinberg::ViewRect *rect) override
 
Steinberg::tresult PLUGIN_API findParameter (Steinberg::int32 xPos, Steinberg::int32 yPos, Steinberg::Vst::ParamID &resultTag) override
 
virtual void valueChanged (CControl *pControl) override
 
virtual void controlBeginEdit (CControl *pControl) override
 
virtual void controlEndEdit (CControl *pControl) override
 
virtual void controlTagWillChange (CControl *pControl) override
 
virtual void controlTagDidChange (CControl *pControl) override
 
void onViewAdded (CFrame *frame, CView *view) override
 
void onViewRemoved (CFrame *frame, CView *view) override
 
void onMouseEntered (CView *view, CFrame *frame) override
 
void onMouseExited (CView *view, CFrame *frame) override
 
void onMouseEvent (MouseEvent &event, CFrame *frame) override
 
bool validateCommandMenuItem (CCommandMenuItem *item) override
 called before the item is shown to validate its state More...
 
bool onCommandMenuItemSelected (CCommandMenuItem *item) override
 called when the item was selected More...
 

Additional Inherited Members

- Protected Types inherited from VST3Editor
using ParameterChangeListenerMap = std::map< int32_t, ParameterChangeListener * >
 
- Protected Attributes inherited from VST3Editor
KeyboardHook * keyboardHook {nullptr}
 
UIDescriptiondescription {nullptr}
 
IVST3EditorDelegatedelegate {nullptr}
 
IControlleroriginalController {nullptr}
 
IControlListeneropenUIEditorController {nullptr}
 
ParameterChangeListenerMap paramChangeListeners
 
std::string viewName
 
std::string xmlFile
 
bool tooltipsEnabled {true}
 
bool doCreateView {false}
 
bool editingEnabled {false}
 
double contentScaleFactor {1.}
 
double zoomFactor {1.}
 
std::vector< double > allowedZoomFactors
 
CPoint minSize
 
CPoint maxSize
 
CRect nonEditRect
 
Optional< CPointsizeRequest
 

Detailed Description

An extended VST3 Editor which scales its contents when resized.

Member Function Documentation

◆ canCalculateAspectRatio()

bool canCalculateAspectRatio ( ) const
protected

◆ checkSizeConstraint()

Steinberg::tresult PLUGIN_API checkSizeConstraint ( Steinberg::ViewRect *  rect)
overrideprotected

◆ getMinZoomFactor()

double getMinZoomFactor ( ) const

◆ onSize()

Steinberg::tresult PLUGIN_API onSize ( Steinberg::ViewRect *  newSize)
overrideprotected

◆ open()

bool PLUGIN_API open ( void *  parent,
const PlatformType &  type 
)
overrideprotected

◆ setMinZoomFactor()

void setMinZoomFactor ( double  factor)

◆ VST3Editor() [1/2]

VST3Editor ( Steinberg::Vst::EditController *  controller,
UTF8StringPtr  templateName,
UTF8StringPtr  xmlFile 
)

◆ VST3Editor() [2/2]

VST3Editor ( UIDescription desc,
Steinberg::Vst::EditController *  controller,
UTF8StringPtr  templateName,
UTF8StringPtr  xmlFile = nullptr 
)

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