| @@ -425,24 +425,21 @@ static const unsigned char temp_73015554[] = | |||||
| "\r\n" | "\r\n" | ||||
| " This is an automatically generated file created by the Jucer!\r\n" | " This is an automatically generated file created by the Jucer!\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " Creation date: %%creationTime%%\r\n" | |||||
| "\r\n" | |||||
| " Be careful when adding custom code to these files, as only the code within\r\n" | " Be careful when adding custom code to these files, as only the code within\r\n" | ||||
| " the \"//[xyz]\" and \"//[/xyz]\" sections will be retained when the file is loaded\r\n" | " the \"//[xyz]\" and \"//[/xyz]\" sections will be retained when the file is loaded\r\n" | ||||
| " and re-saved.\r\n" | " and re-saved.\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " Jucer version: 1.12\r\n" | |||||
| " Created for JUCE version: %%juceVersion%%\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " ------------------------------------------------------------------------------\r\n" | " ------------------------------------------------------------------------------\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " The Jucer is part of the JUCE library - \"Jules' Utility Class Extensions\"\r\n" | |||||
| " Copyright 2004-6 by Raw Material Software ltd.\r\n" | |||||
| " JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd.\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " ==============================================================================\r\n" | " ==============================================================================\r\n" | ||||
| "*/\r\n" | "*/\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| "//[Headers] You can add your own extra header files here...\r\n" | |||||
| "//[/Headers]\r\n" | |||||
| "//[CppHeaders] You can add your own extra header files here...\r\n" | |||||
| "//[/CppHeaders]\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| "%%includeFilesCPP%%\r\n" | "%%includeFilesCPP%%\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| @@ -475,21 +472,17 @@ static const unsigned char temp_73015554[] = | |||||
| "//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...\r\n" | "//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...\r\n" | ||||
| "//[/MiscUserCode]\r\n" | "//[/MiscUserCode]\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| "%%staticMemberDefinitions%%\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| "//==============================================================================\r\n" | "//==============================================================================\r\n" | ||||
| "//======================= Jucer Information Section ==========================\r\n" | |||||
| "//==============================================================================\r\n" | |||||
| "#if 0\r\n" | "#if 0\r\n" | ||||
| "/* -- Jucer information section --\r\n" | |||||
| "\r\n" | |||||
| " This is where the Jucer puts all of its metadata, so don't change anything in here!\r\n" | |||||
| "\r\n" | |||||
| "BEGIN_JUCER_METADATA\r\n" | |||||
| "/* This section stores the Jucer's metadata - edit it at your own risk!\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| "%%metadata%%\r\n" | "%%metadata%%\r\n" | ||||
| "END_JUCER_METADATA\r\n" | |||||
| "*/\r\n" | "*/\r\n" | ||||
| "#endif\r\n" | |||||
| "\r\n" | |||||
| "%%staticMemberDefinitions%%\r\n"; | |||||
| "#endif\r\n"; | |||||
| const char* BinaryData::jucer_ComponentTemplate_cpp = (const char*) temp_73015554; | const char* BinaryData::jucer_ComponentTemplate_cpp = (const char*) temp_73015554; | ||||
| @@ -500,18 +493,15 @@ static const unsigned char temp_b930c59[] = | |||||
| "\r\n" | "\r\n" | ||||
| " This is an automatically generated file created by the Jucer!\r\n" | " This is an automatically generated file created by the Jucer!\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " Creation date: %%creationTime%%\r\n" | |||||
| "\r\n" | |||||
| " Be careful when adding custom code to these files, as only the code within\r\n" | " Be careful when adding custom code to these files, as only the code within\r\n" | ||||
| " the \"//[xyz]\" and \"//[/xyz]\" sections will be retained when the file is loaded\r\n" | " the \"//[xyz]\" and \"//[/xyz]\" sections will be retained when the file is loaded\r\n" | ||||
| " and re-saved.\r\n" | " and re-saved.\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " Jucer version: 1.12\r\n" | |||||
| " Created for JUCE version: %%juceVersion%%\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " ------------------------------------------------------------------------------\r\n" | " ------------------------------------------------------------------------------\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| " The Jucer is part of the JUCE library - \"Jules' Utility Class Extensions\"\r\n" | |||||
| " Copyright 2004-6 by Raw Material Software ltd.\r\n" | |||||
| " JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd.\r\n" | |||||
| "\r\n" | "\r\n" | ||||
| " ==============================================================================\r\n" | " ==============================================================================\r\n" | ||||
| "*/\r\n" | "*/\r\n" | ||||
| @@ -520,7 +510,7 @@ static const unsigned char temp_b930c59[] = | |||||
| "#define %%headerGuard%%\r\n" | "#define %%headerGuard%%\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| "//[Headers] -- You can add your own extra header files here --\r\n" | "//[Headers] -- You can add your own extra header files here --\r\n" | ||||
| "#include \"juce.h\"\r\n" | |||||
| "%%defaultJuceInclude%%\r\n" | |||||
| "//[/Headers]\r\n" | "//[/Headers]\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| "%%includeFilesH%%\r\n" | "%%includeFilesH%%\r\n" | ||||
| @@ -559,7 +549,7 @@ static const unsigned char temp_b930c59[] = | |||||
| " //==============================================================================\r\n" | " //==============================================================================\r\n" | ||||
| " // (prevent copy constructor and operator= being generated..)\r\n" | " // (prevent copy constructor and operator= being generated..)\r\n" | ||||
| " %%className%% (const %%className%%&);\r\n" | " %%className%% (const %%className%%&);\r\n" | ||||
| " const %%className%%& operator= (const %%className%%&);\r\n" | |||||
| " %%className%%& operator= (const %%className%%&);\r\n" | |||||
| "};\r\n" | "};\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| "\r\n" | "\r\n" | ||||
| @@ -23,10 +23,10 @@ namespace BinaryData | |||||
| const int jucer_AudioPluginFilterTemplate_hSize = 2353; | const int jucer_AudioPluginFilterTemplate_hSize = 2353; | ||||
| extern const char* jucer_ComponentTemplate_cpp; | extern const char* jucer_ComponentTemplate_cpp; | ||||
| const int jucer_ComponentTemplate_cppSize = 1975; | |||||
| const int jucer_ComponentTemplate_cppSize = 1976; | |||||
| extern const char* jucer_ComponentTemplate_h; | extern const char* jucer_ComponentTemplate_h; | ||||
| const int jucer_ComponentTemplate_hSize = 2309; | |||||
| const int jucer_ComponentTemplate_hSize = 2239; | |||||
| extern const char* jucer_MainConsoleAppTemplate_cpp; | extern const char* jucer_MainConsoleAppTemplate_cpp; | ||||
| const int jucer_MainConsoleAppTemplate_cppSize = 749; | const int jucer_MainConsoleAppTemplate_cppSize = 749; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -47,6 +47,7 @@ static const char* const newLine = "\r\n"; | |||||
| const char* const projectItemDragType = "Project Items"; | const char* const projectItemDragType = "Project Items"; | ||||
| const char* const drawableItemDragType = "Drawable Items"; | const char* const drawableItemDragType = "Drawable Items"; | ||||
| const char* const componentItemDragType = "Components"; | |||||
| const char* const textFileExtensions = "cpp;h;hpp;mm;m;c;txt;xml;plist;rtf;html;htm;php;py;rb;cs"; | const char* const textFileExtensions = "cpp;h;hpp;mm;m;c;txt;xml;plist;rtf;html;htm;php;py;rb;cs"; | ||||
| const char* const sourceFileExtensions = "cpp;mm;m;c;h;hpp"; | const char* const sourceFileExtensions = "cpp;mm;m;c;h;hpp"; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -205,7 +205,7 @@ public: | |||||
| ~CompMemberNameValueSource() {} | ~CompMemberNameValueSource() {} | ||||
| void valueChanged (Value&) { sendChangeMessage (true); } | void valueChanged (Value&) { sendChangeMessage (true); } | ||||
| const var getValue() const { return sourceValue.toString(); } | |||||
| const var getValue() const { return sourceValue.toString(); } | |||||
| void setValue (const var& newValue) | void setValue (const var& newValue) | ||||
| { | { | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -86,29 +86,6 @@ void CodeGenerator::removeCallback (const String& returnType, const String& prot | |||||
| } | } | ||||
| } | } | ||||
| void CodeGenerator::addImageResourceLoader (const String& imageMemberName, const String& resourceName) | |||||
| { | |||||
| const String initialiser (imageMemberName + " (0)"); | |||||
| if (! memberInitialisers.contains (initialiser, false)) | |||||
| { | |||||
| memberInitialisers.add (initialiser); | |||||
| privateMemberDeclarations | |||||
| << "Image* " << imageMemberName << ";" << newLine; | |||||
| if (resourceName.isNotEmpty()) | |||||
| { | |||||
| constructorCode | |||||
| << imageMemberName << " = ImageCache::getFromMemory (" | |||||
| << resourceName << ", " << resourceName << "Size);" << newLine; | |||||
| destructorCode | |||||
| << "ImageCache::release (" << imageMemberName << ");" << newLine; | |||||
| } | |||||
| } | |||||
| } | |||||
| const StringArray CodeGenerator::getExtraParentClasses() const | const StringArray CodeGenerator::getExtraParentClasses() const | ||||
| { | { | ||||
| StringArray s; | StringArray s; | ||||
| @@ -189,16 +166,15 @@ const String CodeGenerator::getClassDeclaration() const | |||||
| if (parentClassLines.contains ("public Button", false)) | if (parentClassLines.contains ("public Button", false)) | ||||
| parentClassLines.removeString ("public Component", false); | parentClassLines.removeString ("public Component", false); | ||||
| String r ("class "); | |||||
| r << className << " : "; | |||||
| r += parentClassLines.joinIntoString ("," + String (newLine) + String::repeatedString (" ", r.length())); | |||||
| String r; | |||||
| r << "class " << className << " : "; | |||||
| r << parentClassLines.joinIntoString ("," + String (newLine) + String::repeatedString (" ", r.length())); | |||||
| return r; | return r; | ||||
| } | } | ||||
| const String CodeGenerator::getInitialiserList() const | const String CodeGenerator::getInitialiserList() const | ||||
| { | { | ||||
| String s; | |||||
| StringArray inits (memberInitialisers); | StringArray inits (memberInitialisers); | ||||
| if (parentClassInitialiser.isNotEmpty()) | if (parentClassInitialiser.isNotEmpty()) | ||||
| @@ -208,26 +184,24 @@ const String CodeGenerator::getInitialiserList() const | |||||
| inits.removeEmptyStrings(); | inits.removeEmptyStrings(); | ||||
| inits.removeDuplicates (false); | inits.removeDuplicates (false); | ||||
| String s; | |||||
| if (inits.size() == 0) | |||||
| return s; | |||||
| s << " : "; | |||||
| for (int i = 0; i < inits.size(); ++i) | |||||
| if (inits.size() > 0) | |||||
| { | { | ||||
| String init (inits[i]); | |||||
| s << " : "; | |||||
| while (init.endsWithChar (',')) | |||||
| init = init.dropLastCharacters (1); | |||||
| for (int i = 0; i < inits.size(); ++i) | |||||
| { | |||||
| String init (inits[i]); | |||||
| s << init; | |||||
| while (init.endsWithChar (',')) | |||||
| init = init.dropLastCharacters (1); | |||||
| if (i < inits.size() - 1) | |||||
| s << "," << newLine << " "; | |||||
| else | |||||
| s << newLine; | |||||
| s << init; | |||||
| if (i < inits.size() - 1) | |||||
| s << "," << newLine << " "; | |||||
| else | |||||
| s << newLine; | |||||
| } | |||||
| } | } | ||||
| return s; | return s; | ||||
| @@ -263,56 +237,6 @@ static bool getUserSection (const StringArray& lines, const String& tag, StringA | |||||
| return true; | return true; | ||||
| } | } | ||||
| static void copyAcrossUserSections (String& dest, const String& src) | |||||
| { | |||||
| StringArray srcLines, dstLines; | |||||
| srcLines.addLines (src); | |||||
| dstLines.addLines (dest); | |||||
| for (int i = 0; i < dstLines.size(); ++i) | |||||
| { | |||||
| if (dstLines[i].trimStart().startsWith ("//[")) | |||||
| { | |||||
| String tag (dstLines[i].trimStart().substring (3)); | |||||
| tag = tag.upToFirstOccurrenceOf ("]", false, false); | |||||
| jassert (! tag.startsWithChar ('/')); | |||||
| if (! tag.startsWithChar ('/')) | |||||
| { | |||||
| const int endLine = indexOfLineStartingWith (dstLines, | |||||
| "//[/" + tag + "]", | |||||
| i + 1); | |||||
| if (endLine > i) | |||||
| { | |||||
| StringArray sourceLines; | |||||
| if (getUserSection (srcLines, tag, sourceLines)) | |||||
| { | |||||
| int j; | |||||
| for (j = endLine - i; --j > 0;) | |||||
| dstLines.remove (i + 1); | |||||
| for (j = 0; j < sourceLines.size(); ++j) | |||||
| dstLines.insert (++i, sourceLines [j].trimEnd()); | |||||
| ++i; | |||||
| } | |||||
| else | |||||
| { | |||||
| i = endLine; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| dstLines.set (i, dstLines[i].trimEnd()); | |||||
| } | |||||
| dest = dstLines.joinIntoString (newLine) + newLine; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| static void replaceTemplate (String& text, const String& itemName, const String& value) | static void replaceTemplate (String& text, const String& itemName, const String& value) | ||||
| { | { | ||||
| @@ -339,20 +263,11 @@ static void replaceTemplate (String& text, const String& itemName, const String& | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void CodeGenerator::applyToCode (String& code, | |||||
| const String& fileNameRoot, | |||||
| const bool isForPreview, | |||||
| const String& oldFileWithUserData) const | |||||
| void CodeGenerator::applyToCode (String& code, const File& targetFile, | |||||
| bool isForPreview, Project* project) const | |||||
| { | { | ||||
| // header guard.. | |||||
| String headerGuard ("__JUCER_HEADER_"); | |||||
| headerGuard << className.toUpperCase().retainCharacters ("ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |||||
| << "_" << fileNameRoot.toUpperCase().retainCharacters ("ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |||||
| << "_" << String::toHexString (Random::getSystemRandom().nextInt()).toUpperCase() << "__"; | |||||
| replaceTemplate (code, "headerGuard", headerGuard); | |||||
| replaceTemplate (code, "creationTime", Time::getCurrentTime().toString (true, true, true)); | |||||
| replaceTemplate (code, "juceVersion", SystemStats::getJUCEVersion()); | |||||
| replaceTemplate (code, "headerGuard", makeHeaderGuardName (targetFile)); | |||||
| replaceTemplate (code, "className", className); | replaceTemplate (code, "className", className); | ||||
| replaceTemplate (code, "constructorParams", constructorParams); | replaceTemplate (code, "constructorParams", constructorParams); | ||||
| @@ -364,6 +279,11 @@ void CodeGenerator::applyToCode (String& code, | |||||
| replaceTemplate (code, "methodDefinitions", getCallbackDefinitions()); | replaceTemplate (code, "methodDefinitions", getCallbackDefinitions()); | ||||
| if (project != 0) | |||||
| replaceTemplate (code, "defaultJuceInclude", createIncludeStatement (project->getAppIncludeFile(), targetFile)); | |||||
| else | |||||
| replaceTemplate (code, "defaultJuceInclude", "#include \"juce_amalgamated.h\""); | |||||
| replaceTemplate (code, "includeFilesH", getIncludeFileCode (includeFilesH)); | replaceTemplate (code, "includeFilesH", getIncludeFileCode (includeFilesH)); | ||||
| replaceTemplate (code, "includeFilesCPP", getIncludeFileCode (includeFilesCPP)); | replaceTemplate (code, "includeFilesCPP", getIncludeFileCode (includeFilesCPP)); | ||||
| @@ -380,6 +300,146 @@ void CodeGenerator::applyToCode (String& code, | |||||
| replaceTemplate (code, "metadata", " << Metadata isn't shown in the code preview >>" + String (newLine)); | replaceTemplate (code, "metadata", " << Metadata isn't shown in the code preview >>" + String (newLine)); | ||||
| replaceTemplate (code, "staticMemberDefinitions", "// Static member declarations and resources would go here... (these aren't shown in the code preview)"); | replaceTemplate (code, "staticMemberDefinitions", "// Static member declarations and resources would go here... (these aren't shown in the code preview)"); | ||||
| } | } | ||||
| } | |||||
| copyAcrossUserSections (code, oldFileWithUserData); | |||||
| //============================================================================== | |||||
| CodeGenerator::CustomisedCodeSnippets::CustomisedCodeSnippets() | |||||
| { | |||||
| } | |||||
| CodeGenerator::CustomisedCodeSnippets::~CustomisedCodeSnippets() | |||||
| { | |||||
| } | } | ||||
| void CodeGenerator::CustomisedCodeSnippets::reloadFrom (const String& fileContent) | |||||
| { | |||||
| sectionNames.clear(); | |||||
| sectionContent.clear(); | |||||
| StringArray lines; | |||||
| lines.addLines (fileContent); | |||||
| for (int i = 0; i < lines.size(); ++i) | |||||
| { | |||||
| if (lines[i].trimStart().startsWith ("//[")) | |||||
| { | |||||
| String tag (lines[i].trimStart().substring (3)); | |||||
| tag = tag.upToFirstOccurrenceOf ("]", false, false).trim(); | |||||
| jassert (! (tag.isEmpty() || tag.startsWithChar ('/'))); | |||||
| if (! (tag.isEmpty() || tag.startsWithChar ('/'))) | |||||
| { | |||||
| const int endLine = indexOfLineStartingWith (lines, "//[/" + tag + "]", i + 1); | |||||
| if (endLine > i) | |||||
| { | |||||
| String content (lines.joinIntoString (newLine, i + 1, endLine - i - 1)); | |||||
| sectionNames.add (tag); | |||||
| CodeDocument* doc = new CodeDocument(); | |||||
| sectionContent.add (doc); | |||||
| doc->replaceAllContent (content); | |||||
| i = endLine; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| void CodeGenerator::CustomisedCodeSnippets::applyTo (String& fileContent) const | |||||
| { | |||||
| StringArray lines; | |||||
| lines.addLines (fileContent); | |||||
| for (int i = 0; i < lines.size(); ++i) | |||||
| { | |||||
| if (lines[i].trimStart().startsWith ("//[")) | |||||
| { | |||||
| String tag (lines[i].trimStart().substring (3)); | |||||
| tag = tag.upToFirstOccurrenceOf ("]", false, false); | |||||
| jassert (! tag.startsWithChar ('/')); | |||||
| if (! tag.startsWithChar ('/')) | |||||
| { | |||||
| const int endLine = indexOfLineStartingWith (lines, "//[/" + tag + "]", i + 1); | |||||
| if (endLine > i) | |||||
| { | |||||
| StringArray sourceLines; | |||||
| sourceLines.addLines (getSectionContent (tag)); | |||||
| if (sourceLines.size() > 0) | |||||
| { | |||||
| lines.removeRange (i + 1, endLine - i - 1); | |||||
| for (int j = 0; j < sourceLines.size(); ++j) | |||||
| lines.insert (++i, sourceLines [j].trimEnd()); | |||||
| ++i; | |||||
| } | |||||
| else | |||||
| { | |||||
| i = endLine; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| lines.set (i, lines[i].trimEnd()); | |||||
| } | |||||
| if (lines[lines.size() - 1].isNotEmpty()) | |||||
| lines.add (String::empty); | |||||
| fileContent = lines.joinIntoString (newLine); | |||||
| } | |||||
| bool CodeGenerator::CustomisedCodeSnippets::areAnySnippetsUnsaved() const | |||||
| { | |||||
| return true; //xxx | |||||
| } | |||||
| CodeDocument* CodeGenerator::CustomisedCodeSnippets::getDocumentFor (const String& sectionName, bool createIfNotFound) | |||||
| { | |||||
| const int index = sectionNames.indexOf (sectionName); | |||||
| if (index >= 0) | |||||
| return sectionContent [index]; | |||||
| if (createIfNotFound) | |||||
| { | |||||
| sectionNames.add (sectionName); | |||||
| sectionContent.add (new CodeDocument()); | |||||
| return sectionContent.getLast(); | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| const String CodeGenerator::CustomisedCodeSnippets::getSectionContent (const String& sectionName) const | |||||
| { | |||||
| const int index = sectionNames.indexOf (sectionName); | |||||
| if (index >= 0) | |||||
| return sectionContent[index]->getAllContent(); | |||||
| return String::empty; | |||||
| } | |||||
| void CodeGenerator::CustomisedCodeSnippets::removeSection (const String& sectionName) | |||||
| { | |||||
| const int index = sectionNames.indexOf (sectionName); | |||||
| if (index >= 0) | |||||
| { | |||||
| sectionNames.remove (index); | |||||
| sectionContent.remove (index); | |||||
| } | |||||
| } | |||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -27,6 +27,7 @@ | |||||
| #define __JUCER_CODEGENERATOR_H_F79AEF58__ | #define __JUCER_CODEGENERATOR_H_F79AEF58__ | ||||
| #include "../jucer_Headers.h" | #include "../jucer_Headers.h" | ||||
| #include "jucer_Project.h" | |||||
| //============================================================================== | //============================================================================== | ||||
| @@ -37,17 +38,8 @@ public: | |||||
| CodeGenerator(); | CodeGenerator(); | ||||
| ~CodeGenerator(); | ~CodeGenerator(); | ||||
| //============================================================================== | |||||
| void applyToCode (String& codeTemplate, | |||||
| const String& fileNameRoot, | |||||
| const bool isForPreview, | |||||
| const String& oldFileContents) const; | |||||
| int getUniqueSuffix(); | |||||
| //============================================================================== | //============================================================================== | ||||
| String className; | String className; | ||||
| String componentName; | |||||
| String parentClassInitialiser; // optional parent class initialiser to go before the items in the initialisers list | String parentClassInitialiser; // optional parent class initialiser to go before the items in the initialisers list | ||||
| StringArray memberInitialisers; | StringArray memberInitialisers; | ||||
| String parentClasses; | String parentClasses; | ||||
| @@ -75,13 +67,40 @@ public: | |||||
| void removeCallback (const String& returnType, const String& prototype); | void removeCallback (const String& returnType, const String& prototype); | ||||
| void addImageResourceLoader (const String& imageMemberName, const String& resourceName); | |||||
| const String getCallbackDeclarations() const; | const String getCallbackDeclarations() const; | ||||
| const String getCallbackDefinitions() const; | const String getCallbackDefinitions() const; | ||||
| const StringArray getExtraParentClasses() const; | const StringArray getExtraParentClasses() const; | ||||
| int getUniqueSuffix(); | |||||
| //============================================================================== | |||||
| // An object to load and store all the user-defined bits of code as documents. | |||||
| class CustomisedCodeSnippets | |||||
| { | |||||
| public: | |||||
| CustomisedCodeSnippets(); | |||||
| ~CustomisedCodeSnippets(); | |||||
| void reloadFrom (const String& fileContent); | |||||
| void applyTo (String& fileContent) const; | |||||
| bool areAnySnippetsUnsaved() const; | |||||
| CodeDocument* getDocumentFor (const String& sectionName, bool createIfNotFound); | |||||
| const String getSectionContent (const String& sectionName) const; | |||||
| void removeSection (const String& sectionName); | |||||
| private: | |||||
| StringArray sectionNames; | |||||
| OwnedArray <CodeDocument> sectionContent; | |||||
| }; | |||||
| //============================================================================== | |||||
| void applyToCode (String& codeTemplate, const File& targetFile, | |||||
| bool isForPreview, Project* project) const; | |||||
| private: | private: | ||||
| //============================================================================== | |||||
| const String getClassDeclaration() const; | const String getClassDeclaration() const; | ||||
| const String getInitialiserList() const; | const String getInitialiserList() const; | ||||
| int suffix; | int suffix; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -48,7 +48,8 @@ const char* const ComponentDocument::markerPosProperty = "position"; | |||||
| //============================================================================== | //============================================================================== | ||||
| ComponentDocument::ComponentDocument (Project* project_, const File& cppFile_) | ComponentDocument::ComponentDocument (Project* project_, const File& cppFile_) | ||||
| : project (project_), cppFile (cppFile_), | |||||
| : project (project_), | |||||
| cppFile (cppFile_), | |||||
| root (componentDocumentTag), | root (componentDocumentTag), | ||||
| changedSinceSaved (false) | changedSinceSaved (false) | ||||
| { | { | ||||
| @@ -58,6 +59,17 @@ ComponentDocument::ComponentDocument (Project* project_, const File& cppFile_) | |||||
| root.addListener (this); | root.addListener (this); | ||||
| } | } | ||||
| ComponentDocument::ComponentDocument (const ComponentDocument& other) | |||||
| : project (other.project), | |||||
| cppFile (other.cppFile), | |||||
| root (other.root.createCopy()), | |||||
| changedSinceSaved (false) | |||||
| { | |||||
| checkRootObject(); | |||||
| root.addListener (this); | |||||
| } | |||||
| ComponentDocument::~ComponentDocument() | ComponentDocument::~ComponentDocument() | ||||
| { | { | ||||
| root.removeListener (this); | root.removeListener (this); | ||||
| @@ -104,18 +116,39 @@ bool ComponentDocument::isComponentFile (const File& file) | |||||
| void ComponentDocument::writeCode (OutputStream& cpp, OutputStream& header) | void ComponentDocument::writeCode (OutputStream& cpp, OutputStream& header) | ||||
| { | { | ||||
| cpp << "/** */" | |||||
| << newLine << newLine; | |||||
| CodeGenerator codeGen; | |||||
| codeGen.className = getClassName().toString(); | |||||
| codeGen.parentClasses = "public Component"; | |||||
| header << "/** */" | |||||
| << newLine << newLine; | |||||
| { | |||||
| MemoryOutputStream metaData; | |||||
| writeMetadata (metaData); | |||||
| codeGen.jucerMetadata = metaData.toUTF8(); | |||||
| } | |||||
| { | |||||
| String code (BinaryData::jucer_ComponentTemplate_cpp); | |||||
| String oldContent; | |||||
| codeGen.applyToCode (code, cppFile, false, project); | |||||
| customisedCodeSnippets.applyTo (code); | |||||
| cpp << code; | |||||
| } | |||||
| { | |||||
| String code (BinaryData::jucer_ComponentTemplate_h); | |||||
| String oldContent; | |||||
| codeGen.applyToCode (code, cppFile.withFileExtension (".h"), false, project); | |||||
| customisedCodeSnippets.applyTo (code); | |||||
| header << code; | |||||
| } | |||||
| } | } | ||||
| void ComponentDocument::writeMetadata (OutputStream& out) | void ComponentDocument::writeMetadata (OutputStream& out) | ||||
| { | { | ||||
| out << "#if 0" << newLine | |||||
| << "/** Jucer-generated metadata section - Edit this data at own risk!" << newLine | |||||
| << metadataTagStart << newLine << newLine; | |||||
| out << metadataTagStart << newLine << newLine; | |||||
| ScopedPointer<XmlElement> xml (root.createXml()); | ScopedPointer<XmlElement> xml (root.createXml()); | ||||
| jassert (xml != 0); | jassert (xml != 0); | ||||
| @@ -124,15 +157,13 @@ void ComponentDocument::writeMetadata (OutputStream& out) | |||||
| xml->writeToStream (out, String::empty, false, false); | xml->writeToStream (out, String::empty, false, false); | ||||
| out << newLine | out << newLine | ||||
| << metadataTagEnd << " */" << newLine | |||||
| << "#endif" << newLine; | |||||
| << metadataTagEnd << newLine; | |||||
| } | } | ||||
| bool ComponentDocument::save() | bool ComponentDocument::save() | ||||
| { | { | ||||
| MemoryOutputStream cpp, header; | MemoryOutputStream cpp, header; | ||||
| writeCode (cpp, header); | writeCode (cpp, header); | ||||
| writeMetadata (cpp); | |||||
| bool savedOk = overwriteFileWithNewDataIfDifferent (cppFile, cpp) | bool savedOk = overwriteFileWithNewDataIfDifferent (cppFile, cpp) | ||||
| && overwriteFileWithNewDataIfDifferent (cppFile.withFileExtension (".h"), header); | && overwriteFileWithNewDataIfDifferent (cppFile.withFileExtension (".h"), header); | ||||
| @@ -192,6 +223,8 @@ bool ComponentDocument::reload() | |||||
| checkRootObject(); | checkRootObject(); | ||||
| undoManager.clearUndoHistory(); | undoManager.clearUndoHistory(); | ||||
| changedSinceSaved = false; | changedSinceSaved = false; | ||||
| customisedCodeSnippets.reloadFrom (cppFile.loadFileAsString()); | |||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| @@ -523,6 +556,7 @@ ComponentDocument::MarkerList::MarkerList (ComponentDocument& document_, const b | |||||
| group (document_.getRoot().getChildWithName (isX_ ? markersGroupXTag : markersGroupYTag)), | group (document_.getRoot().getChildWithName (isX_ ? markersGroupXTag : markersGroupYTag)), | ||||
| isX (isX_) | isX (isX_) | ||||
| { | { | ||||
| jassert (group.isValid()); | |||||
| jassert (group.isAChildOf (document_.getRoot())); | jassert (group.isAChildOf (document_.getRoot())); | ||||
| } | } | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -29,6 +29,7 @@ | |||||
| #include "../jucer_Headers.h" | #include "../jucer_Headers.h" | ||||
| #include "jucer_Project.h" | #include "jucer_Project.h" | ||||
| #include "jucer_Coordinate.h" | #include "jucer_Coordinate.h" | ||||
| #include "jucer_CodeGenerator.h" | |||||
| //============================================================================== | //============================================================================== | ||||
| @@ -38,6 +39,7 @@ class ComponentDocument : public ValueTree::Listener, | |||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| ComponentDocument (Project* project, const File& cppFile); | ComponentDocument (Project* project, const File& cppFile); | ||||
| ComponentDocument (const ComponentDocument& other); | |||||
| ~ComponentDocument(); | ~ComponentDocument(); | ||||
| static bool isComponentFile (const File& file); | static bool isComponentFile (const File& file); | ||||
| @@ -45,6 +47,7 @@ public: | |||||
| bool save(); | bool save(); | ||||
| bool reload(); | bool reload(); | ||||
| bool hasChangedSinceLastSave(); | bool hasChangedSinceLastSave(); | ||||
| const File getCppFile() const { return cppFile; } | |||||
| //============================================================================== | //============================================================================== | ||||
| Value getClassName() const { return getRootValueNonUndoable ("className"); } | Value getClassName() const { return getRootValueNonUndoable ("className"); } | ||||
| @@ -133,7 +136,12 @@ public: | |||||
| void endDrag (const MouseEvent& e); | void endDrag (const MouseEvent& e); | ||||
| //============================================================================== | //============================================================================== | ||||
| ValueTree& getRoot() { return root; } | |||||
| CodeGenerator::CustomisedCodeSnippets& getCustomisedCodeSnippets() throw() { return customisedCodeSnippets; } | |||||
| //============================================================================== | |||||
| ValueTree& getRoot() { return root; } | |||||
| ValueTree getComponentGroup() const; | |||||
| UndoManager* getUndoManager() const; | UndoManager* getUndoManager() const; | ||||
| void beginNewTransaction(); | void beginNewTransaction(); | ||||
| @@ -156,12 +164,12 @@ private: | |||||
| File cppFile; | File cppFile; | ||||
| ValueTree root; | ValueTree root; | ||||
| ScopedPointer<MarkerList> markersX, markersY; | ScopedPointer<MarkerList> markersX, markersY; | ||||
| CodeGenerator::CustomisedCodeSnippets customisedCodeSnippets; | |||||
| mutable UndoManager undoManager; | mutable UndoManager undoManager; | ||||
| bool changedSinceSaved; | bool changedSinceSaved; | ||||
| void checkRootObject(); | void checkRootObject(); | ||||
| void createSubTreeIfNotThere (const String& name); | void createSubTreeIfNotThere (const String& name); | ||||
| ValueTree getComponentGroup() const; | |||||
| void addMarkerMenuItem (int i, const Coordinate& coord, const String& name, PopupMenu& menu, | void addMarkerMenuItem (int i, const Coordinate& coord, const String& name, PopupMenu& menu, | ||||
| bool isAnchor1, const String& fullCoordName); | bool isAnchor1, const String& fullCoordName); | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -3,24 +3,21 @@ | |||||
| This is an automatically generated file created by the Jucer! | This is an automatically generated file created by the Jucer! | ||||
| Creation date: %%creationTime%% | |||||
| Be careful when adding custom code to these files, as only the code within | 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 | the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded | ||||
| and re-saved. | and re-saved. | ||||
| Jucer version: 1.12 | |||||
| Created for JUCE version: %%juceVersion%% | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| The Jucer is part of the JUCE library - "Jules' Utility Class Extensions" | |||||
| Copyright 2004-6 by Raw Material Software ltd. | |||||
| JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd. | |||||
| ============================================================================== | ============================================================================== | ||||
| */ | */ | ||||
| //[Headers] You can add your own extra header files here... | |||||
| //[/Headers] | |||||
| //[CppHeaders] You can add your own extra header files here... | |||||
| //[/CppHeaders] | |||||
| %%includeFilesCPP%% | %%includeFilesCPP%% | ||||
| @@ -53,18 +50,14 @@ | |||||
| //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... | //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... | ||||
| //[/MiscUserCode] | //[/MiscUserCode] | ||||
| %%staticMemberDefinitions%% | |||||
| //============================================================================== | |||||
| //======================= Jucer Information Section ========================== | |||||
| //============================================================================== | //============================================================================== | ||||
| #if 0 | #if 0 | ||||
| /* -- Jucer information section -- | |||||
| This is where the Jucer puts all of its metadata, so don't change anything in here! | |||||
| BEGIN_JUCER_METADATA | |||||
| /* This section stores the Jucer's metadata - edit it at your own risk! | |||||
| %%metadata%% | %%metadata%% | ||||
| END_JUCER_METADATA | |||||
| */ | */ | ||||
| #endif | #endif | ||||
| %%staticMemberDefinitions%% | |||||
| @@ -3,18 +3,15 @@ | |||||
| This is an automatically generated file created by the Jucer! | This is an automatically generated file created by the Jucer! | ||||
| Creation date: %%creationTime%% | |||||
| Be careful when adding custom code to these files, as only the code within | 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 | the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded | ||||
| and re-saved. | and re-saved. | ||||
| Jucer version: 1.12 | |||||
| Created for JUCE version: %%juceVersion%% | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| The Jucer is part of the JUCE library - "Jules' Utility Class Extensions" | |||||
| Copyright 2004-6 by Raw Material Software ltd. | |||||
| JUCE and the Jucer are copyright 2004-10 by Raw Material Software ltd. | |||||
| ============================================================================== | ============================================================================== | ||||
| */ | */ | ||||
| @@ -23,7 +20,7 @@ | |||||
| #define %%headerGuard%% | #define %%headerGuard%% | ||||
| //[Headers] -- You can add your own extra header files here -- | //[Headers] -- You can add your own extra header files here -- | ||||
| #include "juce.h" | |||||
| %%defaultJuceInclude%% | |||||
| //[/Headers] | //[/Headers] | ||||
| %%includeFilesH%% | %%includeFilesH%% | ||||
| @@ -62,7 +59,7 @@ private: | |||||
| //============================================================================== | //============================================================================== | ||||
| // (prevent copy constructor and operator= being generated..) | // (prevent copy constructor and operator= being generated..) | ||||
| %%className%% (const %%className%%&); | %%className%% (const %%className%%&); | ||||
| const %%className%%& operator= (const %%className%%&); | |||||
| %%className%%& operator= (const %%className%%&); | |||||
| }; | }; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -25,8 +25,289 @@ | |||||
| #include "../../jucer_Headers.h" | #include "../../jucer_Headers.h" | ||||
| #include "jucer_ComponentEditor.h" | #include "jucer_ComponentEditor.h" | ||||
| #include "../jucer_JucerTreeViewBase.h" | |||||
| //============================================================================== | |||||
| namespace ComponentTree | |||||
| { | |||||
| //============================================================================== | |||||
| class Base : public JucerTreeViewBase, | |||||
| public ValueTree::Listener, | |||||
| public ChangeListener | |||||
| { | |||||
| public: | |||||
| Base (ComponentEditor& editor_) | |||||
| : editor (editor_) | |||||
| { | |||||
| editor.getCanvas()->getSelection().addChangeListener (this); | |||||
| } | |||||
| ~Base() | |||||
| { | |||||
| editor.getCanvas()->getSelection().removeChangeListener (this); | |||||
| } | |||||
| //============================================================================== | |||||
| void valueTreePropertyChanged (ValueTree& tree, const var::identifier& property) {} | |||||
| void valueTreeParentChanged (ValueTree& tree) {} | |||||
| void valueTreeChildrenChanged (ValueTree& tree) {} | |||||
| const String getUniqueName() const | |||||
| { | |||||
| jassert (getItemId().isNotEmpty()); | |||||
| return getItemId(); | |||||
| } | |||||
| //============================================================================== | |||||
| void itemOpennessChanged (bool isNowOpen) | |||||
| { | |||||
| if (isNowOpen) | |||||
| refreshSubItems(); | |||||
| } | |||||
| virtual void refreshSubItems() = 0; | |||||
| virtual const String getItemId() const = 0; | |||||
| void setName (const String& newName) {} | |||||
| void itemClicked (const MouseEvent& e) {} | |||||
| void itemDoubleClicked (const MouseEvent& e) {} | |||||
| void itemSelectionChanged (bool isNowSelected) | |||||
| { | |||||
| if (isNowSelected) | |||||
| editor.getCanvas()->getSelection().addToSelection (getItemId()); | |||||
| else | |||||
| editor.getCanvas()->getSelection().deselect (getItemId()); | |||||
| } | |||||
| void changeListenerCallback (void*) { updateSelectionState(); } | |||||
| void updateSelectionState() | |||||
| { | |||||
| setSelected (editor.getCanvas()->getSelection().isSelected (getItemId()), false); | |||||
| } | |||||
| bool isMissing() { return false; } | |||||
| const String getTooltip() { return String::empty; } | |||||
| protected: | |||||
| //============================================================================== | |||||
| ComponentEditor& editor; | |||||
| }; | |||||
| //============================================================================== | |||||
| class ComponentItem : public Base | |||||
| { | |||||
| public: | |||||
| ComponentItem (ComponentEditor& editor_, const ValueTree& componentState_) | |||||
| : Base (editor_), componentState (componentState_) | |||||
| { | |||||
| componentState.addListener (this); | |||||
| updateSelectionState(); | |||||
| } | |||||
| ~ComponentItem() | |||||
| { | |||||
| componentState.removeListener (this); | |||||
| } | |||||
| //============================================================================== | |||||
| const String getItemId() const { return componentState [ComponentDocument::idProperty]; } | |||||
| bool mightContainSubItems() { return false; } | |||||
| void refreshSubItems() {} | |||||
| const String getDisplayName() const { return getRenamingName(); } | |||||
| const String getRenamingName() const { return componentState [ComponentDocument::memberNameProperty]; } | |||||
| Image* getIcon() const { return LookAndFeel::getDefaultLookAndFeel().getDefaultDocumentFileImage(); } | |||||
| const String getDragSourceDescription() { return componentItemDragType; } | |||||
| void valueTreePropertyChanged (ValueTree& tree, const var::identifier& property) | |||||
| { | |||||
| if (property == ComponentDocument::memberNameProperty) | |||||
| repaintItem(); | |||||
| } | |||||
| private: | |||||
| //============================================================================== | |||||
| ValueTree componentState; | |||||
| }; | |||||
| //============================================================================== | |||||
| class ComponentList : public Base | |||||
| { | |||||
| public: | |||||
| ComponentList (ComponentEditor& editor_) | |||||
| : Base (editor_), componentTree (editor.getDocument().getComponentGroup()) | |||||
| { | |||||
| componentTree.addListener (this); | |||||
| } | |||||
| ~ComponentList() | |||||
| { | |||||
| componentTree.removeListener (this); | |||||
| } | |||||
| //============================================================================== | |||||
| const String getItemId() const { return "components"; } | |||||
| bool mightContainSubItems() { return true; } | |||||
| void valueTreeChildrenChanged (ValueTree& tree) | |||||
| { | |||||
| if (tree == componentTree) | |||||
| refreshSubItems(); | |||||
| } | |||||
| void refreshSubItems() | |||||
| { | |||||
| ScopedPointer <XmlElement> openness (getOpennessState()); | |||||
| clearSubItems(); | |||||
| ComponentDocument& doc = editor.getDocument(); | |||||
| const int num = doc.getNumComponents(); | |||||
| for (int i = 0; i < num; ++i) | |||||
| addSubItem (new ComponentItem (editor, doc.getComponent (i))); | |||||
| if (openness != 0) | |||||
| restoreOpennessState (*openness); | |||||
| } | |||||
| const String getDisplayName() const { return getRenamingName(); } | |||||
| const String getRenamingName() const { return "Components"; } | |||||
| Image* getIcon() const { return LookAndFeel::getDefaultLookAndFeel().getDefaultFolderImage(); } | |||||
| const String getDragSourceDescription() { return String::empty; } | |||||
| private: | |||||
| ValueTree componentTree; | |||||
| }; | |||||
| //============================================================================== | |||||
| class MarkerItem : public Base | |||||
| { | |||||
| public: | |||||
| MarkerItem (ComponentEditor& editor_, const ValueTree& markerState_) | |||||
| : Base (editor_), markerState (markerState_) | |||||
| { | |||||
| markerState.addListener (this); | |||||
| updateSelectionState(); | |||||
| } | |||||
| ~MarkerItem() | |||||
| { | |||||
| markerState.removeListener (this); | |||||
| } | |||||
| //============================================================================== | |||||
| const String getItemId() const { return markerState [ComponentDocument::idProperty]; } | |||||
| bool mightContainSubItems() { return false; } | |||||
| void refreshSubItems() {} | |||||
| const String getDisplayName() const { return getRenamingName(); } | |||||
| const String getRenamingName() const { return markerState [ComponentDocument::markerNameProperty]; } | |||||
| Image* getIcon() const { return LookAndFeel::getDefaultLookAndFeel().getDefaultDocumentFileImage(); } | |||||
| const String getDragSourceDescription() { return componentItemDragType; } | |||||
| void valueTreePropertyChanged (ValueTree& tree, const var::identifier& property) | |||||
| { | |||||
| if (property == ComponentDocument::markerNameProperty) | |||||
| repaintItem(); | |||||
| } | |||||
| private: | |||||
| //============================================================================== | |||||
| ValueTree markerState; | |||||
| }; | |||||
| //============================================================================== | |||||
| class MarkerList : public Base | |||||
| { | |||||
| public: | |||||
| MarkerList (ComponentEditor& editor_, bool isX_) | |||||
| : Base (editor_), markerList (editor_.getDocument().getMarkerList (isX_).getGroup()), isX (isX_) | |||||
| { | |||||
| markerList.addListener (this); | |||||
| } | |||||
| ~MarkerList() | |||||
| { | |||||
| markerList.removeListener (this); | |||||
| } | |||||
| //============================================================================== | |||||
| const String getItemId() const { return isX ? "markersX" : "markersY"; } | |||||
| bool mightContainSubItems() { return true; } | |||||
| void valueTreeChildrenChanged (ValueTree& tree) | |||||
| { | |||||
| refreshSubItems(); | |||||
| } | |||||
| void refreshSubItems() | |||||
| { | |||||
| ScopedPointer <XmlElement> openness (getOpennessState()); | |||||
| clearSubItems(); | |||||
| ComponentDocument::MarkerList& markers = editor.getDocument().getMarkerList (isX); | |||||
| const int num = markers.size(); | |||||
| for (int i = 0; i < num; ++i) | |||||
| addSubItem (new MarkerItem (editor, markers.getMarker (i))); | |||||
| if (openness != 0) | |||||
| restoreOpennessState (*openness); | |||||
| } | |||||
| const String getDisplayName() const { return getRenamingName(); } | |||||
| const String getRenamingName() const { return isX ? "Markers (X-axis)" : "Markers (Y-axis)"; } | |||||
| Image* getIcon() const { return LookAndFeel::getDefaultLookAndFeel().getDefaultFolderImage(); } | |||||
| const String getDragSourceDescription() { return String::empty; } | |||||
| private: | |||||
| ValueTree markerList; | |||||
| bool isX; | |||||
| }; | |||||
| //============================================================================== | |||||
| class Root : public Base | |||||
| { | |||||
| public: | |||||
| Root (ComponentEditor& editor_) : Base (editor_) {} | |||||
| ~Root() {} | |||||
| //============================================================================== | |||||
| const String getItemId() const { return "root"; } | |||||
| bool mightContainSubItems() { return true; } | |||||
| void refreshSubItems() | |||||
| { | |||||
| ScopedPointer <XmlElement> openness (getOpennessState()); | |||||
| clearSubItems(); | |||||
| addSubItem (new ComponentList (editor)); | |||||
| addSubItem (new MarkerList (editor, true)); | |||||
| addSubItem (new MarkerList (editor, false)); | |||||
| if (openness != 0) | |||||
| restoreOpennessState (*openness); | |||||
| } | |||||
| const String getDisplayName() const { return getRenamingName(); } | |||||
| const String getRenamingName() const { return editor.getDocument().getClassName().toString(); } | |||||
| Image* getIcon() const { return LookAndFeel::getDefaultLookAndFeel().getDefaultFolderImage(); } | |||||
| const String getDragSourceDescription() { return String::empty; } | |||||
| }; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| class ComponentEditor::ClassInfoHolder : public Component | class ComponentEditor::ClassInfoHolder : public Component | ||||
| { | { | ||||
| @@ -56,18 +337,32 @@ private: | |||||
| PropertyPanelWithTooltips* panel; | PropertyPanelWithTooltips* panel; | ||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| class ComponentEditor::LayoutEditorHolder : public Component | |||||
| class ComponentEditor::LayoutEditorHolder : public Component, | |||||
| public ToolbarItemFactory | |||||
| { | { | ||||
| public: | public: | ||||
| LayoutEditorHolder (ComponentEditor& editor_) | LayoutEditorHolder (ComponentEditor& editor_) | ||||
| : editor (editor_), infoPanel (0) | |||||
| : editor (editor_), infoPanel (0), tree (0) | |||||
| { | { | ||||
| addAndMakeVisible (toolbar = new Toolbar()); | |||||
| toolbar->addDefaultItems (*this); | |||||
| toolbar->setStyle (Toolbar::textOnly); | |||||
| addAndMakeVisible (viewport = new Viewport()); | addAndMakeVisible (viewport = new Viewport()); | ||||
| addChildComponent (tree = new TreeView()); | |||||
| tree->setRootItemVisible (true); | |||||
| tree->setMultiSelectEnabled (true); | |||||
| tree->setDefaultOpenness (true); | |||||
| tree->setColour (TreeView::backgroundColourId, Colours::white); | |||||
| tree->setIndentSize (15); | |||||
| } | } | ||||
| ~LayoutEditorHolder() | ~LayoutEditorHolder() | ||||
| { | { | ||||
| tree->deleteRootItem(); | |||||
| deleteAndZero (infoPanel); | deleteAndZero (infoPanel); | ||||
| deleteAllChildren(); | deleteAllChildren(); | ||||
| } | } | ||||
| @@ -76,20 +371,94 @@ public: | |||||
| { | { | ||||
| viewport->setViewedComponent (new ComponentEditorCanvas (editor)); | viewport->setViewedComponent (new ComponentEditorCanvas (editor)); | ||||
| addAndMakeVisible (infoPanel = new InfoPanel (editor)); | addAndMakeVisible (infoPanel = new InfoPanel (editor)); | ||||
| tree->setRootItem (new ComponentTree::Root (editor)); | |||||
| resized(); | |||||
| } | } | ||||
| void resized() | void resized() | ||||
| { | { | ||||
| const int infoPanelWidth = 200; | |||||
| viewport->setBounds (0, 0, getWidth() - infoPanelWidth, getHeight()); | |||||
| const int toolbarHeight = 22; | |||||
| toolbar->setBounds (0, 0, getWidth(), toolbarHeight); | |||||
| int infoPanelWidth = 200; | |||||
| if (infoPanel != 0 && infoPanel->isVisible()) | |||||
| infoPanel->setBounds (getWidth() - infoPanelWidth, toolbar->getBottom(), infoPanelWidth, getHeight() - toolbar->getBottom()); | |||||
| else | |||||
| infoPanelWidth = 0; | |||||
| if (tree->isVisible()) | |||||
| { | |||||
| tree->setBounds (0, toolbar->getBottom(), infoPanelWidth, getHeight() - toolbar->getBottom()); | |||||
| viewport->setBounds (infoPanelWidth, toolbar->getBottom(), getWidth() - infoPanelWidth * 2, getHeight() - toolbar->getBottom()); | |||||
| } | |||||
| else | |||||
| { | |||||
| viewport->setBounds (0, toolbar->getBottom(), getWidth() - infoPanelWidth, getHeight() - toolbar->getBottom()); | |||||
| } | |||||
| } | |||||
| void showOrHideProperties() | |||||
| { | |||||
| infoPanel->setVisible (! infoPanel->isVisible()); | |||||
| resized(); | |||||
| } | |||||
| if (infoPanel != 0) | |||||
| infoPanel->setBounds (getWidth() - infoPanelWidth, 0, infoPanelWidth, getHeight()); | |||||
| void showOrHideTree() | |||||
| { | |||||
| tree->setVisible (! tree->isVisible()); | |||||
| resized(); | |||||
| } | } | ||||
| Viewport* getViewport() const { return viewport; } | Viewport* getViewport() const { return viewport; } | ||||
| //============================================================================== | |||||
| enum DemoToolbarItemIds | |||||
| { | |||||
| createComponent = 1, | |||||
| showInfo = 2, | |||||
| showComponentTree = 3, | |||||
| }; | |||||
| void getAllToolbarItemIds (Array <int>& ids) | |||||
| { | |||||
| ids.add (createComponent); | |||||
| ids.add (showInfo); | |||||
| ids.add (showComponentTree); | |||||
| ids.add (separatorBarId); | |||||
| ids.add (spacerId); | |||||
| ids.add (flexibleSpacerId); | |||||
| } | |||||
| void getDefaultItemSet (Array <int>& ids) | |||||
| { | |||||
| ids.add (createComponent); | |||||
| ids.add (flexibleSpacerId); | |||||
| ids.add (showInfo); | |||||
| ids.add (showComponentTree); | |||||
| } | |||||
| ToolbarItemComponent* createItem (int itemId) | |||||
| { | |||||
| String name; | |||||
| int commandId = 0; | |||||
| switch (itemId) | |||||
| { | |||||
| case createComponent: name = "new"; break; | |||||
| case showInfo: name = "info"; commandId = CommandIDs::showOrHideProperties; break; | |||||
| case showComponentTree: name = "tree"; commandId = CommandIDs::showOrHideTree; break; | |||||
| default: jassertfalse; return 0; | |||||
| } | |||||
| ToolbarButton* b = new ToolbarButton (itemId, name, new DrawablePath(), 0); | |||||
| b->setCommandToTrigger (commandManager, commandId, true); | |||||
| return b; | |||||
| } | |||||
| private: | private: | ||||
| //============================================================================== | |||||
| class InfoPanel : public Component, | class InfoPanel : public Component, | ||||
| public ChangeListener | public ChangeListener | ||||
| { | { | ||||
| @@ -136,9 +505,11 @@ private: | |||||
| PropertyPanel* props; | PropertyPanel* props; | ||||
| }; | }; | ||||
| Toolbar* toolbar; | |||||
| ComponentEditor& editor; | ComponentEditor& editor; | ||||
| Viewport* viewport; | Viewport* viewport; | ||||
| InfoPanel* infoPanel; | InfoPanel* infoPanel; | ||||
| TreeView* tree; | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -233,6 +604,44 @@ Viewport* ComponentEditor::getViewport() const | |||||
| return layoutEditorHolder->getViewport(); | return layoutEditorHolder->getViewport(); | ||||
| } | } | ||||
| //============================================================================== | |||||
| class TestComponent : public ComponentEditorCanvas::ComponentHolder | |||||
| { | |||||
| public: | |||||
| TestComponent (ComponentDocument& document_) | |||||
| : document (document_) | |||||
| { | |||||
| setSize (document.getCanvasWidth().getValue(), | |||||
| document.getCanvasHeight().getValue()); | |||||
| } | |||||
| ~TestComponent() | |||||
| { | |||||
| } | |||||
| void resized() | |||||
| { | |||||
| document.getCanvasWidth() = getWidth(); | |||||
| document.getCanvasHeight() = getHeight(); | |||||
| ComponentEditorCanvas::ComponentHolder::resized(); | |||||
| updateComponents (document, selected); | |||||
| } | |||||
| private: | |||||
| ComponentDocument document; | |||||
| ComponentEditorCanvas::SelectedItems selected; | |||||
| }; | |||||
| void ComponentEditor::test() | |||||
| { | |||||
| TestComponent testComp (getDocument()); | |||||
| DialogWindow::showModalDialog ("Testing: " + getDocument().getClassName().toString(), | |||||
| &testComp, this, Colours::lightgrey, true, true); | |||||
| } | |||||
| //============================================================================== | |||||
| void ComponentEditor::getAllCommands (Array <CommandID>& commands) | void ComponentEditor::getAllCommands (Array <CommandID>& commands) | ||||
| { | { | ||||
| DocumentEditorComponent::getAllCommands (commands); | DocumentEditorComponent::getAllCommands (commands); | ||||
| @@ -241,6 +650,9 @@ void ComponentEditor::getAllCommands (Array <CommandID>& commands) | |||||
| CommandIDs::redo, | CommandIDs::redo, | ||||
| CommandIDs::toFront, | CommandIDs::toFront, | ||||
| CommandIDs::toBack, | CommandIDs::toBack, | ||||
| CommandIDs::test, | |||||
| CommandIDs::showOrHideProperties, | |||||
| CommandIDs::showOrHideTree, | |||||
| StandardApplicationCommandIDs::del }; | StandardApplicationCommandIDs::del }; | ||||
| commands.addArray (ids, numElementsInArray (ids)); | commands.addArray (ids, numElementsInArray (ids)); | ||||
| @@ -271,6 +683,19 @@ void ComponentEditor::getCommandInfo (CommandID commandID, ApplicationCommandInf | |||||
| result.setInfo ("Send to Back", "Moves the selected items to the back", CommandCategories::editing, 0); | result.setInfo ("Send to Back", "Moves the selected items to the back", CommandCategories::editing, 0); | ||||
| break; | break; | ||||
| case CommandIDs::test: | |||||
| result.setInfo ("Test", "Test the current component", CommandCategories::editing, 0); | |||||
| result.defaultKeypresses.add (KeyPress ('t', ModifierKeys::commandModifier, 0)); | |||||
| break; | |||||
| case CommandIDs::showOrHideProperties: | |||||
| result.setInfo ("Show/Hide Tree", "Shows or hides the component tree view", CommandCategories::editing, 0); | |||||
| break; | |||||
| case CommandIDs::showOrHideTree: | |||||
| result.setInfo ("Show/Hide Properties", "Shows or hides the component properties panel", CommandCategories::editing, 0); | |||||
| break; | |||||
| case StandardApplicationCommandIDs::del: | case StandardApplicationCommandIDs::del: | ||||
| result.setInfo ("Delete", String::empty, CommandCategories::general, 0); | result.setInfo ("Delete", String::empty, CommandCategories::general, 0); | ||||
| result.defaultKeypresses.add (KeyPress (KeyPress::deleteKey, 0, 0)); | result.defaultKeypresses.add (KeyPress (KeyPress::deleteKey, 0, 0)); | ||||
| @@ -303,6 +728,18 @@ bool ComponentEditor::perform (const InvocationInfo& info) | |||||
| getCanvas()->selectionToBack(); | getCanvas()->selectionToBack(); | ||||
| return true; | return true; | ||||
| case CommandIDs::test: | |||||
| test(); | |||||
| return true; | |||||
| case CommandIDs::showOrHideProperties: | |||||
| layoutEditorHolder->showOrHideProperties(); | |||||
| return true; | |||||
| case CommandIDs::showOrHideTree: | |||||
| layoutEditorHolder->showOrHideTree(); | |||||
| return true; | |||||
| case StandardApplicationCommandIDs::del: | case StandardApplicationCommandIDs::del: | ||||
| getCanvas()->deleteSelection(); | getCanvas()->deleteSelection(); | ||||
| return true; | return true; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -53,9 +53,10 @@ public: | |||||
| ComponentDocument& getDocument() const { return *componentDocument; } | ComponentDocument& getDocument() const { return *componentDocument; } | ||||
| Viewport* getViewport() const; | Viewport* getViewport() const; | ||||
| ComponentEditorCanvas* getCanvas() const; | ComponentEditorCanvas* getCanvas() const; | ||||
| void test(); | |||||
| private: | private: | ||||
| class ClassInfoHolder; | class ClassInfoHolder; | ||||
| class LayoutEditorHolder; | class LayoutEditorHolder; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -332,8 +332,8 @@ public: | |||||
| if (axis.expanded (30, 30).contains (e.x, e.y)) | if (axis.expanded (30, 30).contains (e.x, e.y)) | ||||
| { | { | ||||
| Coordinate coord (getMarkerList().getCoordinate (marker)); | Coordinate coord (getMarkerList().getCoordinate (marker)); | ||||
| coord.moveToAbsolute (jmax (0.0, dragStartPos + (isX ? e.getDistanceFromDragStartX() | |||||
| : e.getDistanceFromDragStartY())), | |||||
| coord.moveToAbsolute (jmax (0, roundToInt (dragStartPos + (isX ? e.getDistanceFromDragStartX() | |||||
| : e.getDistanceFromDragStartY()))), | |||||
| getMarkerList()); | getMarkerList()); | ||||
| getMarkerList().setCoordinate (marker, coord); | getMarkerList().setCoordinate (marker, coord); | ||||
| } | } | ||||
| @@ -380,104 +380,6 @@ private: | |||||
| String labelText; | String labelText; | ||||
| }; | }; | ||||
| //============================================================================== | |||||
| class ComponentEditorCanvas::ComponentHolder : public Component | |||||
| { | |||||
| public: | |||||
| ComponentHolder() {} | |||||
| ~ComponentHolder() {} | |||||
| void updateComponents (ComponentDocument& doc, SelectedItems& selection) | |||||
| { | |||||
| int i; | |||||
| for (i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* c = getChildComponent (i); | |||||
| if (! doc.containsComponent (c)) | |||||
| { | |||||
| selection.deselect (ComponentDocument::getJucerIDFor (c)); | |||||
| delete c; | |||||
| } | |||||
| } | |||||
| Array <Component*> componentsInOrder; | |||||
| const int num = doc.getNumComponents(); | |||||
| for (i = 0; i < num; ++i) | |||||
| { | |||||
| const ValueTree v (doc.getComponent (i)); | |||||
| Component* c = getComponentForState (doc, v); | |||||
| if (c == 0) | |||||
| { | |||||
| c = doc.createComponent (i); | |||||
| addAndMakeVisible (c); | |||||
| } | |||||
| doc.updateComponent (c); | |||||
| componentsInOrder.add (c); | |||||
| } | |||||
| // Make sure the z-order is correct.. | |||||
| if (num > 0) | |||||
| { | |||||
| componentsInOrder.getLast()->toFront (false); | |||||
| for (i = num - 1; --i >= 0;) | |||||
| componentsInOrder.getUnchecked(i)->toBehind (componentsInOrder.getUnchecked (i + 1)); | |||||
| } | |||||
| } | |||||
| Component* getComponentForState (ComponentDocument& doc, const ValueTree& state) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent (i); | |||||
| if (doc.isStateForComponent (state, c)) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| Component* findComponentWithID (const String& uid) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent(i); | |||||
| if (ComponentDocument::getJucerIDFor (c) == uid) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| Component* findComponentAt (const Point<int>& pos) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent(i); | |||||
| if (c->getBounds().contains (pos)) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| void findLassoItemsInArea (Array <SelectedItems::ItemType>& itemsFound, const Rectangle<int>& lassoArea) | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* c = getChildComponent(i); | |||||
| if (c->getBounds().intersects (lassoArea)) | |||||
| itemsFound.add (ComponentDocument::getJucerIDFor (c)); | |||||
| } | |||||
| } | |||||
| }; | |||||
| //============================================================================== | //============================================================================== | ||||
| class ComponentEditorCanvas::OverlayComponent : public Component, | class ComponentEditorCanvas::OverlayComponent : public Component, | ||||
| @@ -1097,6 +999,106 @@ void ComponentEditorCanvas::endDrag (const MouseEvent& e) | |||||
| } | } | ||||
| } | } | ||||
| //============================================================================== | |||||
| ComponentEditorCanvas::ComponentHolder::ComponentHolder() | |||||
| { | |||||
| } | |||||
| ComponentEditorCanvas::ComponentHolder::~ComponentHolder() | |||||
| { | |||||
| } | |||||
| void ComponentEditorCanvas::ComponentHolder::updateComponents (ComponentDocument& doc, SelectedItems& selection) | |||||
| { | |||||
| int i; | |||||
| for (i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* c = getChildComponent (i); | |||||
| if (! doc.containsComponent (c)) | |||||
| { | |||||
| selection.deselect (ComponentDocument::getJucerIDFor (c)); | |||||
| delete c; | |||||
| } | |||||
| } | |||||
| Array <Component*> componentsInOrder; | |||||
| const int num = doc.getNumComponents(); | |||||
| for (i = 0; i < num; ++i) | |||||
| { | |||||
| const ValueTree v (doc.getComponent (i)); | |||||
| Component* c = getComponentForState (doc, v); | |||||
| if (c == 0) | |||||
| { | |||||
| c = doc.createComponent (i); | |||||
| addAndMakeVisible (c); | |||||
| } | |||||
| doc.updateComponent (c); | |||||
| componentsInOrder.add (c); | |||||
| } | |||||
| // Make sure the z-order is correct.. | |||||
| if (num > 0) | |||||
| { | |||||
| componentsInOrder.getLast()->toFront (false); | |||||
| for (i = num - 1; --i >= 0;) | |||||
| componentsInOrder.getUnchecked(i)->toBehind (componentsInOrder.getUnchecked (i + 1)); | |||||
| } | |||||
| } | |||||
| Component* ComponentEditorCanvas::ComponentHolder::getComponentForState (ComponentDocument& doc, const ValueTree& state) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent (i); | |||||
| if (doc.isStateForComponent (state, c)) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| Component* ComponentEditorCanvas::ComponentHolder::findComponentWithID (const String& uid) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent(i); | |||||
| if (ComponentDocument::getJucerIDFor (c) == uid) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| Component* ComponentEditorCanvas::ComponentHolder::findComponentAt (const Point<int>& pos) const | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* const c = getChildComponent(i); | |||||
| if (c->getBounds().contains (pos)) | |||||
| return c; | |||||
| } | |||||
| return 0; | |||||
| } | |||||
| void ComponentEditorCanvas::ComponentHolder::findLassoItemsInArea (Array <SelectedItems::ItemType>& itemsFound, const Rectangle<int>& lassoArea) | |||||
| { | |||||
| for (int i = getNumChildComponents(); --i >= 0;) | |||||
| { | |||||
| Component* c = getChildComponent(i); | |||||
| if (c->getBounds().intersects (lassoArea)) | |||||
| itemsFound.add (ComponentDocument::getJucerIDFor (c)); | |||||
| } | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| ComponentEditorCanvas::OverlayItemComponent::OverlayItemComponent (ComponentEditorCanvas& canvas_) | ComponentEditorCanvas::OverlayItemComponent::OverlayItemComponent (ComponentEditorCanvas& canvas_) | ||||
| : canvas (canvas_) | : canvas (canvas_) | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -85,6 +85,20 @@ public: | |||||
| void continueDrag (const MouseEvent& e); | void continueDrag (const MouseEvent& e); | ||||
| void endDrag (const MouseEvent& e); | void endDrag (const MouseEvent& e); | ||||
| //============================================================================== | |||||
| class ComponentHolder : public Component | |||||
| { | |||||
| public: | |||||
| ComponentHolder(); | |||||
| ~ComponentHolder(); | |||||
| void updateComponents (ComponentDocument& doc, SelectedItems& selection); | |||||
| Component* getComponentForState (ComponentDocument& doc, const ValueTree& state) const; | |||||
| Component* findComponentWithID (const String& uid) const; | |||||
| Component* findComponentAt (const Point<int>& pos) const; | |||||
| void findLassoItemsInArea (Array <SelectedItems::ItemType>& itemsFound, const Rectangle<int>& lassoArea); | |||||
| }; | |||||
| private: | private: | ||||
| ComponentEditor& editor; | ComponentEditor& editor; | ||||
| const BorderSize border; | const BorderSize border; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -48,7 +48,9 @@ namespace CommandIDs | |||||
| static const int test = 0x202090; | static const int test = 0x202090; | ||||
| static const int toFront = 0x2020a0; | static const int toFront = 0x2020a0; | ||||
| static const int toBack = 0x2030b0; | |||||
| static const int toBack = 0x2030a1; | |||||
| static const int showOrHideProperties = 0x2030b0; | |||||
| static const int showOrHideTree = 0x2030b1; | |||||
| static const int group = 0x202170; | static const int group = 0x202170; | ||||
| static const int ungroup = 0x202180; | static const int ungroup = 0x202180; | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -54,7 +54,7 @@ public: | |||||
| virtual bool isMissing() = 0; | virtual bool isMissing() = 0; | ||||
| virtual Image* getIcon() const = 0; | virtual Image* getIcon() const = 0; | ||||
| void showRenameBox(); | |||||
| virtual void showRenameBox(); | |||||
| // Text editor listener for renaming.. | // Text editor listener for renaming.. | ||||
| void textEditorTextChanged (TextEditor& editor) {} | void textEditorTextChanged (TextEditor& editor) {} | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -301,7 +301,6 @@ const PopupMenu MainWindow::getMenuForIndex (int topLevelMenuIndex, | |||||
| menu.addCommandItem (commandManager, CommandIDs::undo); | menu.addCommandItem (commandManager, CommandIDs::undo); | ||||
| menu.addCommandItem (commandManager, CommandIDs::redo); | menu.addCommandItem (commandManager, CommandIDs::redo); | ||||
| menu.addSeparator(); | menu.addSeparator(); | ||||
| menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut); | menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut); | ||||
| menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy); | menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy); | ||||
| menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste); | menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste); | ||||
| @@ -322,20 +321,14 @@ const PopupMenu MainWindow::getMenuForIndex (int topLevelMenuIndex, | |||||
| // "View" menu | // "View" menu | ||||
| menu.addCommandItem (commandManager, CommandIDs::showProjectSettings); | menu.addCommandItem (commandManager, CommandIDs::showProjectSettings); | ||||
| menu.addSeparator(); | |||||
| //menu.addCommandItem (commandManager, CommandIDs::test); | |||||
| menu.addCommandItem (commandManager, CommandIDs::test); | |||||
| menu.addSeparator(); | menu.addSeparator(); | ||||
| menu.addCommandItem (commandManager, CommandIDs::showGrid); | menu.addCommandItem (commandManager, CommandIDs::showGrid); | ||||
| menu.addCommandItem (commandManager, CommandIDs::enableSnapToGrid); | menu.addCommandItem (commandManager, CommandIDs::enableSnapToGrid); | ||||
| /* const int currentSnapSize = getActiveDocument() != 0 ? getActiveDocument()->getSnappingGridSize() : 0; | |||||
| PopupMenu m; | |||||
| for (int i = 0; i < numElementsInArray (snapSizes); ++i) | |||||
| m.addItem (300 + i, String (snapSizes[i]) + " pixels", true, snapSizes[i] == currentSnapSize); | |||||
| menu.addSubMenu ("Grid size", m, getActiveDocument() != 0);*/ | |||||
| menu.addSeparator(); | menu.addSeparator(); | ||||
| menu.addCommandItem (commandManager, CommandIDs::zoomIn); | menu.addCommandItem (commandManager, CommandIDs::zoomIn); | ||||
| menu.addCommandItem (commandManager, CommandIDs::zoomOut); | menu.addCommandItem (commandManager, CommandIDs::zoomOut); | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -2,7 +2,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| This file is part of the JUCE library - "Jules' Utility Class Extensions" | This file is part of the JUCE library - "Jules' Utility Class Extensions" | ||||
| Copyright 2004-9 by Raw Material Software Ltd. | |||||
| Copyright 2004-10 by Raw Material Software Ltd. | |||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ||||
| @@ -69219,10 +69219,9 @@ void DragAndDropContainer::startDragging (const String& sourceDescription, | |||||
| else | else | ||||
| { | { | ||||
| if (imageOffsetFromMouse == 0) | if (imageOffsetFromMouse == 0) | ||||
| imageOffset = Point<int> (dragImage->getWidth() / -2, | |||||
| dragImage->getHeight() / -2); | |||||
| imageOffset = -dragImage->getBounds().getCentre(); | |||||
| else | else | ||||
| imageOffset = *imageOffsetFromMouse; | |||||
| imageOffset = -(dragImage->getBounds().getConstrainedPoint (-*imageOffsetFromMouse)); | |||||
| } | } | ||||
| dragImageComponent = new DragImageComponent (dragImage.release(), sourceDescription, sourceComponent, | dragImageComponent = new DragImageComponent (dragImage.release(), sourceDescription, sourceComponent, | ||||
| @@ -69448,12 +69447,12 @@ void* MouseCursor::getHandle() const throw() | |||||
| return cursorHandle->getHandle(); | return cursorHandle->getHandle(); | ||||
| } | } | ||||
| void MouseCursor::showWaitCursor() throw() | |||||
| void MouseCursor::showWaitCursor() | |||||
| { | { | ||||
| Desktop::getInstance().getMainMouseSource().showMouseCursor (MouseCursor::WaitCursor); | Desktop::getInstance().getMainMouseSource().showMouseCursor (MouseCursor::WaitCursor); | ||||
| } | } | ||||
| void MouseCursor::hideWaitCursor() throw() | |||||
| void MouseCursor::hideWaitCursor() | |||||
| { | { | ||||
| Desktop::getInstance().getMainMouseSource().revealCursor(); | Desktop::getInstance().getMainMouseSource().revealCursor(); | ||||
| } | } | ||||
| @@ -72624,7 +72623,7 @@ private: | |||||
| ScopedPointer <Image> colours; | ScopedPointer <Image> colours; | ||||
| void updateMarker() const throw() | |||||
| void updateMarker() const | |||||
| { | { | ||||
| marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), | marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), | ||||
| roundToInt ((getHeight() - edge * 2) * (1.0f - v)), | roundToInt ((getHeight() - edge * 2) * (1.0f - v)), | ||||
| @@ -74188,7 +74187,7 @@ void MidiKeyboardComponent::drawBlackNote (int /*midiNoteNumber*/, | |||||
| } | } | ||||
| } | } | ||||
| void MidiKeyboardComponent::setOctaveForMiddleC (const int octaveNumForMiddleC_) throw() | |||||
| void MidiKeyboardComponent::setOctaveForMiddleC (const int octaveNumForMiddleC_) | |||||
| { | { | ||||
| octaveNumForMiddleC = octaveNumForMiddleC_; | octaveNumForMiddleC = octaveNumForMiddleC_; | ||||
| repaint(); | repaint(); | ||||
| @@ -75672,8 +75671,7 @@ BEGIN_JUCE_NAMESPACE | |||||
| static VoidArray heavyweightPeers; | static VoidArray heavyweightPeers; | ||||
| ComponentPeer::ComponentPeer (Component* const component_, | |||||
| const int styleFlags_) throw() | |||||
| ComponentPeer::ComponentPeer (Component* const component_, const int styleFlags_) | |||||
| : component (component_), | : component (component_), | ||||
| styleFlags (styleFlags_), | styleFlags (styleFlags_), | ||||
| lastPaintTime (0), | lastPaintTime (0), | ||||
| @@ -76126,12 +76124,12 @@ void ComponentPeer::bringModalComponentToFront() | |||||
| Component::bringModalComponentToFront(); | Component::bringModalComponentToFront(); | ||||
| } | } | ||||
| void ComponentPeer::clearMaskedRegion() throw() | |||||
| void ComponentPeer::clearMaskedRegion() | |||||
| { | { | ||||
| maskedRegion.clear(); | maskedRegion.clear(); | ||||
| } | } | ||||
| void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) throw() | |||||
| void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) | |||||
| { | { | ||||
| maskedRegion.add (x, y, w, h); | maskedRegion.add (x, y, w, h); | ||||
| } | } | ||||
| @@ -77490,7 +77488,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| bool addWindow (TopLevelWindow* const w) throw() | |||||
| bool addWindow (TopLevelWindow* const w) | |||||
| { | { | ||||
| windows.add (w); | windows.add (w); | ||||
| startTimer (10); | startTimer (10); | ||||
| @@ -77498,7 +77496,7 @@ public: | |||||
| return isWindowActive (w); | return isWindowActive (w); | ||||
| } | } | ||||
| void removeWindow (TopLevelWindow* const w) throw() | |||||
| void removeWindow (TopLevelWindow* const w) | |||||
| { | { | ||||
| startTimer (10); | startTimer (10); | ||||
| @@ -77516,7 +77514,7 @@ public: | |||||
| private: | private: | ||||
| TopLevelWindow* currentActive; | TopLevelWindow* currentActive; | ||||
| bool isWindowActive (TopLevelWindow* const tlw) const throw() | |||||
| bool isWindowActive (TopLevelWindow* const tlw) const | |||||
| { | { | ||||
| return (tlw == currentActive | return (tlw == currentActive | ||||
| || tlw->isParentOf (currentActive) | || tlw->isParentOf (currentActive) | ||||
| @@ -77569,7 +77567,7 @@ void TopLevelWindow::focusOfChildComponentChanged (FocusChangeType) | |||||
| TopLevelWindowManager::getInstance()->startTimer (10); | TopLevelWindowManager::getInstance()->startTimer (10); | ||||
| } | } | ||||
| void TopLevelWindow::setWindowActive (const bool isNowActive) throw() | |||||
| void TopLevelWindow::setWindowActive (const bool isNowActive) | |||||
| { | { | ||||
| if (windowIsActive_ != isNowActive) | if (windowIsActive_ != isNowActive) | ||||
| { | { | ||||
| @@ -78273,7 +78271,7 @@ ColourGradient::ColourGradient (const Colour& colour1, | |||||
| const Colour& colour2, | const Colour& colour2, | ||||
| const float x2_, | const float x2_, | ||||
| const float y2_, | const float y2_, | ||||
| const bool isRadial_) throw() | |||||
| const bool isRadial_) | |||||
| : x1 (x1_), | : x1 (x1_), | ||||
| y1 (y1_), | y1 (y1_), | ||||
| x2 (x2_), | x2 (x2_), | ||||
| @@ -78287,17 +78285,17 @@ ColourGradient::ColourGradient (const Colour& colour1, | |||||
| colours.add (colour2.getARGB()); | colours.add (colour2.getARGB()); | ||||
| } | } | ||||
| ColourGradient::~ColourGradient() throw() | |||||
| ColourGradient::~ColourGradient() | |||||
| { | { | ||||
| } | } | ||||
| void ColourGradient::clearColours() throw() | |||||
| void ColourGradient::clearColours() | |||||
| { | { | ||||
| colours.clear(); | colours.clear(); | ||||
| } | } | ||||
| void ColourGradient::addColour (const double proportionAlongGradient, | void ColourGradient::addColour (const double proportionAlongGradient, | ||||
| const Colour& colour) throw() | |||||
| const Colour& colour) | |||||
| { | { | ||||
| // must be within the two end-points | // must be within the two end-points | ||||
| jassert (proportionAlongGradient >= 0 && proportionAlongGradient <= 1.0); | jassert (proportionAlongGradient >= 0 && proportionAlongGradient <= 1.0); | ||||
| @@ -78362,7 +78360,7 @@ const Colour ColourGradient::getColourAtPosition (const float position) const th | |||||
| return col1.interpolatedWith (col2, (integerPos - pos1) / (float) (pos2 - pos1)); | return col1.interpolatedWith (col2, (integerPos - pos1) / (float) (pos2 - pos1)); | ||||
| } | } | ||||
| int ColourGradient::createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& lookupTable) const throw() | |||||
| int ColourGradient::createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& lookupTable) const | |||||
| { | { | ||||
| #ifdef JUCE_DEBUG | #ifdef JUCE_DEBUG | ||||
| // trying to use the object without setting its co-ordinates? Have a careful read of | // trying to use the object without setting its co-ordinates? Have a careful read of | ||||
| @@ -79478,7 +79476,7 @@ FillType::FillType (const Colour& colour_) throw() | |||||
| { | { | ||||
| } | } | ||||
| FillType::FillType (const ColourGradient& gradient_) throw() | |||||
| FillType::FillType (const ColourGradient& gradient_) | |||||
| : colour (0xff000000), gradient (new ColourGradient (gradient_)), image (0) | : colour (0xff000000), gradient (new ColourGradient (gradient_)), image (0) | ||||
| { | { | ||||
| } | } | ||||
| @@ -79488,14 +79486,14 @@ FillType::FillType (const Image& image_, const AffineTransform& transform_) thro | |||||
| { | { | ||||
| } | } | ||||
| FillType::FillType (const FillType& other) throw() | |||||
| FillType::FillType (const FillType& other) | |||||
| : colour (other.colour), | : colour (other.colour), | ||||
| gradient (other.gradient != 0 ? new ColourGradient (*other.gradient) : 0), | gradient (other.gradient != 0 ? new ColourGradient (*other.gradient) : 0), | ||||
| image (other.image), transform (other.transform) | image (other.image), transform (other.transform) | ||||
| { | { | ||||
| } | } | ||||
| FillType& FillType::operator= (const FillType& other) throw() | |||||
| FillType& FillType::operator= (const FillType& other) | |||||
| { | { | ||||
| if (this != &other) | if (this != &other) | ||||
| { | { | ||||
| @@ -79519,7 +79517,7 @@ void FillType::setColour (const Colour& newColour) throw() | |||||
| colour = newColour; | colour = newColour; | ||||
| } | } | ||||
| void FillType::setGradient (const ColourGradient& newGradient) throw() | |||||
| void FillType::setGradient (const ColourGradient& newGradient) | |||||
| { | { | ||||
| if (gradient != 0) | if (gradient != 0) | ||||
| { | { | ||||
| @@ -82556,7 +82554,7 @@ Drawable* Drawable::createFromImageFile (const File& file) | |||||
| return fin != 0 ? createFromImageDataStream (*fin) : 0; | return fin != 0 ? createFromImageDataStream (*fin) : 0; | ||||
| } | } | ||||
| Drawable* Drawable::createFromValueTree (const ValueTree& tree) throw() | |||||
| Drawable* Drawable::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| Drawable* d = DrawablePath::createFromValueTree (tree); | Drawable* d = DrawablePath::createFromValueTree (tree); | ||||
| @@ -82728,7 +82726,7 @@ Drawable* DrawableComposite::createCopy() const | |||||
| return dc; | return dc; | ||||
| } | } | ||||
| ValueTree DrawableComposite::createValueTree() const throw() | |||||
| ValueTree DrawableComposite::createValueTree() const | |||||
| { | { | ||||
| ValueTree v ("Group"); | ValueTree v ("Group"); | ||||
| @@ -82758,7 +82756,7 @@ ValueTree DrawableComposite::createValueTree() const throw() | |||||
| return v; | return v; | ||||
| } | } | ||||
| DrawableComposite* DrawableComposite::createFromValueTree (const ValueTree& tree) throw() | |||||
| DrawableComposite* DrawableComposite::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| if (! tree.hasType ("Group")) | if (! tree.hasType ("Group")) | ||||
| return 0; | return 0; | ||||
| @@ -82913,7 +82911,7 @@ Drawable* DrawableImage::createCopy() const | |||||
| return di; | return di; | ||||
| } | } | ||||
| ValueTree DrawableImage::createValueTree() const throw() | |||||
| ValueTree DrawableImage::createValueTree() const | |||||
| { | { | ||||
| ValueTree v ("Image"); | ValueTree v ("Image"); | ||||
| @@ -82944,7 +82942,7 @@ ValueTree DrawableImage::createValueTree() const throw() | |||||
| return v; | return v; | ||||
| } | } | ||||
| DrawableImage* DrawableImage::createFromValueTree (const ValueTree& tree) throw() | |||||
| DrawableImage* DrawableImage::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| if (! tree.hasType ("Image")) | if (! tree.hasType ("Image")) | ||||
| return 0; | return 0; | ||||
| @@ -82986,29 +82984,29 @@ DrawablePath::~DrawablePath() | |||||
| { | { | ||||
| } | } | ||||
| void DrawablePath::setPath (const Path& newPath) throw() | |||||
| void DrawablePath::setPath (const Path& newPath) | |||||
| { | { | ||||
| path = newPath; | path = newPath; | ||||
| updateOutline(); | updateOutline(); | ||||
| } | } | ||||
| void DrawablePath::setFill (const FillType& newFill) throw() | |||||
| void DrawablePath::setFill (const FillType& newFill) | |||||
| { | { | ||||
| mainFill = newFill; | mainFill = newFill; | ||||
| } | } | ||||
| void DrawablePath::setStrokeFill (const FillType& newFill) throw() | |||||
| void DrawablePath::setStrokeFill (const FillType& newFill) | |||||
| { | { | ||||
| strokeFill = newFill; | strokeFill = newFill; | ||||
| } | } | ||||
| void DrawablePath::setStrokeType (const PathStrokeType& newStrokeType) throw() | |||||
| void DrawablePath::setStrokeType (const PathStrokeType& newStrokeType) | |||||
| { | { | ||||
| strokeType = newStrokeType; | strokeType = newStrokeType; | ||||
| updateOutline(); | updateOutline(); | ||||
| } | } | ||||
| void DrawablePath::setStrokeThickness (const float newThickness) throw() | |||||
| void DrawablePath::setStrokeThickness (const float newThickness) | |||||
| { | { | ||||
| setStrokeType (PathStrokeType (newThickness, strokeType.getJointStyle(), strokeType.getEndStyle())); | setStrokeType (PathStrokeType (newThickness, strokeType.getJointStyle(), strokeType.getEndStyle())); | ||||
| } | } | ||||
| @@ -83135,7 +83133,7 @@ static ValueTree createTreeForFillType (const String& tagName, const FillType& f | |||||
| return v; | return v; | ||||
| } | } | ||||
| ValueTree DrawablePath::createValueTree() const throw() | |||||
| ValueTree DrawablePath::createValueTree() const | |||||
| { | { | ||||
| ValueTree v ("Path"); | ValueTree v ("Path"); | ||||
| @@ -83155,7 +83153,7 @@ ValueTree DrawablePath::createValueTree() const throw() | |||||
| return v; | return v; | ||||
| } | } | ||||
| DrawablePath* DrawablePath::createFromValueTree (const ValueTree& tree) throw() | |||||
| DrawablePath* DrawablePath::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| if (! tree.hasType ("Path")) | if (! tree.hasType ("Path")) | ||||
| return 0; | return 0; | ||||
| @@ -83243,7 +83241,7 @@ Drawable* DrawableText::createCopy() const | |||||
| return dt; | return dt; | ||||
| } | } | ||||
| ValueTree DrawableText::createValueTree() const throw() | |||||
| ValueTree DrawableText::createValueTree() const | |||||
| { | { | ||||
| ValueTree v ("Text"); | ValueTree v ("Text"); | ||||
| @@ -83254,7 +83252,7 @@ ValueTree DrawableText::createValueTree() const throw() | |||||
| return v; | return v; | ||||
| } | } | ||||
| DrawableText* DrawableText::createFromValueTree (const ValueTree& tree) throw() | |||||
| DrawableText* DrawableText::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| if (! tree.hasType ("Text")) | if (! tree.hasType ("Text")) | ||||
| return 0; | return 0; | ||||
| @@ -89684,28 +89682,28 @@ RectangleList::RectangleList() throw() | |||||
| { | { | ||||
| } | } | ||||
| RectangleList::RectangleList (const Rectangle<int>& rect) throw() | |||||
| RectangleList::RectangleList (const Rectangle<int>& rect) | |||||
| { | { | ||||
| if (! rect.isEmpty()) | if (! rect.isEmpty()) | ||||
| rects.add (rect); | rects.add (rect); | ||||
| } | } | ||||
| RectangleList::RectangleList (const RectangleList& other) throw() | |||||
| RectangleList::RectangleList (const RectangleList& other) | |||||
| : rects (other.rects) | : rects (other.rects) | ||||
| { | { | ||||
| } | } | ||||
| RectangleList& RectangleList::operator= (const RectangleList& other) throw() | |||||
| RectangleList& RectangleList::operator= (const RectangleList& other) | |||||
| { | { | ||||
| rects = other.rects; | rects = other.rects; | ||||
| return *this; | return *this; | ||||
| } | } | ||||
| RectangleList::~RectangleList() throw() | |||||
| RectangleList::~RectangleList() | |||||
| { | { | ||||
| } | } | ||||
| void RectangleList::clear() throw() | |||||
| void RectangleList::clear() | |||||
| { | { | ||||
| rects.clearQuick(); | rects.clearQuick(); | ||||
| } | } | ||||
| @@ -89730,7 +89728,7 @@ RectangleList::Iterator::Iterator (const RectangleList& list) throw() | |||||
| { | { | ||||
| } | } | ||||
| RectangleList::Iterator::~Iterator() throw() | |||||
| RectangleList::Iterator::~Iterator() | |||||
| { | { | ||||
| } | } | ||||
| @@ -89745,7 +89743,7 @@ bool RectangleList::Iterator::next() throw() | |||||
| return false; | return false; | ||||
| } | } | ||||
| void RectangleList::add (const Rectangle<int>& rect) throw() | |||||
| void RectangleList::add (const Rectangle<int>& rect) | |||||
| { | { | ||||
| if (! rect.isEmpty()) | if (! rect.isEmpty()) | ||||
| { | { | ||||
| @@ -89799,12 +89797,12 @@ void RectangleList::add (const Rectangle<int>& rect) throw() | |||||
| } | } | ||||
| } | } | ||||
| void RectangleList::addWithoutMerging (const Rectangle<int>& rect) throw() | |||||
| void RectangleList::addWithoutMerging (const Rectangle<int>& rect) | |||||
| { | { | ||||
| rects.add (rect); | rects.add (rect); | ||||
| } | } | ||||
| void RectangleList::add (const int x, const int y, const int w, const int h) throw() | |||||
| void RectangleList::add (const int x, const int y, const int w, const int h) | |||||
| { | { | ||||
| if (rects.size() == 0) | if (rects.size() == 0) | ||||
| { | { | ||||
| @@ -89817,13 +89815,13 @@ void RectangleList::add (const int x, const int y, const int w, const int h) thr | |||||
| } | } | ||||
| } | } | ||||
| void RectangleList::add (const RectangleList& other) throw() | |||||
| void RectangleList::add (const RectangleList& other) | |||||
| { | { | ||||
| for (int i = 0; i < other.rects.size(); ++i) | for (int i = 0; i < other.rects.size(); ++i) | ||||
| add (other.rects.getReference (i)); | add (other.rects.getReference (i)); | ||||
| } | } | ||||
| void RectangleList::subtract (const Rectangle<int>& rect) throw() | |||||
| void RectangleList::subtract (const Rectangle<int>& rect) | |||||
| { | { | ||||
| const int originalNumRects = rects.size(); | const int originalNumRects = rects.size(); | ||||
| @@ -89909,13 +89907,13 @@ void RectangleList::subtract (const Rectangle<int>& rect) throw() | |||||
| } | } | ||||
| } | } | ||||
| void RectangleList::subtract (const RectangleList& otherList) throw() | |||||
| void RectangleList::subtract (const RectangleList& otherList) | |||||
| { | { | ||||
| for (int i = otherList.rects.size(); --i >= 0;) | for (int i = otherList.rects.size(); --i >= 0;) | ||||
| subtract (otherList.rects.getReference (i)); | subtract (otherList.rects.getReference (i)); | ||||
| } | } | ||||
| bool RectangleList::clipTo (const Rectangle<int>& rect) throw() | |||||
| bool RectangleList::clipTo (const Rectangle<int>& rect) | |||||
| { | { | ||||
| bool notEmpty = false; | bool notEmpty = false; | ||||
| @@ -89939,7 +89937,7 @@ bool RectangleList::clipTo (const Rectangle<int>& rect) throw() | |||||
| return notEmpty; | return notEmpty; | ||||
| } | } | ||||
| bool RectangleList::clipTo (const RectangleList& other) throw() | |||||
| bool RectangleList::clipTo (const RectangleList& other) | |||||
| { | { | ||||
| if (rects.size() == 0) | if (rects.size() == 0) | ||||
| return false; | return false; | ||||
| @@ -89964,7 +89962,7 @@ bool RectangleList::clipTo (const RectangleList& other) throw() | |||||
| return ! isEmpty(); | return ! isEmpty(); | ||||
| } | } | ||||
| bool RectangleList::getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const throw() | |||||
| bool RectangleList::getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const | |||||
| { | { | ||||
| destRegion.clear(); | destRegion.clear(); | ||||
| @@ -89987,7 +89985,7 @@ void RectangleList::swapWith (RectangleList& otherList) throw() | |||||
| rects.swapWithArray (otherList.rects); | rects.swapWithArray (otherList.rects); | ||||
| } | } | ||||
| void RectangleList::consolidate() throw() | |||||
| void RectangleList::consolidate() | |||||
| { | { | ||||
| int i; | int i; | ||||
| for (i = 0; i < getNumRectangles() - 1; ++i) | for (i = 0; i < getNumRectangles() - 1; ++i) | ||||
| @@ -90068,7 +90066,7 @@ bool RectangleList::containsPoint (const int x, const int y) const throw() | |||||
| return false; | return false; | ||||
| } | } | ||||
| bool RectangleList::containsRectangle (const Rectangle<int>& rectangleToCheck) const throw() | |||||
| bool RectangleList::containsRectangle (const Rectangle<int>& rectangleToCheck) const | |||||
| { | { | ||||
| if (rects.size() > 1) | if (rects.size() > 1) | ||||
| { | { | ||||
| @@ -90151,7 +90149,7 @@ void RectangleList::offsetAll (const int dx, const int dy) throw() | |||||
| } | } | ||||
| } | } | ||||
| const Path RectangleList::toPath() const throw() | |||||
| const Path RectangleList::toPath() const | |||||
| { | { | ||||
| Path p; | Path p; | ||||
| @@ -216071,13 +216069,13 @@ class FontDCHolder : private DeletedAtShutdown | |||||
| { | { | ||||
| public: | public: | ||||
| FontDCHolder() throw() | |||||
| FontDCHolder() | |||||
| : dc (0), numKPs (0), size (0), | : dc (0), numKPs (0), size (0), | ||||
| bold (false), italic (false) | bold (false), italic (false) | ||||
| { | { | ||||
| } | } | ||||
| ~FontDCHolder() throw() | |||||
| ~FontDCHolder() | |||||
| { | { | ||||
| if (dc != 0) | if (dc != 0) | ||||
| { | { | ||||
| @@ -216090,7 +216088,7 @@ public: | |||||
| juce_DeclareSingleton_SingleThreaded_Minimal (FontDCHolder); | juce_DeclareSingleton_SingleThreaded_Minimal (FontDCHolder); | ||||
| HDC loadFont (const String& fontName_, const bool bold_, const bool italic_, const int size_) throw() | |||||
| HDC loadFont (const String& fontName_, const bool bold_, const bool italic_, const int size_) | |||||
| { | { | ||||
| if (fontName != fontName_ || bold != bold_ || italic != italic_ || size != size_) | if (fontName != fontName_ || bold != bold_ || italic != italic_ || size != size_) | ||||
| { | { | ||||
| @@ -216160,7 +216158,7 @@ public: | |||||
| return dc; | return dc; | ||||
| } | } | ||||
| KERNINGPAIR* getKerningPairs (int& numKPs_) throw() | |||||
| KERNINGPAIR* getKerningPairs (int& numKPs_) | |||||
| { | { | ||||
| if (kps == 0) | if (kps == 0) | ||||
| { | { | ||||
| @@ -220848,7 +220846,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void handle (const uint32 message, const uint32 timeStamp) throw() | |||||
| void handle (const uint32 message, const uint32 timeStamp) | |||||
| { | { | ||||
| const int byte = message & 0xff; | const int byte = message & 0xff; | ||||
| if (byte < 0x80) | if (byte < 0x80) | ||||
| @@ -220877,7 +220875,7 @@ public: | |||||
| notify(); | notify(); | ||||
| } | } | ||||
| void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp) throw() | |||||
| void handleSysEx (MIDIHDR* const hdr, const uint32 timeStamp) | |||||
| { | { | ||||
| const int num = hdr->dwBytesRecorded; | const int num = hdr->dwBytesRecorded; | ||||
| @@ -220906,7 +220904,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void writeBlock (const int i) throw() | |||||
| void writeBlock (const int i) | |||||
| { | { | ||||
| hdr[i].dwBytesRecorded = 0; | hdr[i].dwBytesRecorded = 0; | ||||
| MMRESULT res = midiInPrepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); | MMRESULT res = midiInPrepareHeader (hIn, &hdr[i], sizeof (MIDIHDR)); | ||||
| @@ -220973,7 +220971,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void start() throw() | |||||
| void start() | |||||
| { | { | ||||
| jassert (hIn != 0); | jassert (hIn != 0); | ||||
| if (hIn != 0 && ! isStarted) | if (hIn != 0 && ! isStarted) | ||||
| @@ -221000,7 +220998,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void stop() throw() | |||||
| void stop() | |||||
| { | { | ||||
| if (isStarted) | if (isStarted) | ||||
| { | { | ||||
| @@ -221062,7 +221060,7 @@ private: | |||||
| int pendingLength; | int pendingLength; | ||||
| char pending [MidiConstants::midiBufferSize]; | char pending [MidiConstants::midiBufferSize]; | ||||
| double timeStampToTime (uint32 timeStamp) throw() | |||||
| double timeStampToTime (uint32 timeStamp) | |||||
| { | { | ||||
| timeStamp += startTime; | timeStamp += startTime; | ||||
| @@ -222560,7 +222558,7 @@ private: | |||||
| return error; | return error; | ||||
| } | } | ||||
| void callback (const long index) throw() | |||||
| void callback (const long index) | |||||
| { | { | ||||
| if (isStarted) | if (isStarted) | ||||
| { | { | ||||
| @@ -222576,7 +222574,7 @@ private: | |||||
| calledback = true; | calledback = true; | ||||
| } | } | ||||
| void processBuffer() throw() | |||||
| void processBuffer() | |||||
| { | { | ||||
| const ASIOBufferInfo* const infos = bufferInfos; | const ASIOBufferInfo* const infos = bufferInfos; | ||||
| const int bi = bufferIndex; | const int bi = bufferIndex; | ||||
| @@ -222705,7 +222703,7 @@ private: | |||||
| asioObject->outputReady(); | asioObject->outputReady(); | ||||
| } | } | ||||
| static ASIOTime* bufferSwitchTimeInfoCallback0 (ASIOTime*, long index, long) throw() | |||||
| static ASIOTime* bufferSwitchTimeInfoCallback0 (ASIOTime*, long index, long) | |||||
| { | { | ||||
| if (currentASIODev[0] != 0) | if (currentASIODev[0] != 0) | ||||
| currentASIODev[0]->callback (index); | currentASIODev[0]->callback (index); | ||||
| @@ -222713,7 +222711,7 @@ private: | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static ASIOTime* bufferSwitchTimeInfoCallback1 (ASIOTime*, long index, long) throw() | |||||
| static ASIOTime* bufferSwitchTimeInfoCallback1 (ASIOTime*, long index, long) | |||||
| { | { | ||||
| if (currentASIODev[1] != 0) | if (currentASIODev[1] != 0) | ||||
| currentASIODev[1]->callback (index); | currentASIODev[1]->callback (index); | ||||
| @@ -222721,7 +222719,7 @@ private: | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static ASIOTime* bufferSwitchTimeInfoCallback2 (ASIOTime*, long index, long) throw() | |||||
| static ASIOTime* bufferSwitchTimeInfoCallback2 (ASIOTime*, long index, long) | |||||
| { | { | ||||
| if (currentASIODev[2] != 0) | if (currentASIODev[2] != 0) | ||||
| currentASIODev[2]->callback (index); | currentASIODev[2]->callback (index); | ||||
| @@ -222729,40 +222727,40 @@ private: | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static void bufferSwitchCallback0 (long index, long) throw() | |||||
| static void bufferSwitchCallback0 (long index, long) | |||||
| { | { | ||||
| if (currentASIODev[0] != 0) | if (currentASIODev[0] != 0) | ||||
| currentASIODev[0]->callback (index); | currentASIODev[0]->callback (index); | ||||
| } | } | ||||
| static void bufferSwitchCallback1 (long index, long) throw() | |||||
| static void bufferSwitchCallback1 (long index, long) | |||||
| { | { | ||||
| if (currentASIODev[1] != 0) | if (currentASIODev[1] != 0) | ||||
| currentASIODev[1]->callback (index); | currentASIODev[1]->callback (index); | ||||
| } | } | ||||
| static void bufferSwitchCallback2 (long index, long) throw() | |||||
| static void bufferSwitchCallback2 (long index, long) | |||||
| { | { | ||||
| if (currentASIODev[2] != 0) | if (currentASIODev[2] != 0) | ||||
| currentASIODev[2]->callback (index); | currentASIODev[2]->callback (index); | ||||
| } | } | ||||
| static long asioMessagesCallback0 (long selector, long value, void*, double*) throw() | |||||
| static long asioMessagesCallback0 (long selector, long value, void*, double*) | |||||
| { | { | ||||
| return asioMessagesCallback (selector, value, 0); | return asioMessagesCallback (selector, value, 0); | ||||
| } | } | ||||
| static long asioMessagesCallback1 (long selector, long value, void*, double*) throw() | |||||
| static long asioMessagesCallback1 (long selector, long value, void*, double*) | |||||
| { | { | ||||
| return asioMessagesCallback (selector, value, 1); | return asioMessagesCallback (selector, value, 1); | ||||
| } | } | ||||
| static long asioMessagesCallback2 (long selector, long value, void*, double*) throw() | |||||
| static long asioMessagesCallback2 (long selector, long value, void*, double*) | |||||
| { | { | ||||
| return asioMessagesCallback (selector, value, 2); | return asioMessagesCallback (selector, value, 2); | ||||
| } | } | ||||
| static long asioMessagesCallback (long selector, long value, const int deviceIndex) throw() | |||||
| static long asioMessagesCallback (long selector, long value, const int deviceIndex) | |||||
| { | { | ||||
| switch (selector) | switch (selector) | ||||
| { | { | ||||
| @@ -238168,7 +238166,7 @@ class ScreenSaverDefeater : public Timer, | |||||
| public DeletedAtShutdown | public DeletedAtShutdown | ||||
| { | { | ||||
| public: | public: | ||||
| ScreenSaverDefeater() throw() | |||||
| ScreenSaverDefeater() | |||||
| { | { | ||||
| startTimer (10000); | startTimer (10000); | ||||
| timerCallback(); | timerCallback(); | ||||
| @@ -9367,9 +9367,9 @@ public: | |||||
| bool operator!= (const MouseCursor& other) const throw(); | bool operator!= (const MouseCursor& other) const throw(); | ||||
| static void showWaitCursor() throw(); | |||||
| static void showWaitCursor(); | |||||
| static void hideWaitCursor() throw(); | |||||
| static void hideWaitCursor(); | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -11974,16 +11974,16 @@ public: | |||||
| ColourGradient (const Colour& colour1, float x1, float y1, | ColourGradient (const Colour& colour1, float x1, float y1, | ||||
| const Colour& colour2, float x2, float y2, | const Colour& colour2, float x2, float y2, | ||||
| bool isRadial) throw(); | |||||
| bool isRadial); | |||||
| ColourGradient() throw(); | ColourGradient() throw(); | ||||
| ~ColourGradient() throw(); | |||||
| ~ColourGradient(); | |||||
| void clearColours() throw(); | |||||
| void clearColours(); | |||||
| void addColour (double proportionAlongGradient, | void addColour (double proportionAlongGradient, | ||||
| const Colour& colour) throw(); | |||||
| const Colour& colour); | |||||
| void multiplyOpacity (float multiplier) throw(); | void multiplyOpacity (float multiplier) throw(); | ||||
| @@ -11995,7 +11995,7 @@ public: | |||||
| const Colour getColourAtPosition (float position) const throw(); | const Colour getColourAtPosition (float position) const throw(); | ||||
| int createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& resultLookupTable) const throw(); | |||||
| int createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& resultLookupTable) const; | |||||
| bool isOpaque() const throw(); | bool isOpaque() const throw(); | ||||
| @@ -12027,13 +12027,13 @@ public: | |||||
| FillType (const Colour& colour) throw(); | FillType (const Colour& colour) throw(); | ||||
| FillType (const ColourGradient& gradient) throw(); | |||||
| FillType (const ColourGradient& gradient); | |||||
| FillType (const Image& image, const AffineTransform& transform) throw(); | FillType (const Image& image, const AffineTransform& transform) throw(); | ||||
| FillType (const FillType& other) throw(); | |||||
| FillType (const FillType& other); | |||||
| FillType& operator= (const FillType& other) throw(); | |||||
| FillType& operator= (const FillType& other); | |||||
| ~FillType() throw(); | ~FillType() throw(); | ||||
| @@ -12045,7 +12045,7 @@ public: | |||||
| void setColour (const Colour& newColour) throw(); | void setColour (const Colour& newColour) throw(); | ||||
| void setGradient (const ColourGradient& newGradient) throw(); | |||||
| void setGradient (const ColourGradient& newGradient); | |||||
| void setTiledImage (const Image& image, const AffineTransform& transform) throw(); | void setTiledImage (const Image& image, const AffineTransform& transform) throw(); | ||||
| @@ -12369,13 +12369,13 @@ public: | |||||
| RectangleList() throw(); | RectangleList() throw(); | ||||
| RectangleList (const RectangleList& other) throw(); | |||||
| RectangleList (const RectangleList& other); | |||||
| RectangleList (const Rectangle<int>& rect) throw(); | |||||
| RectangleList (const Rectangle<int>& rect); | |||||
| RectangleList& operator= (const RectangleList& other) throw(); | |||||
| RectangleList& operator= (const RectangleList& other); | |||||
| ~RectangleList() throw(); | |||||
| ~RectangleList(); | |||||
| bool isEmpty() const throw(); | bool isEmpty() const throw(); | ||||
| @@ -12383,31 +12383,31 @@ public: | |||||
| const Rectangle<int> getRectangle (const int index) const throw(); | const Rectangle<int> getRectangle (const int index) const throw(); | ||||
| void clear() throw(); | |||||
| void clear(); | |||||
| void add (int x, int y, int width, int height) throw(); | |||||
| void add (int x, int y, int width, int height); | |||||
| void add (const Rectangle<int>& rect) throw(); | |||||
| void add (const Rectangle<int>& rect); | |||||
| void addWithoutMerging (const Rectangle<int>& rect) throw(); | |||||
| void addWithoutMerging (const Rectangle<int>& rect); | |||||
| void add (const RectangleList& other) throw(); | |||||
| void add (const RectangleList& other); | |||||
| void subtract (const Rectangle<int>& rect) throw(); | |||||
| void subtract (const Rectangle<int>& rect); | |||||
| void subtract (const RectangleList& otherList) throw(); | |||||
| void subtract (const RectangleList& otherList); | |||||
| bool clipTo (const Rectangle<int>& rect) throw(); | |||||
| bool clipTo (const Rectangle<int>& rect); | |||||
| bool clipTo (const RectangleList& other) throw(); | |||||
| bool clipTo (const RectangleList& other); | |||||
| bool getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const throw(); | |||||
| bool getIntersectionWith (const Rectangle<int>& rect, RectangleList& destRegion) const; | |||||
| void swapWith (RectangleList& otherList) throw(); | void swapWith (RectangleList& otherList) throw(); | ||||
| bool containsPoint (int x, int y) const throw(); | bool containsPoint (int x, int y) const throw(); | ||||
| bool containsRectangle (const Rectangle<int>& rectangleToCheck) const throw(); | |||||
| bool containsRectangle (const Rectangle<int>& rectangleToCheck) const; | |||||
| bool intersectsRectangle (const Rectangle<int>& rectangleToCheck) const throw(); | bool intersectsRectangle (const Rectangle<int>& rectangleToCheck) const throw(); | ||||
| @@ -12415,18 +12415,18 @@ public: | |||||
| const Rectangle<int> getBounds() const throw(); | const Rectangle<int> getBounds() const throw(); | ||||
| void consolidate() throw(); | |||||
| void consolidate(); | |||||
| void offsetAll (int dx, int dy) throw(); | void offsetAll (int dx, int dy) throw(); | ||||
| const Path toPath() const throw(); | |||||
| const Path toPath() const; | |||||
| class Iterator | class Iterator | ||||
| { | { | ||||
| public: | public: | ||||
| Iterator (const RectangleList& list) throw(); | Iterator (const RectangleList& list) throw(); | ||||
| ~Iterator() throw(); | |||||
| ~Iterator(); | |||||
| bool next() throw(); | bool next() throw(); | ||||
| @@ -20197,9 +20197,9 @@ public: | |||||
| static Drawable* createFromSVG (const XmlElement& svgDocument); | static Drawable* createFromSVG (const XmlElement& svgDocument); | ||||
| static Drawable* createFromValueTree (const ValueTree& tree) throw(); | |||||
| static Drawable* createFromValueTree (const ValueTree& tree); | |||||
| virtual ValueTree createValueTree() const throw() = 0; | |||||
| virtual ValueTree createValueTree() const = 0; | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -22947,7 +22947,7 @@ private: | |||||
| bool useDropShadow, useNativeTitleBar, windowIsActive_; | bool useDropShadow, useNativeTitleBar, windowIsActive_; | ||||
| ScopedPointer <DropShadower> shadower; | ScopedPointer <DropShadower> shadower; | ||||
| void setWindowActive (bool isNowActive) throw(); | |||||
| void setWindowActive (bool isNowActive); | |||||
| TopLevelWindow (const TopLevelWindow&); | TopLevelWindow (const TopLevelWindow&); | ||||
| TopLevelWindow& operator= (const TopLevelWindow&); | TopLevelWindow& operator= (const TopLevelWindow&); | ||||
| @@ -26812,7 +26812,7 @@ public: | |||||
| void setKeyPressBaseOctave (int newOctaveNumber); | void setKeyPressBaseOctave (int newOctaveNumber); | ||||
| void setOctaveForMiddleC (int octaveNumForMiddleC) throw(); | |||||
| void setOctaveForMiddleC (int octaveNumForMiddleC); | |||||
| int getOctaveForMiddleC() const throw() { return octaveNumForMiddleC; } | int getOctaveForMiddleC() const throw() { return octaveNumForMiddleC; } | ||||
| @@ -27405,8 +27405,7 @@ public: | |||||
| }; | }; | ||||
| ComponentPeer (Component* component, | |||||
| int styleFlags) throw(); | |||||
| ComponentPeer (Component* component, int styleFlags); | |||||
| virtual ~ComponentPeer(); | virtual ~ComponentPeer(); | ||||
| @@ -27503,9 +27502,9 @@ public: | |||||
| void handleFileDragExit (const StringArray& files); | void handleFileDragExit (const StringArray& files); | ||||
| void handleFileDragDrop (const StringArray& files, const Point<int>& position); | void handleFileDragDrop (const StringArray& files, const Point<int>& position); | ||||
| void clearMaskedRegion() throw(); | |||||
| void clearMaskedRegion(); | |||||
| void addMaskedRegion (int x, int y, int w, int h) throw(); | |||||
| void addMaskedRegion (int x, int y, int w, int h); | |||||
| static int getNumPeers() throw(); | static int getNumPeers() throw(); | ||||
| @@ -27985,8 +27984,8 @@ public: | |||||
| const Rectangle<float> getBounds() const; | const Rectangle<float> getBounds() const; | ||||
| bool hitTest (float x, float y) const; | bool hitTest (float x, float y) const; | ||||
| Drawable* createCopy() const; | Drawable* createCopy() const; | ||||
| ValueTree createValueTree() const throw(); | |||||
| static DrawableComposite* createFromValueTree (const ValueTree& tree) throw(); | |||||
| ValueTree createValueTree() const; | |||||
| static DrawableComposite* createFromValueTree (const ValueTree& tree); | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -28038,8 +28037,8 @@ public: | |||||
| const Rectangle<float> getBounds() const; | const Rectangle<float> getBounds() const; | ||||
| bool hitTest (float x, float y) const; | bool hitTest (float x, float y) const; | ||||
| Drawable* createCopy() const; | Drawable* createCopy() const; | ||||
| ValueTree createValueTree() const throw(); | |||||
| static DrawableImage* createFromValueTree (const ValueTree& tree) throw(); | |||||
| ValueTree createValueTree() const; | |||||
| static DrawableImage* createFromValueTree (const ValueTree& tree); | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -28072,21 +28071,21 @@ public: | |||||
| virtual ~DrawablePath(); | virtual ~DrawablePath(); | ||||
| void setPath (const Path& newPath) throw(); | |||||
| void setPath (const Path& newPath); | |||||
| const Path& getPath() const throw() { return path; } | const Path& getPath() const throw() { return path; } | ||||
| void setFill (const FillType& newFill) throw(); | |||||
| void setFill (const FillType& newFill); | |||||
| const FillType& getFill() const throw() { return mainFill; } | const FillType& getFill() const throw() { return mainFill; } | ||||
| void setStrokeFill (const FillType& newStrokeFill) throw(); | |||||
| void setStrokeFill (const FillType& newStrokeFill); | |||||
| const FillType& getStrokeFill() const throw() { return strokeFill; } | const FillType& getStrokeFill() const throw() { return strokeFill; } | ||||
| void setStrokeType (const PathStrokeType& newStrokeType) throw(); | |||||
| void setStrokeType (const PathStrokeType& newStrokeType); | |||||
| void setStrokeThickness (float newThickness) throw(); | |||||
| void setStrokeThickness (float newThickness); | |||||
| const PathStrokeType& getStrokeType() const throw() { return strokeType; } | const PathStrokeType& getStrokeType() const throw() { return strokeType; } | ||||
| @@ -28094,8 +28093,8 @@ public: | |||||
| const Rectangle<float> getBounds() const; | const Rectangle<float> getBounds() const; | ||||
| bool hitTest (float x, float y) const; | bool hitTest (float x, float y) const; | ||||
| Drawable* createCopy() const; | Drawable* createCopy() const; | ||||
| ValueTree createValueTree() const throw(); | |||||
| static DrawablePath* createFromValueTree (const ValueTree& tree) throw(); | |||||
| ValueTree createValueTree() const; | |||||
| static DrawablePath* createFromValueTree (const ValueTree& tree); | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -28143,8 +28142,8 @@ public: | |||||
| const Rectangle<float> getBounds() const; | const Rectangle<float> getBounds() const; | ||||
| bool hitTest (float x, float y) const; | bool hitTest (float x, float y) const; | ||||
| Drawable* createCopy() const; | Drawable* createCopy() const; | ||||
| ValueTree createValueTree() const throw(); | |||||
| static DrawableText* createFromValueTree (const ValueTree& tree) throw(); | |||||
| ValueTree createValueTree() const; | |||||
| static DrawableText* createFromValueTree (const ValueTree& tree); | |||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -386,10 +386,9 @@ void DragAndDropContainer::startDragging (const String& sourceDescription, | |||||
| else | else | ||||
| { | { | ||||
| if (imageOffsetFromMouse == 0) | if (imageOffsetFromMouse == 0) | ||||
| imageOffset = Point<int> (dragImage->getWidth() / -2, | |||||
| dragImage->getHeight() / -2); | |||||
| imageOffset = -dragImage->getBounds().getCentre(); | |||||
| else | else | ||||
| imageOffset = *imageOffsetFromMouse; | |||||
| imageOffset = -(dragImage->getBounds().getConstrainedPoint (-*imageOffsetFromMouse)); | |||||
| } | } | ||||
| dragImageComponent = new DragImageComponent (dragImage.release(), sourceDescription, sourceComponent, | dragImageComponent = new DragImageComponent (dragImage.release(), sourceDescription, sourceComponent, | ||||
| @@ -178,12 +178,12 @@ void* MouseCursor::getHandle() const throw() | |||||
| return cursorHandle->getHandle(); | return cursorHandle->getHandle(); | ||||
| } | } | ||||
| void MouseCursor::showWaitCursor() throw() | |||||
| void MouseCursor::showWaitCursor() | |||||
| { | { | ||||
| Desktop::getInstance().getMainMouseSource().showMouseCursor (MouseCursor::WaitCursor); | Desktop::getInstance().getMainMouseSource().showMouseCursor (MouseCursor::WaitCursor); | ||||
| } | } | ||||
| void MouseCursor::hideWaitCursor() throw() | |||||
| void MouseCursor::hideWaitCursor() | |||||
| { | { | ||||
| Desktop::getInstance().getMainMouseSource().revealCursor(); | Desktop::getInstance().getMainMouseSource().revealCursor(); | ||||
| } | } | ||||
| @@ -127,7 +127,7 @@ public: | |||||
| @see MessageManager::setTimeBeforeShowingWaitCursor | @see MessageManager::setTimeBeforeShowingWaitCursor | ||||
| */ | */ | ||||
| static void showWaitCursor() throw(); | |||||
| static void showWaitCursor(); | |||||
| /** If showWaitCursor has been called, this will return the mouse to its | /** If showWaitCursor has been called, this will return the mouse to its | ||||
| normal state. | normal state. | ||||
| @@ -137,7 +137,7 @@ public: | |||||
| @see showWaitCursor | @see showWaitCursor | ||||
| */ | */ | ||||
| static void hideWaitCursor() throw(); | |||||
| static void hideWaitCursor(); | |||||
| //============================================================================== | //============================================================================== | ||||
| @@ -184,7 +184,7 @@ private: | |||||
| ScopedPointer <Image> colours; | ScopedPointer <Image> colours; | ||||
| void updateMarker() const throw() | |||||
| void updateMarker() const | |||||
| { | { | ||||
| marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), | marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), | ||||
| roundToInt ((getHeight() - edge * 2) * (1.0f - v)), | roundToInt ((getHeight() - edge * 2) * (1.0f - v)), | ||||
| @@ -536,7 +536,7 @@ void MidiKeyboardComponent::drawBlackNote (int /*midiNoteNumber*/, | |||||
| } | } | ||||
| } | } | ||||
| void MidiKeyboardComponent::setOctaveForMiddleC (const int octaveNumForMiddleC_) throw() | |||||
| void MidiKeyboardComponent::setOctaveForMiddleC (const int octaveNumForMiddleC_) | |||||
| { | { | ||||
| octaveNumForMiddleC = octaveNumForMiddleC_; | octaveNumForMiddleC = octaveNumForMiddleC_; | ||||
| repaint(); | repaint(); | ||||
| @@ -263,7 +263,7 @@ public: | |||||
| @see getOctaveForMiddleC | @see getOctaveForMiddleC | ||||
| */ | */ | ||||
| void setOctaveForMiddleC (int octaveNumForMiddleC) throw(); | |||||
| void setOctaveForMiddleC (int octaveNumForMiddleC); | |||||
| /** This returns the value set by setOctaveForMiddleC(). | /** This returns the value set by setOctaveForMiddleC(). | ||||
| @see setOctaveForMiddleC | @see setOctaveForMiddleC | ||||
| @@ -45,8 +45,7 @@ static VoidArray heavyweightPeers; | |||||
| //============================================================================== | //============================================================================== | ||||
| ComponentPeer::ComponentPeer (Component* const component_, | |||||
| const int styleFlags_) throw() | |||||
| ComponentPeer::ComponentPeer (Component* const component_, const int styleFlags_) | |||||
| : component (component_), | : component (component_), | ||||
| styleFlags (styleFlags_), | styleFlags (styleFlags_), | ||||
| lastPaintTime (0), | lastPaintTime (0), | ||||
| @@ -507,12 +506,12 @@ void ComponentPeer::bringModalComponentToFront() | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void ComponentPeer::clearMaskedRegion() throw() | |||||
| void ComponentPeer::clearMaskedRegion() | |||||
| { | { | ||||
| maskedRegion.clear(); | maskedRegion.clear(); | ||||
| } | } | ||||
| void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) throw() | |||||
| void ComponentPeer::addMaskedRegion (int x, int y, int w, int h) | |||||
| { | { | ||||
| maskedRegion.add (x, y, w, h); | maskedRegion.add (x, y, w, h); | ||||
| } | } | ||||
| @@ -87,8 +87,7 @@ public: | |||||
| The component is the one that we intend to represent, and the style flags are | The component is the one that we intend to represent, and the style flags are | ||||
| a combination of the values in the StyleFlags enum | a combination of the values in the StyleFlags enum | ||||
| */ | */ | ||||
| ComponentPeer (Component* component, | |||||
| int styleFlags) throw(); | |||||
| ComponentPeer (Component* component, int styleFlags); | |||||
| /** Destructor. */ | /** Destructor. */ | ||||
| virtual ~ComponentPeer(); | virtual ~ComponentPeer(); | ||||
| @@ -310,7 +309,7 @@ public: | |||||
| @see addMaskedRegion | @see addMaskedRegion | ||||
| */ | */ | ||||
| void clearMaskedRegion() throw(); | |||||
| void clearMaskedRegion(); | |||||
| /** Adds a rectangle to the set of areas not to paint over. | /** Adds a rectangle to the set of areas not to paint over. | ||||
| @@ -321,7 +320,7 @@ public: | |||||
| The masked region is cleared each time before a paint happens, so a component | The masked region is cleared each time before a paint happens, so a component | ||||
| will have to make sure it calls this every time it's painted. | will have to make sure it calls this every time it's painted. | ||||
| */ | */ | ||||
| void addMaskedRegion (int x, int y, int w, int h) throw(); | |||||
| void addMaskedRegion (int x, int y, int w, int h); | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns the number of currently-active peers. | /** Returns the number of currently-active peers. | ||||
| @@ -95,7 +95,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| bool addWindow (TopLevelWindow* const w) throw() | |||||
| bool addWindow (TopLevelWindow* const w) | |||||
| { | { | ||||
| windows.add (w); | windows.add (w); | ||||
| startTimer (10); | startTimer (10); | ||||
| @@ -103,7 +103,7 @@ public: | |||||
| return isWindowActive (w); | return isWindowActive (w); | ||||
| } | } | ||||
| void removeWindow (TopLevelWindow* const w) throw() | |||||
| void removeWindow (TopLevelWindow* const w) | |||||
| { | { | ||||
| startTimer (10); | startTimer (10); | ||||
| @@ -121,7 +121,7 @@ public: | |||||
| private: | private: | ||||
| TopLevelWindow* currentActive; | TopLevelWindow* currentActive; | ||||
| bool isWindowActive (TopLevelWindow* const tlw) const throw() | |||||
| bool isWindowActive (TopLevelWindow* const tlw) const | |||||
| { | { | ||||
| return (tlw == currentActive | return (tlw == currentActive | ||||
| || tlw->isParentOf (currentActive) | || tlw->isParentOf (currentActive) | ||||
| @@ -176,7 +176,7 @@ void TopLevelWindow::focusOfChildComponentChanged (FocusChangeType) | |||||
| TopLevelWindowManager::getInstance()->startTimer (10); | TopLevelWindowManager::getInstance()->startTimer (10); | ||||
| } | } | ||||
| void TopLevelWindow::setWindowActive (const bool isNowActive) throw() | |||||
| void TopLevelWindow::setWindowActive (const bool isNowActive) | |||||
| { | { | ||||
| if (windowIsActive_ != isNowActive) | if (windowIsActive_ != isNowActive) | ||||
| { | { | ||||
| @@ -161,7 +161,7 @@ private: | |||||
| bool useDropShadow, useNativeTitleBar, windowIsActive_; | bool useDropShadow, useNativeTitleBar, windowIsActive_; | ||||
| ScopedPointer <DropShadower> shadower; | ScopedPointer <DropShadower> shadower; | ||||
| void setWindowActive (bool isNowActive) throw(); | |||||
| void setWindowActive (bool isNowActive); | |||||
| TopLevelWindow (const TopLevelWindow&); | TopLevelWindow (const TopLevelWindow&); | ||||
| TopLevelWindow& operator= (const TopLevelWindow&); | TopLevelWindow& operator= (const TopLevelWindow&); | ||||
| @@ -44,7 +44,7 @@ ColourGradient::ColourGradient (const Colour& colour1, | |||||
| const Colour& colour2, | const Colour& colour2, | ||||
| const float x2_, | const float x2_, | ||||
| const float y2_, | const float y2_, | ||||
| const bool isRadial_) throw() | |||||
| const bool isRadial_) | |||||
| : x1 (x1_), | : x1 (x1_), | ||||
| y1 (y1_), | y1 (y1_), | ||||
| x2 (x2_), | x2 (x2_), | ||||
| @@ -58,18 +58,18 @@ ColourGradient::ColourGradient (const Colour& colour1, | |||||
| colours.add (colour2.getARGB()); | colours.add (colour2.getARGB()); | ||||
| } | } | ||||
| ColourGradient::~ColourGradient() throw() | |||||
| ColourGradient::~ColourGradient() | |||||
| { | { | ||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| void ColourGradient::clearColours() throw() | |||||
| void ColourGradient::clearColours() | |||||
| { | { | ||||
| colours.clear(); | colours.clear(); | ||||
| } | } | ||||
| void ColourGradient::addColour (const double proportionAlongGradient, | void ColourGradient::addColour (const double proportionAlongGradient, | ||||
| const Colour& colour) throw() | |||||
| const Colour& colour) | |||||
| { | { | ||||
| // must be within the two end-points | // must be within the two end-points | ||||
| jassert (proportionAlongGradient >= 0 && proportionAlongGradient <= 1.0); | jassert (proportionAlongGradient >= 0 && proportionAlongGradient <= 1.0); | ||||
| @@ -136,7 +136,7 @@ const Colour ColourGradient::getColourAtPosition (const float position) const th | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| int ColourGradient::createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& lookupTable) const throw() | |||||
| int ColourGradient::createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& lookupTable) const | |||||
| { | { | ||||
| #ifdef JUCE_DEBUG | #ifdef JUCE_DEBUG | ||||
| // trying to use the object without setting its co-ordinates? Have a careful read of | // trying to use the object without setting its co-ordinates? Have a careful read of | ||||
| @@ -61,7 +61,7 @@ public: | |||||
| */ | */ | ||||
| ColourGradient (const Colour& colour1, float x1, float y1, | ColourGradient (const Colour& colour1, float x1, float y1, | ||||
| const Colour& colour2, float x2, float y2, | const Colour& colour2, float x2, float y2, | ||||
| bool isRadial) throw(); | |||||
| bool isRadial); | |||||
| /** Creates an uninitialised gradient. | /** Creates an uninitialised gradient. | ||||
| @@ -71,7 +71,7 @@ public: | |||||
| ColourGradient() throw(); | ColourGradient() throw(); | ||||
| /** Destructor */ | /** Destructor */ | ||||
| ~ColourGradient() throw(); | |||||
| ~ColourGradient(); | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Removes any colours that have been added. | /** Removes any colours that have been added. | ||||
| @@ -79,7 +79,7 @@ public: | |||||
| This will also remove any start and end colours, so the gradient won't work. You'll | This will also remove any start and end colours, so the gradient won't work. You'll | ||||
| need to add more colours with addColour(). | need to add more colours with addColour(). | ||||
| */ | */ | ||||
| void clearColours() throw(); | |||||
| void clearColours(); | |||||
| /** Adds a colour at a point along the length of the gradient. | /** Adds a colour at a point along the length of the gradient. | ||||
| @@ -92,7 +92,7 @@ public: | |||||
| @param colour the colour that should be used at this point | @param colour the colour that should be used at this point | ||||
| */ | */ | ||||
| void addColour (double proportionAlongGradient, | void addColour (double proportionAlongGradient, | ||||
| const Colour& colour) throw(); | |||||
| const Colour& colour); | |||||
| /** Multiplies the alpha value of all the colours by the given scale factor */ | /** Multiplies the alpha value of all the colours by the given scale factor */ | ||||
| void multiplyOpacity (float multiplier) throw(); | void multiplyOpacity (float multiplier) throw(); | ||||
| @@ -123,7 +123,7 @@ public: | |||||
| This will resize the HeapBlock, fill it with the colours, and will return the number of | This will resize the HeapBlock, fill it with the colours, and will return the number of | ||||
| colours that it added. | colours that it added. | ||||
| */ | */ | ||||
| int createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& resultLookupTable) const throw(); | |||||
| int createLookupTable (const AffineTransform& transform, HeapBlock <PixelARGB>& resultLookupTable) const; | |||||
| /** Returns true if all colours are opaque. */ | /** Returns true if all colours are opaque. */ | ||||
| bool isOpaque() const throw(); | bool isOpaque() const throw(); | ||||
| @@ -42,7 +42,7 @@ FillType::FillType (const Colour& colour_) throw() | |||||
| { | { | ||||
| } | } | ||||
| FillType::FillType (const ColourGradient& gradient_) throw() | |||||
| FillType::FillType (const ColourGradient& gradient_) | |||||
| : colour (0xff000000), gradient (new ColourGradient (gradient_)), image (0) | : colour (0xff000000), gradient (new ColourGradient (gradient_)), image (0) | ||||
| { | { | ||||
| } | } | ||||
| @@ -52,14 +52,14 @@ FillType::FillType (const Image& image_, const AffineTransform& transform_) thro | |||||
| { | { | ||||
| } | } | ||||
| FillType::FillType (const FillType& other) throw() | |||||
| FillType::FillType (const FillType& other) | |||||
| : colour (other.colour), | : colour (other.colour), | ||||
| gradient (other.gradient != 0 ? new ColourGradient (*other.gradient) : 0), | gradient (other.gradient != 0 ? new ColourGradient (*other.gradient) : 0), | ||||
| image (other.image), transform (other.transform) | image (other.image), transform (other.transform) | ||||
| { | { | ||||
| } | } | ||||
| FillType& FillType::operator= (const FillType& other) throw() | |||||
| FillType& FillType::operator= (const FillType& other) | |||||
| { | { | ||||
| if (this != &other) | if (this != &other) | ||||
| { | { | ||||
| @@ -83,7 +83,7 @@ void FillType::setColour (const Colour& newColour) throw() | |||||
| colour = newColour; | colour = newColour; | ||||
| } | } | ||||
| void FillType::setGradient (const ColourGradient& newGradient) throw() | |||||
| void FillType::setGradient (const ColourGradient& newGradient) | |||||
| { | { | ||||
| if (gradient != 0) | if (gradient != 0) | ||||
| { | { | ||||
| @@ -54,7 +54,7 @@ public: | |||||
| /** Creates a gradient fill type. | /** Creates a gradient fill type. | ||||
| @see setGradient | @see setGradient | ||||
| */ | */ | ||||
| FillType (const ColourGradient& gradient) throw(); | |||||
| FillType (const ColourGradient& gradient); | |||||
| /** Creates a tiled image fill type. The transform allows you to set the scaling, offset | /** Creates a tiled image fill type. The transform allows you to set the scaling, offset | ||||
| and rotation of the pattern. | and rotation of the pattern. | ||||
| @@ -63,10 +63,10 @@ public: | |||||
| FillType (const Image& image, const AffineTransform& transform) throw(); | FillType (const Image& image, const AffineTransform& transform) throw(); | ||||
| /** Creates a copy of another FillType. */ | /** Creates a copy of another FillType. */ | ||||
| FillType (const FillType& other) throw(); | |||||
| FillType (const FillType& other); | |||||
| /** Makes a copy of another FillType. */ | /** Makes a copy of another FillType. */ | ||||
| FillType& operator= (const FillType& other) throw(); | |||||
| FillType& operator= (const FillType& other); | |||||
| /** Destructor. */ | /** Destructor. */ | ||||
| ~FillType() throw(); | ~FillType() throw(); | ||||
| @@ -85,7 +85,7 @@ public: | |||||
| void setColour (const Colour& newColour) throw(); | void setColour (const Colour& newColour) throw(); | ||||
| /** Turns this object into a gradient fill. */ | /** Turns this object into a gradient fill. */ | ||||
| void setGradient (const ColourGradient& newGradient) throw(); | |||||
| void setGradient (const ColourGradient& newGradient); | |||||
| /** Turns this object into a tiled image fill type. The transform allows you to set | /** Turns this object into a tiled image fill type. The transform allows you to set | ||||
| the scaling, offset and rotation of the pattern. | the scaling, offset and rotation of the pattern. | ||||
| @@ -133,7 +133,7 @@ Drawable* Drawable::createFromImageFile (const File& file) | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| Drawable* Drawable::createFromValueTree (const ValueTree& tree) throw() | |||||
| Drawable* Drawable::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| Drawable* d = DrawablePath::createFromValueTree (tree); | Drawable* d = DrawablePath::createFromValueTree (tree); | ||||
| @@ -183,13 +183,13 @@ public: | |||||
| /** Tries to create a Drawable from a previously-saved ValueTree. | /** Tries to create a Drawable from a previously-saved ValueTree. | ||||
| The ValueTree must have been created by the createValueTree() method. | The ValueTree must have been created by the createValueTree() method. | ||||
| */ | */ | ||||
| static Drawable* createFromValueTree (const ValueTree& tree) throw(); | |||||
| static Drawable* createFromValueTree (const ValueTree& tree); | |||||
| /** Creates a ValueTree to represent this Drawable. | /** Creates a ValueTree to represent this Drawable. | ||||
| The VarTree that is returned can be turned back into a Drawable with | The VarTree that is returned can be turned back into a Drawable with | ||||
| createFromValueTree(). | createFromValueTree(). | ||||
| */ | */ | ||||
| virtual ValueTree createValueTree() const throw() = 0; | |||||
| virtual ValueTree createValueTree() const = 0; | |||||
| //============================================================================== | //============================================================================== | ||||
| juce_UseDebuggingNewOperator | juce_UseDebuggingNewOperator | ||||
| @@ -183,7 +183,7 @@ Drawable* DrawableComposite::createCopy() const | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| ValueTree DrawableComposite::createValueTree() const throw() | |||||
| ValueTree DrawableComposite::createValueTree() const | |||||
| { | { | ||||
| ValueTree v ("Group"); | ValueTree v ("Group"); | ||||
| @@ -213,7 +213,7 @@ ValueTree DrawableComposite::createValueTree() const throw() | |||||
| return v; | return v; | ||||
| } | } | ||||
| DrawableComposite* DrawableComposite::createFromValueTree (const ValueTree& tree) throw() | |||||
| DrawableComposite* DrawableComposite::createFromValueTree (const ValueTree& tree) | |||||
| { | { | ||||
| if (! tree.hasType ("Group")) | if (! tree.hasType ("Group")) | ||||
| return 0; | return 0; | ||||