Jamba  3.1.0
pongasoft::VST::GUI::Views::ToggleButtonView Class Reference

#include <ToggleButtonView.h>

Inherits pongasoft::VST::GUI::Views::TCustomControlView< bool >.

Classes

class  Creator
 

Public Member Functions

void draw (CDrawContext *iContext) override
 
int getFrames () const
 
BitmapPtr getImage () const
 
bool getInverse () const
 
CColor const & getOnColor () const
 
bool isOff () const
 
bool isOn () const
 
int32_t onKeyDown (VstKeyCode &keyCode) override
 
int32_t onKeyUp (VstKeyCode &keyCode) override
 
CMouseEventResult onMouseCancel () override
 
CMouseEventResult onMouseDown (CPoint &where, const CButtonState &buttons) override
 
CMouseEventResult onMouseUp (CPoint &where, const CButtonState &buttons) override
 
void setFrames (int iFrames)
 
void setImage (BitmapPtr iImage)
 
void setInverse (bool iInverse)
 
void setOnColor (CColor const &iColor)
 
bool sizeToFit () override
 
 ToggleButtonView (const CRect &iSize)
 
- Public Member Functions inherited from pongasoft::VST::GUI::Views::TCustomControlView< bool >
bool getControlValue () const
 
void registerParameters () override
 
void setControlTag (int32_t iTag) override
 
virtual void setControlValue (bool const &iControlValue)
 
 TCustomControlView (const CRect &iSize)
 
- Public Member Functions inherited from pongasoft::VST::GUI::Views::CustomControlView
 CustomControlView (const CRect &iSize)
 
int32_t getControlTag () const
 
- Public Member Functions inherited from pongasoft::VST::GUI::Views::CustomView
 CustomView (const CRect &iSize)
 
 CustomView (const CustomView &c)=delete
 
void draw (CDrawContext *iContext) override
 
virtual void drawBackColor (CDrawContext *iContext)
 
void drawStyleChanged ()
 
CColor const & getBackColor () const
 
int32_t getCustomViewTag () const
 
bool getEditorMode () const
 
void markDirty ()
 
void onParameterChange (ParamID iParamID) override
 
void setBackColor (CColor const &iColor)
 
void setCustomViewTag (int32_t iTag)
 
void setEditorMode (bool iEditorMode)
 
- Public Member Functions inherited from pongasoft::VST::GUI::Params::GUIParamCxAware
bool __internal__registerRawVstControl (int32_t iParamID, ParamValue &oControlValue, GUIRawVstParam &oGUIRawVstParam)
 
template<typename T >
bool __internal__registerVstControl (int32_t iParamID, T &oControlValue, GUIVstParam< T > &oParam)
 
bool __internal__registerVstControl (int32_t iParamID, ParamValue &oControlValue, GUIRawVstParam &oParam)
 
virtual void initState (GUIState *iGUIState)
 
void invokeAll ()
 
