Browse Source

Viewport component listener fix. Minor clean-ups.

tags/2021-05-28
jules 13 years ago
parent
commit
36bd285c4b
22 changed files with 27 additions and 24 deletions
  1. +1
    -1
      modules/juce_graphics/colour/juce_ColourGradient.cpp
  2. +1
    -1
      modules/juce_graphics/colour/juce_ColourGradient.h
  3. +2
    -2
      modules/juce_graphics/colour/juce_Colours.cpp
  4. +2
    -2
      modules/juce_graphics/colour/juce_Colours.h
  5. +1
    -1
      modules/juce_graphics/images/juce_Image.cpp
  6. +1
    -1
      modules/juce_graphics/images/juce_Image.h
  7. +1
    -1
      modules/juce_gui_basics/components/juce_Component.cpp
  8. +1
    -1
      modules/juce_gui_basics/components/juce_Component.h
  9. +1
    -1
      modules/juce_gui_basics/drawables/juce_DrawableImage.cpp
  10. +1
    -1
      modules/juce_gui_basics/drawables/juce_DrawableImage.h
  11. +1
    -1
      modules/juce_gui_basics/drawables/juce_SVGParser.cpp
  12. +1
    -1
      modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp
  13. +1
    -1
      modules/juce_gui_basics/layout/juce_TabbedButtonBar.h
  14. +2
    -2
      modules/juce_gui_basics/layout/juce_TabbedComponent.cpp
  15. +1
    -1
      modules/juce_gui_basics/layout/juce_TabbedComponent.h
  16. +3
    -0
      modules/juce_gui_basics/layout/juce_Viewport.cpp
  17. +1
    -1
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
  18. +1
    -1
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h
  19. +1
    -1
      modules/juce_gui_basics/windows/juce_ResizableWindow.cpp
  20. +1
    -1
      modules/juce_gui_basics/windows/juce_ResizableWindow.h
  21. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp
  22. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h

+ 1
- 1
modules/juce_graphics/colour/juce_ColourGradient.cpp View File

