|
LMMS
|
#include <juce_ModalComponentManager.h>
Classes | |
| class | Callback |
| struct | ModalItem |
Public Member Functions | |
| int | getNumModalComponents () const |
| Component * | getModalComponent (int index) const |
| bool | isModal (const Component *component) const |
| bool | isFrontModalComponent (const Component *component) const |
| void | attachCallback (Component *component, Callback *callback) |
| void | bringModalComponentsToFront (bool topOneShouldGrabFocus=true) |
| bool | cancelAllModalComponents () |
Protected Member Functions | |
| ModalComponentManager () | |
| ~ModalComponentManager () override | |
| void | handleAsyncUpdate () override |
Private Member Functions | |
| void | startModal (Component *, bool autoDelete) |
| void | endModal (Component *, int returnValue) |
| void | endModal (Component *) |
| Private Member Functions inherited from juce::AsyncUpdater | |
| AsyncUpdater () | |
| virtual | ~AsyncUpdater () |
| void | triggerAsyncUpdate () |
| void | cancelPendingUpdate () noexcept |
| void | handleUpdateNowIfNeeded () |
| bool | isUpdatePending () const noexcept |
| Private Member Functions inherited from juce::DeletedAtShutdown | |
| DeletedAtShutdown () | |
| virtual | ~DeletedAtShutdown () |
Private Attributes | |
| OwnedArray< ModalItem > | stack |
Friends | |
| class | Component |
Additional Inherited Members | |
| Static Private Member Functions inherited from juce::DeletedAtShutdown | |
| static void | deleteAll () |
Manages the system's stack of modal components.
Normally you'll just use the Component methods to invoke modal states in components, and won't have to deal with this class directly, but this is the singleton object that's used internally to manage the stack.
@tags{GUI}
|
protected |
Creates a ModalComponentManager. You shouldn't ever call the constructor - it's a singleton, so use ModalComponentManager::getInstance()
|
overrideprotected |
Destructor.
Adds a new callback that will be called when the specified modal component is dismissed.
If the component is modal, then when it is dismissed, either by being hidden, or by calling Component::exitModalState(), then the Callback::modalStateFinished() method will be called.
Each component can have any number of callbacks associated with it, and this one is added to that list.
The object that is passed in will be deleted by the manager when it's no longer needed. If the given component is not currently modal, the callback object is deleted immediately and no action is taken.
Brings any modal components to the front.
| bool juce::ModalComponentManager::cancelAllModalComponents | ( | ) |
Calls exitModalState (0) on any components that are currently modal.
Returns one of the components being shown modally. An index of 0 is the most recently-shown, topmost component.
| int juce::ModalComponentManager::getNumModalComponents | ( | ) | const |
Returns the number of components currently being shown modally.
|
overrideprotectedvirtual |
Called back to do whatever your class needs to do.
This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.
Implements juce::AsyncUpdater.
Returns true if the specified component is currently the topmost modal component.
Returns true if the specified component is in a modal state.
|
friend |
|
private |