Public Member Functions

AudioDeviceSelectorComponent Class Reference

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

Inherits Component, ComboBox::Listener, and ChangeListener.

List of all members.

Public Member Functions

 AudioDeviceSelectorComponent (AudioDeviceManager &deviceManager, const int minAudioInputChannels, const int maxAudioInputChannels, const int minAudioOutputChannels, const int maxAudioOutputChannels, const bool showMidiInputOptions, const bool showMidiOutputSelector, const bool showChannelsAsStereoPairs, const bool hideAdvancedOptionsWithButton)
 Creates the component.
 ~AudioDeviceSelectorComponent ()
 Destructor.
void resized ()
 Called when this component's size has been changed.
void comboBoxChanged (ComboBox *)
 Called when a ComboBox has its selected item changed.
void buttonClicked (Button *)
void changeListenerCallback (ChangeBroadcaster *)
 Your subclass should implement this method to receive the callback.
void childBoundsChanged (Component *)
 Called when one of this component's children is moved or resized.

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

Constructor & Destructor Documentation

AudioDeviceSelectorComponent::AudioDeviceSelectorComponent ( AudioDeviceManager deviceManager,
const int  minAudioInputChannels,
const int  maxAudioInputChannels,
const int  minAudioOutputChannels,
const int  maxAudioOutputChannels,
const bool  showMidiInputOptions,
const bool  showMidiOutputSelector,
const bool  showChannelsAsStereoPairs,
const 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
AudioDeviceSelectorComponent::~AudioDeviceSelectorComponent (  )

Destructor.


Member Function Documentation

void AudioDeviceSelectorComponent::resized (  ) [virtual]

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 Component.

void AudioDeviceSelectorComponent::comboBoxChanged ( ComboBox comboBoxThatHasChanged ) [virtual]

Called when a ComboBox has its selected item changed.

Implements ComboBox::Listener.

void AudioDeviceSelectorComponent::buttonClicked ( Button  )
void AudioDeviceSelectorComponent::changeListenerCallback ( ChangeBroadcaster source ) [virtual]

Your subclass should implement this method to receive the callback.

Parameters:
sourcethe ChangeBroadcaster that triggered the callback.

Implements ChangeListener.

void AudioDeviceSelectorComponent::childBoundsChanged ( Component child ) [virtual]

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 Component.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines