1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-09-05 12:24:26 +00:00
parent 8229d215a6
commit 2b29f4918a
3 changed files with 8 additions and 10 deletions

View file

@ -92,7 +92,7 @@ private:
// handy wrapper method to avoid having to cast the filter to a DemoJuceFilter
// every time we need it..
DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getOwnerFilter(); }
DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getAudioProcessor(); }
};

View file

@ -38,18 +38,18 @@ BEGIN_JUCE_NAMESPACE
//==============================================================================
AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const ownerFilter_)
: ownerFilter (ownerFilter_)
AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const owner_)
: owner (owner_)
{
// the filter must be valid..
jassert (ownerFilter != 0);
jassert (owner != 0);
}
AudioProcessorEditor::~AudioProcessorEditor()
{
// if this fails, then the wrapper hasn't called editorBeingDeleted() on the
// filter for some reason..
jassert (ownerFilter->getActiveEditor() != this);
jassert (owner->getActiveEditor() != this);
}

View file

@ -50,8 +50,6 @@ class AudioProcessorEditor : public Component
protected:
//==============================================================================
/** Creates an editor for the specified processor.
You'll need to pass in the filter that's creating it.
*/
AudioProcessorEditor (AudioProcessor* const owner);
@ -61,13 +59,13 @@ public:
//==============================================================================
/** Returns a pointer to the filter that owns this editor. */
AudioProcessor* getOwnerFilter() const throw() { return ownerFilter; }
/** Returns a pointer to the processor that this editor represents. */
AudioProcessor* getAudioProcessor() const throw() { return owner; }
private:
//==============================================================================
AudioProcessor* const ownerFilter;
AudioProcessor* const owner;
};