Browse Source

Cleaned up some compiler warnings. Jucer development.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
b9443c8ba3
88 changed files with 861 additions and 687 deletions
  1. +16
    -15
      extras/Jucer (experimental)/Source/model/Component/Types/jucer_ComponentTypeManager.cpp
  2. +23
    -0
      extras/Jucer (experimental)/Source/model/Component/Types/jucer_GenericComponent.h
  3. +0
    -16
      extras/Jucer (experimental)/Source/model/Component/jucer_CodeGenerator.cpp
  4. +6
    -0
      extras/Jucer (experimental)/Source/model/Component/jucer_CodeGenerator.h
  5. +45
    -75
      extras/Jucer (experimental)/Source/model/Component/jucer_ComponentDocument.cpp
  6. +5
    -3
      extras/Jucer (experimental)/Source/model/Component/jucer_ComponentDocument.h
  7. +15
    -6
      extras/Jucer (experimental)/Source/model/Drawable/jucer_DrawableDocument.cpp
  8. +2
    -0
      extras/Jucer (experimental)/Source/model/Drawable/jucer_DrawableDocument.h
  9. +4
    -4
      extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExport_MSVC.h
  10. +69
    -69
      extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExport_XCode.h
  11. +2
    -2
      extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExporter.h
  12. +3
    -3
      extras/Jucer (experimental)/Source/model/Project/jucer_ProjectSaver.h
  13. +2
    -2
      extras/Jucer (experimental)/Source/ui/Code Editor/jucer_SourceCodeEditor.cpp
  14. +2
    -2
      extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditor.cpp
  15. +3
    -0
      extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditorToolbar.h
  16. +13
    -13
      extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditorTreeView.h
  17. +2
    -2
      extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditor.cpp
  18. +3
    -0
      extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditorToolbar.h
  19. +7
    -7
      extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditorTreeView.h
  20. +9
    -9
      extras/Jucer (experimental)/Source/ui/Project Editor/jucer_ProjectTreeViewBase.cpp
  21. +17
    -0
      extras/Jucer (experimental)/Source/utility/jucer_Coordinate.cpp
  22. +6
    -0
      extras/Jucer (experimental)/Source/utility/jucer_Coordinate.h
  23. +6
    -6
      extras/Jucer (experimental)/Source/utility/jucer_CoordinatePropertyComponent.h
  24. +102
    -4
      extras/Jucer (experimental)/Source/utility/jucer_MarkerListBase.h
  25. +3
    -0
      extras/Jucer (experimental)/Source/utility/jucer_UtilityFunctions.cpp
  26. +1
    -1
      extras/Jucer (experimental)/Source/utility/jucer_UtilityFunctions.h
  27. +4
    -4
      extras/Jucer (experimental)/Source/utility/jucer_ValueRemapperSource.h
  28. +241
    -202
      juce_amalgamated.cpp
  29. +12
    -25
      juce_amalgamated.h
  30. +4
    -4
      src/core/juce_Atomic.h
  31. +0
    -1
      src/gui/components/controls/juce_ListBox.cpp
  32. +0
    -8
      src/gui/components/controls/juce_Slider.h
  33. +3
    -3
      src/gui/components/controls/juce_TextEditor.cpp
  34. +3
    -3
      src/gui/components/controls/juce_ToolbarItemComponent.cpp
  35. +27
    -24
      src/gui/components/controls/juce_TreeView.cpp
  36. +2
    -0
      src/gui/components/filebrowser/juce_FileBrowserComponent.cpp
  37. +16
    -16
      src/gui/components/juce_Component.cpp
  38. +0
    -5
      src/gui/components/juce_Component.h
  39. +4
    -5
      src/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp
  40. +2
    -2
      src/gui/components/layout/juce_ScrollBar.cpp
  41. +2
    -2
      src/gui/components/layout/juce_TabbedComponent.cpp
  42. +1
    -1
      src/gui/components/mouse/juce_LassoComponent.h
  43. +11
    -11
      src/gui/components/special/juce_ColourSelector.cpp
  44. +5
    -5
      src/gui/components/special/juce_MidiKeyboardComponent.cpp
  45. +6
    -6
      src/gui/components/windows/juce_AlertWindow.cpp
  46. +5
    -5
      src/gui/components/windows/juce_DocumentWindow.cpp
  47. +4
    -4
      src/gui/components/windows/juce_ResizableWindow.cpp
  48. +4
    -4
      src/gui/components/windows/juce_TopLevelWindow.cpp
  49. +14
    -14
      src/gui/graphics/drawables/juce_SVGParser.cpp
  50. +4
    -4
      src/gui/graphics/fonts/juce_Font.cpp
  51. +2
    -2
      src/gui/graphics/geometry/juce_Path.cpp
  52. +5
    -5
      src/gui/graphics/geometry/juce_Rectangle.h
  53. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jccoefct.c
  54. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jccolor.c
  55. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jcmarker.c
  56. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jcsample.c
  57. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jctrans.c
  58. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jdatasrc.c
  59. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jdcoefct.c
  60. +1
    -1
      src/gui/graphics/imaging/image_file_formats/jpglib/jdcolor.c
  61. +3
    -3
      src/gui/graphics/imaging/image_file_formats/jpglib/jdmerge.c
  62. +4
    -4
      src/gui/graphics/imaging/image_file_formats/jpglib/jdpostct.c
  63. +6
    -6
      src/gui/graphics/imaging/image_file_formats/jpglib/jdsample.c
  64. +10
    -10
      src/gui/graphics/imaging/image_file_formats/jpglib/jmemnobs.c
  65. +4
    -4
      src/gui/graphics/imaging/image_file_formats/jpglib/jquant1.c
  66. +2
    -2
      src/gui/graphics/imaging/image_file_formats/jpglib/jquant2.c
  67. +2
    -2
      src/gui/graphics/imaging/image_file_formats/jpglib/transupp.c
  68. +1
    -1
      src/gui/graphics/imaging/image_file_formats/pnglib/pngerror.c
  69. +1
    -1
      src/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c
  70. +3
    -3
      src/gui/graphics/imaging/image_file_formats/pnglib/pngset.c
  71. +1
    -1
      src/native/common/juce_posix_SharedCode.h
  72. +2
    -2
      src/native/mac/juce_mac_CarbonViewWrapperComponent.h
  73. +8
    -8
      src/native/mac/juce_mac_CoreAudio.cpp
  74. +1
    -1
      src/native/mac/juce_mac_CoreGraphicsContext.mm
  75. +5
    -5
      src/native/mac/juce_mac_CoreMidi.cpp
  76. +1
    -0
      src/native/mac/juce_mac_FileChooser.mm
  77. +2
    -0
      src/native/mac/juce_mac_MainMenu.mm
  78. +9
    -3
      src/native/mac/juce_mac_MessageManager.mm
  79. +2
    -2
      src/native/mac/juce_mac_MiscUtilities.mm
  80. +1
    -1
      src/native/mac/juce_mac_MouseCursor.mm
  81. +1
    -1
      src/native/mac/juce_mac_NSViewComponent.mm
  82. +14
    -0
      src/native/mac/juce_mac_NSViewComponentPeer.mm
  83. +9
    -5
      src/native/mac/juce_mac_Network.mm
  84. +2
    -2
      src/native/mac/juce_mac_Threads.mm
  85. +6
    -2
      src/native/mac/juce_mac_WebBrowserComponent.mm
  86. +2
    -2
      src/text/juce_XmlElement.cpp
  87. +2
    -2
      src/utilities/juce_PropertiesFile.cpp
  88. +2
    -2
      src/utilities/juce_SelectedItemSet.h

+ 16
- 15
extras/Jucer (experimental)/Source/model/Component/Types/jucer_ComponentTypeManager.cpp View File

@@ -43,6 +43,7 @@ public:
: CoordinatePropertyComponent (document_, name,
Value (new CoordExtractor (coordValue_, type_)),
type_ == left || type_ == right),
document (document_),
type (type_),
compState (compState_)
{
@@ -133,6 +134,7 @@ public:
}
private:
ComponentDocument& document;
Type type;
ValueTree compState;
@@ -164,9 +166,9 @@ ComponentTypeHandler::~ComponentTypeHandler()
{
}
Value ComponentTypeHandler::getValue (const var::identifier& name, ValueTree& state, ComponentDocument& document) const
Value ComponentTypeHandler::getValue (const var::identifier& name_, ValueTree& state, ComponentDocument& document) const
{
return state.getPropertyAsValue (name, document.getUndoManager());
return state.getPropertyAsValue (name_, document.getUndoManager());
}
void ComponentTypeHandler::updateComponent (ComponentDocument& document, Component* comp, const ValueTree& state)
@@ -186,7 +188,7 @@ void ComponentTypeHandler::updateComponent (ComponentDocument& document, Compone
void ComponentTypeHandler::initialiseNewItem (ComponentDocument& document, ValueTree& state)
{
state.setProperty (ComponentDocument::compNameProperty, String::empty, 0);
state.setProperty (ComponentDocument::memberNameProperty, document.getNonExistentMemberName (getMemberNameRoot()), 0);
state.setProperty (ComponentDocument::memberNameProperty, document.getNonexistentMemberName (getMemberNameRoot()), 0);
const Rectangle<int> bounds (getDefaultSize().withPosition (Point<int> (Random::getSystemRandom().nextInt (100) + 100,
Random::getSystemRandom().nextInt (100) + 100)));
@@ -202,10 +204,9 @@ class CompMemberNameValueSource : public Value::ValueSource,
public Value::Listener
{
public:
CompMemberNameValueSource (ComponentDocument& document_, const ValueTree& state_)
: sourceValue (state_.getPropertyAsValue (ComponentDocument::memberNameProperty, document_.getUndoManager())),
document (document_),
state (state_)
CompMemberNameValueSource (ComponentDocument& document_, const ValueTree& state)
: sourceValue (state.getPropertyAsValue (ComponentDocument::memberNameProperty, document_.getUndoManager())),
document (document_)
{
sourceValue.addListener (this);
}
@@ -217,21 +218,21 @@ public:
void setValue (const var& newValue)
{
String newVal (newValue.toString());
//xxx check for uniqueness + rename any coords that use the name..
if (newValue == sourceValue)
return;
newVal = makeValidCppIdentifier (newVal, false, true, false);
const String name (document.getNonexistentMemberName (newValue));
if (sourceValue != newVal)
sourceValue = newVal;
if (sourceValue != name)
{
document.renameAnchor (sourceValue.toString(), name);
sourceValue = name;
}
}
private:
Value sourceValue;
ComponentDocument& document;
ValueTree state;
CompMemberNameValueSource (const CompMemberNameValueSource&);
const CompMemberNameValueSource& operator= (const CompMemberNameValueSource&);


+ 23
- 0
extras/Jucer (experimental)/Source/model/Component/Types/jucer_GenericComponent.h View File

@@ -45,13 +45,29 @@ public:
{
}
void setDetails (const String& memberName, const String& className)
{
const String name (memberName + " (" + className + ")");
if (name != getName())
{
setName (name);
repaint();
}
}
void paint (Graphics& g)
{
g.fillAll (Colours::white.withAlpha (0.2f));
g.setColour (Colours::grey);
g.drawRect (getLocalBounds());
g.drawLine (0.5f, 0.5f, getWidth() - 0.5f, getHeight() - 0.5f);
g.drawLine (0.5f, getHeight() - 0.5f, getWidth() - 0.5f, 0.5f);
g.setColour (Colours::black);
g.setFont (11.0f);
g.drawFittedText (getName(), 2, 2, getWidth() - 4, getHeight() - 4, Justification::centredTop, 2);
}
};
@@ -61,14 +77,21 @@ public:
void update (ComponentDocument& document, Component* comp, const ValueTree& state)
{
static_cast<PlaceholderComp*> (comp)->setDetails (state [ComponentDocument::memberNameProperty],
state ["class"]);
}
void initialiseNew (ComponentDocument& document, ValueTree& state)
{
state.setProperty ("class", "Component", 0);
}
void createProperties (ComponentDocument& document, ValueTree& state, Array <PropertyComponent*>& props)
{
addFocusOrderProperty (document, state, props);
props.add (new TextPropertyComponent (getValue ("class", state, document), "Class", 256, false));
props.getLast()->setTooltip ("The class that this component is an instance of.");
}
};


+ 0
- 16
extras/Jucer (experimental)/Source/model/Component/jucer_CodeGenerator.cpp View File

@@ -221,22 +221,6 @@ static const String getIncludeFileCode (StringArray files)
return s;
}
//==============================================================================
static bool getUserSection (const StringArray& lines, const String& tag, StringArray& resultLines)
{
const int start = indexOfLineStartingWith (lines, "//[" + tag + "]", 0);
if (start < 0)
return false;
const int end = indexOfLineStartingWith (lines, "//[/" + tag + "]", start + 1);
for (int i = start + 1; i < end; ++i)
resultLines.add (lines [i]);
return true;
}
//==============================================================================
static void replaceTemplate (String& text, const String& itemName, const String& value)
{


+ 6
- 0
extras/Jucer (experimental)/Source/model/Component/jucer_CodeGenerator.h View File

@@ -97,6 +97,9 @@ public:
private:
CodeDocument* const doc;
CodeDocumentRef (const CodeDocumentRef&);
CodeDocumentRef& operator= (const CodeDocumentRef&);
};
//==============================================================================
@@ -124,6 +127,9 @@ public:
CustomCodeList& customCode;
StringArray lines;
int i;
Iterator (const Iterator&);
Iterator& operator= (const Iterator&);
};
private:


+ 45
- 75
extras/Jucer (experimental)/Source/model/Component/jucer_ComponentDocument.cpp View File

@@ -412,6 +412,33 @@ bool ComponentDocument::setCoordsFor (ValueTree& state, const RectangleCoordinat
return true;
}
const String ComponentDocument::getNonexistentMemberName (String name)
{
String n (makeValidCppIdentifier (name, false, true, false));
int suffix = 2;
while (markersX->getMarkerNamed (n).isValid() || markersY->getMarkerNamed (n).isValid()
|| getComponentWithMemberName (n).isValid())
n = n.trimCharactersAtEnd ("0123456789") + String (suffix++);
return n;
}
void ComponentDocument::renameAnchor (const String& oldName, const String& newName)
{
int i;
for (i = getNumComponents(); --i >= 0;)
{
ValueTree v (getComponent(i));
RectangleCoordinates coords (getCoordsFor (v));
coords.renameAnchorIfUsed (oldName, newName);
setCoordsFor (v, coords);
}
markersX->renameAnchorInMarkers (oldName, newName);
markersY->renameAnchorInMarkers (oldName, newName);
}
void ComponentDocument::addMarkerMenuItem (int i, const Coordinate& coord, const String& name, PopupMenu& menu,
bool isAnchor1, const String& fullCoordName)
{
@@ -555,24 +582,6 @@ void ComponentDocument::removeComponent (const ValueTree& state)
getComponentGroup().removeChild (state, getUndoManager());
}
const String ComponentDocument::getNonExistentMemberName (String suggestedName)
{
suggestedName = makeValidCppIdentifier (suggestedName, false, true, false);
const String original (suggestedName);
int num = 1;
while (getComponentWithMemberName (suggestedName).isValid())
{
suggestedName = original;
while (String ("0123456789").containsChar (suggestedName.getLastCharacter()))
suggestedName = suggestedName.dropLastCharacters (1);
suggestedName << num++;
}
return suggestedName;
}
//==============================================================================
ComponentDocument::MarkerList::MarkerList (ComponentDocument& document_, const bool isX_)
: MarkerListBase (document_.getRoot().getChildWithName (isX_ ? markersGroupXTag : markersGroupYTag), isX_),
@@ -589,19 +598,24 @@ UndoManager* ComponentDocument::MarkerList::getUndoManager() const
const String ComponentDocument::MarkerList::getNonexistentMarkerName (const String& name)
{
return document.getNonexistentMarkerName (name);
return document.getNonexistentMemberName (name);
}
void ComponentDocument::MarkerList::renameAnchor (const String& oldName, const String& newName)
{
document.renameAnchor (oldName, newName);
}
const Coordinate ComponentDocument::MarkerList::findMarker (const String& name, bool isHorizontal) const
const Coordinate ComponentDocument::MarkerList::findMarker (const String& name, bool isHorizontal_) const
{
if (isHorizontal == isX)
if (isHorizontal_ == isX)
{
if (name == Coordinate::parentRightMarkerName) return Coordinate ((double) document.getCanvasWidth().getValue(), isHorizontal);
if (name == Coordinate::parentBottomMarkerName) return Coordinate ((double) document.getCanvasHeight().getValue(), isHorizontal);
if (name == Coordinate::parentRightMarkerName) return Coordinate ((double) document.getCanvasWidth().getValue(), isX);
if (name == Coordinate::parentBottomMarkerName) return Coordinate ((double) document.getCanvasHeight().getValue(), isX);
const ValueTree marker (document.getMarkerList (isHorizontal).getMarkerNamed (name));
const ValueTree marker (document.getMarkerList (isX).getMarkerNamed (name));
if (marker.isValid())
return document.getMarkerList (isHorizontal).getCoordinate (marker);
return document.getMarkerList (isX).getCoordinate (marker);
}
return Coordinate (isX);
@@ -643,69 +657,25 @@ const String ComponentDocument::MarkerList::getChosenMarkerMenuItem (const Coord
return String::empty;
}
//==============================================================================
class MarkerPositionComponent : public CoordinatePropertyComponent
{
public:
//==============================================================================
MarkerPositionComponent (ComponentDocument& document_, const String& name, const ValueTree& markerState_,
const Value& coordValue_, bool isHorizontal_)
: CoordinatePropertyComponent (document_, name, coordValue_, isHorizontal_),
markerState (markerState_)
{
}
~MarkerPositionComponent()
{
}
const String pickMarker (TextButton* button, const String& currentMarker, bool isAnchor1)
{
Coordinate coord (getCoordinate());
PopupMenu m;
document.getMarkerList (coord.isHorizontal())
.addMarkerMenuItems (markerState, coord, m, isAnchor1);
const int r = m.showAt (button);
if (r > 0)
return document.getMarkerList (coord.isHorizontal()).getChosenMarkerMenuItem (coord, r);
return String::empty;
}
private:
ValueTree markerState;
};
//==============================================================================
bool ComponentDocument::MarkerList::createProperties (Array <PropertyComponent*>& props, const String& itemId)
{
ValueTree marker (group.getChildWithProperty (idProperty, itemId));
if (marker.isValid())
{
props.add (new TextPropertyComponent (getNameAsValue (marker), "Marker Name", 256, false));
props.add (new MarkerPositionComponent (document, "Position", marker,
marker.getPropertyAsValue (getMarkerPosProperty(), document.getUndoManager()),
contains (marker)));
props.add (new TextPropertyComponent (Value (new MarkerListBase::MarkerNameValueSource (this, getNameAsValue (marker))),
"Marker Name", 256, false));
props.add (new MarkerListBase::PositionPropertyComponent (document, *this, "Position", marker,
marker.getPropertyAsValue (getMarkerPosProperty(), document.getUndoManager())));
return true;
}
return false;
}
const String ComponentDocument::getNonexistentMarkerName (const String& name)
{
String n (makeValidCppIdentifier (name, false, true, false));
int suffix = 2;
while (markersX->getMarkerNamed (n).isValid() || markersY->getMarkerNamed (n).isValid())
n = n.trimCharactersAtEnd ("0123456789") + String (suffix++);
return n;
}
//==============================================================================
bool ComponentDocument::createItemProperties (Array <PropertyComponent*>& props, const String& itemId)
{


+ 5
- 3
extras/Jucer (experimental)/Source/model/Component/jucer_ComponentDocument.h View File

@@ -62,7 +62,7 @@ public:
void createClassProperties (Array <PropertyComponent*>& props);
const String getNonExistentMemberName (String suggestedName);
const String getNonexistentMemberName (String suggestedName);
//==============================================================================
int getNumComponents() const;
@@ -77,6 +77,7 @@ public:
void removeComponent (const ValueTree& state);
const RectangleCoordinates getCoordsFor (const ValueTree& componentState) const;
bool setCoordsFor (ValueTree& componentState, const RectangleCoordinates& newSize);
void renameAnchor (const String& oldName, const String& newName);
// for Coordinate::MarkerResolver:
const Coordinate findMarker (const String& name, bool isHorizontal) const;
@@ -99,8 +100,11 @@ public:
void addMarkerMenuItems (const ValueTree& markerState, const Coordinate& coord, PopupMenu& menu, bool isAnchor1);
const String getChosenMarkerMenuItem (const Coordinate& coord, int itemId) const;
UndoManager* getUndoManager() const;
void renameAnchor (const String& oldName, const String& newName);
const String getNonexistentMarkerName (const String& name);
ComponentDocument& getDocument() throw() { return document; }
private:
ComponentDocument& document;
@@ -112,8 +116,6 @@ public:
MarkerList& getMarkerListY() const { return *markersY; }
MarkerList& getMarkerList (bool isX) const { return isX ? *markersX : *markersY; }
const String getNonexistentMarkerName (const String& name);
//==============================================================================
void createItemProperties (Array <PropertyComponent*>& props, const StringArray& selectedItemIds);


+ 15
- 6
extras/Jucer (experimental)/Source/model/Drawable/jucer_DrawableDocument.cpp View File

@@ -307,16 +307,16 @@ DrawableDocument::MarkerList::MarkerList (DrawableDocument& document_, bool isX_
{
}
const Coordinate DrawableDocument::MarkerList::findMarker (const String& name, bool isHorizontal) const
const Coordinate DrawableDocument::MarkerList::findMarker (const String& name, bool isHorizontal_) const
{
if (isHorizontal == isX)
if (isHorizontal_ == isX)
{
if (name == Coordinate::parentRightMarkerName) return Coordinate ((double) document.getCanvasWidth().getValue(), isHorizontal);
if (name == Coordinate::parentBottomMarkerName) return Coordinate ((double) document.getCanvasHeight().getValue(), isHorizontal);
if (name == Coordinate::parentRightMarkerName) return Coordinate ((double) document.getCanvasWidth().getValue(), isX);
if (name == Coordinate::parentBottomMarkerName) return Coordinate ((double) document.getCanvasHeight().getValue(), isX);
const ValueTree marker (document.getMarkerList (isHorizontal).getMarkerNamed (name));
const ValueTree marker (document.getMarkerList (isX).getMarkerNamed (name));
if (marker.isValid())
return document.getMarkerList (isHorizontal).getCoordinate (marker);
return document.getMarkerList (isX).getCoordinate (marker);
}
return Coordinate (isX);
@@ -404,3 +404,12 @@ const String DrawableDocument::getNonexistentMarkerName (const String& name)
return n;
}
void DrawableDocument::MarkerList::renameAnchor (const String& oldName, const String& newName)
{
document.renameAnchor (oldName, newName);
}
void DrawableDocument::renameAnchor (const String& oldName, const String& newName)
{
}

+ 2
- 0
extras/Jucer (experimental)/Source/model/Drawable/jucer_DrawableDocument.h View File

@@ -75,6 +75,7 @@ public:
const String getChosenMarkerMenuItem (const Coordinate& coord, int itemId) const;
UndoManager* getUndoManager() const;
const String getNonexistentMarkerName (const String& name);
void renameAnchor (const String& oldName, const String& newName);
private:
DrawableDocument& document;
@@ -88,6 +89,7 @@ public:
MarkerList& getMarkerList (bool isX) const { return isX ? *markersX : *markersY; }
const String getNonexistentMarkerName (const String& name);
void renameAnchor (const String& oldName, const String& newName);
//==============================================================================
void valueTreePropertyChanged (ValueTree& tree, const var::identifier& name);


+ 4
- 4
extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExport_MSVC.h View File

@@ -237,10 +237,10 @@ private:
}
}
XmlElement* createGroup (const String& name, XmlElement& parent)
XmlElement* createGroup (const String& groupName, XmlElement& parent)
{
XmlElement* filter = parent.createNewChildElement ("Filter");
filter->setAttribute ("Name", name);
filter->setAttribute ("Name", groupName);
return filter;
}
@@ -409,10 +409,10 @@ private:
return searchPaths;
}
XmlElement* createToolElement (XmlElement& parent, const String& name) const
XmlElement* createToolElement (XmlElement& parent, const String& toolName) const
{
XmlElement* const e = parent.createNewChildElement ("Tool");
e->setAttribute ("Name", name);
e->setAttribute ("Name", toolName);
return e;
}


+ 69
- 69
extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExport_XCode.h View File

@@ -368,57 +368,57 @@ private:
const StringArray getProjectSettings (const Project::BuildConfiguration& config)
{
StringArray settings;
settings.add ("ALWAYS_SEARCH_USER_PATHS = NO");
settings.add ("GCC_C_LANGUAGE_STANDARD = c99");
settings.add ("GCC_WARN_ABOUT_RETURN_TYPE = YES");
settings.add ("GCC_WARN_CHECK_SWITCH_STATEMENTS = YES");
settings.add ("GCC_WARN_UNUSED_VARIABLE = YES");
settings.add ("GCC_WARN_MISSING_PARENTHESES = YES");
settings.add ("GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES");
settings.add ("GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES");
settings.add ("GCC_MODEL_TUNING = G5");
settings.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
settings.add ("ZERO_LINK = NO");
settings.add ("DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"");
settings.add ("PRODUCT_NAME = \"" + config.getTargetBinaryName().toString() + "\"");
return settings;
StringArray s;
s.add ("ALWAYS_SEARCH_USER_PATHS = NO");
s.add ("GCC_C_LANGUAGE_STANDARD = c99");
s.add ("GCC_WARN_ABOUT_RETURN_TYPE = YES");
s.add ("GCC_WARN_CHECK_SWITCH_STATEMENTS = YES");
s.add ("GCC_WARN_UNUSED_VARIABLE = YES");
s.add ("GCC_WARN_MISSING_PARENTHESES = YES");
s.add ("GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES");
s.add ("GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES");
s.add ("GCC_MODEL_TUNING = G5");
s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
s.add ("ZERO_LINK = NO");
s.add ("DEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\"");
s.add ("PRODUCT_NAME = \"" + config.getTargetBinaryName().toString() + "\"");
return s;
}
const StringArray getTargetSettings (const Project::BuildConfiguration& config)
{
StringArray settings;
settings.add ("ARCHS = \"$(ARCHS_STANDARD_32_BIT)\"");
settings.add ("PREBINDING = NO");
settings.add ("HEADER_SEARCH_PATHS = \"" + getHeaderSearchPaths (config).joinIntoString (" ") + " $(inherited)\"");
settings.add ("GCC_OPTIMIZATION_LEVEL = " + config.getGCCOptimisationFlag());
settings.add ("INFOPLIST_FILE = " + infoPlistFile.getFileName());
StringArray s;
s.add ("ARCHS = \"$(ARCHS_STANDARD_32_BIT)\"");
s.add ("PREBINDING = NO");
s.add ("HEADER_SEARCH_PATHS = \"" + getHeaderSearchPaths (config).joinIntoString (" ") + " $(inherited)\"");
s.add ("GCC_OPTIMIZATION_LEVEL = " + config.getGCCOptimisationFlag());
s.add ("INFOPLIST_FILE = " + infoPlistFile.getFileName());
if (getExtraCompilerFlags().toString().isNotEmpty())
settings.add ("OTHER_CPLUSPLUSFLAGS = " + getExtraCompilerFlags().toString());
s.add ("OTHER_CPLUSPLUSFLAGS = " + getExtraCompilerFlags().toString());
switch ((int) project.getProjectType().getValue())
{
case Project::application:
settings.add ("INSTALL_PATH = \"$(HOME)/Applications\"");
s.add ("INSTALL_PATH = \"$(HOME)/Applications\"");
break;
case Project::commandLineApp:
break;
case Project::audioPlugin:
settings.add ("LIBRARY_STYLE = Bundle");
settings.add ("INSTALL_PATH = \"$(HOME)/Library/Audio/Plug-Ins/Components/\"");
settings.add ("WRAPPER_EXTENSION = " + getAudioPluginBundleExtension());
settings.add ("GENERATE_PKGINFO_FILE = YES");
settings.add ("OTHER_REZFLAGS = \"-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64"
" -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers"
" -I \\\"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\\\"\"");
s.add ("LIBRARY_STYLE = Bundle");
s.add ("INSTALL_PATH = \"$(HOME)/Library/Audio/Plug-Ins/Components/\"");
s.add ("WRAPPER_EXTENSION = " + getAudioPluginBundleExtension());
s.add ("GENERATE_PKGINFO_FILE = YES");
s.add ("OTHER_REZFLAGS = \"-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64"
" -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers"
" -I \\\"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\\\"\"");
break;
case Project::browserPlugin:
settings.add ("LIBRARY_STYLE = Bundle");
settings.add ("INSTALL_PATH = \"/Library/Internet Plug-Ins/\"");
s.add ("LIBRARY_STYLE = Bundle");
s.add ("INSTALL_PATH = \"/Library/Internet Plug-Ins/\"");
break;
case Project::library:
@@ -427,12 +427,12 @@ private:
RelativePath binaryPath (config.getTargetBinaryRelativePath().toString(), RelativePath::projectFolder);
binaryPath = binaryPath.rebased (project.getFile().getParentDirectory(), getTargetFolder(), RelativePath::buildTargetFolder);
settings.add ("DSTROOT = " + sanitisePath (binaryPath.toUnixStyle()));
settings.add ("SYMROOT = " + sanitisePath (binaryPath.toUnixStyle()));
s.add ("DSTROOT = " + sanitisePath (binaryPath.toUnixStyle()));
s.add ("SYMROOT = " + sanitisePath (binaryPath.toUnixStyle()));
}
settings.add ("CONFIGURATION_BUILD_DIR = \"$(BUILD_DIR)\"");
settings.add ("DEPLOYMENT_LOCATION = YES");
s.add ("CONFIGURATION_BUILD_DIR = \"$(BUILD_DIR)\"");
s.add ("DEPLOYMENT_LOCATION = YES");
break;
default:
@@ -441,27 +441,27 @@ private:
if (iPhone)
{
settings.add ("SDKROOT = iphonesimulator3.0");
s.add ("SDKROOT = iphonesimulator3.0");
}
else
{
switch ((int) config.getMacSDKVersion().getValue())
{
case 2: settings.add ("SDKROOT = macosx10.4"); settings.add ("GCC_VERSION = 4.0"); break;
case 3: settings.add ("SDKROOT = macosx10.5"); break;
case 4: settings.add ("SDKROOT = macosx10.6"); break;
case 2: s.add ("SDKROOT = macosx10.4"); s.add ("GCC_VERSION = 4.0"); break;
case 3: s.add ("SDKROOT = macosx10.5"); break;
case 4: s.add ("SDKROOT = macosx10.6"); break;
default: break;
}
switch ((int) config.getMacCompatibilityVersion().getValue())
{
case 2: settings.add ("MACOSX_DEPLOYMENT_TARGET = 10.4"); break;
case 3: settings.add ("MACOSX_DEPLOYMENT_TARGET = 10.5"); break;
case 4: settings.add ("MACOSX_DEPLOYMENT_TARGET = 10.6"); break;
case 2: s.add ("MACOSX_DEPLOYMENT_TARGET = 10.4"); break;
case 3: s.add ("MACOSX_DEPLOYMENT_TARGET = 10.5"); break;
case 4: s.add ("MACOSX_DEPLOYMENT_TARGET = 10.6"); break;
default: break;
}
settings.add ("MACOSX_DEPLOYMENT_TARGET_ppc = 10.4");
s.add ("MACOSX_DEPLOYMENT_TARGET_ppc = 10.4");
}
{
@@ -469,7 +469,7 @@ private:
getLinkerFlags (config, linkerFlags, librarySearchPaths);
if (linkerFlags.size() > 0)
settings.add ("OTHER_LDFLAGS = \"" + linkerFlags.joinIntoString (" ") + "\"");
s.add ("OTHER_LDFLAGS = \"" + linkerFlags.joinIntoString (" ") + "\"");
if (librarySearchPaths.size() > 0)
{
@@ -478,7 +478,7 @@ private:
for (int i = 0; i < librarySearchPaths.size(); ++i)
libPaths += ", \"\\\"" + librarySearchPaths[i] + "\\\"\"";
settings.add (libPaths + ")");
s.add (libPaths + ")");
}
}
@@ -488,17 +488,17 @@ private:
{
defines.add ("_DEBUG=1");
defines.add ("DEBUG=1 ");
settings.add ("ONLY_ACTIVE_ARCH = YES");
settings.add ("COPY_PHASE_STRIP = NO");
settings.add ("GCC_DYNAMIC_NO_PIC = NO");
settings.add ("GCC_ENABLE_FIX_AND_CONTINUE = YES");
s.add ("ONLY_ACTIVE_ARCH = YES");
s.add ("COPY_PHASE_STRIP = NO");
s.add ("GCC_DYNAMIC_NO_PIC = NO");
s.add ("GCC_ENABLE_FIX_AND_CONTINUE = YES");
}
else
{
defines.add ("_NDEBUG=1");
defines.add ("NDEBUG=1 ");
settings.add ("GCC_GENERATE_DEBUGGING_SYMBOLS = NO");
settings.add ("GCC_SYMBOLS_PRIVATE_EXTERN = YES");
s.add ("GCC_GENERATE_DEBUGGING_SYMBOLS = NO");
s.add ("GCC_SYMBOLS_PRIVATE_EXTERN = YES");
}
{
@@ -513,10 +513,10 @@ private:
for (int i = defines.size(); --i >= 0;)
defines.set (i, defines[i].quoted());
settings.add ("GCC_PREPROCESSOR_DEFINITIONS = (" + indentList (defines, ",") + ")");
s.add ("GCC_PREPROCESSOR_DEFINITIONS = (" + indentList (defines, ",") + ")");
}
return settings;
return s;
}
void addFrameworks()
@@ -565,15 +565,15 @@ private:
for (int j = 0; j < o.getNumProperties(); ++j)
{
const var::identifier name (o.getPropertyName(j));
String val (o.getProperty (name).toString());
const var::identifier propertyName (o.getPropertyName(j));
String val (o.getProperty (propertyName).toString());
if (val.isEmpty() || (val.containsAnyOf (" \t;<>()=,-\r\n")
&& ! (val.trimStart().startsWithChar ('(')
|| val.trimStart().startsWithChar ('{'))))
val = val.quoted();
output << name.name << " = " << val << "; ";
output << propertyName.name << " = " << val << "; ";
}
output << "};\n";
@@ -699,12 +699,12 @@ private:
frameworkFileIDs.add (fileRefID);
}
void addGroup (const String& groupID, const String& name, const StringArray& childIDs)
void addGroup (const String& groupID, const String& groupName, const StringArray& childIDs)
{
ValueTree* v = new ValueTree (groupID);
v->setProperty ("isa", "PBXGroup", 0);
v->setProperty ("children", "(" + indentList (childIDs, ",") + " )", 0);
v->setProperty ("name", name, 0);
v->setProperty ("name", groupName, 0);
v->setProperty ("sourceTree", "<group>", 0);
groups.add (v);
}
@@ -782,21 +782,21 @@ private:
pbxFileReferences.add (v);
}
void addTargetConfig (const String& name, const StringArray& settings)
void addTargetConfig (const String& configName, const StringArray& buildSettings)
{
ValueTree* v = new ValueTree (createID ("targetconfigid_" + name));
ValueTree* v = new ValueTree (createID ("targetconfigid_" + configName));
v->setProperty ("isa", "XCBuildConfiguration", 0);
v->setProperty ("buildSettings", "{" + indentList (settings, ";") + " }", 0);
v->setProperty ("name", name, 0);
v->setProperty ("buildSettings", "{" + indentList (buildSettings, ";") + " }", 0);
v->setProperty ("name", configName, 0);
targetConfigs.add (v);
}
void addProjectConfig (const String& name, const StringArray& settings)
void addProjectConfig (const String& configName, const StringArray& buildSettings)
{
ValueTree* v = new ValueTree (createID ("projectconfigid_" + name));
ValueTree* v = new ValueTree (createID ("projectconfigid_" + configName));
v->setProperty ("isa", "XCBuildConfiguration", 0);
v->setProperty ("buildSettings", "{" + indentList (settings, ";") + " }", 0);
v->setProperty ("name", name, 0);
v->setProperty ("buildSettings", "{" + indentList (buildSettings, ";") + " }", 0);
v->setProperty ("name", configName, 0);
projectConfigs.add (v);
}
@@ -910,11 +910,11 @@ private:
return createID (path.toUnixStyle());
}
const String createID (const String& name) const
const String createID (const String& rootString) const
{
static const char digits[] = "0123456789ABCDEF";
char n[24];
Random ran (projectIDSalt + hashCode64 (name));
Random ran (projectIDSalt + hashCode64 (rootString));
for (int i = 0; i < numElementsInArray (n); ++i)
n[i] = digits [ran.nextInt (16)];


+ 2
- 2
extras/Jucer (experimental)/Source/model/Project/jucer_ProjectExporter.h View File

@@ -62,7 +62,7 @@ public:
const File getTargetFolder() const;
const ValueTree& getSettings() const { return settings; }
Value getSetting (const var::identifier& name) const { return settings.getPropertyAsValue (name, project.getUndoManagerFor (settings)); }
Value getSetting (const var::identifier& name_) const { return settings.getPropertyAsValue (name_, project.getUndoManagerFor (settings)); }
Value getJuceFolder() const { return getSetting ("juceFolder"); }
Value getTargetLocation() const { return getSetting ("targetFolder"); }
@@ -95,7 +95,7 @@ protected:
const Array<RelativePath> getVSTFilesRequired() const;
const String getLibbedFilename (String name) const
static const String getLibbedFilename (String name)
{
if (! name.startsWith ("lib"))
name = "lib" + name;


+ 3
- 3
extras/Jucer (experimental)/Source/model/Project/jucer_ProjectSaver.h View File

@@ -494,12 +494,12 @@ private:
if (numJuceSourceFiles > 0)
{
for (int i = 0; i <= project.getNumSeparateAmalgamatedFiles(); ++i)
for (int j = 0; j <= project.getNumSeparateAmalgamatedFiles(); ++j)
{
const File sourceWrapperCpp (getSourceWrapperCpp (i));
const File sourceWrapperCpp (getSourceWrapperCpp (j));
const File sourceWrapperMM (sourceWrapperCpp.withFileExtension (".mm"));
if ((i == 0 && numJuceSourceFiles == 1) || (i != 0 && numJuceSourceFiles > 1))
if ((j == 0 && numJuceSourceFiles == 1) || (j != 0 && numJuceSourceFiles > 1))
{
if (exporter->usesMMFiles())
exporter->juceWrapperFiles.add (RelativePath (sourceWrapperMM, targetFolder, RelativePath::buildTargetFolder));


+ 2
- 2
extras/Jucer (experimental)/Source/ui/Code Editor/jucer_SourceCodeEditor.cpp View File

@@ -28,10 +28,10 @@
//==============================================================================
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document,
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_,
CodeDocument& codeDocument,
CodeTokeniser* const codeTokeniser)
: DocumentEditorComponent (document)
: DocumentEditorComponent (document_)
{
addAndMakeVisible (editor = new CodeEditorComponent (codeDocument, codeTokeniser));


+ 2
- 2
extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditor.cpp View File

@@ -120,9 +120,9 @@ private:
//==============================================================================
ComponentEditor::ComponentEditor (OpenDocumentManager::Document* document,
ComponentEditor::ComponentEditor (OpenDocumentManager::Document* document_,
Project* project_, ComponentDocument* componentDocument_)
: DocumentEditorComponent (document),
: DocumentEditorComponent (document_),
project (project_),
componentDocument (componentDocument_),
classInfoHolder (0),


+ 3
- 0
extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditorToolbar.h View File

@@ -89,6 +89,9 @@ public:
private:
ComponentEditor& editor;
ComponentEditorToolbarFactory (const ComponentEditorToolbarFactory&);
ComponentEditorToolbarFactory& operator= (const ComponentEditorToolbarFactory&);
};


+ 13
- 13
extras/Jucer (experimental)/Source/ui/Component Editor/jucer_ComponentEditorTreeView.h View File

@@ -164,7 +164,7 @@ namespace ComponentEditorTreeView
void refreshSubItems()
{
ScopedPointer <XmlElement> openness (getOpennessState());
ScopedPointer <XmlElement> oldOpenness (getOpennessState());
clearSubItems();
ComponentDocument& doc = editor.getDocument();
@@ -173,8 +173,8 @@ namespace ComponentEditorTreeView
for (int i = 0; i < num; ++i)
addSubItem (new ComponentItem (editor, doc.getComponent (i)));
if (openness != 0)
restoreOpennessState (*openness);
if (oldOpenness != 0)
restoreOpennessState (*oldOpenness);
}
const String getDisplayName() const { return getRenamingName(); }
@@ -193,7 +193,7 @@ namespace ComponentEditorTreeView
if (editor.getSelection().getNumSelected() > 0)
{
TreeView* tree = getOwnerView();
const ScopedPointer <XmlElement> openness (tree->getOpennessState (false));
const ScopedPointer <XmlElement> oldOpenness (tree->getOpennessState (false));
Array <ValueTree> selectedComps;
// scan the source tree rather than look at the selection manager, because it might
@@ -201,8 +201,8 @@ namespace ComponentEditorTreeView
getAllSelectedNodesInTree (sourceComponent, selectedComps);
insertItems (selectedComps, insertIndex);
if (openness != 0)
tree->restoreOpennessState (*openness);
if (oldOpenness != 0)
tree->restoreOpennessState (*oldOpenness);
}
}
@@ -332,14 +332,14 @@ namespace ComponentEditorTreeView
const String getItemId() const { return isX ? "markersX" : "markersY"; }
bool mightContainSubItems() { return true; }
void valueTreeChildrenChanged (ValueTree& tree)
void valueTreeChildrenChanged (ValueTree&)
{
refreshSubItems();
}
void refreshSubItems()
{
ScopedPointer <XmlElement> openness (getOpennessState());
ScopedPointer <XmlElement> oldOpenness (getOpennessState());
clearSubItems();
ComponentDocument::MarkerList& markers = editor.getDocument().getMarkerList (isX);
@@ -348,8 +348,8 @@ namespace ComponentEditorTreeView
for (int i = 0; i < num; ++i)
addSubItem (new MarkerItem (editor, markers.getMarker (i)));
if (openness != 0)
restoreOpennessState (*openness);
if (oldOpenness != 0)
restoreOpennessState (*oldOpenness);
}
const String getDisplayName() const { return getRenamingName(); }
@@ -375,15 +375,15 @@ namespace ComponentEditorTreeView
void refreshSubItems()
{
ScopedPointer <XmlElement> openness (getOpennessState());
ScopedPointer <XmlElement> oldOpenness (getOpennessState());
clearSubItems();
addSubItem (new ComponentList (editor));
addSubItem (new MarkerList (editor, true));
addSubItem (new MarkerList (editor, false));
if (openness != 0)
restoreOpennessState (*openness);
if (oldOpenness != 0)
restoreOpennessState (*oldOpenness);
}
const String getDisplayName() const { return getRenamingName(); }


+ 2
- 2
extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditor.cpp View File

@@ -72,10 +72,10 @@ private:
};
//==============================================================================
DrawableEditor::DrawableEditor (OpenDocumentManager::Document* document,
DrawableEditor::DrawableEditor (OpenDocumentManager::Document* document_,
Project* project_,
DrawableDocument* drawableDocument_)
: DocumentEditorComponent (document),
: DocumentEditorComponent (document_),
project (project_),
drawableDocument (drawableDocument_)
{


+ 3
- 0
extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditorToolbar.h View File

@@ -86,6 +86,9 @@ public:
private:
DrawableEditor& editor;
DrawableEditorToolbarFactory (const DrawableEditorToolbarFactory&);
DrawableEditorToolbarFactory& operator= (const DrawableEditorToolbarFactory&);
};


+ 7
- 7
extras/Jucer (experimental)/Source/ui/Drawable Editor/jucer_DrawableEditorTreeView.h View File

@@ -114,7 +114,7 @@ public:
void refreshSubItems()
{
ScopedPointer <XmlElement> openness (getOpennessState());
ScopedPointer <XmlElement> oldOpenness (getOpennessState());
clearSubItems();
@@ -127,8 +127,8 @@ public:
addSubItem (item);
}
if (openness != 0)
restoreOpennessState (*openness);
if (oldOpenness != 0)
restoreOpennessState (*oldOpenness);
editor.getSelection().changed();
}
@@ -215,10 +215,10 @@ public:
}
// Text editor listener for renaming..
void textEditorTextChanged (TextEditor& editor) {}
void textEditorReturnKeyPressed (TextEditor& editor) { editor.exitModalState (1); }
void textEditorEscapeKeyPressed (TextEditor& editor) { editor.exitModalState (0); }
void textEditorFocusLost (TextEditor& editor) { editor.exitModalState (0); }
void textEditorTextChanged (TextEditor& textEditor) {}
void textEditorReturnKeyPressed (TextEditor& textEditor) { textEditor.exitModalState (1); }
void textEditorEscapeKeyPressed (TextEditor& textEditor) { textEditor.exitModalState (0); }
void textEditorFocusLost (TextEditor& textEditor) { textEditor.exitModalState (0); }
//==============================================================================
DrawableEditor& editor;


+ 9
- 9
extras/Jucer (experimental)/Source/ui/Project Editor/jucer_ProjectTreeViewBase.cpp View File

@@ -242,9 +242,9 @@ void ProjectTreeViewBase::deleteAllSelectedItems()
for (i = itemsToRemove.size(); --i >= 0;)
{
ProjectTreeViewBase* item = treeRootItem->findTreeViewItem (*itemsToRemove.getUnchecked(i));
if (item != 0)
item->deleteItem();
ProjectTreeViewBase* itemToRemove = treeRootItem->findTreeViewItem (*itemsToRemove.getUnchecked(i));
if (itemToRemove != 0)
itemToRemove->deleteItem();
}
}
}
@@ -353,12 +353,12 @@ void ProjectTreeViewBase::itemDropped (const String& sourceDescription, Componen
if (selectedNodes.size() > 0)
{
TreeView* tree = getOwnerView();
ScopedPointer <XmlElement> openness (tree->getOpennessState (false));
ScopedPointer <XmlElement> oldOpenness (tree->getOpennessState (false));
moveSelectedItemsTo (selectedNodes, insertIndex);
if (openness != 0)
tree->restoreOpennessState (*openness);
if (oldOpenness != 0)
tree->restoreOpennessState (*oldOpenness);
}
}
@@ -414,13 +414,13 @@ void ProjectTreeViewBase::addSubItems()
void ProjectTreeViewBase::refreshSubItems()
{
ScopedPointer <XmlElement> openness (getOpennessState());
ScopedPointer <XmlElement> oldOpenness (getOpennessState());
clearSubItems();
addSubItems();
if (openness != 0)
restoreOpennessState (*openness);
if (oldOpenness != 0)
restoreOpennessState (*oldOpenness);
}
void ProjectTreeViewBase::showMultiSelectionPopupMenu()


+ 17
- 0
extras/Jucer (experimental)/Source/utility/jucer_Coordinate.cpp View File

@@ -338,6 +338,15 @@ void Coordinate::changeAnchor2 (const String& newMarkerName, const MarkerResolve
moveToAbsolute (oldValue, markerResolver);
}
void Coordinate::renameAnchorIfUsed (const String& oldName, const String& newName)
{
if (anchor1.upToFirstOccurrenceOf (".", false, false) == oldName)
anchor1 = newName + anchor1.fromFirstOccurrenceOf (".", true, false);
if (anchor2.upToFirstOccurrenceOf (".", false, false) == oldName)
anchor2 = newName + anchor2.fromFirstOccurrenceOf (".", true, false);
}
//==============================================================================
RectangleCoordinates::RectangleCoordinates()
: left (true), right (true), top (false), bottom (false)
@@ -386,3 +395,11 @@ const String RectangleCoordinates::toString() const
{
return left.toString() + ", " + top.toString() + ", " + right.toString() + ", " + bottom.toString();
}
void RectangleCoordinates::renameAnchorIfUsed (const String& oldName, const String& newName)
{
left.renameAnchorIfUsed (oldName, newName);
right.renameAnchorIfUsed (oldName, newName);
top.renameAnchorIfUsed (oldName, newName);
bottom.renameAnchorIfUsed (oldName, newName);
}

+ 6
- 0
extras/Jucer (experimental)/Source/utility/jucer_Coordinate.h View File

@@ -97,6 +97,9 @@ public:
const String getAnchor2() const { return checkName (anchor2); }
void changeAnchor2 (const String& newMarkerName, const MarkerResolver& markerResolver);
// Tells the coord that an anchor is changing its name.
void renameAnchorIfUsed (const String& oldName, const String& newName);
//==============================================================================
/*
Position string formats:
@@ -154,6 +157,9 @@ public:
void moveToAbsolute (const Rectangle<float>& newPos, const Coordinate::MarkerResolver& markerResolver);
const String toString() const;
// Tells the coord that an anchor is changing its name.
void renameAnchorIfUsed (const String& oldName, const String& newName);
Coordinate left, right, top, bottom;
};


+ 6
- 6
extras/Jucer (experimental)/Source/utility/jucer_CoordinatePropertyComponent.h View File

@@ -34,9 +34,9 @@ class CoordinatePropertyComponent : public PropertyComponent,
{
public:
//==============================================================================
CoordinatePropertyComponent (ComponentDocument& document_, const String& name,
CoordinatePropertyComponent (Coordinate::MarkerResolver& resolver_, const String& name,
const Value& coordValue_, bool isHorizontal_)
: PropertyComponent (name, 40), document (document_),
: PropertyComponent (name, 40), resolver (resolver_),
coordValue (coordValue_),
textValue (Value (new CoordEditableValueSource (coordValue_, isHorizontal_))),
isHorizontal (isHorizontal_)
@@ -98,7 +98,7 @@ public:
if (button == proportionButton)
{
coord.toggleProportionality (document);
coord.toggleProportionality (resolver);
coordValue = coord.toString();
}
else if (button == anchorButton1)
@@ -107,7 +107,7 @@ public:
if (marker.isNotEmpty())
{
coord.changeAnchor1 (marker, document);
coord.changeAnchor1 (marker, resolver);
coordValue = coord.toString();
}
}
@@ -117,7 +117,7 @@ public:
if (marker.isNotEmpty())
{
coord.changeAnchor2 (marker, document);
coord.changeAnchor2 (marker, resolver);
coordValue = coord.toString();
}
}
@@ -142,7 +142,7 @@ public:
virtual const String pickMarker (TextButton* button, const String& currentMarker, bool isAnchor1) = 0;
protected:
ComponentDocument& document;
Coordinate::MarkerResolver& resolver;
Value coordValue, textValue;
Label* label;
TextButton* proportionButton;


+ 102
- 4
extras/Jucer (experimental)/Source/utility/jucer_MarkerListBase.h View File

@@ -26,6 +26,8 @@
#ifndef __JUCER_MARKERLISTBASE_H_E0091A88__
#define __JUCER_MARKERLISTBASE_H_E0091A88__
#include "jucer_CoordinatePropertyComponent.h"
//==============================================================================
class MarkerListBase : public Coordinate::MarkerResolver
@@ -34,6 +36,7 @@ public:
MarkerListBase (const ValueTree& group_, bool isX_) : group (group_), isX (isX_) {}
virtual ~MarkerListBase() {}
bool isHorizontal() const { return isX; }
static const String getId (const ValueTree& markerState) { return markerState [getIdProperty()]; }
ValueTree& getGroup() { return group; }
int size() const { return group.getNumChildren(); }
@@ -47,6 +50,17 @@ public:
const Coordinate getCoordinate (const ValueTree& markerState) const { return Coordinate (markerState [getMarkerPosProperty()].toString(), isX); }
void setCoordinate (ValueTree& markerState, const Coordinate& newCoord) { markerState.setProperty (getMarkerPosProperty(), newCoord.toString(), getUndoManager()); }
void renameAnchorInMarkers (const String& oldName, const String& newName)
{
for (int i = size(); --i >= 0;)
{
ValueTree v (getMarker (i));
Coordinate coord (getCoordinate (v));
coord.renameAnchorIfUsed (oldName, newName);
setCoordinate (v, coord);
}
}
void createMarker (const String& name, int position)
{
ValueTree marker (getMarkerTag());
@@ -58,7 +72,12 @@ public:
void deleteMarker (ValueTree& markerState) { group.removeChild (markerState, getUndoManager()); }
bool createProperties (Array <PropertyComponent*>& props, const String& itemId);
//==============================================================================
virtual UndoManager* getUndoManager() const = 0;
virtual const String getNonexistentMarkerName (const String& name) = 0;
virtual void renameAnchor (const String& oldName, const String& newName) = 0;
virtual void addMarkerMenuItems (const ValueTree& markerState, const Coordinate& coord, PopupMenu& menu, bool isAnchor1) = 0;
virtual const String getChosenMarkerMenuItem (const Coordinate& coord, int itemId) const = 0;
//==============================================================================
static const char* getMarkerTag() { return "MARKER"; }
@@ -66,12 +85,91 @@ public:
static const char* getMarkerNameProperty() { return "name"; }
static const char* getMarkerPosProperty() { return "position"; }
protected:
virtual UndoManager* getUndoManager() const = 0;
virtual const String getNonexistentMarkerName (const String& name) = 0;
//==============================================================================
class MarkerNameValueSource : public Value::ValueSource,
public Value::Listener
{
public:
MarkerNameValueSource (MarkerListBase* markerList_, const Value& value)
: sourceValue (value),
markerList (markerList_)
{
sourceValue.addListener (this);
}
~MarkerNameValueSource() {}
void valueChanged (Value&) { sendChangeMessage (true); }
const var getValue() const { return sourceValue.toString(); }
void setValue (const var& newValue)
{
if (newValue == sourceValue)
return;
const String name (markerList->getNonexistentMarkerName (newValue));
if (sourceValue != name)
{
markerList->renameAnchor (sourceValue.toString(), name);
sourceValue = name;
}
}
private:
Value sourceValue;
MarkerListBase* markerList;
MarkerNameValueSource (const MarkerNameValueSource&);
const MarkerNameValueSource& operator= (const MarkerNameValueSource&);
};
//==============================================================================
class PositionPropertyComponent : public CoordinatePropertyComponent
{
public:
//==============================================================================
PositionPropertyComponent (MarkerResolver& resolver_, MarkerListBase& markerList_,
const String& name, const ValueTree& markerState_,
const Value& coordValue_)
: CoordinatePropertyComponent (resolver_, name, coordValue_, markerList_.isHorizontal()),
markerList (markerList_),
markerState (markerState_)
{
}
~PositionPropertyComponent()
{
}
const String pickMarker (TextButton* button, const String& currentMarker, bool isAnchor1)
{
Coordinate coord (getCoordinate());
PopupMenu m;
markerList.addMarkerMenuItems (markerState, coord, m, isAnchor1);
const int r = m.showAt (button);
if (r > 0)
return markerList.getChosenMarkerMenuItem (coord, r);
return String::empty;
}
private:
MarkerListBase& markerList;
ValueTree markerState;
};
//==============================================================================
protected:
ValueTree group;
const bool isX;
private:
MarkerListBase (const MarkerListBase&);
MarkerListBase& operator= (const MarkerListBase&);
};


+ 3
- 0
extras/Jucer (experimental)/Source/utility/jucer_UtilityFunctions.cpp View File

@@ -307,6 +307,9 @@ const String makeValidCppIdentifier (String s,
const bool removeColons,
const bool allowTemplates)
{
if (s.isEmpty())
return "unknown";
if (removeColons)
s = s.replaceCharacters (".,;:/@", "______");
else


+ 1
- 1
extras/Jucer (experimental)/Source/utility/jucer_UtilityFunctions.h View File

@@ -208,7 +208,7 @@ private:
int findLevelIndexForValue (const double value) const
{
int i;
for (i = 0; i < sizeof (tickSizes) / sizeof (*tickSizes); ++i)
for (i = 0; i < (int) (sizeof (tickSizes) / sizeof (*tickSizes)); ++i)
if (tickSizes [i] >= value)
break;


+ 4
- 4
extras/Jucer (experimental)/Source/utility/jucer_ValueRemapperSource.h View File

@@ -40,10 +40,10 @@ public:
sourceValue.addListener (this);
}
ValueRemapperSource (const Value& sourceValue_, const char** mappings)
ValueRemapperSource (const Value& sourceValue_, const char** mappings_)
: sourceValue (sourceValue_)
{
addMappings (mappings);
addMappings (mappings_);
sourceValue.addListener (this);
}
@@ -58,9 +58,9 @@ public:
}
}
void addMapping (const var& sourceValue, const var& remappedValue)
void addMapping (const var& sourceValue_, const var& remappedValue)
{
mappings.add (sourceValue);
mappings.add (sourceValue_);
mappings.add (remappedValue);
}


+ 241
- 202
juce_amalgamated.cpp
File diff suppressed because it is too large
View File


+ 12
- 25
juce_amalgamated.h View File

@@ -5740,10 +5740,10 @@ public:
#define juce_InterlockedDecrement64(a) _InterlockedDecrement64(a)
#else
// None of these atomics are available in a 32-bit Windows build!!
static __int64 juce_InterlockedExchangeAdd64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a += b; return old; }
static __int64 juce_InterlockedExchange64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a = b; return old; }
static __int64 juce_InterlockedIncrement64 (volatile __int64* a) throw() { jassertfalse; return ++*a; }
static __int64 juce_InterlockedDecrement64 (volatile __int64* a) throw() { jassertfalse; return --*a; }
template <typename Type> static Type juce_InterlockedExchangeAdd64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a += b; return old; }
template <typename Type> static Type juce_InterlockedExchange64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a = b; return old; }
template <typename Type> static Type juce_InterlockedIncrement64 (volatile Type* a) throw() { jassertfalse; return ++*a; }
template <typename Type> static Type juce_InterlockedDecrement64 (volatile Type* a) throw() { jassertfalse; return --*a; }
#endif
#endif

@@ -20390,12 +20390,12 @@ public:
transform.transformPoint (x3, y3);
transform.transformPoint (x4, y4);

const float x = jmin (x1, x2, x3, x4);
const float y = jmin (y1, y2, y3, y4);
const float rx = jmin (x1, x2, x3, x4);
const float ry = jmin (y1, y2, y3, y4);

return Rectangle (x, y,
jmax (x1, x2, x3, x4) - x,
jmax (y1, y2, y3, y4) - y);
return Rectangle (rx, ry,
jmax (x1, x2, x3, x4) - rx,
jmax (y1, y2, y3, y4) - ry);
}

/** Returns the smallest integer-aligned rectangle that completely contains this one.
@@ -26352,13 +26352,8 @@ private:
// hierarchies. You might need to give your subclasses a private dummy constructor like
// this one to avoid compiler warnings.
Component (const Component&);

Component& operator= (const Component&);

// (dummy method to cause a deliberate compile error - if you hit this, you need to update your
// subclass to use the new parameters to keyStateChanged)
virtual void keyStateChanged() {};

protected:
/** @internal */
virtual void internalRepaint (int x, int y, int w, int h);
@@ -44798,14 +44793,6 @@ public:
*/
virtual void valueChanged();

