LMMS
Loading...
Searching...
No Matches
juce::Button::CallbackHelper Struct Reference
Inheritance diagram for juce::Button::CallbackHelper:
juce::Timer juce::ApplicationCommandManagerListener juce::Value::Listener juce::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 juce::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 juce::ApplicationCommandManagerListener
virtual ~ApplicationCommandManagerListener ()=default
Public Member Functions inherited from juce::Value::Listener
 Listener ()=default
virtual ~Listener ()=default
Public Member Functions inherited from juce::KeyListener
virtual ~KeyListener ()=default

Public Attributes

Buttonbutton

Additional Inherited Members

Static Public Member Functions inherited from juce::Timer
static void JUCE_CALLTYPE callAfterDelay (int milliseconds, std::function< void()> functionToCall)
static void JUCE_CALLTYPE callPendingTimersSynchronously ()
Protected Member Functions inherited from juce::Timer
 Timer () noexcept
 Timer (const Timer &) noexcept

Constructor & Destructor Documentation

◆ CallbackHelper()

juce::Button::CallbackHelper::CallbackHelper ( Button & b)
inline

Member Function Documentation

◆ applicationCommandInvoked()

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

Called when an app command is about to be invoked.

Implements juce::ApplicationCommandManagerListener.

◆ applicationCommandListChanged()

void juce::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 juce::ApplicationCommandManagerListener.

◆ keyPressed()

bool juce::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 juce::KeyListener.

◆ keyStateChanged()

bool juce::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 juce::KeyListener.

◆ timerCallback()

void juce::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 juce::Timer.

◆ valueChanged()

void juce::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 juce::Value::Listener.

Member Data Documentation

◆ button

Button& juce::Button::CallbackHelper::button

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