openshot-audio  0.1.4
Public Member Functions | List of all members
Button::CallbackHelper Class Reference
Inheritance diagram for Button::CallbackHelper:
Timer ApplicationCommandManagerListener Value::Listener KeyListener

Public Member Functions

 CallbackHelper (Button &b)
 
void timerCallback () override
 
bool keyStateChanged (bool, Component *) override
 
void valueChanged (Value &value) override
 
bool keyPressed (const KeyPress &, Component *) override
 
void applicationCommandInvoked (const ApplicationCommandTarget::InvocationInfo &info) override
 
void applicationCommandListChanged () override
 
- Public Member Functions inherited from Timer
virtual ~Timer ()
 
void startTimer (int intervalInMilliseconds) noexcept
 
void startTimerHz (int timerFrequencyHz) noexcept
 
void stopTimer () noexcept
 
bool isTimerRunning () const noexcept
 
int getTimerInterval () const noexcept
 
- Public Member Functions inherited from ApplicationCommandManagerListener
virtual ~ApplicationCommandManagerListener ()
 
- Public Member Functions inherited from Value::Listener
 Listener ()
 
virtual ~Listener ()
 
- Public Member Functions inherited from KeyListener
virtual ~KeyListener ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Timer
static void JUCE_CALLTYPE callPendingTimersSynchronously ()
 
- Protected Member Functions inherited from Timer
 Timer () noexcept
 
 Timer (const Timer &) noexcept
 

Constructor & Destructor Documentation

◆ CallbackHelper()

Button::CallbackHelper::CallbackHelper ( Button b)
inline

Member Function Documentation

◆ applicationCommandInvoked()

void Button::CallbackHelper::applicationCommandInvoked ( const ApplicationCommandTarget::InvocationInfo )
inlineoverridevirtual

Called when an app command is about to be invoked.

Implements ApplicationCommandManagerListener.

◆ applicationCommandListChanged()

void Button::CallbackHelper::applicationCommandListChanged ( )
inlineoverridevirtual

Called when commands are registered or deregistered from the command manager, or when commands are made active or inactive.

Note that if you're using this to watch for changes to whether a command is disabled, you'll need to make sure that ApplicationCommandManager::commandStatusChanged() is called whenever the status of your command might have changed.

Implements ApplicationCommandManagerListener.

◆ keyPressed()

bool Button::CallbackHelper::keyPressed ( const KeyPress key,
Component originatingComponent 
)
inlineoverridevirtual

Called to indicate that a key has been pressed.

If your implementation returns true, then the key event is considered to have been consumed, and will not be passed on to any other components. If it returns false, then the key will be passed to other components that might want to use it.

Parameters
keythe keystroke, including modifier keys
originatingComponentthe component that received the key event
See also
keyStateChanged, Component::keyPressed

Implements KeyListener.

◆ keyStateChanged()

bool Button::CallbackHelper::keyStateChanged ( bool  isKeyDown,
Component originatingComponent 
)
inlineoverridevirtual

Called when any key is pressed or released.

When this is called, classes that might be interested in the state of one or more keys can use KeyPress::isKeyCurrentlyDown() to check whether their key has changed.

If your implementation returns true, then the key event is considered to have been consumed, and will not be passed on to any other components. If it returns false, then the key will be passed to other components that might want to use it.

Parameters
originatingComponentthe component that received the key event
isKeyDowntrue if a key is being pressed, false if one is being released
See also
KeyPress, Component::keyStateChanged

Reimplemented from KeyListener.

◆ timerCallback()

void Button::CallbackHelper::timerCallback ( )
inlineoverridevirtual

The user-defined callback routine that actually gets called periodically.

It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.

Implements Timer.

◆ valueChanged()

void Button::CallbackHelper::valueChanged ( Value value)
inlineoverridevirtual

Called when a Value object is changed.

Note that the Value object passed as a parameter may not be exactly the same object that you registered the listener with - it might be a copy that refers to the same underlying ValueSource. To find out, you can call Value::refersToSameSourceAs().

Implements Value::Listener.


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