/** Callback to indicate that the user has just moved the slider.
Note - the valueChanged() method has changed its format and now no longer has
any parameters. Update your code to use the new version.
This version has been left here with an int as its return value to cause
a syntax error if you've got existing code that uses the old version.
*/
virtual int valueChanged (double) { jassertfalse; return 0; }

/** Subclasses can override this to convert a text string to a value.

When the user enters something into the text-entry box, this method is
@@ -53360,14 +53347,14 @@ public:
For example, if the item is an object, you might want to call it and tell
it that it's being selected.
*/
virtual void itemSelected (SelectableItemType item) {}
virtual void itemSelected (SelectableItemType item) { (void) item; }

/** Can be overridden to do special handling when an item is deselected.

For example, if the item is an object, you might want to call it and tell
it that it's being deselected.
*/
virtual void itemDeselected (SelectableItemType item) {}
virtual void itemDeselected (SelectableItemType item) { (void) item; }

/** Used internally, but can be called to force a change message to be sent to the ChangeListeners.
*/
@@ -53580,7 +53567,7 @@ public:
}

/** @internal */
bool hitTest (int x, int y) { return false; }
bool hitTest (int, int) { return false; }

juce_UseDebuggingNewOperator



+ 4
- 4
src/core/juce_Atomic.h View File

@@ -191,10 +191,10 @@ public:
#define juce_InterlockedDecrement64(a) _InterlockedDecrement64(a)
#else
// None of these atomics are available in a 32-bit Windows build!!
static __int64 juce_InterlockedExchangeAdd64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a += b; return old; }
static __int64 juce_InterlockedExchange64 (volatile __int64* a, __int64 b) throw() { jassertfalse; __int64 old = *a; *a = b; return old; }
static __int64 juce_InterlockedIncrement64 (volatile __int64* a) throw() { jassertfalse; return ++*a; }
static __int64 juce_InterlockedDecrement64 (volatile __int64* a) throw() { jassertfalse; return --*a; }
template <typename Type> static Type juce_InterlockedExchangeAdd64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a += b; return old; }
template <typename Type> static Type juce_InterlockedExchange64 (volatile Type* a, Type b) throw() { jassertfalse; Type old = *a; *a = b; return old; }
template <typename Type> static Type juce_InterlockedIncrement64 (volatile Type* a) throw() { jassertfalse; return ++*a; }
template <typename Type> static Type juce_InterlockedDecrement64 (volatile Type* a) throw() { jassertfalse; return --*a; }
#endif
#endif


+ 0
- 1
src/gui/components/controls/juce_ListBox.cpp View File

@@ -657,7 +657,6 @@ int ListBox::getRowNumberOfComponent (Component* const rowComponent) const throw
const Rectangle<int> ListBox::getRowPosition (const int rowNumber,
const bool relativeToComponentTopLeft) const throw()
{
const int rowHeight = getRowHeight();
int y = viewport->getY() + rowHeight * rowNumber;
if (relativeToComponentTopLeft)


+ 0
- 8
src/gui/components/controls/juce_Slider.h View File

@@ -579,14 +579,6 @@ public:
*/
virtual void valueChanged();
/** Callback to indicate that the user has just moved the slider.
Note - the valueChanged() method has changed its format and now no longer has
any parameters. Update your code to use the new version.
This version has been left here with an int as its return value to cause
a syntax error if you've got existing code that uses the old version.
*/
virtual int valueChanged (double) { jassertfalse; return 0; }
//==============================================================================
/** Subclasses can override this to convert a text string to a value.


+ 3
- 3
src/gui/components/controls/juce_TextEditor.cpp View File

@@ -1631,10 +1631,10 @@ void TextEditor::copy()
{
if (passwordCharacter == 0)
{
const String selection (getHighlightedText());
const String selectedText (getHighlightedText());
if (selection.isNotEmpty())
SystemClipboard::copyTextToClipboard (selection);
if (selectedText.isNotEmpty())
SystemClipboard::copyTextToClipboard (selectedText);
}
}


+ 3
- 3
src/gui/components/controls/juce_ToolbarItemComponent.cpp View File

@@ -190,11 +190,11 @@ void ToolbarItemComponent::setStyle (const Toolbar::ToolbarItemStyle& newStyle)
}
}
void ToolbarItemComponent::paintButton (Graphics& g, bool isMouseOver, bool isMouseDown)
void ToolbarItemComponent::paintButton (Graphics& g, const bool over, const bool down)
{
if (isBeingUsedAsAButton)
getLookAndFeel().paintToolbarButtonBackground (g, getWidth(), getHeight(),
isMouseOver, isMouseDown, *this);
over, down, *this);
if (toolbarStyle != Toolbar::iconsOnly)
{
@@ -218,7 +218,7 @@ void ToolbarItemComponent::paintButton (Graphics& g, bool isMouseOver, bool isMo
g.setOrigin (contentArea.getX(), contentArea.getY());
g.reduceClipRegion (0, 0, contentArea.getWidth(), contentArea.getHeight());
paintButtonArea (g, contentArea.getWidth(), contentArea.getHeight(), isMouseOver, isMouseDown);
paintButtonArea (g, contentArea.getWidth(), contentArea.getHeight(), over, down);
g.restoreState();
}


+ 27
- 24
src/gui/components/controls/juce_TreeView.cpp View File

@@ -205,37 +205,40 @@ public:
const int visibleBottom = visibleTop + getParentHeight();
BigInteger itemsToKeep;
TreeViewItem* item = owner.rootItem;
int y = (item != 0 && ! owner.rootItemVisible) ? -item->itemHeight : 0;
while (item != 0 && y < visibleBottom)
{
y += item->itemHeight;
TreeViewItem* item = owner.rootItem;
int y = (item != 0 && ! owner.rootItemVisible) ? -item->itemHeight : 0;
if (y >= visibleTop)
while (item != 0 && y < visibleBottom)
{
const int index = rowComponentIds.indexOf (item->uid);
y += item->itemHeight;
if (index < 0)
if (y >= visibleTop)
{
Component* const comp = item->createItemComponent();
const int index = rowComponentIds.indexOf (item->uid);
if (comp != 0)
if (index < 0)
{
addAndMakeVisible (comp);
itemsToKeep.setBit (rowComponentItems.size());
rowComponentItems.add (item);
rowComponentIds.add (item->uid);
rowComponents.add (comp);
Component* const comp = item->createItemComponent();
if (comp != 0)
{
addAndMakeVisible (comp);
itemsToKeep.setBit (rowComponentItems.size());
rowComponentItems.add (item);
rowComponentIds.add (item->uid);
rowComponents.add (comp);
}
}
else
{
itemsToKeep.setBit (index);
}
}
else
{
itemsToKeep.setBit (index);
}
}
item = item->getNextVisibleItem (true);
item = item->getNextVisibleItem (true);
}
}
for (int i = rowComponentItems.size(); --i >= 0;)
@@ -1716,14 +1719,14 @@ const String TreeViewItem::getItemIdentifierString() const
TreeViewItem* TreeViewItem::findItemFromIdentifierString (const String& identifierString)
{
const String uid (getUniqueName());
const String thisId (getUniqueName());
if (uid == identifierString)
if (thisId == identifierString)
return this;
if (identifierString.startsWith (uid + "/"))
if (identifierString.startsWith (thisId + "/"))
{
const String remainingPath (identifierString.substring (uid.length() + 1));
const String remainingPath (identifierString.substring (thisId.length() + 1));
bool wasOpen = isOpen();
setOpen (true);


+ 2
- 0
src/gui/components/filebrowser/juce_FileBrowserComponent.cpp View File

@@ -370,6 +370,8 @@ void FileBrowserComponent::fileDoubleClicked (const File& f)
bool FileBrowserComponent::keyPressed (const KeyPress& key)
{
(void) key;
#if JUCE_LINUX || JUCE_WINDOWS
if (key.getModifiers().isCommandDown()
&& (key.getKeyCode() == 'H' || key.getKeyCode() == 'h'))


+ 16
- 16
src/gui/components/juce_Component.cpp View File

@@ -2186,13 +2186,13 @@ void Component::internalMouseEnter (MouseInputSource& source, const Point<int>&
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked(i)->mouseEnter (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2258,13 +2258,13 @@ void Component::internalMouseExit (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseExit (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2425,13 +2425,13 @@ void Component::internalMouseDown (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDown (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2494,13 +2494,13 @@ void Component::internalMouseUp (MouseInputSource& source, const Point<int>& rel
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseUp (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2545,13 +2545,13 @@ void Component::internalMouseUp (MouseInputSource& source, const Point<int>& rel
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDoubleClick (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2611,13 +2611,13 @@ void Component::internalMouseDrag (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseDrag (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2677,13 +2677,13 @@ void Component::internalMouseMove (MouseInputSource& source, const Point<int>& r
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseMove (me);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);
@@ -2743,13 +2743,13 @@ void Component::internalMouseWheel (MouseInputSource& source, const Point<int>&
{
if (p->numDeepMouseListeners > 0)
{
BailOutChecker checker (this, p);
BailOutChecker checker2 (this, p);
for (int i = p->numDeepMouseListeners; --i >= 0;)
{
p->mouseListeners_->getUnchecked (i)->mouseWheelMove (me, wheelIncrementX, wheelIncrementY);
if (checker.shouldBailOut())
if (checker2.shouldBailOut())
return;
i = jmin (i, p->numDeepMouseListeners);


+ 0
- 5
src/gui/components/juce_Component.h View File

@@ -2084,13 +2084,8 @@ private:
// hierarchies. You might need to give your subclasses a private dummy constructor like
// this one to avoid compiler warnings.
Component (const Component&);
Component& operator= (const Component&);
// (dummy method to cause a deliberate compile error - if you hit this, you need to update your
// subclass to use the new parameters to keyStateChanged)
virtual void keyStateChanged() {};
protected:
/** @internal */
virtual void internalRepaint (int x, int y, int w, int h);


+ 4
- 5
src/gui/components/keyboard/juce_KeyMappingEditorComponent.cpp View File

@@ -356,10 +356,9 @@ void KeyMappingEditorComponent::resized()
const int buttonHeight = 20;
h -= buttonHeight + 8;
int x = getWidth() - 8;
const int y = h + 6;
resetButton->changeWidthToFitText (buttonHeight);
resetButton->setTopRightPosition (x, y);
resetButton->setTopRightPosition (x, h + 6);
}
tree->setBounds (0, 0, getWidth(), h);
@@ -381,7 +380,7 @@ void KeyMappingEditorComponent::buttonClicked (Button* button)
void KeyMappingEditorComponent::changeListenerCallback (void*)
{
ScopedPointer <XmlElement> openness (tree->getOpennessState (true));
ScopedPointer <XmlElement> oldOpenness (tree->getOpennessState (true));
clearSubItems();
@@ -400,8 +399,8 @@ void KeyMappingEditorComponent::changeListenerCallback (void*)
addSubItem (new KeyCategoryTreeViewItem (this, categories[i]));
}
if (openness != 0)
tree->restoreOpennessState (*openness);
if (oldOpenness != 0)
tree->restoreOpennessState (*oldOpenness);
}
//==============================================================================


+ 2
- 2
src/gui/components/layout/juce_ScrollBar.cpp View File

@@ -50,14 +50,14 @@ public:
{
}
void paintButton (Graphics& g, bool isMouseOver, bool isMouseDown)
void paintButton (Graphics& g, bool over, bool down)
{
getLookAndFeel()
.drawScrollbarButton (g, owner,
getWidth(), getHeight(),
direction,
owner.isVertical(),
isMouseOver, isMouseDown);
over, down);
}
void clicked()


+ 2
- 2
src/gui/components/layout/juce_TabbedComponent.cpp View File

@@ -36,8 +36,8 @@ class TabCompButtonBar : public TabbedButtonBar
{
public:
TabCompButtonBar (TabbedComponent* const owner_,
const TabbedButtonBar::Orientation orientation)
: TabbedButtonBar (orientation),
const TabbedButtonBar::Orientation orientation_)
: TabbedButtonBar (orientation_),
owner (owner_)
{
}


+ 1
- 1
src/gui/components/mouse/juce_LassoComponent.h View File

@@ -228,7 +228,7 @@ public:
}
/** @internal */
bool hitTest (int x, int y) { return false; }
bool hitTest (int, int) { return false; }
//==============================================================================
juce_UseDebuggingNewOperator


+ 11
- 11
src/gui/components/special/juce_ColourSelector.cpp View File

@@ -124,12 +124,12 @@ public:
for (int y = 0; y < height; ++y)
{
const float v = 1.0f - y / (float) height;
const float val = 1.0f - y / (float) height;
for (int x = 0; x < width; ++x)
{
const float s = x / (float) width;
const Colour col (h, s, v, 1.0f);
const float sat = x / (float) width;
const Colour col (h, sat, val, 1.0f);
PixelRGB* const pix = (PixelRGB*) pixels.getPixelPointer (x, y);
pix->set (col.getPixelARGB());
@@ -149,10 +149,10 @@ public:
void mouseDrag (const MouseEvent& e)
{
const float s = (e.x - edge) / (float) (getWidth() - edge * 2);
const float v = 1.0f - (e.y - edge) / (float) (getHeight() - edge * 2);
const float sat = (e.x - edge) / (float) (getWidth() - edge * 2);
const float val = 1.0f - (e.y - edge) / (float) (getHeight() - edge * 2);
owner->setSV (s, v);
owner->setSV (sat, val);
}
void updateIfNeeded()
@@ -486,16 +486,16 @@ void ColourSelector::paint (Graphics& g)
if ((flags & showColourAtTop) != 0)
{
const Colour colour (getCurrentColour());
const Colour currentColour (getCurrentColour());
g.fillCheckerBoard (edgeGap, edgeGap, getWidth() - edgeGap - edgeGap, topSpace - edgeGap - edgeGap,
10, 10,
Colour (0xffdddddd).overlaidWith (colour),
Colour (0xffffffff).overlaidWith (colour));
Colour (0xffdddddd).overlaidWith (currentColour),
Colour (0xffffffff).overlaidWith (currentColour));
g.setColour (Colours::white.overlaidWith (colour).contrasting());
g.setColour (Colours::white.overlaidWith (currentColour).contrasting());
g.setFont (14.0f, true);
g.drawText (colour.toDisplayString ((flags & showAlphaChannel) != 0),
g.drawText (currentColour.toDisplayString ((flags & showAlphaChannel) != 0),
0, edgeGap, getWidth(), topSpace - edgeGap * 2,
Justification::centred, false);
}


+ 5
- 5
src/gui/components/special/juce_MidiKeyboardComponent.cpp View File

@@ -204,7 +204,7 @@ void MidiKeyboardComponent::setVelocity (const float velocity_, const bool useMo
}
//==============================================================================
void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyWidth, int& x, int& w) const
void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyWidth_, int& x, int& w) const
{
jassert (midiNoteNumber >= 0 && midiNoteNumber < 128);
@@ -227,8 +227,8 @@ void MidiKeyboardComponent::getKeyPosition (int midiNoteNumber, const float keyW
const int octave = midiNoteNumber / 12;
const int note = midiNoteNumber % 12;
x = roundToInt (octave * 7.0f * keyWidth + notePos [note] * keyWidth);
w = roundToInt (widths [note] * keyWidth);
x = roundToInt (octave * 7.0f * keyWidth_ + notePos [note] * keyWidth_);
w = roundToInt (widths [note] * keyWidth_);
}
void MidiKeyboardComponent::getKeyPos (int midiNoteNumber, int& x, int& w) const
@@ -551,7 +551,7 @@ const String MidiKeyboardComponent::getWhiteNoteText (const int midiNoteNumber)
}
void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h,
const bool isMouseOver,
const bool isMouseOver_,
const bool isButtonDown,
const bool movesOctavesUp)
{
@@ -574,7 +574,7 @@ void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h,
path.applyTransform (AffineTransform::rotation (float_Pi * 2.0f * angle, 0.5f, 0.5f));
g.setColour (findColour (upDownButtonArrowColourId)
.withAlpha (isButtonDown ? 1.0f : (isMouseOver ? 0.6f : 0.4f)));
.withAlpha (isButtonDown ? 1.0f : (isMouseOver_ ? 0.6f : 0.4f)));
g.fillPath (path, path.getTransformToScaleToFit (1.0f, 1.0f,
w - 2.0f,


+ 6
- 6
src/gui/components/windows/juce_AlertWindow.cpp View File

@@ -297,9 +297,9 @@ private:
AlertTextComp& operator= (const AlertTextComp&);
};
void AlertWindow::addTextBlock (const String& text)
void AlertWindow::addTextBlock (const String& textBlock)
{
AlertTextComp* const c = new AlertTextComp (text, font);
AlertTextComp* const c = new AlertTextComp (textBlock, font);
textBlocks.add (c);
allComps.add (c);
@@ -519,7 +519,7 @@ void AlertWindow::updateLayout (const bool onlyIncreaseSize)
for (i = 0; i < allComps.size(); ++i)
{
Component* const c = (Component*) allComps[i];
int h = 22;
h = 22;
const int comboIndex = comboBoxes.indexOf (c);
if (comboIndex >= 0 && comboBoxNames [comboIndex].isNotEmpty())
@@ -601,10 +601,10 @@ bool AlertWindow::keyPressed (const KeyPress& key)
void AlertWindow::lookAndFeelChanged()
{
const int flags = getLookAndFeel().getAlertBoxWindowFlags();
const int newFlags = getLookAndFeel().getAlertBoxWindowFlags();
setUsingNativeTitleBar ((flags & ComponentPeer::windowHasTitleBar) != 0);
setDropShadowEnabled (isOpaque() && (flags & ComponentPeer::windowHasDropShadow) != 0);
setUsingNativeTitleBar ((newFlags & ComponentPeer::windowHasTitleBar) != 0);
setDropShadowEnabled (isOpaque() && (newFlags & ComponentPeer::windowHasDropShadow) != 0);
}
int AlertWindow::getDesktopWindowStyleFlags() const


+ 5
- 5
src/gui/components/windows/juce_DocumentWindow.cpp View File

@@ -304,18 +304,18 @@ Button* DocumentWindow::getMaximiseButton() const throw()
int DocumentWindow::getDesktopWindowStyleFlags() const
{
int flags = ResizableWindow::getDesktopWindowStyleFlags();
int styleFlags = ResizableWindow::getDesktopWindowStyleFlags();
if ((requiredButtons & minimiseButton) != 0)
flags |= ComponentPeer::windowHasMinimiseButton;
styleFlags |= ComponentPeer::windowHasMinimiseButton;
if ((requiredButtons & maximiseButton) != 0)
flags |= ComponentPeer::windowHasMaximiseButton;
styleFlags |= ComponentPeer::windowHasMaximiseButton;
if ((requiredButtons & closeButton) != 0)
flags |= ComponentPeer::windowHasCloseButton;
styleFlags |= ComponentPeer::windowHasCloseButton;
return flags;
return styleFlags;
}
void DocumentWindow::lookAndFeelChanged()


+ 4
- 4
src/gui/components/windows/juce_ResizableWindow.cpp View File

@@ -88,12 +88,12 @@ ResizableWindow::~ResizableWindow()
int ResizableWindow::getDesktopWindowStyleFlags() const
{
int flags = TopLevelWindow::getDesktopWindowStyleFlags();
int styleFlags = TopLevelWindow::getDesktopWindowStyleFlags();
if (isResizable() && (flags & ComponentPeer::windowHasTitleBar) != 0)
flags |= ComponentPeer::windowIsResizable;
if (isResizable() && (styleFlags & ComponentPeer::windowHasTitleBar) != 0)
styleFlags |= ComponentPeer::windowIsResizable;
return flags;
return styleFlags;
}
//==============================================================================


+ 4
- 4
src/gui/components/windows/juce_TopLevelWindow.cpp View File

@@ -202,15 +202,15 @@ void TopLevelWindow::visibilityChanged()
int TopLevelWindow::getDesktopWindowStyleFlags() const
{
int flags = ComponentPeer::windowAppearsOnTaskbar;
int styleFlags = ComponentPeer::windowAppearsOnTaskbar;
if (useDropShadow)
flags |= ComponentPeer::windowHasDropShadow;
styleFlags |= ComponentPeer::windowHasDropShadow;
if (useNativeTitleBar)
flags |= ComponentPeer::windowHasTitleBar;
styleFlags |= ComponentPeer::windowHasTitleBar;
return flags;
return styleFlags;
}
void TopLevelWindow::setDropShadowEnabled (const bool useShadow)


+ 14
- 14
src/gui/graphics/drawables/juce_SVGParser.cpp View File

@@ -734,8 +734,8 @@ private:
gradient.isRadial = fillXml->hasTagName ("radialGradient");
float width = viewBoxW;
float height = viewBoxH;
float gradientWidth = viewBoxW;
float gradientHeight = viewBoxH;
float dx = 0.0f;
float dy = 0.0f;
@@ -746,16 +746,16 @@ private:
const Rectangle<float> bounds (path.getBounds());
dx = bounds.getX();
dy = bounds.getY();
width = bounds.getWidth();
height = bounds.getHeight();
gradientWidth = bounds.getWidth();
gradientHeight = bounds.getHeight();
}
if (gradient.isRadial)
{
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("cx", "50%"), width);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("cy", "50%"), height);
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("cx", "50%"), gradientWidth);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("cy", "50%"), gradientHeight);
const float radius = getCoordLength (fillXml->getStringAttribute ("r", "50%"), width);
const float radius = getCoordLength (fillXml->getStringAttribute ("r", "50%"), gradientWidth);
gradient.x2 = gradient.x1 + radius;
gradient.y2 = gradient.y1;
@@ -764,11 +764,11 @@ private:
}
else
{
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("x1", "0%"), width);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("y1", "0%"), height);
gradient.x1 = dx + getCoordLength (fillXml->getStringAttribute ("x1", "0%"), gradientWidth);
gradient.y1 = dy + getCoordLength (fillXml->getStringAttribute ("y1", "0%"), gradientHeight);
gradient.x2 = dx + getCoordLength (fillXml->getStringAttribute ("x2", "100%"), width);
gradient.y2 = dy + getCoordLength (fillXml->getStringAttribute ("y2", "0%"), height);
gradient.x2 = dx + getCoordLength (fillXml->getStringAttribute ("x2", "100%"), gradientWidth);
gradient.y2 = dy + getCoordLength (fillXml->getStringAttribute ("y2", "0%"), gradientHeight);
if (gradient.x1 == gradient.x2 && gradient.y1 == gradient.y2)
return Colour (gradient.getColour (gradient.getNumColours() - 1));
@@ -791,7 +791,7 @@ private:
const PathStrokeType getStrokeFor (const XmlElement* const xml) const
{
const String width (getStyleAttribute (xml, "stroke-width"));
const String strokeWidth (getStyleAttribute (xml, "stroke-width"));
const String cap (getStyleAttribute (xml, "stroke-linecap"));
const String join (getStyleAttribute (xml, "stroke-linejoin"));
@@ -814,10 +814,10 @@ private:
float ox = 0.0f, oy = 0.0f;
transform.transformPoint (ox, oy);
float x = getCoordLength (width, viewBoxW), y = 0.0f;
float x = getCoordLength (strokeWidth, viewBoxW), y = 0.0f;
transform.transformPoint (x, y);
return PathStrokeType (width.isNotEmpty() ? juce_hypotf (x - ox, y - oy) : 1.0f,
return PathStrokeType (strokeWidth.isNotEmpty() ? juce_hypotf (x - ox, y - oy) : 1.0f,
joinStyle, capStyle);
}


+ 4
- 4
src/gui/graphics/fonts/juce_Font.cpp View File

@@ -44,6 +44,8 @@ namespace FontValues
}
static const float defaultFontHeight = 14.0f;
static String fallbackFont;
}
//==============================================================================
@@ -166,16 +168,14 @@ void Font::setTypefaceName (const String& faceName) throw()
}
//==============================================================================
static String fallbackFont;
const String Font::getFallbackFontName() throw()
{
return fallbackFont;
return FontValues::fallbackFont;
}
void Font::setFallbackFontName (const String& name) throw()
{
fallbackFont = name;
FontValues::fallbackFont = name;
}
//==============================================================================


+ 2
- 2
src/gui/graphics/geometry/juce_Path.cpp View File

@@ -1329,9 +1329,9 @@ void Path::loadPathFromStream (InputStream& source)
}
}
void Path::loadPathFromData (const void* const data, const int numberOfBytes)
void Path::loadPathFromData (const void* const pathData, const int numberOfBytes)
{
MemoryInputStream in (data, numberOfBytes, false);
MemoryInputStream in (pathData, numberOfBytes, false);
loadPathFromStream (in);
}


+ 5
- 5
src/gui/graphics/geometry/juce_Rectangle.h View File

@@ -482,12 +482,12 @@ public:
transform.transformPoint (x3, y3);
transform.transformPoint (x4, y4);
const float x = jmin (x1, x2, x3, x4);
const float y = jmin (y1, y2, y3, y4);
const float rx = jmin (x1, x2, x3, x4);
const float ry = jmin (y1, y2, y3, y4);
return Rectangle (x, y,
jmax (x1, x2, x3, x4) - x,
jmax (y1, y2, y3, y4) - y);
return Rectangle (rx, ry,
jmax (x1, x2, x3, x4) - rx,
jmax (y1, y2, y3, y4) - ry);
}
/** Returns the smallest integer-aligned rectangle that completely contains this one.


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jccoefct.c View File

@@ -338,7 +338,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
*/
METHODDEF(boolean)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
compress_output (j_compress_ptr cinfo, JSAMPIMAGE)
{
my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
JDIMENSION MCU_col_num; /* index of current MCU within row */


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jccolor.c View File

@@ -338,7 +338,7 @@ null_convert (j_compress_ptr cinfo,
*/
METHODDEF(void)
null_method (j_compress_ptr cinfo)
null_method (j_compress_ptr)
{
/* no work needed */
}


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jcmarker.c View File

@@ -152,7 +152,7 @@ emit_dht (j_compress_ptr cinfo, int index, boolean is_ac)
LOCAL(void)
emit_dac (j_compress_ptr cinfo)
emit_dac (j_compress_ptr)
/* Emit a DAC marker */
/* Since the useful info is so small, we want to emit all the tables in */
/* one DAC marker. Therefore this routine does its own scan of the table. */


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jcsample.c View File

@@ -72,7 +72,7 @@ typedef my_downsampler * my_downsample_ptr;
*/
METHODDEF(void)
start_pass_downsample (j_compress_ptr cinfo)
start_pass_downsample (j_compress_ptr)
{
/* no work for now */
}


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jctrans.c View File

@@ -275,7 +275,7 @@ start_pass_coef2 (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
*/
METHODDEF(boolean)
compress_output2 (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
compress_output2 (j_compress_ptr cinfo, JSAMPIMAGE)
{
my_coef_ptr2 coef = (my_coef_ptr2) cinfo->coef;
JDIMENSION MCU_col_num; /* index of current MCU within row */


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jdatasrc.c View File

@@ -166,7 +166,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
*/
METHODDEF(void)
term_source (j_decompress_ptr cinfo)
term_source (j_decompress_ptr)
{
/* no work necessary here */
}


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jdcoefct.c View File

@@ -225,7 +225,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
*/
METHODDEF(int)
dummy_consume_data (j_decompress_ptr cinfo)
dummy_consume_data (j_decompress_ptr)
{
return JPEG_SUSPENDED; /* Always indicate nothing was done */
}


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/jpglib/jdcolor.c View File

@@ -290,7 +290,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
*/
METHODDEF(void)
start_pass_dcolor (j_decompress_ptr cinfo)
start_pass_dcolor (j_decompress_ptr)
{
/* no work needed */
}


+ 3
- 3
src/gui/graphics/imaging/image_file_formats/jpglib/jdmerge.c View File

@@ -143,7 +143,7 @@ start_pass_merged_upsample (j_decompress_ptr cinfo)
METHODDEF(void)
merged_2v_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
/* 2:1 vertical sampling case: may need a spare row. */
@@ -192,9 +192,9 @@ merged_2v_upsample (j_decompress_ptr cinfo,
METHODDEF(void)
merged_1v_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
JDIMENSION)
/* 1:1 vertical sampling case: much easier, never need a spare row. */
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;


+ 4
- 4
src/gui/graphics/imaging/image_file_formats/jpglib/jdpostct.c View File

@@ -158,8 +158,8 @@ METHODDEF(void)
post_process_prepass (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
JSAMPARRAY, JDIMENSION *out_row_ctr,
JDIMENSION)
{
my_post_ptr post = (my_post_ptr) cinfo->post;
JDIMENSION old_next_row, num_rows;
@@ -200,8 +200,8 @@ post_process_prepass (j_decompress_ptr cinfo,
METHODDEF(void)
post_process_2pass (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JSAMPIMAGE, JDIMENSION *,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{


+ 6
- 6
src/gui/graphics/imaging/image_file_formats/jpglib/jdsample.c View File

@@ -88,7 +88,7 @@ start_pass_upsample (j_decompress_ptr cinfo)
METHODDEF(void)
sep_upsample (j_decompress_ptr cinfo,
JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr,
JDIMENSION in_row_groups_avail,
JDIMENSION,
JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
JDIMENSION out_rows_avail)
{
@@ -154,7 +154,7 @@ sep_upsample (j_decompress_ptr cinfo,
*/
METHODDEF(void)
fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
fullsize_upsample (j_decompress_ptr, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = input_data;
@@ -167,8 +167,8 @@ fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
noop_upsample (j_decompress_ptr, jpeg_component_info *,
JSAMPARRAY, JSAMPARRAY * output_data_ptr)
{
*output_data_ptr = NULL; /* safety check */
}
@@ -230,7 +230,7 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;
@@ -258,7 +258,7 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
*/
METHODDEF(void)
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info *,
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
{
JSAMPARRAY output_data = *output_data_ptr;


+ 10
- 10
src/gui/graphics/imaging/image_file_formats/jpglib/jmemnobs.c View File

@@ -32,13 +32,13 @@ extern void free JPP((void *ptr));
*/
GLOBAL(void *)
jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
jpeg_get_small (j_common_ptr , size_t sizeofobject)
{
return (void *) malloc(sizeofobject);
}
GLOBAL(void)
jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
jpeg_free_small (j_common_ptr , void * object, size_t)
{
free(object);
}
@@ -52,13 +52,13 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
*/
GLOBAL(void FAR *)
jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
jpeg_get_large (j_common_ptr, size_t sizeofobject)
{
return (void FAR *) malloc(sizeofobject);
}
GLOBAL(void)
jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
jpeg_free_large (j_common_ptr, void FAR * object, size_t)
{
free(object);
}
@@ -70,8 +70,8 @@ jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
*/
GLOBAL(long)
jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
long max_bytes_needed, long already_allocated)
jpeg_mem_available (j_common_ptr, long,
long max_bytes_needed, long)
{
return max_bytes_needed;
}
@@ -84,8 +84,8 @@ jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
*/
GLOBAL(void)
jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *info,
long total_bytes_needed)
jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *,
long )
{
ERREXIT(cinfo, JERR_NO_BACKING_STORE);
}
@@ -97,13 +97,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, struct backing_store_struct *info,
*/
GLOBAL(long)
jpeg_mem_init (j_common_ptr cinfo)
jpeg_mem_init (j_common_ptr)
{
return 0; /* just set max_memory_to_use to 0 */
}
GLOBAL(void)
jpeg_mem_term (j_common_ptr cinfo)
jpeg_mem_term (j_common_ptr)
{
/* no work */
}

+ 4
- 4
src/gui/graphics/imaging/image_file_formats/jpglib/jquant1.c View File

@@ -242,7 +242,7 @@ select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
LOCAL(int)
output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
output_value (j_decompress_ptr, int, int j, int maxj)
/* Return j'th output value, where j will range from 0 to maxj */
/* The output values must fall in 0..MAXJSAMPLE in increasing order */
{
@@ -256,7 +256,7 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
LOCAL(int)
largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
largest_input_value (j_decompress_ptr, int, int j, int maxj)
/* Return largest input value that should map to j'th output value */
/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
{
@@ -738,7 +738,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
*/
METHODDEF(void)
start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
start_pass_1_quant (j_decompress_ptr cinfo, boolean)
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
size_t arraysize;
@@ -795,7 +795,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
*/
METHODDEF(void)
finish_pass_1_quant (j_decompress_ptr cinfo)
finish_pass_1_quant (j_decompress_ptr)
{
/* no work in 1-pass case */
}


+ 2
- 2
src/gui/graphics/imaging/image_file_formats/jpglib/jquant2.c View File

@@ -222,7 +222,7 @@ typedef my_cquantizer2 * my_cquantize_ptr2;
METHODDEF(void)
prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
JSAMPARRAY output_buf, int num_rows)
JSAMPARRAY, int num_rows)
{
my_cquantize_ptr2 cquantize = (my_cquantize_ptr2) cinfo->cquantize;
register JSAMPROW ptr;
@@ -1153,7 +1153,7 @@ finish_pass1 (j_decompress_ptr cinfo)
METHODDEF(void)
finish_pass2 (j_decompress_ptr cinfo)
finish_pass2 (j_decompress_ptr)
{
/* no work */
}


+ 2
- 2
src/gui/graphics/imaging/image_file_formats/jpglib/transupp.c View File

@@ -729,7 +729,7 @@ trim_bottom_edge (j_compress_ptr dstinfo)
*/
GLOBAL(jvirt_barray_ptr *)
jtransform_adjust_parameters (j_decompress_ptr srcinfo,
jtransform_adjust_parameters (j_decompress_ptr,
j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jpeg_transform_info *info)
@@ -884,7 +884,7 @@ jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option)
GLOBAL(void)
jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
JCOPY_OPTION option)
JCOPY_OPTION)
{
jpeg_saved_marker_ptr marker;


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/pnglib/pngerror.c View File

@@ -208,7 +208,7 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
* error function pointer in png_set_error_fn().
*/
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp error_message)
png_default_error(png_structp, png_const_charp error_message)
{
#ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_ERROR_NUMBERS_SUPPORTED


+ 1
- 1
src/gui/graphics/imaging/image_file_formats/pnglib/pngrutil.c View File

@@ -2723,7 +2723,7 @@ png_do_read_interlace(png_structp png_ptr)
#endif /* PNG_READ_INTERLACING_SUPPORTED */
void /* PRIVATE */
png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
png_read_filter_row(png_structp, png_row_infop row_info, png_bytep row,
png_bytep prev_row, int filter)
{
png_debug(1, "in png_read_filter_row\n");


+ 3
- 3
src/gui/graphics/imaging/image_file_formats/pnglib/pngset.c View File

@@ -1204,7 +1204,7 @@ png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
/* function was added to libpng 1.2.0 and should always exist by default */
void PNGAPI
png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
png_set_asm_flags (png_structp png_ptr, png_uint_32)
{
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr != NULL)
@@ -1214,8 +1214,8 @@ png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags)
/* this function was added to libpng 1.2.0 */
void PNGAPI
png_set_mmx_thresholds (png_structp png_ptr,
png_byte mmx_bitdepth_threshold,
png_uint_32 mmx_rowbytes_threshold)
png_byte,
png_uint_32)
{
/* Obsolete as of libpng-1.2.20 and will be removed from libpng-1.4.0 */
if (png_ptr == NULL)


+ 1
- 1
src/native/common/juce_posix_SharedCode.h View File

@@ -292,7 +292,7 @@ void File::getFileTimesInternal (int64& modificationTime, int64& accessTime, int
}
}
bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 creationTime) const
bool File::setFileTimesInternal (int64 modificationTime, int64 accessTime, int64 /*creationTime*/) const
{
struct utimbuf times;
times.actime = (time_t) (accessTime / 1000);


+ 2
- 2
src/native/mac/juce_mac_CarbonViewWrapperComponent.h View File

@@ -54,7 +54,7 @@ public:
virtual HIViewRef attachView (WindowRef windowRef, HIViewRef rootView) = 0;
virtual void removeView (HIViewRef embeddedView) = 0;
virtual void mouseDown (int x, int y) {}
virtual void mouseDown (int, int) {}
virtual void paint() {}
virtual bool getEmbeddedViewSize (int& w, int& h)
@@ -224,7 +224,7 @@ public:
recursiveHIViewRepaint (HIViewGetRoot (wrapperWindow));
}
OSStatus carbonEventHandler (EventHandlerCallRef nextHandlerRef,
OSStatus carbonEventHandler (EventHandlerCallRef /*nextHandlerRef*/,
EventRef event)
{
switch (GetEventKind (event))


+ 8
- 8
src/native/mac/juce_mac_CoreAudio.cpp View File

@@ -338,7 +338,7 @@ public:
{
StringArray s;
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
for (int i = 0; i < num; ++i)
{
@@ -383,7 +383,7 @@ public:
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, 0, &size, &currentSourceID)))
{
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
for (int i = 0; i < num; ++i)
{
@@ -404,7 +404,7 @@ public:
if (deviceID != 0)
{
HeapBlock <OSType> types;
const int num = getAllDataSourcesForDevice (deviceID, input, types);
const int num = getAllDataSourcesForDevice (deviceID, types);
if (((unsigned int) index) < (unsigned int) num)
{
@@ -798,12 +798,12 @@ private:
CoreAudioInternal& operator= (const CoreAudioInternal&);
//==============================================================================
static OSStatus audioIOProc (AudioDeviceID inDevice,
const AudioTimeStamp* inNow,
static OSStatus audioIOProc (AudioDeviceID /*inDevice*/,
const AudioTimeStamp* /*inNow*/,
const AudioBufferList* inInputData,
const AudioTimeStamp* inInputTime,
const AudioTimeStamp* /*inInputTime*/,
AudioBufferList* outOutputData,
const AudioTimeStamp* inOutputTime,
const AudioTimeStamp* /*inOutputTime*/,
void* device)
{
static_cast <CoreAudioInternal*> (device)->audioCallback (inInputData, outOutputData);
@@ -837,7 +837,7 @@ private:
}
//==============================================================================
static int getAllDataSourcesForDevice (AudioDeviceID deviceID, const bool input, HeapBlock <OSType>& types)
static int getAllDataSourcesForDevice (AudioDeviceID deviceID, HeapBlock <OSType>& types)
{
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioDevicePropertyDataSources;


+ 1
- 1
src/native/mac/juce_mac_CoreGraphicsContext.mm View File

@@ -225,7 +225,7 @@ public:
AffineTransform t (AffineTransform::scale (1.0f, -1.0f).translated (0, sourceImage.getHeight()).followedBy (transform));
applyTransform (t);
CGRect r = CGRectMake (0, 0, sourceImage.getWidth(), sourceImage.getHeight());
CGRect r = CGRectMake (srcClip.getX(), srcClip.getY(), srcClip.getWidth(), srcClip.getHeight());
CGContextClipToMask (context, r, image);
applyTransform (t.inverted());


+ 5
- 5
src/native/mac/juce_mac_CoreMidi.cpp View File

@@ -315,12 +315,12 @@ void MidiOutput::reset()
{
}
bool MidiOutput::getVolume (float& leftVol, float& rightVol)
bool MidiOutput::getVolume (float& /*leftVol*/, float& /*rightVol*/)
{
return false;
}
void MidiOutput::setVolume (float leftVol, float rightVol)
void MidiOutput::setVolume (float /*leftVol*/, float /*rightVol*/)
{
}
@@ -476,7 +476,7 @@ namespace CoreMidiCallbacks
static void midiInputProc (const MIDIPacketList* pktlist,
void* readProcRefCon,
void* srcConnRefCon)
void* /*srcConnRefCon*/)
{
double time = Time::getMillisecondCounterHiRes() * 0.001;
const double originalTime = time;
@@ -658,12 +658,12 @@ void MidiOutput::reset()
{
}
bool MidiOutput::getVolume (float& leftVol, float& rightVol)
bool MidiOutput::getVolume (float& /*leftVol*/, float& /*rightVol*/)
{
return false;
}
void MidiOutput::setVolume (float leftVol, float rightVol)
void MidiOutput::setVolume (float /*leftVol*/, float /*rightVol*/)
{
}


+ 1
- 0
src/native/mac/juce_mac_FileChooser.mm View File

@@ -66,6 +66,7 @@ using namespace JUCE_NAMESPACE;
- (BOOL) panel: (id) sender shouldShowFilename: (NSString*) filename
{
(void) sender;
const File f (nsStringToJuce (filename));
for (int i = filters->size(); --i >= 0;)


+ 2
- 0
src/native/mac/juce_mac_MainMenu.mm View File

@@ -412,6 +412,8 @@ END_JUCE_NAMESPACE
- (void) menuNeedsUpdate: (NSMenu*) menu;
{
(void) menu;
if (JuceMainMenuHandler::instance != 0)
JuceMainMenuHandler::instance->updateMenus();
}


+ 9
- 3
src/native/mac/juce_mac_MessageManager.mm View File

@@ -236,31 +236,37 @@ using namespace JUCE_NAMESPACE;
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication*) app
{
(void) app;
return redirector->shouldTerminate();
}
- (BOOL) application: (NSApplication*) app openFile: (NSString*) filename
{
(void) app;
return redirector->openFile (filename);
}
- (void) application: (NSApplication*) sender openFiles: (NSArray*) filenames
{
(void) sender;
return redirector->openFiles (filenames);
}
- (void) applicationDidBecomeActive: (NSNotification*) aNotification
- (void) applicationDidBecomeActive: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}
- (void) applicationDidResignActive: (NSNotification*) aNotification
- (void) applicationDidResignActive: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}
- (void) applicationWillUnhide: (NSNotification*) aNotification
- (void) applicationWillUnhide: (NSNotification*) notification
{
(void) notification;
redirector->focusChanged();
}


+ 2
- 2
src/native/mac/juce_mac_MiscUtilities.mm View File

@@ -85,7 +85,7 @@ bool AlertWindow::showNativeDialogBox (const String& title,
}
//==============================================================================
bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool canMoveFiles)
bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& files, const bool /*canMoveFiles*/)
{
if (files.size() == 0)
return false;
@@ -140,7 +140,7 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi
return true;
}
bool DragAndDropContainer::performExternalDragDropOfText (const String& text)
bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/)
{
jassertfalse // not implemented!
return false;


+ 1
- 1
src/native/mac/juce_mac_MouseCursor.mm View File

@@ -106,7 +106,7 @@ void* MouseCursor::createStandardMouseCursor (MouseCursor::StandardCursorType ty
return c;
}
void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool isStandard)
void MouseCursor::deleteMouseCursor (void* const cursorHandle, const bool /*isStandard*/)
{
[((NSCursor*) cursorHandle) release];
}


+ 1
- 1
src/native/mac/juce_mac_NSViewComponent.mm View File

@@ -145,7 +145,7 @@ void* NSViewComponent::getView() const
return info == 0 ? 0 : info->view;
}
void NSViewComponent::paint (Graphics& g)
void NSViewComponent::paint (Graphics&)
{
}


+ 14
- 0
src/native/mac/juce_mac_NSViewComponentPeer.mm View File

@@ -421,11 +421,13 @@ END_JUCE_NAMESPACE
- (BOOL) acceptsFirstMouse: (NSEvent*) ev
{
(void) ev;
return YES;
}
- (void) frameChanged: (NSNotification*) n
{
(void) n;
if (owner != 0)
owner->redirectMovedOrResized();
}
@@ -483,10 +485,13 @@ END_JUCE_NAMESPACE
- (void) doCommandBySelector: (SEL) aSelector
{
(void) aSelector;
}
- (void) setMarkedText: (id) aString selectedRange: (NSRange) selectionRange
{
(void) selectionRange;
if (stringBeingComposed == 0)
stringBeingComposed = new String();
@@ -567,6 +572,7 @@ END_JUCE_NAMESPACE
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
{
(void) theRange;
JUCE_NAMESPACE::Component* const comp = dynamic_cast <JUCE_NAMESPACE::Component*> (owner->findCurrentTextInputTarget());
if (comp == 0)
@@ -582,6 +588,7 @@ END_JUCE_NAMESPACE
- (unsigned int) characterIndexForPoint: (NSPoint) thePoint
{
(void) thePoint;
return NSNotFound;
}
@@ -667,6 +674,7 @@ END_JUCE_NAMESPACE
- (BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender
{
(void) sender;
return YES;
}
@@ -677,6 +685,7 @@ END_JUCE_NAMESPACE
- (void) concludeDragOperation: (id <NSDraggingInfo>) sender
{
(void) sender;
}
@end
@@ -705,11 +714,13 @@ END_JUCE_NAMESPACE
- (BOOL) windowShouldClose: (id) window
{
(void) window;
return owner == 0 || owner->windowShouldClose();
}
- (NSRect) constrainFrameRect: (NSRect) frameRect toScreen: (NSScreen*) screen
{
(void) screen;
if (owner != 0)
frameRect = owner->constrainRect (frameRect);
@@ -718,6 +729,7 @@ END_JUCE_NAMESPACE
- (NSSize) windowWillResize: (NSWindow*) window toSize: (NSSize) proposedFrameSize
{
(void) window;
if (isZooming)
return proposedFrameSize;
@@ -740,6 +752,8 @@ END_JUCE_NAMESPACE
- (void) windowWillMove: (NSNotification*) notification
{
(void) notification;
if (JUCE_NAMESPACE::Component::getCurrentlyModalComponent() != 0
&& owner->getComponent()->isCurrentlyBlockedByAnotherModalComponent()
&& (owner->getStyleFlags() & JUCE_NAMESPACE::ComponentPeer::windowHasTitleBar) != 0)


+ 9
- 5
src/native/mac/juce_mac_Network.mm View File

@@ -236,8 +236,9 @@ public:
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveResponse: (NSURLResponse*) response
- (void) connection: (NSURLConnection*) conn didReceiveResponse: (NSURLResponse*) response
{
(void) conn;
[dataLock lock];
[data setLength: 0];
[dataLock unlock];
@@ -245,8 +246,9 @@ public:
contentLength = [response expectedContentLength];
}
- (void) connection: (NSURLConnection*) connection didFailWithError: (NSError*) error
- (void) connection: (NSURLConnection*) conn didFailWithError: (NSError*) error
{
(void) conn;
DBG (nsStringToJuce ([error description]));
hasFailed = true;
initialised = true;
@@ -255,16 +257,18 @@ public:
runLoopThread->signalThreadShouldExit();
}
- (void) connection: (NSURLConnection*) connection didReceiveData: (NSData*) newData
- (void) connection: (NSURLConnection*) conn didReceiveData: (NSData*) newData
{
(void) conn;
[dataLock lock];
[data appendData: newData];
[dataLock unlock];
initialised = true;
}
- (void) connectionDidFinishLoading: (NSURLConnection*) connection
- (void) connectionDidFinishLoading: (NSURLConnection*) conn
{
(void) conn;
hasFinished = true;
initialised = true;
@@ -412,7 +416,7 @@ int64 juce_getInternetFileContentLength (void* handle)
return -1;
}
int juce_seekInInternetFile (void* handle, int newPosition)
int juce_seekInInternetFile (void* handle, int /*newPosition*/)
{
JuceURLConnection* const s = (JuceURLConnection*) handle;


+ 2
- 2
src/native/mac/juce_mac_Threads.mm View File

@@ -88,7 +88,7 @@ void Thread::yield()
sched_yield();
}
void Thread::setCurrentThreadAffinityMask (const uint32 affinityMask)
void Thread::setCurrentThreadAffinityMask (const uint32 /*affinityMask*/)
{
// xxx
jassertfalse
@@ -119,7 +119,7 @@ void Process::terminate()
exit (0);
}
void Process::setPriority (ProcessPriority p)
void Process::setPriority (ProcessPriority)
{
// xxx
}


+ 6
- 2
src/native/mac/juce_mac_WebBrowserComponent.mm View File

@@ -63,6 +63,10 @@ END_JUCE_NAMESPACE
frame: (WebFrame*) frame
decisionListener: (id <WebPolicyDecisionListener>) listener
{
(void) sender;
(void) request;
(void) frame;
NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"];
if (ownerComponent->pageAboutToLoad (nsStringToJuce ([url absoluteString])))
@@ -214,7 +218,7 @@ void WebBrowserComponent::refresh()
}
//==============================================================================
void WebBrowserComponent::paint (Graphics& g)
void WebBrowserComponent::paint (Graphics&)
{
}
@@ -263,7 +267,7 @@ void WebBrowserComponent::visibilityChanged()
checkWindowAssociation();
}
bool WebBrowserComponent::pageAboutToLoad (const String& url)
bool WebBrowserComponent::pageAboutToLoad (const String&)
{
return true;
}


+ 2
- 2
src/text/juce_XmlElement.cpp View File

@@ -824,9 +824,9 @@ void XmlElement::insertChildElement (XmlElement* const newNode,
}
}
XmlElement* XmlElement::createNewChildElement (const String& tagName)
XmlElement* XmlElement::createNewChildElement (const String& childTagName)
{
XmlElement* const newElement = new XmlElement (tagName);
XmlElement* const newElement = new XmlElement (childTagName);
addChildElement (newElement);
return newElement;
}


+ 2
- 2
src/utilities/juce_PropertiesFile.cpp View File

@@ -171,10 +171,10 @@ bool PropertiesFile::needsToBeSaved() const
return needsWriting;
}
void PropertiesFile::setNeedsToBeSaved (const bool needsToBeSaved)
void PropertiesFile::setNeedsToBeSaved (const bool needsToBeSaved_)
{
const ScopedLock sl (getLock());
needsWriting = needsToBeSaved;
needsWriting = needsToBeSaved_;
}
bool PropertiesFile::save()


+ 2
- 2
src/utilities/juce_SelectedItemSet.h View File

@@ -291,14 +291,14 @@ public:
For example, if the item is an object, you might want to call it and tell
it that it's being selected.
*/
virtual void itemSelected (SelectableItemType item) {}
virtual void itemSelected (SelectableItemType item) { (void) item; }
/** Can be overridden to do special handling when an item is deselected.
For example, if the item is an object, you might want to call it and tell
it that it's being deselected.
*/
virtual void itemDeselected (SelectableItemType item) {}
virtual void itemDeselected (SelectableItemType item) { (void) item; }
/** Used internally, but can be called to force a change message to be sent to the ChangeListeners.
*/


Loading…
Cancel
Save