Jamba C++ API
5.1.1
|
#include <GUIState.h>
Inherits IMessageProducer, and IDialogHandler.
Inherited by GUIPluginState< TPluginParameters >.
Public Member Functions | |
template<typename T > | |
GUIJmbParam< T > | add (JmbParam< T > iParamDef) |
This method is called for each parameter managed by the GUIState that is not a regular VST parameter. More... | |
template<typename T > | |
tresult | broadcast (JmbParam< T > const &iParamDef, T const &iMessage) |
Broadcast a message without requiring the need to instantiate a GUIJmbParam. More... | |
std::unique_ptr< FObjectCx > | connect (ParamID iParamID, Parameters::IChangeListener *iChangeListener) const |
Connects the paramID to the listener. More... | |
std::unique_ptr< FObjectCx > | connect (ParamID iParamID, Parameters::ChangeCallback iChangeCallback) const |
Connects the paramID to the callback. More... | |
std::unique_ptr< GUIParamCxMgr > | createParamCxMgr () |
The CustomView class automatically calls this method to get a handle of a ParamCxMgr used to register for interest and obtain GUIParam instances. More... | |
bool | dismissDialog () override |
Dismisses the currently shown dialog. More... | |
bool | existsJmb (ParamID iParamID) const |
bool | existsVst (ParamID iParamID) const |
std::shared_ptr< IGUIParameter > | findParam (ParamID iParamID) const |
Generic call which returns a param with the given id or nullptr if there isn't one. More... | |
std::vector< ParamID > const & | getAllRegistrationOrder () const |
template<typename T > | |
std::shared_ptr< GUIVstParameter< T > > | getGUIVstParameter (ParamID iParamID) const |
template<typename T > | |
std::shared_ptr< GUIVstParameter< T > > | getGUIVstParameter (VstParam< T > iParamDef) const |
std::shared_ptr< IGUIJmbParameter > | getJmbParameter (ParamID iParamID) const |
Parameters const & | getPluginParameters () const |
std::shared_ptr< RawVstParamDef > | getRawVstParamDef (ParamID iParamID) const |
std::shared_ptr< GUIRawVstParameter > | getRawVstParameter (ParamID iParamID) const |
GUIState (Parameters const &iPluginParameters) | |
virtual tresult | handleGUIStateUpgrade (int16 iDeprecatedVersion, int16 iVersion) const |
When Jamba detects that a previously saved GUI state matches a deprecated version (as registered with setGUIDeprecatedSaveStateOrder ), it will call this method to let the plugin handle the upgrade if necessary. More... | |
tresult | handleMessage (Message const &iMessage) |
Handle an incoming message => will forward to JmbParam marked shared by rtOwner. More... | |
virtual tresult | init (VstParametersSPtr iVstParameters, IMessageProducer *iMessageProducer, IDialogHandler *iDialogHandler) |
Called by the GUIController. More... | |
template<typename TView > | |
ParamAwareView< TView > * | makeParamAware (TView *iView) |
Allow for registering an arbitrary callback on an arbitrary view without having to inherit from the view. More... | |
virtual tresult | readGUIState (IBStreamer &iStreamer) |
This method is called from the GUI controller setState method and reads the state previously saved by the GUI only (parameters that are ui only) and initializes the vst host parameters accordingly. More... | |
virtual tresult | readRTState (IBStreamer &iStreamer) |
This method is called from the GUI controller setComponentState method and reads the state coming from RT and initializes the vst host parameters accordingly. More... | |
template<typename TView > | |
ParamAwareView< TView > * | registerConnectionFor (TView *iView) |
bool | showDialog (std::string iTemplateName) override |
This method is called with the name of the template to use for the dialog. More... | |
virtual tresult | writeGUIState (IBStreamer &oStreamer) const |
This method is called from the GUI controller getState method and writes the state specific to the GUI only (parameters that are ui only), reading the values from the vst host parameters. More... | |
Public Member Functions inherited from IDialogHandler | |
virtual | ~IDialogHandler ()=default |
Destructor. More... | |
Protected Member Functions | |
void | addJmbParam (std::shared_ptr< IGUIJmbParameter > iParameter) |
IPtr< IMessage > | allocateMessage () override |
Allocates a message instance. More... | |
virtual tresult | readDeprecatedGUIState (uint16 iDeprecatedVersion, IBStreamer &iStreamer, NormalizedState::SaveOrder const &iLatestSaveOrder) |
virtual tresult | readGUIState (NormalizedState::SaveOrder const &iSaveOrder, IBStreamer &iStreamer) |
Reads the gui state from the stream using the provided order. More... | |
tresult | sendMessage (IPtr< IMessage > iMessage) override |
Sends the given message to the peer. More... | |
tresult | setParamNormalized (NormalizedState const *iNormalizedState) |
Protected Attributes | |
std::vector< ParamID > | fAllRegistrationOrder {} |
IDialogHandler * | fDialogHandler {} |
std::map< ParamID, std::shared_ptr< IGUIJmbParameter > > | fJmbParams {} |
MessageHandler | fMessageHandler {} |
IMessageProducer * | fMessageProducer {} |
ParamAwareViews | fParamAwareViews {} |
Parameters const & | fPluginParameters |
VstParametersSPtr | fVstParameters {} |
Friends | |
class | Debug::ParamDisplay |
|
explicit |
GUIJmbParam< T > add | ( | JmbParam< T > | iParamDef | ) |
|
protected |
|
overrideprotectedvirtual |
Allocates a message instance.
Implements IMessageProducer.
tresult broadcast | ( | JmbParam< T > const & | iParamDef, |
T const & | iMessage | ||
) |
Broadcast a message without requiring the need to instantiate a GUIJmbParam.
|
inline |
Connects the paramID to the listener.
The connection object returned automatically closes the connection when it gets destroyed
|
inline |
Connects the paramID to the callback.
The connection object returned automatically closes the connection when it gets destroyed
std::unique_ptr< GUIParamCxMgr > createParamCxMgr | ( | ) |
The CustomView class automatically calls this method to get a handle of a ParamCxMgr used to register for interest and obtain GUIParam instances.
See CustomView::registerXXX methods.
|
overridevirtual |
Dismisses the currently shown dialog.
true
if there was a dialog shown or false
otherwise Implements IDialogHandler.
|
inline |
|
inline |
std::shared_ptr< IGUIParameter > findParam | ( | ParamID | iParamID | ) | const |
Generic call which returns a param with the given id or nullptr
if there isn't one.
It can be either a Vst or Jmb param.
|
inline |
std::shared_ptr< GUIVstParameter< T > > getGUIVstParameter | ( | ParamID | iParamID | ) | const |
|
inline |
std::shared_ptr< IGUIJmbParameter > getJmbParameter | ( | ParamID | iParamID | ) | const |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
When Jamba detects that a previously saved GUI state matches a deprecated version (as registered with setGUIDeprecatedSaveStateOrder
), it will call this method to let the plugin handle the upgrade if necessary.
iDeprecatedVersion | the deprecated version |
iVersion | the current version |
kResultTrue
if handled, kResultFalse
if unhandled
|
inline |
Handle an incoming message => will forward to JmbParam marked shared by rtOwner.
|
virtual |
Called by the GUIController.
|
inline |
Allow for registering an arbitrary callback on an arbitrary view without having to inherit from the view.
The registration will automatically be discarded when the view is deleted.
Example usage:
TextButtonView *button = ....; fState->makeParamAware(button)->registerCallback<int>(fParams->fMyParam, [] (TextButtonView *iButton, GUIVstParam<int> &iParam) { iButton->setMouseEnabled(iParam > 3); });
TView | should be a subclass of VSTGUI::CView |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
Reads the gui state from the stream using the provided order.
|
virtual |
|
inline |
|
overrideprotectedvirtual |
Sends the given message to the peer.
Implements IMessageProducer.
|
protected |
|
overridevirtual |
This method is called with the name of the template to use for the dialog.
It should be a template defined in the xml file (.uidesc
) as a top level template.
iTemplateName | the name of the top level template to use |
true
if the dialog was shown and false
if there was a problem (for example iTemplateName
does not refer to a valid top level template name) Implements IDialogHandler.
|
virtual |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |