mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Added some more override decorators.
This commit is contained in:
parent
4ce1908f79
commit
4fc8fbaef1
38 changed files with 139 additions and 146 deletions
|
|
@ -70,26 +70,26 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Implementation of the AudioSource method. */
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void releaseResources();
|
||||
void releaseResources() override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
|
||||
|
||||
//==============================================================================
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
void setNextReadPosition (int64 newPosition);
|
||||
void setNextReadPosition (int64 newPosition) override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getNextReadPosition() const;
|
||||
int64 getNextReadPosition() const override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getTotalLength() const { return source->getTotalLength(); }
|
||||
int64 getTotalLength() const override { return source->getTotalLength(); }
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
bool isLooping() const { return source->isLooping(); }
|
||||
bool isLooping() const override { return source->isLooping(); }
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -141,26 +141,26 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Implementation of the AudioSource method. */
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void releaseResources();
|
||||
void releaseResources() override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
|
||||
|
||||
//==============================================================================
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
void setNextReadPosition (int64 newPosition);
|
||||
void setNextReadPosition (int64 newPosition) override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getNextReadPosition() const;
|
||||
int64 getNextReadPosition() const override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getTotalLength() const;
|
||||
int64 getTotalLength() const override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
bool isLooping() const;
|
||||
bool isLooping() const override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -68,23 +68,23 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Implementation of the AudioSource method. */
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate);
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void releaseResources();
|
||||
void releaseResources() override;
|
||||
|
||||
/** Implementation of the AudioSource method. */
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override;
|
||||
|
||||
//==============================================================================
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
void setNextReadPosition (int64 newPosition);
|
||||
void setNextReadPosition (int64 newPosition) override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getNextReadPosition() const;
|
||||
int64 getNextReadPosition() const override;
|
||||
|
||||
/** Implements the PositionableAudioSource method. */
|
||||
int64 getTotalLength() const;
|
||||
int64 getTotalLength() const override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -984,7 +984,7 @@ public:
|
|||
return view;
|
||||
}
|
||||
|
||||
void childBoundsChanged (Component*)
|
||||
void childBoundsChanged (Component*) override
|
||||
{
|
||||
if (Component* editor = getChildComponent(0))
|
||||
{
|
||||
|
|
@ -1004,7 +1004,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool keyPressed (const KeyPress&)
|
||||
bool keyPressed (const KeyPress&) override
|
||||
{
|
||||
if (PluginHostType().isAbletonLive())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,11 +75,11 @@ public:
|
|||
|
||||
|
||||
//==============================================================================
|
||||
int64 getTotalLength();
|
||||
int read (void* destBuffer, int maxBytesToRead);
|
||||
bool isExhausted();
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 pos);
|
||||
int64 getTotalLength() override;
|
||||
int read (void* destBuffer, int maxBytesToRead) override;
|
||||
bool isExhausted() override;
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64 pos) override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ bool Process::openEmailWithAttachments (const String& targetEmailAddress,
|
|||
class WebInputStream : public InputStream
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
WebInputStream (String address, bool isPost, const MemoryBlock& postData,
|
||||
URL::OpenStreamProgressCallback* progressCallback, void* progressCallbackContext,
|
||||
const String& headers, int timeOutMs, StringPairArray* responseHeaders)
|
||||
|
|
@ -132,12 +131,12 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool isExhausted() { return stream != nullptr && stream.callBooleanMethod (HTTPStream.isExhausted); }
|
||||
int64 getTotalLength() { return stream != nullptr ? stream.callLongMethod (HTTPStream.getTotalLength) : 0; }
|
||||
int64 getPosition() { return stream != nullptr ? stream.callLongMethod (HTTPStream.getPosition) : 0; }
|
||||
bool setPosition (int64 wantedPos) { return stream != nullptr && stream.callBooleanMethod (HTTPStream.setPosition, (jlong) wantedPos); }
|
||||
bool isExhausted() override { return stream != nullptr && stream.callBooleanMethod (HTTPStream.isExhausted); }
|
||||
int64 getTotalLength() override { return stream != nullptr ? stream.callLongMethod (HTTPStream.getTotalLength) : 0; }
|
||||
int64 getPosition() override { return stream != nullptr ? stream.callLongMethod (HTTPStream.getPosition) : 0; }
|
||||
bool setPosition (int64 wantedPos) override { return stream != nullptr && stream.callBooleanMethod (HTTPStream.setPosition, (jlong) wantedPos); }
|
||||
|
||||
int read (void* buffer, int bytesToRead)
|
||||
int read (void* buffer, int bytesToRead) override
|
||||
{
|
||||
jassert (buffer != nullptr && bytesToRead >= 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -98,17 +98,17 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool isError() const { return socketHandle < 0; }
|
||||
bool isExhausted() { return finished; }
|
||||
int64 getPosition() { return position; }
|
||||
bool isError() const { return socketHandle < 0; }
|
||||
bool isExhausted() override { return finished; }
|
||||
int64 getPosition() override { return position; }
|
||||
|
||||
int64 getTotalLength()
|
||||
int64 getTotalLength() override
|
||||
{
|
||||
//xxx to do
|
||||
return -1;
|
||||
}
|
||||
|
||||
int read (void* buffer, int bytesToRead)
|
||||
int read (void* buffer, int bytesToRead) override
|
||||
{
|
||||
if (finished || isError())
|
||||
return 0;
|
||||
|
|
@ -131,7 +131,7 @@ public:
|
|||
return bytesRead;
|
||||
}
|
||||
|
||||
bool setPosition (int64 wantedPos)
|
||||
bool setPosition (int64 wantedPos) override
|
||||
{
|
||||
if (isError())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -327,12 +327,12 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool isError() const { return connection == nullptr; }
|
||||
int64 getTotalLength() { return connection == nullptr ? -1 : connection->contentLength; }
|
||||
bool isExhausted() { return finished; }
|
||||
int64 getPosition() { return position; }
|
||||
bool isError() const { return connection == nullptr; }
|
||||
int64 getTotalLength() override { return connection == nullptr ? -1 : connection->contentLength; }
|
||||
bool isExhausted() override { return finished; }
|
||||
int64 getPosition() override { return position; }
|
||||
|
||||
int read (void* buffer, int bytesToRead)
|
||||
int read (void* buffer, int bytesToRead) override
|
||||
{
|
||||
jassert (buffer != nullptr && bytesToRead >= 0);
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool setPosition (int64 wantedPos)
|
||||
bool setPosition (int64 wantedPos) override
|
||||
{
|
||||
if (wantedPos != position)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ public:
|
|||
|
||||
|
||||
//==============================================================================
|
||||
int64 getTotalLength();
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 newPosition);
|
||||
int read (void* destBuffer, int maxBytesToRead);
|
||||
String readString();
|
||||
bool isExhausted();
|
||||
int64 getTotalLength() override;
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64 newPosition) override;
|
||||
int read (void* destBuffer, int maxBytesToRead) override;
|
||||
String readString() override;
|
||||
bool isExhausted() override;
|
||||
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@ public:
|
|||
size_t getDataSize() const noexcept { return dataSize; }
|
||||
|
||||
//==============================================================================
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 pos);
|
||||
int64 getTotalLength();
|
||||
bool isExhausted();
|
||||
int read (void* destBuffer, int maxBytesToRead);
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64 pos) override;
|
||||
int64 getTotalLength() override;
|
||||
bool isExhausted() override;
|
||||
int read (void* destBuffer, int maxBytesToRead) override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -74,15 +74,14 @@ public:
|
|||
|
||||
|
||||
//==============================================================================
|
||||
int64 getTotalLength();
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 newPosition);
|
||||
int read (void* destBuffer, int maxBytesToRead);
|
||||
bool isExhausted();
|
||||
int64 getTotalLength() override;
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64 newPosition) override;
|
||||
int read (void* destBuffer, int maxBytesToRead) override;
|
||||
bool isExhausted() override;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
private:
|
||||
//==============================================================================
|
||||
OptionalScopedPointer<InputStream> source;
|
||||
const int64 startPositionInSourceStream, lengthOfSourceStream;
|
||||
|
||||
|
|
|
|||
|
|
@ -75,15 +75,14 @@ public:
|
|||
~GZIPDecompressorInputStream();
|
||||
|
||||
//==============================================================================
|
||||
int64 getPosition();
|
||||
bool setPosition (int64 pos);
|
||||
int64 getTotalLength();
|
||||
bool isExhausted();
|
||||
int read (void* destBuffer, int maxBytesToRead);
|
||||
int64 getPosition() override;
|
||||
bool setPosition (int64 pos) override;
|
||||
int64 getTotalLength() override;
|
||||
bool isExhausted() override;
|
||||
int read (void* destBuffer, int maxBytesToRead) override;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
private:
|
||||
//==============================================================================
|
||||
OptionalScopedPointer<InputStream> sourceStream;
|
||||
const int64 uncompressedStreamLength;
|
||||
const bool noWrap;
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ void Graphics::drawImageAt (const Image& imageToDraw,
|
|||
void Graphics::drawImageWithin (const Image& imageToDraw,
|
||||
const int destX, const int destY,
|
||||
const int destW, const int destH,
|
||||
const RectanglePlacement& placementWithinTarget,
|
||||
RectanglePlacement placementWithinTarget,
|
||||
const bool fillAlphaChannelWithCurrentBrush) const
|
||||
{
|
||||
// passing in a silly number can cause maths problems in rendering!
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ public:
|
|||
*/
|
||||
void drawImageWithin (const Image& imageToDraw,
|
||||
int destX, int destY, int destWidth, int destHeight,
|
||||
const RectanglePlacement& placementWithinTarget,
|
||||
RectanglePlacement placementWithinTarget,
|
||||
bool fillAlphaChannelWithCurrentBrush = false) const;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ public:
|
|||
deleted when no longer needed or when this button is deleted.
|
||||
@param toggledOnImage a drawable object that the button can use as its icon if the button
|
||||
is in a toggled-on state (see the Button::getToggleState() method). If
|
||||
0 is passed-in here, then the normal image will be used instead, regardless
|
||||
of the toggle state. The object that is passed-in here will be kept by
|
||||
this object and will be deleted when no longer needed or when this button
|
||||
is deleted.
|
||||
nullptr is passed-in here, then the normal image will be used instead,
|
||||
regardless of the toggle state. The object that is passed-in here will be
|
||||
owned by this object and will be deleted when no longer needed or when
|
||||
this button is deleted.
|
||||
*/
|
||||
ToolbarButton (int itemId,
|
||||
const String& labelText,
|
||||
|
|
@ -71,17 +71,17 @@ public:
|
|||
//==============================================================================
|
||||
/** @internal */
|
||||
bool getToolbarItemSizes (int toolbarDepth, bool isToolbarVertical, int& preferredSize,
|
||||
int& minSize, int& maxSize);
|
||||
int& minSize, int& maxSize) override;
|
||||
/** @internal */
|
||||
void paintButtonArea (Graphics&, int width, int height, bool isMouseOver, bool isMouseDown);
|
||||
void paintButtonArea (Graphics&, int width, int height, bool isMouseOver, bool isMouseDown) override;
|
||||
/** @internal */
|
||||
void contentAreaChanged (const Rectangle<int>&);
|
||||
void contentAreaChanged (const Rectangle<int>&) override;
|
||||
/** @internal */
|
||||
void buttonStateChanged();
|
||||
void buttonStateChanged() override;
|
||||
/** @internal */
|
||||
void resized();
|
||||
void resized() override;
|
||||
/** @internal */
|
||||
void enablementChanged();
|
||||
void enablementChanged() override;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -728,9 +728,9 @@ public:
|
|||
g.drawImageAt (image, 0, 0);
|
||||
}
|
||||
|
||||
void invalidateAll() { validArea.clear(); }
|
||||
void invalidate (const Rectangle<int>& area) { validArea.subtract (area); }
|
||||
void releaseResources() { image = Image::null; }
|
||||
void invalidateAll() override { validArea.clear(); }
|
||||
void invalidate (const Rectangle<int>& area) override { validArea.subtract (area); }
|
||||
void releaseResources() override { image = Image::null; }
|
||||
|
||||
private:
|
||||
Image image;
|
||||
|
|
|
|||
|
|
@ -33,21 +33,21 @@ public:
|
|||
jassert (comp != nullptr);
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool, bool) {}
|
||||
void componentMovedOrResized (bool, bool) override {}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
if (! component->isShowing())
|
||||
cancel();
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
if (! component->isShowing())
|
||||
cancel();
|
||||
}
|
||||
|
||||
void componentBeingDeleted (Component& comp)
|
||||
void componentBeingDeleted (Component& comp) override
|
||||
{
|
||||
ComponentMovementWatcher::componentBeingDeleted (comp);
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ void Drawable::drawAt (Graphics& g, float x, float y, float opacity) const
|
|||
draw (g, opacity, AffineTransform::translation (x, y));
|
||||
}
|
||||
|
||||
void Drawable::drawWithin (Graphics& g, const Rectangle<float>& destArea, const RectanglePlacement& placement, float opacity) const
|
||||
void Drawable::drawWithin (Graphics& g, const Rectangle<float>& destArea,
|
||||
RectanglePlacement placement, float opacity) const
|
||||
{
|
||||
draw (g, opacity, placement.getTransformToFit (getDrawableBounds(), destArea));
|
||||
}
|
||||
|
|
@ -113,7 +114,7 @@ void Drawable::setOriginWithOriginalSize (Point<float> originWithinParent)
|
|||
setTransform (AffineTransform::translation (originWithinParent.x, originWithinParent.y));
|
||||
}
|
||||
|
||||
void Drawable::setTransformToFit (const Rectangle<float>& area, const RectanglePlacement& placement)
|
||||
void Drawable::setTransformToFit (const Rectangle<float>& area, RectanglePlacement placement)
|
||||
{
|
||||
if (! area.isEmpty())
|
||||
setTransform (placement.getTransformToFit (getDrawableBounds(), area));
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public:
|
|||
*/
|
||||
void drawWithin (Graphics& g,
|
||||
const Rectangle<float>& destArea,
|
||||
const RectanglePlacement& placement,
|
||||
RectanglePlacement placement,
|
||||
float opacity) const;
|
||||
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
/** Sets a transform for this drawable that will position it within the specified
|
||||
area of its parent component.
|
||||
*/
|
||||
void setTransformToFit (const Rectangle<float>& areaInParent, const RectanglePlacement& placement);
|
||||
void setTransformToFit (const Rectangle<float>& areaInParent, RectanglePlacement placement);
|
||||
|
||||
/** Returns the DrawableComposite that contains this object, if there is one. */
|
||||
DrawableComposite* getParent() const;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public:
|
|||
/** @internal */
|
||||
void parentHierarchyChanged() override;
|
||||
/** @internal */
|
||||
MarkerList* getMarkers (bool xAxis);
|
||||
MarkerList* getMarkers (bool xAxis) override;
|
||||
|
||||
//==============================================================================
|
||||
/** Internally-used class for wrapping a DrawableComposite's state into a ValueTree. */
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ private:
|
|||
bool reentrant;
|
||||
WeakReference<Component> lastParentComp;
|
||||
|
||||
void componentMovedOrResized (Component&, bool, bool);
|
||||
void componentBroughtToFront (Component&);
|
||||
void componentChildrenChanged (Component&);
|
||||
void componentParentHierarchyChanged (Component&);
|
||||
void componentVisibilityChanged (Component&);
|
||||
void componentMovedOrResized (Component&, bool, bool) override;
|
||||
void componentBroughtToFront (Component&) override;
|
||||
void componentChildrenChanged (Component&) override;
|
||||
void componentParentHierarchyChanged (Component&) override;
|
||||
void componentVisibilityChanged (Component&) override;
|
||||
|
||||
void updateParent();
|
||||
void updateShadows();
|
||||
|
|
|
|||
|
|
@ -599,7 +599,7 @@ private:
|
|||
{
|
||||
public:
|
||||
SilentDummyModalComp() {}
|
||||
void inputAttemptWhenModal() {}
|
||||
void inputAttemptWhenModal() override {}
|
||||
};
|
||||
|
||||
SilentDummyModalComp dummyModalComponent;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void ImageComponent::setImage (const Image& newImage)
|
|||
}
|
||||
}
|
||||
|
||||
void ImageComponent::setImage (const Image& newImage, const RectanglePlacement& placementToUse)
|
||||
void ImageComponent::setImage (const Image& newImage, RectanglePlacement placementToUse)
|
||||
{
|
||||
if (image != newImage || placement != placementToUse)
|
||||
{
|
||||
|
|
@ -51,7 +51,7 @@ void ImageComponent::setImage (const Image& newImage, const RectanglePlacement&
|
|||
}
|
||||
}
|
||||
|
||||
void ImageComponent::setImagePlacement (const RectanglePlacement& newPlacement)
|
||||
void ImageComponent::setImagePlacement (RectanglePlacement newPlacement)
|
||||
{
|
||||
if (placement != newPlacement)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
/** Sets the image that should be displayed, and its placement within the component. */
|
||||
void setImage (const Image& newImage,
|
||||
const RectanglePlacement& placementToUse);
|
||||
RectanglePlacement placementToUse);
|
||||
|
||||
/** Returns the current image. */
|
||||
const Image& getImage() const;
|
||||
|
|
@ -61,7 +61,7 @@ public:
|
|||
By default the positioning is centred, and will fit the image inside the component's bounds
|
||||
whilst keeping its aspect ratio correct, but you can change it to whatever layout you need.
|
||||
*/
|
||||
void setImagePlacement (const RectanglePlacement& newPlacement);
|
||||
void setImagePlacement (RectanglePlacement newPlacement);
|
||||
|
||||
/** Returns the current image placement. */
|
||||
RectanglePlacement getImagePlacement() const;
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ private:
|
|||
|
||||
void moveCaret (int newCaretPos);
|
||||
void moveCaretTo (int newPosition, bool isSelecting);
|
||||
void handleCommandMessage (int);
|
||||
void handleCommandMessage (int) override;
|
||||
void coalesceSimilarSections();
|
||||
void splitSection (int sectionIndex, int charToSplitAt);
|
||||
void clearInternal (UndoManager*);
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ public:
|
|||
setVisible (false);
|
||||
}
|
||||
|
||||
bool canModalEventBeSentToComponent (const Component* comp)
|
||||
bool canModalEventBeSentToComponent (const Component* comp) override
|
||||
{
|
||||
return toolbar->isParentOf (comp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@ public:
|
|||
repaint();
|
||||
}
|
||||
|
||||
void visibleAreaChanged (const Rectangle<int>& newVisibleArea)
|
||||
void visibleAreaChanged (const Rectangle<int>& newVisibleArea) override
|
||||
{
|
||||
const bool hasScrolledSideways = (newVisibleArea.getX() != lastX);
|
||||
lastX = newVisibleArea.getX();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
[view release];
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
Component* const topComp = owner.getTopLevelComponent();
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
ComponentPeer* const peer = owner.getPeer();
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ public:
|
|||
[view setHidden: ! owner.isShowing()];
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
componentPeerChanged();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,18 +219,18 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
setEmbeddedWindowToOurSize();
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
deleteWindow();
|
||||
createWindow();
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
if (isShowing())
|
||||
createWindow();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
[view release];
|
||||
}
|
||||
|
||||
void componentMovedOrResized (Component& comp, bool wasMoved, bool wasResized)
|
||||
void componentMovedOrResized (Component& comp, bool wasMoved, bool wasResized) override
|
||||
{
|
||||
ComponentMovementWatcher::componentMovedOrResized (comp, wasMoved, wasResized);
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
componentMovedOrResized (wasMoved, wasResized);
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
Component* const topComp = owner.getTopLevelComponent();
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
ComponentPeer* const peer = owner.getPeer();
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ public:
|
|||
[view setHidden: ! owner.isShowing()];
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
componentPeerChanged();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
Component* const topComp = owner.getTopLevelComponent();
|
||||
|
||||
|
|
@ -246,12 +246,12 @@ public:
|
|||
setControlBounds (topComp->getLocalArea (&owner, owner.getLocalBounds()));
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
componentMovedOrResized (true, true);
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
setControlVisible (owner.isShowing());
|
||||
componentPeerChanged();
|
||||
|
|
|
|||
|
|
@ -162,9 +162,9 @@ private:
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool, bool ) {}
|
||||
void componentPeerChanged() {}
|
||||
void componentVisibilityChanged() { owner.visibilityChanged(); }
|
||||
void componentMovedOrResized (bool, bool) override {}
|
||||
void componentPeerChanged() override {}
|
||||
void componentVisibilityChanged() override { owner.visibilityChanged(); }
|
||||
|
||||
private:
|
||||
WebBrowserComponent& owner;
|
||||
|
|
|
|||
|
|
@ -75,19 +75,19 @@ public:
|
|||
peer->addMaskedRegion (peer->getComponent().getLocalArea (&component, component.getLocalBounds()));
|
||||
}
|
||||
|
||||
void invalidateAll()
|
||||
void invalidateAll() override
|
||||
{
|
||||
validArea.clear();
|
||||
triggerRepaint();
|
||||
}
|
||||
|
||||
void invalidate (const Rectangle<int>& area)
|
||||
void invalidate (const Rectangle<int>& area) override
|
||||
{
|
||||
validArea.subtract (area);
|
||||
triggerRepaint();
|
||||
}
|
||||
|
||||
void releaseResources() {}
|
||||
void releaseResources() override {}
|
||||
|
||||
void triggerRepaint()
|
||||
{
|
||||
|
|
@ -416,7 +416,7 @@ public:
|
|||
detach();
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
Component& comp = *getComponent();
|
||||
|
||||
|
|
@ -434,13 +434,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
detach();
|
||||
componentVisibilityChanged();
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
Component& comp = *getComponent();
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ public:
|
|||
}
|
||||
|
||||
#if JUCE_DEBUG || JUCE_LOG_ASSERTIONS
|
||||
void componentBeingDeleted (Component& component)
|
||||
void componentBeingDeleted (Component& component) override
|
||||
{
|
||||
/* You must call detach() or delete your OpenGLContext to remove it
|
||||
from a component BEFORE deleting the component that it is using!
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ void QuickTimeMovieComponent::goToStart()
|
|||
}
|
||||
|
||||
void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
|
||||
const RectanglePlacement& placement)
|
||||
RectanglePlacement placement)
|
||||
{
|
||||
int normalWidth, normalHeight;
|
||||
getMovieNormalSize (normalWidth, normalHeight);
|
||||
|
|
|
|||
|
|
@ -734,19 +734,19 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
|
||||
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/) override
|
||||
{
|
||||
if (owner->videoLoaded)
|
||||
owner->updateContextPosition();
|
||||
}
|
||||
|
||||
void componentPeerChanged()
|
||||
void componentPeerChanged() override
|
||||
{
|
||||
if (owner->videoLoaded)
|
||||
owner->recreateNativeWindowAsync();
|
||||
}
|
||||
|
||||
void componentVisibilityChanged()
|
||||
void componentVisibilityChanged() override
|
||||
{
|
||||
if (owner->videoLoaded)
|
||||
owner->showContext (owner->isShowing());
|
||||
|
|
@ -869,7 +869,7 @@ void DirectShowComponent::getMovieNormalSize (int &width, int &height) const
|
|||
|
||||
//======================================================================
|
||||
void DirectShowComponent::setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
|
||||
const RectanglePlacement& placement)
|
||||
RectanglePlacement placement)
|
||||
{
|
||||
int normalWidth, normalHeight;
|
||||
getMovieNormalSize (normalWidth, normalHeight);
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ void QuickTimeMovieComponent::goToStart()
|
|||
}
|
||||
|
||||
void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
|
||||
const RectanglePlacement& placement)
|
||||
RectanglePlacement placement)
|
||||
{
|
||||
int normalWidth, normalHeight;
|
||||
getMovieNormalSize (normalWidth, normalHeight);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
@note Not implemented
|
||||
*/
|
||||
void setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
|
||||
const RectanglePlacement& placement);
|
||||
RectanglePlacement placement);
|
||||
|
||||
/** Starts the video playing. */
|
||||
void play();
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
the top or sides.
|
||||
*/
|
||||
void setBoundsWithCorrectAspectRatio (const Rectangle<int>& spaceToFitWithin,
|
||||
const RectanglePlacement& placement);
|
||||
RectanglePlacement placement);
|
||||
|
||||
/** Starts the movie playing. */
|
||||
void play();
|
||||
|
|
@ -167,13 +167,11 @@ public:
|
|||
void setSpeed (float newSpeed);
|
||||
|
||||
/** Changes the movie's playback volume.
|
||||
|
||||
@param newVolume the volume in the range 0 (silent) to 1.0 (full)
|
||||
*/
|
||||
void setMovieVolume (float newVolume);
|
||||
|
||||
/** Returns the movie's playback volume.
|
||||
|
||||
@returns the volume in the range 0 (silent) to 1.0 (full)
|
||||
*/
|
||||
float getMovieVolume() const;
|
||||
|
|
@ -182,13 +180,11 @@ public:
|
|||
void setLooping (bool shouldLoop);
|
||||
|
||||
/** Returns true if the movie is currently looping.
|
||||
|
||||
@see setLooping
|
||||
*/
|
||||
bool isLooping() const;
|
||||
|
||||
/** True if the native QuickTime controller bar is shown in the window.
|
||||
|
||||
@see loadMovie
|
||||
*/
|
||||
bool isControllerVisible() const;
|
||||
|
|
@ -204,19 +200,18 @@ private:
|
|||
File movieFile;
|
||||
bool movieLoaded, controllerVisible, looping;
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
#if JUCE_WINDOWS
|
||||
void parentHierarchyChanged() override;
|
||||
void visibilityChanged() override;
|
||||
|
||||
void createControlIfNeeded();
|
||||
bool isControlCreated() const;
|
||||
|
||||
class Pimpl;
|
||||
friend class ScopedPointer <Pimpl>;
|
||||
ScopedPointer <Pimpl> pimpl;
|
||||
#else
|
||||
#else
|
||||
void* movie;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (QuickTimeMovieComponent)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue