JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::Button::CallbackHelper Struct Referencefinal
Inheritance diagram for juce::Button::CallbackHelper:
juce::Timer juce::ApplicationCommandManagerListener juce::Value::Listener juce::KeyListener

Public Member Functions

 CallbackHelper (Button &b)
 
void timerCallback () override
 The user-defined callback routine that actually gets called periodically.
 
bool keyStateChanged (bool, Component *) override
 Called when any key is pressed or released.
 
void valueChanged (Value &value) override
 Called when a Value object is changed.
 
bool keyPressed (const KeyPress &, Component *) override
 Called to indicate that a key has been pressed.
 
void applicationCommandInvoked (const ApplicationCommandTarget::InvocationInfo &info) override
 Called when an app command is about to be invoked.
 
void applicationCommandListChanged () override
 Called when commands are registered or deregistered from the command manager, or when commands are made active or inactive.
 
- Public Member Functions inherited from juce::Timer
virtual ~Timer ()
 Destructor.
 
void startTimer (int intervalInMilliseconds) noexcept
 Starts the timer and sets the length of interval required.
 
void startTimerHz (int timerFrequencyHz) noexcept
 Starts the timer with an interval specified in Hertz.
 
void stopTimer () noexcept
 Stops the timer.
 
bool isTimerRunning () const noexcept
 Returns true if the timer is currently running.
 
int getTimerInterval () const noexcept
 Returns the timer's interval.
 
- Public Member Functions inherited from juce::ApplicationCommandManagerListener
virtual ~ApplicationCommandManagerListener ()=default
 Destructor.
 
- Public Member Functions inherited from juce::KeyListener
virtual ~KeyListener ()=default
 Destructor.
 

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)
 Invokes a lambda after a given number of milliseconds.
 
static void JUCE_CALLTYPE callPendingTimersSynchronously ()
 For internal use only: invokes any timers that need callbacks.
 
- Protected Member Functions inherited from juce::Timer
 Timer () noexcept
 Creates a Timer.
 
 Timer (const Timer &) noexcept
 Creates a copy of another timer.
 

Detailed Description

Definition at line 29 of file juce_Button.cpp.

Constructor & Destructor Documentation

◆ CallbackHelper()

juce::Button::CallbackHelper::CallbackHelper ( Button b)

Definition at line 34 of file juce_Button.cpp.

Member Function Documentation

◆ applicationCommandInvoked()

void juce::Button::CallbackHelper::applicationCommandInvoked ( const ApplicationCommandTarget::InvocationInfo )
overridevirtual

Called when an app command is about to be invoked.

Implements juce::ApplicationCommandManagerListener.

Definition at line 58 of file juce_Button.cpp.

◆ applicationCommandListChanged()

void juce::Button::CallbackHelper::applicationCommandListChanged ( )
overridevirtual

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.

Definition at line 65 of file juce_Button.cpp.

◆ keyPressed()

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

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.

Definition at line 52 of file juce_Button.cpp.

◆ keyStateChanged()

bool juce::Button::CallbackHelper::keyStateChanged ( bool  isKeyDown,
Component originatingComponent 
)
overridevirtual

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.

Definition at line 41 of file juce_Button.cpp.

◆ timerCallback()

void juce::Button::CallbackHelper::timerCallback ( )
overridevirtual

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.

Definition at line 36 of file juce_Button.cpp.

◆ valueChanged()

void juce::Button::CallbackHelper::valueChanged ( Value value)
overridevirtual

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.

Definition at line 46 of file juce_Button.cpp.

Member Data Documentation

◆ button

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

Definition at line 70 of file juce_Button.cpp.


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