GUIRawVstParam registerCallback (RawVstParam const &iParamDef, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
GUIVstParam< T > registerCallback (VstParam< T > const &iParamDef, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
bool registerCallback (VstParam< T > const &iParamDef, Parameters::ChangeCallback1< GUIVstParam< T >> iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
GUIJmbParam< T > registerCallback (GUIJmbParam< T > &iParamDef, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
bool registerCallback (GUIJmbParam< T > &iParamDef, Parameters::ChangeCallback1< GUIJmbParam< T >> iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
GUIJmbParam< T > registerJmbCallback (ParamID iParamID, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
GUIJmbParam< T > registerJmbParam (ParamID iParamID, bool iSubscribeToChanges=true)
 
GUIRawVstParam registerParam (RawVstParam const &iParamDef, bool iSubscribeToChanges=true)
 
template<typename T >
GUIVstParam< T > registerParam (VstParam< T > const &iParamDef, bool iSubscribeToChanges=true)
 
template<typename T >
GUIJmbParam< T > registerParam (GUIJmbParam< T > &iParamDef)
 
GUIRawVstParam registerRawVstCallback (ParamID iParamID, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
GUIRawVstParam registerRawVstParam (ParamID iParamID, bool iSubscribeToChanges=true)
 
GUIVstParam< bool > registerVstBooleanParam (ParamID iParamID, bool iSubscribeToChanges=true)
 
template<typename T >
GUIVstParam< T > registerVstCallback (ParamID iParamID, Parameters::ChangeCallback iChangeCallback, bool iInvokeCallback=false)
 
template<typename T >
GUIVstParam< T > registerVstParam (ParamID iParamID, bool iSubscribeToChanges=true)
 
GUIVstParam< Percent > registerVstPercentParam (ParamID iParamID, bool iSubscribeToChanges=true)
 
void unregisterAll ()
 
bool unregisterParam (ParamID iParamID)
 
GUIRawVstParam unregisterParam (GUIRawVstParam const &iParam)
 
template<typename T >
GUIVstParam< T > unregisterParam (GUIVstParam< T > const &iParam)
 
template<typename T >
GUIJmbParam< T > unregisterParam (GUIJmbParam< T > const &iParam)
 
virtual ~GUIParamCxAware ()
 

Protected Attributes

int fFrames {4}
 
BitmapSPtr fImage {nullptr}
 
bool fInverse {false}
 
CColor fOnColor {kRedCColor}
 
bool fPressed {false}
 
- Protected Attributes inherited from pongasoft::VST::GUI::Views::TCustomControlView< bool >
GUIVstParam< bool > fControlParameter
 
bool fControlValue
 
- Protected Attributes inherited from pongasoft::VST::GUI::Views::CustomControlView
int32_t fControlTag {-1}
 
- Protected Attributes inherited from pongasoft::VST::GUI::Views::CustomView
CColor fBackColor
 
bool fEditorMode
 
int32_t fTag
 
- Protected Attributes inherited from pongasoft::VST::GUI::Params::GUIParamCxAware
std::unique_ptr< GUIParamCxMgr > fParamCxMgr {}
 

Additional Inherited Members

- Public Types inherited from pongasoft::VST::GUI::Views::TCustomControlView< bool >
using Creator = CustomViewCreator< TCustomControlView< bool, GUIVstParam< bool > >, CustomControlView >
 
- Protected Member Functions inherited from pongasoft::VST::GUI::Views::CustomView
void sizeToFit (CCoord iWidth, CCoord iHeight)
 
bool sizeToFit (BitmapPtr iBitmap, int iFrameCount=1)
 

Constructor & Destructor Documentation

◆ ToggleButtonView()

pongasoft::VST::GUI::Views::ToggleButtonView::ToggleButtonView ( const CRect &  iSize)
inlineexplicit

Member Function Documentation

◆ draw()

void pongasoft::VST::GUI::Views::ToggleButtonView::draw ( CDrawContext *  iContext)
override

◆ getFrames()

int pongasoft::VST::GUI::Views::ToggleButtonView::getFrames ( ) const
inline

◆ getImage()

BitmapPtr pongasoft::VST::GUI::Views::ToggleButtonView::getImage ( ) const
inline

get/setImage for the button which should have 2 or 4 frames depending on the fFrames value The images should contain the following :

  • for 2 frames each is of size image height / 2:
    • at y = 0, the button in its off state
    • at y = image height / 2, the button in its on state
  • for 4 frames each is of size image height / 4:
    • at y = 0 0/4, the button in its off state
    • at y = image height * 1/4, the button in its off state depressed
    • at y = image height * 2/4, the button in its on state
    • at y = image height * 3/4, the button in its on state depressed

◆ getInverse()

bool pongasoft::VST::GUI::Views::ToggleButtonView::getInverse ( ) const
inline

◆ getOnColor()

CColor const& pongasoft::VST::GUI::Views::ToggleButtonView::getOnColor ( ) const
inline

◆ isOff()

bool pongasoft::VST::GUI::Views::ToggleButtonView::isOff ( ) const
inline

◆ isOn()

bool pongasoft::VST::GUI::Views::ToggleButtonView::isOn ( ) const
inline

◆ onKeyDown()

int32_t pongasoft::VST::GUI::Views::ToggleButtonView::onKeyDown ( VstKeyCode &  keyCode)
override

◆ onKeyUp()

int32_t pongasoft::VST::GUI::Views::ToggleButtonView::onKeyUp ( VstKeyCode &  keyCode)
override

◆ onMouseCancel()

CMouseEventResult pongasoft::VST::GUI::Views::ToggleButtonView::onMouseCancel ( )
override

◆ onMouseDown()

CMouseEventResult pongasoft::VST::GUI::Views::ToggleButtonView::onMouseDown ( CPoint &  where,
const CButtonState &  buttons 
)
override

◆ onMouseUp()

CMouseEventResult pongasoft::VST::GUI::Views::ToggleButtonView::onMouseUp ( CPoint &  where,
const CButtonState &  buttons 
)
override

◆ setFrames()

void pongasoft::VST::GUI::Views::ToggleButtonView::setFrames ( int  iFrames)

◆ setImage()

void pongasoft::VST::GUI::Views::ToggleButtonView::setImage ( BitmapPtr  iImage)
inline

◆ setInverse()

void pongasoft::VST::GUI::Views::ToggleButtonView::setInverse ( bool  iInverse)
inline

◆ setOnColor()

void pongasoft::VST::GUI::Views::ToggleButtonView::setOnColor ( CColor const &  iColor)
inline

◆ sizeToFit()

bool pongasoft::VST::GUI::Views::ToggleButtonView::sizeToFit ( )
override

Member Data Documentation

◆ fFrames

int pongasoft::VST::GUI::Views::ToggleButtonView::fFrames {4}
protected

◆ fImage

BitmapSPtr pongasoft::VST::GUI::Views::ToggleButtonView::fImage {nullptr}
protected

◆ fInverse

bool pongasoft::VST::GUI::Views::ToggleButtonView::fInverse {false}
protected

◆ fOnColor

CColor pongasoft::VST::GUI::Views::ToggleButtonView::fOnColor {kRedCColor}
protected

◆ fPressed

bool pongasoft::VST::GUI::Views::ToggleButtonView::fPressed {false}
protected

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