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 | List of all members
juce::FocusTraverser Class Reference

Controls the order in which focus moves between components. More...

#include "juce_FocusTraverser.h"

Inheritance diagram for juce::FocusTraverser:
juce::ComponentTraverser

Public Member Functions

 ~FocusTraverser () override=default
 Destructor.
 
ComponentgetDefaultComponent (Component *parentComponent) override
 Returns the component that should receive focus by default within the given parent component.
 
ComponentgetNextComponent (Component *current) override
 Returns the component that should be given focus after the specified one when moving "forwards".
 
ComponentgetPreviousComponent (Component *current) override
 Returns the component that should be given focus after the specified one when moving "backwards".
 
std::vector< Component * > getAllComponents (Component *parentComponent) override
 Returns all of the components that can receive focus within the given parent component in traversal order.
 
- Public Member Functions inherited from juce::ComponentTraverser
virtual ~ComponentTraverser ()=default
 Destructor.
 

Detailed Description

Controls the order in which focus moves between components.

The algorithm used by this class to work out the order of traversal is as follows:

If you need focus traversal in a more customised way you can create a ComponentTraverser subclass that uses your own algorithm and return it from Component::createFocusTraverser().

See also
ComponentTraverser, Component::createFocusTraverser

@tags{GUI}

Definition at line 53 of file juce_FocusTraverser.h.

Member Function Documentation

◆ getAllComponents()

std::vector< Component * > juce::FocusTraverser::getAllComponents ( Component parentComponent)
overridevirtual

Returns all of the components that can receive focus within the given parent component in traversal order.

The default implementation will return all visible and enabled child components.

Implements juce::ComponentTraverser.

Definition at line 66 of file juce_FocusTraverser.cpp.

◆ getDefaultComponent()

Component * juce::FocusTraverser::getDefaultComponent ( Component parentComponent)
overridevirtual

Returns the component that should receive focus by default within the given parent component.

The default implementation will just return the foremost visible and enabled child component, and will return nullptr if there is no suitable component.

Implements juce::ComponentTraverser.

Definition at line 50 of file juce_FocusTraverser.cpp.

◆ getNextComponent()

Component * juce::FocusTraverser::getNextComponent ( Component current)
overridevirtual

Returns the component that should be given focus after the specified one when moving "forwards".

The default implementation will return the next visible and enabled component which is to the right of or below this one, and will return nullptr if there is no suitable component.

Implements juce::ComponentTraverser.

Definition at line 30 of file juce_FocusTraverser.cpp.

◆ getPreviousComponent()

Component * juce::FocusTraverser::getPreviousComponent ( Component current)
overridevirtual

Returns the component that should be given focus after the specified one when moving "backwards".

The default implementation will return the previous visible and enabled component which is to the left of or above this one, and will return nullptr if there is no suitable component.

Implements juce::ComponentTraverser.

Definition at line 40 of file juce_FocusTraverser.cpp.


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