@@ -114,7 +114,7 @@ double ColourGradient::getColourPosition (const int index) const noexcept
return 0;
}
const Colour ColourGradient::getColour (const int index) const noexcept
Colour ColourGradient::getColour (const int index) const noexcept
{
if (isPositiveAndBelow (index, colours.size()))
return colours.getReference (index).colour;


+ 1
- 1
modules/juce_graphics/colour/juce_ColourGradient.h View File

@@ -112,7 +112,7 @@ public:
/** Returns the colour that was added with a given index.
The index is from 0 to getNumColours() - 1.
*/
const Colour getColour (int index) const noexcept;
Colour getColour (int index) const noexcept;
/** Changes the colour at a given index.
The index is from 0 to getNumColours() - 1.


+ 2
- 2
modules/juce_graphics/colour/juce_Colours.cpp View File

@@ -168,8 +168,8 @@ const Colour Colours::yellow (0xffffff00);
const Colour Colours::yellowgreen (0xff9acd32);
//==============================================================================
const Colour Colours::findColourForName (const String& colourName,
const Colour& defaultColour)
Colour Colours::findColourForName (const String& colourName,
const Colour& defaultColour)
{
static const int presets[] =
{


+ 2
- 2
modules/juce_graphics/colour/juce_Colours.h View File

@@ -95,8 +95,8 @@ public:
if a match is found, that colour is returned. If no match is found, the
colour passed in as the defaultColour parameter is returned.
*/
static JUCE_API const Colour findColourForName (const String& colourName,
const Colour& defaultColour);
static JUCE_API Colour findColourForName (const String& colourName,
const Colour& defaultColour);
private:
//==============================================================================


+ 1
- 1
modules/juce_graphics/images/juce_Image.cpp View File

@@ -373,7 +373,7 @@ Image::BitmapData::~BitmapData()
{
}
const Colour Image::BitmapData::getPixelColour (const int x, const int y) const noexcept
Colour Image::BitmapData::getPixelColour (const int x, const int y) const noexcept
{
jassert (isPositiveAndBelow (x, width) && isPositiveAndBelow (y, height));


+ 1
- 1
modules/juce_graphics/images/juce_Image.h View File

@@ -338,7 +338,7 @@ public:
For performance reasons, this won't do any bounds-checking on the coordinates, so it's the caller's
repsonsibility to make sure they're within the image's size.
*/
const Colour getPixelColour (int x, int y) const noexcept;
Colour getPixelColour (int x, int y) const noexcept;
/** Sets the colour of a given pixel.
For performance reasons, this won't do any bounds-checking on the coordinates, so it's the caller's


+ 1
- 1
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -2071,7 +2071,7 @@ void Component::sendLookAndFeelChange()
}
}
const Colour Component::findColour (const int colourId, const bool inheritFromParent) const
Colour Component::findColour (const int colourId, const bool inheritFromParent) const
{
const var* const v = properties.getVarPointer (ComponentHelpers::getColourPropertyId (colourId));


+ 1
- 1
modules/juce_gui_basics/components/juce_Component.h View File

@@ -2061,7 +2061,7 @@ public:
@see setColour, isColourSpecified, colourChanged, LookAndFeel::findColour, LookAndFeel::setColour
*/
const Colour findColour (int colourId, bool inheritFromParent = false) const;
Colour findColour (int colourId, bool inheritFromParent = false) const;
/** Registers a colour to be used for a particular purpose.


+ 1
- 1
modules/juce_gui_basics/drawables/juce_DrawableImage.cpp View File

@@ -203,7 +203,7 @@ void DrawableImage::ValueTreeWrapper::setOpacity (float newOpacity, UndoManager*
state.setProperty (opacity, newOpacity, undoManager);
}
const Colour DrawableImage::ValueTreeWrapper::getOverlayColour() const
Colour DrawableImage::ValueTreeWrapper::getOverlayColour() const
{
return Colour::fromString (state [overlay].toString());
}


+ 1
- 1
modules/juce_gui_basics/drawables/juce_DrawableImage.h View File

@@ -113,7 +113,7 @@ public:
void setOpacity (float newOpacity, UndoManager* undoManager);
Value getOpacityValue (UndoManager* undoManager);
const Colour getOverlayColour() const;
Colour getOverlayColour() const;
void setOverlayColour (const Colour& newColour, UndoManager* undoManager);
Value getOverlayColourValue (UndoManager* undoManager);


+ 1
- 1
modules/juce_gui_basics/drawables/juce_SVGParser.cpp View File

@@ -1070,7 +1070,7 @@ private:
}
//==============================================================================
static const Colour parseColour (const String& s, int& index, const Colour& defaultColour)
static Colour parseColour (const String& s, int& index, const Colour& defaultColour)
{
if (s [index] == '#')
{


+ 1
- 1
modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp View File

@@ -450,7 +450,7 @@ void TabbedButtonBar::resized()
}
//==============================================================================
const Colour TabbedButtonBar::getTabBackgroundColour (const int tabIndex)
Colour TabbedButtonBar::getTabBackgroundColour (const int tabIndex)
{
TabInfo* const tab = tabs [tabIndex];
return tab == nullptr ? Colours::white : tab->colour;


+ 1
- 1
modules/juce_gui_basics/layout/juce_TabbedButtonBar.h View File

@@ -234,7 +234,7 @@ public:
This is the colour that was specified in addTab().
*/
const Colour getTabBackgroundColour (int tabIndex);
Colour getTabBackgroundColour (int tabIndex);
/** Changes the background colour of a tab.


+ 2
- 2
modules/juce_gui_basics/layout/juce_TabbedComponent.cpp View File

@@ -72,7 +72,7 @@ public:
owner.popupMenuClickOnTab (tabIndex, tabName);
}
const Colour getTabBackgroundColour (const int tabIndex)
Colour getTabBackgroundColour (const int tabIndex)
{
return owner.tabs->getTabBackgroundColour (tabIndex);
}
@@ -192,7 +192,7 @@ Component* TabbedComponent::getTabContentComponent (const int tabIndex) const no
return contentComponents [tabIndex];
}
const Colour TabbedComponent::getTabBackgroundColour (const int tabIndex) const noexcept
Colour TabbedComponent::getTabBackgroundColour (const int tabIndex) const noexcept
{
return tabs->getTabBackgroundColour (tabIndex);
}


+ 1
- 1
modules/juce_gui_basics/layout/juce_TabbedComponent.h View File

@@ -138,7 +138,7 @@ public:
Component* getTabContentComponent (int tabIndex) const noexcept;
/** Returns the colour of one of the tabs. */
const Colour getTabBackgroundColour (int tabIndex) const noexcept;
Colour getTabBackgroundColour (int tabIndex) const noexcept;
/** Changes the background colour of one of the tabs. */
void setTabBackgroundColour (int tabIndex, const Colour& newColour);


+ 3
- 0
modules/juce_gui_basics/layout/juce_Viewport.cpp View File

@@ -63,6 +63,9 @@ void Viewport::viewedComponentChanged (Component*) {}
//==============================================================================
void Viewport::deleteContentComp()
{
if (contentComp != nullptr)
contentComp->removeComponentListener (this);
if (deleteContent)
{
// This sets the content comp to a null pointer before deleting the old one, in case


+ 1
- 1
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp View File

@@ -268,7 +268,7 @@ LookAndFeel::~LookAndFeel()
}
//==============================================================================
const Colour LookAndFeel::findColour (const int colourId) const noexcept
Colour LookAndFeel::findColour (const int colourId) const noexcept
{
const int index = colourIds.indexOf (colourId);


+ 1
- 1
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h View File

@@ -111,7 +111,7 @@ public:
@see setColour, Component::findColour, Component::setColour
*/
const Colour findColour (int colourId) const noexcept;
Colour findColour (int colourId) const noexcept;
/** Registers a colour to be used for a particular purpose.


+ 1
- 1
modules/juce_gui_basics/windows/juce_ResizableWindow.cpp View File

@@ -402,7 +402,7 @@ void ResizableWindow::lookAndFeelChanged()
}
}
const Colour ResizableWindow::getBackgroundColour() const noexcept
Colour ResizableWindow::getBackgroundColour() const noexcept
{
return findColour (backgroundColourId, false);
}


+ 1
- 1
modules/juce_gui_basics/windows/juce_ResizableWindow.h View File

@@ -94,7 +94,7 @@ public:
@see setBackgroundColour
*/
const Colour getBackgroundColour() const noexcept;
Colour getBackgroundColour() const noexcept;
/** Changes the colour currently being used for the window's background.


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp View File

@@ -1109,7 +1109,7 @@ void CodeEditorComponent::setColourForTokenType (const int tokenType, const Colo
repaint();
}
const Colour CodeEditorComponent::getColourForTokenType (const int tokenType) const
Colour CodeEditorComponent::getColourForTokenType (const int tokenType) const
{
if (! isPositiveAndBelow (tokenType, coloursForTokenCategories.size()))
return findColour (CodeEditorComponent::defaultTextColourId);


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.h View File

@@ -191,7 +191,7 @@ public:
CodeTokeniser::getTokenTypes() to get a list of the token types.
@see setColourForTokenType
*/
const Colour getColourForTokenType (int tokenType) const;
Colour getColourForTokenType (int tokenType) const;
//==============================================================================
/** A set of colour IDs to use to change the colour of various aspects of the editor.


Loading…
Cancel
Save