JUCE: juce::AudioDeviceSelectorComponent Class Reference
Loading...
Searching...
No Matches
juce::AudioDeviceSelectorComponent Class Reference

Detailed Description

A component containing controls to let the user change the audio settings of an AudioDeviceManager object.

Very easy to use - just create one of these and show it to the user.

See also
AudioDeviceManager

The documentation for this class was generated from the following file:
Inheritance diagram for juce::AudioDeviceSelectorComponent:

Public Attributes

AudioDeviceManagerdeviceManager
 The device manager that this component is controlling.

Additional Inherited Members

Public Types inherited from juce::Component
enum class  WindowControlKind {
  client , caption , minimise , maximise ,
  close , sizeTop , sizeLeft , sizeRight ,
  sizeBottom , sizeTopLeft , sizeTopRight , sizeBottomLeft ,
  sizeBottomRight
}
 Types of control that are commonly found in windows, especially title-bars. More...
enum class  FocusContainerType { none , focusContainer , keyboardFocusContainer }
 A focus container type that can be passed to setFocusContainerType(). More...
enum  FocusChangeType { focusChangedByMouseClick , focusChangedByTabKey , focusChangedDirectly }
 Enumeration used by the focusGained() and focusLost() methods. More...
enum class  FocusChangeDirection { unknown , forward , backward }
 Enumeration used by the focusGainedWithDirection() method. More...
Static Public Member Functions inherited from juce::Component
static float JUCE_CALLTYPE getApproximateScaleFactorForComponent (const Component *targetComponent)
 Returns the approximate scale factor for a given component by traversing its parent hierarchy and applying each transform and finally scaling this by the global scale factor.
static Component *JUCE_CALLTYPE getCurrentlyFocusedComponent () noexcept
 Returns the component that currently has the keyboard focus.
static void JUCE_CALLTYPE unfocusAllComponents ()
 If any component has keyboard focus, this will defocus it.
static void JUCE_CALLTYPE beginDragAutoRepeat (int millisecondsBetweenCallbacks)
 Ensures that a non-stop stream of mouse-drag events will be sent during the current mouse-drag operation.
static bool JUCE_CALLTYPE isMouseButtonDownAnywhere () noexcept
 Returns true if a mouse button is currently down.
static int JUCE_CALLTYPE getNumCurrentlyModalComponents () noexcept
 Returns the number of components that are currently in a modal state.
static Component *JUCE_CALLTYPE getCurrentlyModalComponent (int index=0) noexcept
 Returns one of the components that are currently modal.

Constructors and Destructors

◆ AudioDeviceSelectorComponent()

juce::AudioDeviceSelectorComponent::AudioDeviceSelectorComponent ( AudioDeviceManager & deviceManager,
int minAudioInputChannels,
int maxAudioInputChannels,
int minAudioOutputChannels,
int maxAudioOutputChannels,
bool showMidiInputOptions,
bool showMidiOutputSelector,
bool showChannelsAsStereoPairs,
bool hideAdvancedOptionsWithButton )

Creates the component.

If your app needs only output channels, you might ask for a maximum of 0 input channels, and the component won't display any options for choosing the input channels. And likewise if you're doing an input-only app.

Parameters
deviceManagerthe device manager that this component should control
minAudioInputChannelsthe minimum number of audio input channels that the application needs
maxAudioInputChannelsthe maximum number of audio input channels that the application needs
minAudioOutputChannelsthe minimum number of audio output channels that the application needs
maxAudioOutputChannelsthe maximum number of audio output channels that the application needs
showMidiInputOptionsif true, the component will allow the user to select which midi inputs are enabled
showMidiOutputSelectorif true, the component will let the user choose a default midi output device
showChannelsAsStereoPairsif true, channels will be treated as pairs; if false, channels will be treated as a set of separate mono channels.
hideAdvancedOptionsWithButtonif true, only the minimum amount of UI components are shown, with an "advanced" button that shows the rest of them

References deviceManager.

Referenced by childBoundsChanged().

◆ ~AudioDeviceSelectorComponent()

juce::AudioDeviceSelectorComponent::~AudioDeviceSelectorComponent ( )
override

Destructor.

Member Functions

◆ setItemHeight()

void juce::AudioDeviceSelectorComponent::setItemHeight ( int itemHeight)

Sets the standard height used for items in the panel.

◆ getItemHeight()

int juce::AudioDeviceSelectorComponent::getItemHeight ( ) const
inlinenoexcept

Returns the standard height used for items in the panel.

◆ getMidiInputSelectorListBox()

ListBox * juce::AudioDeviceSelectorComponent::getMidiInputSelectorListBox ( ) const
noexcept

Returns the ListBox that's being used to show the midi inputs, or nullptr if there isn't one.

◆ resized()

void juce::AudioDeviceSelectorComponent::resized ( )
overridevirtual

Called when this component's size has been changed.

A component can implement this method to do things such as laying out its child components when its width or height changes.

The method is called synchronously as a result of the setBounds or setSize methods, so repeatedly changing a components size will repeatedly call its resized method (unlike things like repainting, where multiple calls to repaint are coalesced together).

If the component is a top-level window on the desktop, its size could also be changed by operating-system factors beyond the application's control.

See also
moved, setSize

Reimplemented from juce::Component.

References resized().

Referenced by resized().

◆ childBoundsChanged()

void juce::AudioDeviceSelectorComponent::childBoundsChanged ( Component * child)
overridevirtual

Called when one of this component's children is moved or resized.

If the parent wants to know about changes to its immediate children (not to children of its children), this is the method to override.

See also
moved, resized, parentSizeChanged

Reimplemented from juce::Component.

References AudioDeviceSelectorComponent(), childBoundsChanged(), juce::Component::Component(), and JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR.

Referenced by childBoundsChanged().

Member Data Documentation

◆ deviceManager

The device manager that this component is controlling.

Referenced by AudioDeviceSelectorComponent().

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram