| @@ -20,7 +20,7 @@ ifeq ($(CONFIG),Debug) | |||
| CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../JuceLibraryCode" | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 | |||
| CXXFLAGS += $(CFLAGS) | |||
| LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound | |||
| LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound -lXext | |||
| LDDEPS := | |||
| RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../JuceLibraryCode" | |||
| TARGET := Introjucer | |||
| @@ -35,7 +35,7 @@ ifeq ($(CONFIG),Release) | |||
| CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../JuceLibraryCode" | |||
| CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 | |||
| CXXFLAGS += $(CFLAGS) | |||
| LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound | |||
| LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -L"/usr/X11R6/lib/" -L"../../../../../juce/bin" -lfreetype -lpthread -lrt -lX11 -lGL -lGLU -lXinerama -lasound -lXext | |||
| LDDEPS := | |||
| RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../JuceLibraryCode" | |||
| TARGET := Introjucer | |||
| @@ -1,7 +1,7 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Jucer! | |||
| This file was auto-generated! | |||
| It contains the basic startup code for a Juce application. | |||
| @@ -1,7 +1,7 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Jucer! | |||
| This file was auto-generated! | |||
| It contains the basic startup code for a Juce application. | |||
| @@ -1,7 +1,7 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Jucer! | |||
| This file was auto-generated! | |||
| It contains the basic startup code for a Juce application. | |||
| @@ -1,7 +1,7 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Jucer! | |||
| This file was auto-generated! | |||
| It contains the basic outline for a simple desktop window. | |||
| @@ -1,7 +1,7 @@ | |||
| /* | |||
| ============================================================================== | |||
| This file was auto-generated by the Jucer! | |||
| This file was auto-generated! | |||
| It contains the basic outline for a simple desktop window. | |||
| @@ -213,20 +213,6 @@ private: | |||
| if (xml != nullptr) | |||
| { | |||
| #if JUCE_DEBUG | |||
| { | |||
| MemoryOutputStream mo; | |||
| project.getProjectRoot().writeToStream (mo); | |||
| MemoryInputStream mi (mo.getData(), mo.getDataSize(), false); | |||
| ValueTree v = ValueTree::readFromStream (mi); | |||
| ScopedPointer <XmlElement> xml2 (v.createXml()); | |||
| // This bit just tests that ValueTree save/load works reliably.. Let me know if this asserts for you! | |||
| jassert (xml->isEquivalentTo (xml2, true)); | |||
| } | |||
| #endif | |||
| MemoryOutputStream mo; | |||
| xml->writeToStream (mo, String::empty); | |||
| replaceFileIfDifferent (projectFile, mo); | |||
| @@ -1,23 +1,23 @@ | |||
| /* | |||
| ============================================================================== | |||
| This is an automatically generated file created by the Jucer! | |||
| This is an automatically generated file! | |||
| Be careful when adding custom code to these files, as only the code within | |||
| the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded | |||
| and re-saved. | |||
| Created for JUCE version: JUCE v1.53.8 | |||
| Created for JUCE version: JUCE v2.0.9 | |||
| ------------------------------------------------------------------------------ | |||
| JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd. | |||
| JUCE is copyright 2004-11 by Raw Material Software ltd. | |||
| ============================================================================== | |||
| */ | |||
| #ifndef __JUCER_PROJECTINFORMATIONCOMPONENT_H_2F89B0AC__ | |||
| #define __JUCER_PROJECTINFORMATIONCOMPONENT_H_2F89B0AC__ | |||
| #ifndef __JUCER_PROJECTINFORMATIONCOMPONENT_H_30FFCD07__ | |||
| #define __JUCER_PROJECTINFORMATIONCOMPONENT_H_30FFCD07__ | |||
| //[Headers] -- You can add your own extra header files here -- | |||
| #include "jucer_Project.h" | |||
| @@ -33,7 +33,7 @@ | |||
| */ | |||
| class ProjectInformationComponent : public Component, | |||
| public ChangeListener, | |||
| public ButtonListener | |||
| public Button::Listener | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| @@ -43,7 +43,6 @@ public: | |||
| //============================================================================== | |||
| //[UserMethods] -- You can add your own custom methods in this section. | |||
| void changeListenerCallback (ChangeBroadcaster*); | |||
| void rebuildConfigTabs(); | |||
| //[/UserMethods] | |||
| void resized(); | |||
| @@ -51,27 +50,24 @@ public: | |||
| void paint (Graphics& g); | |||
| private: | |||
| //============================================================================== | |||
| //[UserVariables] -- You can add your own custom variables in this section. | |||
| Project& project; | |||
| var lastProjectType; | |||
| void updateConfigTabs(); | |||
| void showConfigMenu(); | |||
| void showExporterMenu(); | |||
| class RolloverHelpComp; | |||
| //[/UserVariables] | |||
| //============================================================================== | |||
| TabbedComponent configTabBox; | |||
| TextButton editConfigsButton; | |||
| Viewport viewport; | |||
| TextButton openProjectButton; | |||
| TextButton editExportersButton; | |||
| TextButton saveAndOpenButton; | |||
| ScopedPointer<RolloverHelpComp> rollover; | |||
| //============================================================================== | |||
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectInformationComponent); | |||
| }; | |||
| #endif // __JUCER_PROJECTINFORMATIONCOMPONENT_H_2F89B0AC__ | |||
| #endif // __JUCER_PROJECTINFORMATIONCOMPONENT_H_30FFCD07__ | |||
| @@ -32,8 +32,7 @@ RectangleList::RectangleList() noexcept | |||
| RectangleList::RectangleList (const Rectangle<int>& rect) | |||
| { | |||
| if (! rect.isEmpty()) | |||
| rects.add (rect); | |||
| addWithoutMerging (rect); | |||
| } | |||
| RectangleList::RectangleList (const RectangleList& other) | |||
| @@ -99,7 +98,7 @@ bool RectangleList::Iterator::next() noexcept | |||
| { | |||
| if (--index >= 0) | |||
| { | |||
| current = & (owner.rects.getReference (index)); | |||
| current = &(owner.rects.getReference (index)); | |||
| return true; | |||
| } | |||
| @@ -120,15 +119,14 @@ void RectangleList::add (const Rectangle<int>& rect) | |||
| { | |||
| bool anyOverlaps = false; | |||
| int i; | |||
| for (i = rects.size(); --i >= 0;) | |||
| for (int j = rects.size(); --j >= 0;) | |||
| { | |||
| Rectangle<int>& ourRect = rects.getReference (i); | |||
| Rectangle<int>& ourRect = rects.getReference (j); | |||
| if (rect.intersects (ourRect)) | |||
| { | |||
| if (rect.contains (ourRect)) | |||
| rects.remove (i); | |||
| rects.remove (j); | |||
| else if (! ourRect.reduceIfPartlyContainedIn (rect)) | |||
| anyOverlaps = true; | |||
| } | |||
| @@ -138,7 +136,7 @@ void RectangleList::add (const Rectangle<int>& rect) | |||
| { | |||
| RectangleList r (rect); | |||
| for (i = rects.size(); --i >= 0;) | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| const Rectangle<int>& ourRect = rects.getReference (i); | |||
| @@ -151,8 +149,7 @@ void RectangleList::add (const Rectangle<int>& rect) | |||
| } | |||
| } | |||
| for (i = r.getNumRectangles(); --i >= 0;) | |||
| rects.add (r.rects.getReference (i)); | |||
| rects.addArray (r.rects); | |||
| } | |||
| else | |||
| { | |||
| @@ -170,15 +167,7 @@ void RectangleList::addWithoutMerging (const Rectangle<int>& rect) | |||
| void RectangleList::add (const int x, const int y, const int w, const int h) | |||
| { | |||
| if (rects.size() == 0) | |||
| { | |||
| if (w > 0 && h > 0) | |||
| rects.add (Rectangle<int> (x, y, w, h)); | |||
| } | |||
| else | |||
| { | |||
| add (Rectangle<int> (x, y, w, h)); | |||
| } | |||
| add (Rectangle<int> (x, y, w, h)); | |||
| } | |||
| void RectangleList::add (const RectangleList& other) | |||
| @@ -220,8 +209,8 @@ void RectangleList::subtract (const Rectangle<int>& rect) | |||
| r.x = x1; | |||
| r.w = rx2 - x1; | |||
| rects.insert (i + 1, Rectangle<int> (rx1, ry1, x1 - rx1, ry2 - ry1)); | |||
| i += 2; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, x1 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (x2 > rx1 && x2 < rx2) | |||
| @@ -231,8 +220,8 @@ void RectangleList::subtract (const Rectangle<int>& rect) | |||
| if (y1 > ry1 || y2 < ry2 || x1 > rx1) | |||
| { | |||
| rects.insert (i + 1, Rectangle<int> (rx1, ry1, x2 - rx1, ry2 - ry1)); | |||
| i += 2; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, x2 - rx1, ry2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y1 > ry1 && y1 < ry2) | |||
| @@ -246,8 +235,8 @@ void RectangleList::subtract (const Rectangle<int>& rect) | |||
| r.y = y1; | |||
| r.h = ry2 - y1; | |||
| rects.insert (i + 1, Rectangle<int> (rx1, ry1, rx2 - rx1, y1 - ry1)); | |||
| i += 2; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, rx2 - rx1, y1 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else if (y2 > ry1 && y2 < ry2) | |||
| @@ -257,8 +246,8 @@ void RectangleList::subtract (const Rectangle<int>& rect) | |||
| if (x1 > rx1 || x2 < rx2 || y1 > ry1) | |||
| { | |||
| rects.insert (i + 1, Rectangle<int> (rx1, ry1, rx2 - rx1, y2 - ry1)); | |||
| i += 2; | |||
| rects.insert (++i, Rectangle<int> (rx1, ry1, rx2 - rx1, y2 - ry1)); | |||
| ++i; | |||
| } | |||
| } | |||
| else | |||
| @@ -522,15 +511,8 @@ Path RectangleList::toPath() const | |||
| { | |||
| Path p; | |||
| for (int i = rects.size(); --i >= 0;) | |||
| { | |||
| const Rectangle<int>& r = rects.getReference (i); | |||
| p.addRectangle ((float) r.x, | |||
| (float) r.y, | |||
| (float) r.w, | |||
| (float) r.h); | |||
| } | |||
| for (int i = 0; i < rects.size(); ++i) | |||
| p.addRectangle (rects.getReference (i)); | |||
| return p; | |||
| } | |||
| @@ -68,7 +68,6 @@ void Viewport::deleteContentComp() | |||
| // This sets the content comp to a null pointer before deleting the old one, in case | |||
| // anything tries to use the old one while it's in mid-deletion.. | |||
| ScopedPointer<Component> oldCompDeleter (contentComp); | |||
| contentComp = nullptr; | |||
| } | |||
| else | |||
| { | |||
| @@ -186,36 +185,49 @@ void Viewport::updateVisibleArea() | |||
| const bool canShowHBar = showHScrollbar && canShowAnyBars; | |||
| const bool canShowVBar = showVScrollbar && canShowAnyBars; | |||
| bool hBarVisible = canShowHBar && ! horizontalScrollBar.autoHides(); | |||
| bool vBarVisible = canShowVBar && ! verticalScrollBar.autoHides(); | |||
| Rectangle<int> contentArea (getLocalBounds()); | |||
| bool hBarVisible, vBarVisible; | |||
| Rectangle<int> contentArea; | |||
| if (contentComp != nullptr && ! contentArea.contains (contentComp->getBounds())) | |||
| for (int i = 3; --i >= 0;) | |||
| { | |||
| hBarVisible = canShowHBar && (hBarVisible || contentComp->getX() < 0 || contentComp->getRight() > contentArea.getWidth()); | |||
| vBarVisible = canShowVBar && (vBarVisible || contentComp->getY() < 0 || contentComp->getBottom() > contentArea.getHeight()); | |||
| hBarVisible = canShowHBar && ! horizontalScrollBar.autoHides(); | |||
| vBarVisible = canShowVBar && ! verticalScrollBar.autoHides(); | |||
| contentArea = getLocalBounds(); | |||
| if (vBarVisible) | |||
| contentArea.setWidth (getWidth() - scrollbarWidth); | |||
| if (contentComp != nullptr && ! contentArea.contains (contentComp->getBounds())) | |||
| { | |||
| hBarVisible = canShowHBar && (hBarVisible || contentComp->getX() < 0 || contentComp->getRight() > contentArea.getWidth()); | |||
| vBarVisible = canShowVBar && (vBarVisible || contentComp->getY() < 0 || contentComp->getBottom() > contentArea.getHeight()); | |||
| if (hBarVisible) | |||
| contentArea.setHeight (getHeight() - scrollbarWidth); | |||
| if (vBarVisible) | |||
| contentArea.setWidth (getWidth() - scrollbarWidth); | |||
| if (! contentArea.contains (contentComp->getBounds())) | |||
| { | |||
| hBarVisible = canShowHBar && (hBarVisible || contentComp->getRight() > contentArea.getWidth()); | |||
| vBarVisible = canShowVBar && (vBarVisible || contentComp->getBottom() > contentArea.getHeight()); | |||
| if (hBarVisible) | |||
| contentArea.setHeight (getHeight() - scrollbarWidth); | |||
| if (! contentArea.contains (contentComp->getBounds())) | |||
| { | |||
| hBarVisible = canShowHBar && (hBarVisible || contentComp->getRight() > contentArea.getWidth()); | |||
| vBarVisible = canShowVBar && (vBarVisible || contentComp->getBottom() > contentArea.getHeight()); | |||
| } | |||
| } | |||
| } | |||
| if (vBarVisible) | |||
| contentArea.setWidth (getWidth() - scrollbarWidth); | |||
| if (vBarVisible) contentArea.setWidth (getWidth() - scrollbarWidth); | |||
| if (hBarVisible) contentArea.setHeight (getHeight() - scrollbarWidth); | |||
| if (hBarVisible) | |||
| contentArea.setHeight (getHeight() - scrollbarWidth); | |||
| if (contentComp == nullptr) | |||
| { | |||
| contentHolder.setBounds (contentArea); | |||
| break; | |||
| } | |||
| const Rectangle<int> oldContentBounds (contentComp->getBounds()); | |||
| contentHolder.setBounds (contentArea); | |||
| contentHolder.setBounds (contentArea); | |||
| // If the content has changed its size, that might affect our scrollbars, so go round again and re-caclulate.. | |||
| if (oldContentBounds == contentComp->getBounds()) | |||
| break; | |||
| } | |||
| Rectangle<int> contentBounds; | |||
| if (contentComp != nullptr) | |||
| @@ -223,7 +223,7 @@ public: | |||
| getComponent().setBounds (newBounds); | |||
| } | |||
| jassertfalse; // must be a recursive reference! | |||
| jassertfalse; // Seems to be a recursive reference! | |||
| } | |||
| void applyNewBounds (const Rectangle<int>& newBounds) | |||
| @@ -611,7 +611,7 @@ public: | |||
| void setColour (const float alpha) noexcept | |||
| { | |||
| const uint8 v = jmin (255, (int) (alpha * 255.0f)); | |||
| const uint8 v = (uint8) jmin (255, (int) (alpha * 255.0f)); | |||
| setColour (PixelARGB (v, v, v, v)); | |||
| } | |||
| @@ -727,7 +727,7 @@ public: | |||
| { | |||
| GLint t = 0; | |||
| glGetIntegerv (GL_TEXTURE_BINDING_2D, &t); | |||
| jassert (t == textureID); | |||
| jassert (t == (GLint) textureID); | |||
| } | |||
| } | |||