| @@ -72,10 +72,6 @@ public: | |||
| setName (coord.toString()); | |||
| //ScopedPointer<Coordinate::MarkerResolver> markers (document.createMarkerResolver (state, component->getParentComponent())); | |||
| //int anchor1 = roundToInt (coord.getAnchorPoint1().resolve (*markers)); | |||
| //int anchor2 = roundToInt (coord.getAnchorPoint2().resolve (*markers)); | |||
| int textW = (int) font.getStringWidth (getName()); | |||
| int textH = (int) font.getHeight(); | |||
| @@ -83,33 +79,33 @@ public: | |||
| switch (type) | |||
| { | |||
| case left: | |||
| p1 = Point<int> (component->getX(), 0); | |||
| p2 = Point<int> (component->getX(), component->getY()); | |||
| textArea.setBounds (p1.getX() - textW - 2, 4, textW, textH); | |||
| break; | |||
| case right: | |||
| p1 = Point<int> (component->getRight(), 0); | |||
| p2 = Point<int> (component->getRight(), component->getY()); | |||
| textArea.setBounds (p1.getX() + 2, 4, textW, textH); | |||
| break; | |||
| case top: | |||
| p1 = Point<int> (0, component->getY()); | |||
| p2 = Point<int> (component->getX(), component->getY()); | |||
| textArea.setBounds (4, p1.getY() - textH - 2, textW, textH); | |||
| break; | |||
| case bottom: | |||
| p1 = Point<int> (0, component->getBottom()); | |||
| p2 = Point<int> (component->getX(), component->getBottom()); | |||
| textArea.setBounds (4, p1.getY() + 2, textW, textH); | |||
| break; | |||
| default: | |||
| jassertfalse; | |||
| break; | |||
| case left: | |||
| p1 = Point<int> (component->getX(), 0); | |||
| p2 = Point<int> (component->getX(), component->getY()); | |||
| textArea.setBounds (p1.getX() - textW - 2, 4, textW, textH); | |||
| break; | |||
| case right: | |||
| p1 = Point<int> (component->getRight(), 0); | |||
| p2 = Point<int> (component->getRight(), component->getY()); | |||
| textArea.setBounds (p1.getX() + 2, 4, textW, textH); | |||
| break; | |||
| case top: | |||
| p1 = Point<int> (0, component->getY()); | |||
| p2 = Point<int> (component->getX(), component->getY()); | |||
| textArea.setBounds (4, p1.getY() - textH - 2, textW, textH); | |||
| break; | |||
| case bottom: | |||
| p1 = Point<int> (0, component->getBottom()); | |||
| p2 = Point<int> (component->getX(), component->getBottom()); | |||
| textArea.setBounds (4, p1.getY() + 2, textW, textH); | |||
| break; | |||
| default: | |||
| jassertfalse; | |||
| break; | |||
| } | |||
| Rectangle<int> bounds (Rectangle<int> (p1, p2).expanded (2, 2).getUnion (textArea)); | |||
| @@ -3492,11 +3492,6 @@ void PropertySet::removeValue (const String& keyName) throw() | |||
| } | |||
| } | |||
| void PropertySet::setValue (const String& keyName, const tchar* const value) throw() | |||
| { | |||
| setValue (keyName, String (value)); | |||
| } | |||
| void PropertySet::setValue (const String& keyName, const int value) throw() | |||
| { | |||
| setValue (keyName, String (value)); | |||
| @@ -10030,11 +10025,11 @@ const String LocalisedStrings::translate (const String& text) const | |||
| static int findCloseQuote (const String& text, int startPos) | |||
| { | |||
| tchar lastChar = 0; | |||
| juce_wchar lastChar = 0; | |||
| for (;;) | |||
| { | |||
| const tchar c = text [startPos]; | |||
| const juce_wchar c = text [startPos]; | |||
| if (c == 0 || (c == '"' && lastChar != '\\')) | |||
| break; | |||
| @@ -16059,7 +16054,7 @@ void ValueTree::SharedObject::removeAllChildren (UndoManager* const undoManager) | |||
| removeChild (children.size() - 1, undoManager); | |||
| } | |||
| ValueTree ValueTree::invalid ((ValueTree::SharedObject*) 0); | |||
| ValueTree ValueTree::invalid (static_cast <ValueTree::SharedObject*> (0)); | |||
| ValueTree::ValueTree (const String& type_) | |||
| : object (new ValueTree::SharedObject (type_)) | |||
| @@ -18541,7 +18536,7 @@ END_JUCE_NAMESPACE | |||
| BEGIN_JUCE_NAMESPACE | |||
| static const char* const aiffFormatName = "AIFF file"; | |||
| static const tchar* const aiffExtensions[] = { T(".aiff"), T(".aif"), 0 }; | |||
| static const juce_wchar* const aiffExtensions[] = { T(".aiff"), T(".aif"), 0 }; | |||
| class AiffAudioFormatReader : public AudioFormatReader | |||
| { | |||
| @@ -18597,8 +18592,8 @@ public: | |||
| || (byte0 == 0x40 && sampleRateBytes[1] > 0x1C)) | |||
| break; | |||
| unsigned int sampRate = ByteOrder::bigEndianInt ((char*) sampleRateBytes + 2); | |||
| sampRate >>= (16414 - ByteOrder::bigEndianShort ((char*) sampleRateBytes)); | |||
| unsigned int sampRate = ByteOrder::bigEndianInt (sampleRateBytes + 2); | |||
| sampRate >>= (16414 - ByteOrder::bigEndianShort (sampleRateBytes)); | |||
| sampleRate = (int) sampRate; | |||
| if (length <= 18) | |||
| @@ -18693,7 +18688,7 @@ public: | |||
| { | |||
| if (littleEndian) | |||
| { | |||
| const short* src = (const short*) tempBuffer; | |||
| const short* src = reinterpret_cast <const short*> (tempBuffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -18732,7 +18727,7 @@ public: | |||
| } | |||
| else | |||
| { | |||
| const char* src = (const char*) tempBuffer; | |||
| const char* src = tempBuffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -18863,9 +18858,9 @@ public: | |||
| } | |||
| else if (bitsPerSample == 32) | |||
| { | |||
| const unsigned int* src = (const unsigned int*) tempBuffer; | |||
| unsigned int* l = (unsigned int*) left; | |||
| unsigned int* r = (unsigned int*) right; | |||
| const unsigned int* src = reinterpret_cast <const unsigned int*> (tempBuffer); | |||
| unsigned int* l = reinterpret_cast <unsigned int*> (left); | |||
| unsigned int* r = reinterpret_cast <unsigned int*> (right); | |||
| if (littleEndian) | |||
| { | |||
| @@ -18942,12 +18937,12 @@ public: | |||
| } | |||
| } | |||
| left = (int*) l; | |||
| right = (int*) r; | |||
| left = reinterpret_cast <int*> (l); | |||
| right = reinterpret_cast <int*> (r); | |||
| } | |||
| else if (bitsPerSample == 8) | |||
| { | |||
| const char* src = (const char*) tempBuffer; | |||
| const char* src = tempBuffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -19129,7 +19124,7 @@ public: | |||
| const int bytes = numChannels * numSamples * bitsPerSample / 8; | |||
| tempBlock.ensureSize (bytes, false); | |||
| char* buffer = (char*) tempBlock.getData(); | |||
| char* buffer = static_cast <char*> (tempBlock.getData()); | |||
| const int* left = data[0]; | |||
| const int* right = data[1]; | |||
| @@ -19138,7 +19133,7 @@ public: | |||
| if (bitsPerSample == 16) | |||
| { | |||
| short* b = (short*) buffer; | |||
| short* b = reinterpret_cast <short*> (buffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -19158,7 +19153,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 24) | |||
| { | |||
| char* b = (char*) buffer; | |||
| char* b = buffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -19181,7 +19176,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 32) | |||
| { | |||
| uint32* b = (uint32*) buffer; | |||
| uint32* b = reinterpret_cast <uint32*> (buffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -19201,7 +19196,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 8) | |||
| { | |||
| char* b = (char*) buffer; | |||
| char* b = buffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -19243,7 +19238,7 @@ public: | |||
| }; | |||
| AiffAudioFormat::AiffAudioFormat() | |||
| : AudioFormat (TRANS (aiffFormatName), (const tchar**) aiffExtensions) | |||
| : AudioFormat (TRANS (aiffFormatName), (const juce_wchar**) aiffExtensions) | |||
| { | |||
| } | |||
| @@ -20943,7 +20938,7 @@ BEGIN_JUCE_NAMESPACE | |||
| bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); | |||
| static const char* const quickTimeFormatName = "QuickTime file"; | |||
| static const tchar* const quickTimeExtensions[] = { T(".mov"), T(".mp3"), T(".mp4"), 0 }; | |||
| static const juce_wchar* const quickTimeExtensions[] = { T(".mov"), T(".mp3"), T(".mp4"), 0 }; | |||
| class QTAudioReader : public AudioFormatReader | |||
| { | |||
| @@ -21202,7 +21197,7 @@ private: | |||
| }; | |||
| QuickTimeAudioFormat::QuickTimeAudioFormat() | |||
| : AudioFormat (TRANS (quickTimeFormatName), (const tchar**) quickTimeExtensions) | |||
| : AudioFormat (TRANS (quickTimeFormatName), (const juce_wchar**) quickTimeExtensions) | |||
| { | |||
| } | |||
| @@ -21265,15 +21260,15 @@ END_JUCE_NAMESPACE | |||
| BEGIN_JUCE_NAMESPACE | |||
| static const char* const wavFormatName = "WAV file"; | |||
| static const tchar* const wavExtensions[] = { T(".wav"), T(".bwf"), 0 }; | |||
| static const juce_wchar* const wavExtensions[] = { T(".wav"), T(".bwf"), 0 }; | |||
| const tchar* const WavAudioFormat::bwavDescription = T("bwav description"); | |||
| const tchar* const WavAudioFormat::bwavOriginator = T("bwav originator"); | |||
| const tchar* const WavAudioFormat::bwavOriginatorRef = T("bwav originator ref"); | |||
| const tchar* const WavAudioFormat::bwavOriginationDate = T("bwav origination date"); | |||
| const tchar* const WavAudioFormat::bwavOriginationTime = T("bwav origination time"); | |||
| const tchar* const WavAudioFormat::bwavTimeReference = T("bwav time reference"); | |||
| const tchar* const WavAudioFormat::bwavCodingHistory = T("bwav coding history"); | |||
| const char* const WavAudioFormat::bwavDescription = "bwav description"; | |||
| const char* const WavAudioFormat::bwavOriginator = "bwav originator"; | |||
| const char* const WavAudioFormat::bwavOriginatorRef = "bwav originator ref"; | |||
| const char* const WavAudioFormat::bwavOriginationDate = "bwav origination date"; | |||
| const char* const WavAudioFormat::bwavOriginationTime = "bwav origination time"; | |||
| const char* const WavAudioFormat::bwavTimeReference = "bwav time reference"; | |||
| const char* const WavAudioFormat::bwavCodingHistory = "bwav coding history"; | |||
| const StringPairArray WavAudioFormat::createBWAVMetadata (const String& description, | |||
| const String& originator, | |||
| @@ -22034,7 +22029,7 @@ public: | |||
| }; | |||
| WavAudioFormat::WavAudioFormat() | |||
| : AudioFormat (TRANS (wavFormatName), (const tchar**) wavExtensions) | |||
| : AudioFormat (TRANS (wavFormatName), (const juce_wchar**) wavExtensions) | |||
| { | |||
| } | |||
| @@ -43133,7 +43128,7 @@ BEGIN_JUCE_NAMESPACE | |||
| class CodeDocumentLine | |||
| { | |||
| public: | |||
| CodeDocumentLine (const tchar* const line_, | |||
| CodeDocumentLine (const juce_wchar* const line_, | |||
| const int lineLength_, | |||
| const int numNewLineChars, | |||
| const int lineStartInFile_) | |||
| @@ -43501,7 +43496,7 @@ const CodeDocument::Position CodeDocument::Position::movedByLines (const int del | |||
| return p; | |||
| } | |||
| const tchar CodeDocument::Position::getCharacter() const throw() | |||
| const juce_wchar CodeDocument::Position::getCharacter() const throw() | |||
| { | |||
| const CodeDocumentLine* const l = owner->lines [line]; | |||
| return l == 0 ? 0 : l->line [getIndexInLine()]; | |||
| @@ -43698,7 +43693,7 @@ bool CodeDocument::hasChangedSinceSavePoint() const throw() | |||
| return currentActionIndex != indexOfSavedState; | |||
| } | |||
| static int getCodeCharacterCategory (const tchar character) throw() | |||
| static int getCodeCharacterCategory (const juce_wchar character) throw() | |||
| { | |||
| return (CharacterFunctions::isLetterOrDigit (character) || character == '_') | |||
| ? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1); | |||
| @@ -43751,7 +43746,7 @@ const CodeDocument::Position CodeDocument::findWordBreakBefore (const Position& | |||
| while (i < maxDistance) | |||
| { | |||
| const tchar c = p.movedBy (-1).getCharacter(); | |||
| const juce_wchar c = p.movedBy (-1).getCharacter(); | |||
| if (c == '\r' || c == '\n') | |||
| { | |||
| @@ -45247,13 +45242,13 @@ CPlusPlusCodeTokeniser::~CPlusPlusCodeTokeniser() | |||
| namespace CppTokeniser | |||
| { | |||
| static bool isIdentifierStart (const tchar c) throw() | |||
| static bool isIdentifierStart (const juce_wchar c) throw() | |||
| { | |||
| return CharacterFunctions::isLetter (c) | |||
| || c == '_' || c == '@'; | |||
| } | |||
| static bool isIdentifierBody (const tchar c) throw() | |||
| static bool isIdentifierBody (const juce_wchar c) throw() | |||
| { | |||
| return CharacterFunctions::isLetter (c) | |||
| || CharacterFunctions::isDigit (c) | |||
| @@ -45262,26 +45257,26 @@ static bool isIdentifierBody (const tchar c) throw() | |||
| static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| { | |||
| static const tchar* keywords2Char[] = | |||
| static const juce_wchar* keywords2Char[] = | |||
| { T("if"), T("do"), T("or"), 0 }; | |||
| static const tchar* keywords3Char[] = | |||
| static const juce_wchar* keywords3Char[] = | |||
| { T("for"), T("int"), T("new"), T("try"), T("xor"), T("and"), T("asm"), T("not"), 0 }; | |||
| static const tchar* keywords4Char[] = | |||
| static const juce_wchar* keywords4Char[] = | |||
| { T("bool"), T("void"), T("this"), T("true"), T("long"), T("else"), T("char"), | |||
| T("enum"), T("case"), T("goto"), T("auto"), 0 }; | |||
| static const tchar* keywords5Char[] = | |||
| static const juce_wchar* keywords5Char[] = | |||
| { T("while"), T("bitor"), T("break"), T("catch"), T("class"), T("compl"), T("const"), T("false"), | |||
| T("float"), T("short"), T("throw"), T("union"), T("using"), T("or_eq"), 0 }; | |||
| static const tchar* keywords6Char[] = | |||
| static const juce_wchar* keywords6Char[] = | |||
| { T("return"), T("struct"), T("and_eq"), T("bitand"), T("delete"), T("double"), T("extern"), | |||
| T("friend"), T("inline"), T("not_eq"), T("public"), T("sizeof"), T("static"), T("signed"), | |||
| T("switch"), T("typeid"), T("wchar_t"), T("xor_eq"), 0}; | |||
| static const tchar* keywordsOther[] = | |||
| static const juce_wchar* keywordsOther[] = | |||
| { T("const_cast"), T("continue"), T("default"), T("explicit"), T("mutable"), T("namespace"), | |||
| T("operator"), T("private"), T("protected"), T("register"), T("reinterpret_cast"), T("static_cast"), | |||
| T("template"), T("typedef"), T("typename"), T("unsigned"), T("virtual"), T("volatile"), | |||
| @@ -45289,11 +45284,11 @@ static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| T("@private"), T("@property"), T("@protected"), T("@class"), 0 }; | |||
| int tokenLength = 0; | |||
| tchar possibleIdentifier [19]; | |||
| juce_wchar possibleIdentifier [19]; | |||
| while (isIdentifierBody (source.peekNextChar())) | |||
| { | |||
| const tchar c = source.nextChar(); | |||
| const juce_wchar c = source.nextChar(); | |||
| if (tokenLength < numElementsInArray (possibleIdentifier) - 1) | |||
| possibleIdentifier [tokenLength] = c; | |||
| @@ -45304,7 +45299,7 @@ static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| if (tokenLength > 1 && tokenLength <= 16) | |||
| { | |||
| possibleIdentifier [tokenLength] = 0; | |||
| const tchar** k; | |||
| const juce_wchar** k; | |||
| switch (tokenLength) | |||
| { | |||
| @@ -45532,7 +45527,7 @@ int CPlusPlusCodeTokeniser::readNextToken (CodeDocument::Iterator& source) | |||
| int result = tokenType_error; | |||
| source.skipWhitespace(); | |||
| tchar firstChar = source.peekNextChar(); | |||
| juce_wchar firstChar = source.peekNextChar(); | |||
| switch (firstChar) | |||
| { | |||
| @@ -50686,7 +50681,7 @@ struct TextAtom | |||
| bool isWhitespace() const { return CharacterFunctions::isWhitespace (atomText[0]); } | |||
| bool isNewLine() const { return atomText[0] == '\r' || atomText[0] == '\n'; } | |||
| const String getText (const tchar passwordCharacter) const | |||
| const String getText (const juce_wchar passwordCharacter) const | |||
| { | |||
| if (passwordCharacter == 0) | |||
| return atomText; | |||
| @@ -50695,7 +50690,7 @@ struct TextAtom | |||
| atomText.length()); | |||
| } | |||
| const String getTrimmedText (const tchar passwordCharacter) const | |||
| const String getTrimmedText (const juce_wchar passwordCharacter) const | |||
| { | |||
| if (passwordCharacter == 0) | |||
| return atomText.substring (0, numChars); | |||
| @@ -50714,7 +50709,7 @@ public: | |||
| UniformTextSection (const String& text, | |||
| const Font& font_, | |||
| const Colour& colour_, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| : font (font_), | |||
| colour (colour_) | |||
| { | |||
| @@ -50754,7 +50749,7 @@ public: | |||
| return (TextAtom*) atoms.getUnchecked (index); | |||
| } | |||
| void append (const UniformTextSection& other, const tchar passwordCharacter) | |||
| void append (const UniformTextSection& other, const juce_wchar passwordCharacter) | |||
| { | |||
| if (other.atoms.size() > 0) | |||
| { | |||
| @@ -50789,7 +50784,7 @@ public: | |||
| } | |||
| UniformTextSection* split (const int indexToBreakAt, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| UniformTextSection* const section2 = new UniformTextSection (String::empty, | |||
| font, colour, | |||
| @@ -50884,7 +50879,7 @@ public: | |||
| } | |||
| void setFont (const Font& newFont, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| if (font != newFont) | |||
| { | |||
| @@ -50907,7 +50902,7 @@ private: | |||
| VoidArray atoms; | |||
| void initialiseAtoms (const String& textToParse, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| int i = 0; | |||
| const int len = textToParse.length(); | |||
| @@ -50972,7 +50967,7 @@ public: | |||
| TextEditorIterator (const VoidArray& sections_, | |||
| const float wordWrapWidth_, | |||
| const tchar passwordCharacter_) | |||
| const juce_wchar passwordCharacter_) | |||
| : indexInText (0), | |||
| lineY (0), | |||
| lineHeight (0), | |||
| @@ -51358,7 +51353,7 @@ private: | |||
| const VoidArray& sections; | |||
| int sectionIndex, atomIndex; | |||
| const float wordWrapWidth; | |||
| const tchar passwordCharacter; | |||
| const juce_wchar passwordCharacter; | |||
| TextAtom tempAtom; | |||
| TextEditorIterator& operator= (const TextEditorIterator&); | |||
| @@ -51584,7 +51579,7 @@ namespace TextEditorDefs | |||
| } | |||
| TextEditor::TextEditor (const String& name, | |||
| const tchar passwordCharacter_) | |||
| const juce_wchar passwordCharacter_) | |||
| : Component (name), | |||
| borderSize (1, 1, 1, 3), | |||
| readOnly (false), | |||
| @@ -51772,7 +51767,7 @@ void TextEditor::setTextToShowWhenEmpty (const String& text, const Colour& colou | |||
| colourForTextWhenEmpty = colourToUse; | |||
| } | |||
| void TextEditor::setPasswordCharacter (const tchar newPasswordCharacter) | |||
| void TextEditor::setPasswordCharacter (const juce_wchar newPasswordCharacter) | |||
| { | |||
| if (passwordCharacter != newPasswordCharacter) | |||
| { | |||
| @@ -53132,7 +53127,7 @@ int TextEditor::indexAtPosition (const float x, const float y) | |||
| return getTotalNumChars(); | |||
| } | |||
| static int getCharacterCategory (const tchar character) | |||
| static int getCharacterCategory (const juce_wchar character) | |||
| { | |||
| return CharacterFunctions::isLetterOrDigit (character) | |||
| ? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1); | |||
| @@ -53218,7 +53213,7 @@ END_JUCE_NAMESPACE | |||
| /*** Start of inlined file: juce_Toolbar.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| const tchar* const Toolbar::toolbarDragDescriptor = T("_toolbarItem_"); | |||
| const char* const Toolbar::toolbarDragDescriptor = "_toolbarItem_"; | |||
| class ToolbarSpacerComp : public ToolbarItemComponent | |||
| { | |||
| @@ -59051,8 +59046,8 @@ bool KeyPress::operator== (const KeyPress& other) const throw() | |||
| && (keyCode == other.keyCode | |||
| || (keyCode < 256 | |||
| && other.keyCode < 256 | |||
| && CharacterFunctions::toLowerCase ((tchar) keyCode) | |||
| == CharacterFunctions::toLowerCase ((tchar) other.keyCode))); | |||
| && CharacterFunctions::toLowerCase ((juce_wchar) keyCode) | |||
| == CharacterFunctions::toLowerCase ((juce_wchar) other.keyCode))); | |||
| } | |||
| bool KeyPress::operator!= (const KeyPress& other) const throw() | |||
| @@ -59138,7 +59133,7 @@ const KeyPress KeyPress::createFromDescription (const String& desc) | |||
| // see if it's a numpad key.. | |||
| if (desc.containsIgnoreCase (KeyPressHelpers::numberPadPrefix())) | |||
| { | |||
| const tchar lastChar = desc.trimEnd().getLastCharacter(); | |||
| const juce_wchar lastChar = desc.trimEnd().getLastCharacter(); | |||
| if (lastChar >= '0' && lastChar <= '9') | |||
| key = numberPad0 + lastChar - '0'; | |||
| @@ -59225,7 +59220,7 @@ const String KeyPress::getTextDescription() const | |||
| else if (keyCode >= numberPad0 && keyCode <= numberPad9) | |||
| desc << KeyPressHelpers::numberPadPrefix() << (keyCode - numberPad0); | |||
| else if (keyCode >= 33 && keyCode < 176) | |||
| desc += CharacterFunctions::toUpperCase ((tchar) keyCode); | |||
| desc += CharacterFunctions::toUpperCase ((juce_wchar) keyCode); | |||
| else if (keyCode == numberPadAdd) | |||
| desc << KeyPressHelpers::numberPadPrefix() << '+'; | |||
| else if (keyCode == numberPadSubtract) | |||
| @@ -59691,8 +59686,9 @@ END_JUCE_NAMESPACE | |||
| /*** Start of inlined file: juce_ComponentAnimator.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| struct AnimationTask | |||
| class ComponentAnimator::AnimationTask | |||
| { | |||
| public: | |||
| AnimationTask (Component* const comp) | |||
| : component (comp) | |||
| { | |||
| @@ -59769,10 +59765,10 @@ ComponentAnimator::~ComponentAnimator() | |||
| jassert (tasks.size() == 0); | |||
| } | |||
| void* ComponentAnimator::findTaskFor (Component* const component) const | |||
| ComponentAnimator::AnimationTask* ComponentAnimator::findTaskFor (Component* const component) const | |||
| { | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| if (component == ((AnimationTask*) tasks.getUnchecked(i))->component.getComponent()) | |||
| if (component == tasks.getUnchecked(i)->component.getComponent()) | |||
| return tasks.getUnchecked(i); | |||
| return 0; | |||
| @@ -59786,7 +59782,7 @@ void ComponentAnimator::animateComponent (Component* const component, | |||
| { | |||
| if (component != 0) | |||
| { | |||
| AnimationTask* at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* at = findTaskFor (component); | |||
| if (at == 0) | |||
| { | |||
| @@ -59825,7 +59821,7 @@ void ComponentAnimator::cancelAllAnimations (const bool moveComponentsToTheirFin | |||
| { | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) tasks.getUnchecked(i); | |||
| AnimationTask* const at = tasks.getUnchecked(i); | |||
| if (moveComponentsToTheirFinalPositions) | |||
| at->moveToFinalDestination(); | |||
| @@ -59839,7 +59835,7 @@ void ComponentAnimator::cancelAllAnimations (const bool moveComponentsToTheirFin | |||
| void ComponentAnimator::cancelAnimation (Component* const component, | |||
| const bool moveComponentToItsFinalPosition) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* const at = findTaskFor (component); | |||
| if (at != 0) | |||
| { | |||
| @@ -59854,7 +59850,7 @@ void ComponentAnimator::cancelAnimation (Component* const component, | |||
| const Rectangle<int> ComponentAnimator::getComponentDestination (Component* const component) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* const at = findTaskFor (component); | |||
| if (at != 0) | |||
| return at->destination; | |||
| @@ -59880,7 +59876,7 @@ void ComponentAnimator::timerCallback() | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) tasks.getUnchecked(i); | |||
| AnimationTask* const at = tasks.getUnchecked(i); | |||
| if (! at->useTimeslice (elapsed)) | |||
| { | |||
| @@ -75112,16 +75108,11 @@ END_JUCE_NAMESPACE | |||
| /*** Start of inlined file: juce_AlertWindow.cpp ***/ | |||
| BEGIN_JUCE_NAMESPACE | |||
| static const int titleH = 24; | |||
| static const int iconWidth = 80; | |||
| class AlertWindowTextEditor : public TextEditor | |||
| { | |||
| public: | |||
| static const tchar passwordChar; | |||
| AlertWindowTextEditor (const String& name, const bool isPasswordBox) | |||
| : TextEditor (name, isPasswordBox ? passwordChar : 0) | |||
| : TextEditor (name, isPasswordBox ? getDefaultPasswordChar() : 0) | |||
| { | |||
| setSelectAllWhenFocused (true); | |||
| } | |||
| @@ -75145,13 +75136,16 @@ public: | |||
| private: | |||
| AlertWindowTextEditor (const AlertWindowTextEditor&); | |||
| AlertWindowTextEditor& operator= (const AlertWindowTextEditor&); | |||
| }; | |||
| #if JUCE_LINUX | |||
| const tchar AlertWindowTextEditor::passwordChar = 0x2022; | |||
| #else | |||
| const tchar AlertWindowTextEditor::passwordChar = 0x25cf; | |||
| #endif | |||
| static juce_wchar getDefaultPasswordChar() throw() | |||
| { | |||
| #if JUCE_LINUX | |||
| return 0x2022; | |||
| #else | |||
| return 0x25cf; | |||
| #endif | |||
| } | |||
| }; | |||
| AlertWindow::AlertWindow (const String& title, | |||
| const String& message, | |||
| @@ -75462,6 +75456,9 @@ void AlertWindow::paint (Graphics& g) | |||
| void AlertWindow::updateLayout (const bool onlyIncreaseSize) | |||
| { | |||
| const int titleH = 24; | |||
| const int iconWidth = 80; | |||
| const int wid = jmax (font.getStringWidth (text), | |||
| font.getStringWidth (getName())); | |||
| @@ -83563,7 +83560,7 @@ private: | |||
| int index = 0; | |||
| float lastX = 0, lastY = 0; | |||
| float lastX2 = 0, lastY2 = 0; | |||
| tchar lastCommandChar = 0; | |||
| juce_wchar lastCommandChar = 0; | |||
| bool isRelative = true; | |||
| bool carryOn = true; | |||
| @@ -84232,8 +84229,8 @@ private: | |||
| { | |||
| const float dpi = 96.0f; | |||
| const tchar n1 = s [len - 2]; | |||
| const tchar n2 = s [len - 1]; | |||
| const juce_wchar n1 = s [len - 2]; | |||
| const juce_wchar n2 = s [len - 1]; | |||
| if (n1 == 'i' && n2 == 'n') | |||
| n *= dpi; | |||
| @@ -84329,7 +84326,7 @@ private: | |||
| return String::empty; | |||
| } | |||
| static bool isIdentifierChar (const tchar c) | |||
| static bool isIdentifierChar (const juce_wchar c) | |||
| { | |||
| return CharacterFunctions::isLetter (c) || c == '-'; | |||
| } | |||
| @@ -85986,7 +85983,7 @@ public: | |||
| isNewLine = t.containsChar ('\n') || t.containsChar ('\r'); | |||
| } | |||
| Token (const Token& other) throw() | |||
| Token (const Token& other) | |||
| : text (other.text), | |||
| font (other.font), | |||
| x (other.x), | |||
| @@ -86000,7 +85997,7 @@ public: | |||
| { | |||
| } | |||
| ~Token() throw() | |||
| ~Token() | |||
| { | |||
| } | |||
| @@ -86021,27 +86018,26 @@ public: | |||
| juce_UseDebuggingNewOperator | |||
| }; | |||
| TextLayout::TextLayout() throw() | |||
| TextLayout::TextLayout() | |||
| : totalLines (0) | |||
| { | |||
| tokens.ensureStorageAllocated (64); | |||
| } | |||
| TextLayout::TextLayout (const String& text, | |||
| const Font& font) throw() | |||
| TextLayout::TextLayout (const String& text, const Font& font) | |||
| : totalLines (0) | |||
| { | |||
| tokens.ensureStorageAllocated (64); | |||
| appendText (text, font); | |||
| } | |||
| TextLayout::TextLayout (const TextLayout& other) throw() | |||
| TextLayout::TextLayout (const TextLayout& other) | |||
| : totalLines (0) | |||
| { | |||
| *this = other; | |||
| } | |||
| TextLayout& TextLayout::operator= (const TextLayout& other) throw() | |||
| TextLayout& TextLayout::operator= (const TextLayout& other) | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -86056,27 +86052,26 @@ TextLayout& TextLayout::operator= (const TextLayout& other) throw() | |||
| return *this; | |||
| } | |||
| TextLayout::~TextLayout() throw() | |||
| TextLayout::~TextLayout() | |||
| { | |||
| clear(); | |||
| } | |||
| void TextLayout::clear() throw() | |||
| void TextLayout::clear() | |||
| { | |||
| tokens.clear(); | |||
| totalLines = 0; | |||
| } | |||
| void TextLayout::appendText (const String& text, | |||
| const Font& font) throw() | |||
| void TextLayout::appendText (const String& text, const Font& font) | |||
| { | |||
| const tchar* t = text; | |||
| const juce_wchar* t = text; | |||
| String currentString; | |||
| int lastCharType = 0; | |||
| for (;;) | |||
| { | |||
| const tchar c = *t++; | |||
| const juce_wchar c = *t++; | |||
| if (c == 0) | |||
| break; | |||
| @@ -86119,7 +86114,7 @@ void TextLayout::appendText (const String& text, | |||
| tokens.add (new Token (currentString, font, lastCharType == 2)); | |||
| } | |||
| void TextLayout::setText (const String& text, const Font& font) throw() | |||
| void TextLayout::setText (const String& text, const Font& font) | |||
| { | |||
| clear(); | |||
| appendText (text, font); | |||
| @@ -86127,7 +86122,7 @@ void TextLayout::setText (const String& text, const Font& font) throw() | |||
| void TextLayout::layout (int maxWidth, | |||
| const Justification& justification, | |||
| const bool attemptToBalanceLineLengths) throw() | |||
| const bool attemptToBalanceLineLengths) | |||
| { | |||
| if (attemptToBalanceLineLengths) | |||
| { | |||
| @@ -86242,7 +86237,7 @@ void TextLayout::layout (int maxWidth, | |||
| } | |||
| } | |||
| int TextLayout::getLineWidth (const int lineNumber) const throw() | |||
| int TextLayout::getLineWidth (const int lineNumber) const | |||
| { | |||
| int maxW = 0; | |||
| @@ -86257,7 +86252,7 @@ int TextLayout::getLineWidth (const int lineNumber) const throw() | |||
| return maxW; | |||
| } | |||
| int TextLayout::getWidth() const throw() | |||
| int TextLayout::getWidth() const | |||
| { | |||
| int maxW = 0; | |||
| @@ -86271,7 +86266,7 @@ int TextLayout::getWidth() const throw() | |||
| return maxW; | |||
| } | |||
| int TextLayout::getHeight() const throw() | |||
| int TextLayout::getHeight() const | |||
| { | |||
| int maxH = 0; | |||
| @@ -86288,7 +86283,7 @@ int TextLayout::getHeight() const throw() | |||
| void TextLayout::draw (Graphics& g, | |||
| const int xOffset, | |||
| const int yOffset) const throw() | |||
| const int yOffset) const | |||
| { | |||
| for (int i = tokens.size(); --i >= 0;) | |||
| tokens.getUnchecked(i)->draw (g, xOffset, yOffset); | |||
| @@ -86296,7 +86291,7 @@ void TextLayout::draw (Graphics& g, | |||
| void TextLayout::drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& justification) const throw() | |||
| const Justification& justification) const | |||
| { | |||
| justification.applyToRectangle (x, y, getWidth(), getHeight(), | |||
| x, y, w, h); | |||
| @@ -87384,12 +87379,12 @@ namespace PathHelpers | |||
| } | |||
| } | |||
| static const String nextToken (const tchar*& t) | |||
| static const String nextToken (const juce_wchar*& t) | |||
| { | |||
| while (CharacterFunctions::isWhitespace (*t)) | |||
| ++t; | |||
| const tchar* const start = t; | |||
| const juce_wchar* const start = t; | |||
| while (*t != 0 && ! CharacterFunctions::isWhitespace (*t)) | |||
| ++t; | |||
| @@ -217238,7 +217233,7 @@ const String SystemClipboard::getTextFromClipboard() | |||
| if (data != 0) | |||
| { | |||
| result = String (data, (int) (GlobalSize (bufH) / sizeof (tchar))); | |||
| result = String (data, (int) (GlobalSize (bufH) / sizeof (wchar_t))); | |||
| GlobalUnlock (bufH); | |||
| } | |||
| @@ -218284,7 +218279,7 @@ public: | |||
| if (headers != 0) | |||
| { | |||
| V_VT (&headersVar) = VT_BSTR; | |||
| V_BSTR (&headersVar) = SysAllocString ((const tchar*) headers->joinIntoString ("\r\n")); | |||
| V_BSTR (&headersVar) = SysAllocString ((const OLECHAR*) headers->joinIntoString ("\r\n")); | |||
| } | |||
| if (postData != 0 && postData->getSize() > 0) | |||
| @@ -230647,16 +230642,12 @@ public: | |||
| } | |||
| // Add a glyph to a font | |||
| bool addGlyphToFont (const uint32 character, | |||
| const tchar* fontName, bool bold, bool italic, | |||
| CustomTypeface& dest) | |||
| bool addGlyphToFont (const uint32 character, const String& fontName, | |||
| bool bold, bool italic, CustomTypeface& dest) | |||
| { | |||
| FT_Face face = createFT_Face (fontName, bold, italic); | |||
| if (face != 0) | |||
| return addGlyph (face, dest, character); | |||
| return false; | |||
| return face != 0 && addGlyph (face, dest, character); | |||
| } | |||
| void getFamilyNames (StringArray& familyNames) const | |||
| @@ -236623,11 +236614,11 @@ const String PlatformUtilities::convertToPrecomposedUnicode (const String& s) | |||
| { | |||
| result.preallocateStorage (bytesRead / sizeof (UniChar) + 2); | |||
| tchar* t = result; | |||
| juce_wchar* t = result; | |||
| unsigned int i; | |||
| for (i = 0; i < bytesRead / sizeof (UniChar); ++i) | |||
| t[i] = (tchar) tempOut[i]; | |||
| t[i] = (juce_wchar) tempOut[i]; | |||
| t[i] = 0; | |||
| } | |||
| @@ -245720,11 +245711,11 @@ bool KeyPress::isKeyCurrentlyDown (const int keyCode) | |||
| return true; | |||
| if (keyCode >= 'A' && keyCode <= 'Z' | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toLowerCase ((tchar) keyCode))) | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toLowerCase ((juce_wchar) keyCode))) | |||
| return true; | |||
| if (keyCode >= 'a' && keyCode <= 'z' | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toUpperCase ((tchar) keyCode))) | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toUpperCase ((juce_wchar) keyCode))) | |||
| return true; | |||
| return false; | |||
| @@ -249252,7 +249243,7 @@ public: | |||
| CFRelease (runLoopSource); | |||
| while (messages.size() > 0) | |||
| delete ((Message*) messages.remove(0)); | |||
| delete static_cast <Message*> (messages.remove(0)); | |||
| } | |||
| virtual NSApplicationTerminateReply shouldTerminate() | |||
| @@ -249353,7 +249344,7 @@ private: | |||
| static void runLoopSourceCallback (void* info) | |||
| { | |||
| ((AppDelegateRedirector*) info)->runLoopCallback(); | |||
| static_cast <AppDelegateRedirector*> (info)->runLoopCallback(); | |||
| } | |||
| }; | |||
| @@ -4746,8 +4746,6 @@ public: | |||
| void setValue (const String& keyName, const String& value) throw(); | |||
| void setValue (const String& keyName, const tchar* const value) throw(); | |||
| void setValue (const String& keyName, const int value) throw(); | |||
| void setValue (const String& keyName, const double value) throw(); | |||
| @@ -14515,19 +14513,19 @@ public: | |||
| ~WavAudioFormat(); | |||
| static const tchar* const bwavDescription; | |||
| static const char* const bwavDescription; | |||
| static const tchar* const bwavOriginator; | |||
| static const char* const bwavOriginator; | |||
| static const tchar* const bwavOriginatorRef; | |||
| static const char* const bwavOriginatorRef; | |||
| static const tchar* const bwavOriginationDate; | |||
| static const char* const bwavOriginationDate; | |||
| static const tchar* const bwavOriginationTime; | |||
| static const char* const bwavOriginationTime; | |||
| static const tchar* const bwavTimeReference; | |||
| static const char* const bwavTimeReference; | |||
| static const tchar* const bwavCodingHistory; | |||
| static const char* const bwavCodingHistory; | |||
| static const StringPairArray createBWAVMetadata (const String& description, | |||
| const String& originator, | |||
| @@ -16515,7 +16513,7 @@ class JUCE_API TextEditor : public Component, | |||
| public: | |||
| explicit TextEditor (const String& componentName = String::empty, | |||
| tchar passwordCharacter = 0); | |||
| juce_wchar passwordCharacter = 0); | |||
| virtual ~TextEditor(); | |||
| @@ -16544,9 +16542,9 @@ public: | |||
| bool areScrollbarsShown() const { return scrollbarVisible; } | |||
| void setPasswordCharacter (tchar passwordCharacter); | |||
| void setPasswordCharacter (juce_wchar passwordCharacter); | |||
| tchar getPasswordCharacter() const { return passwordCharacter; } | |||
| juce_wchar getPasswordCharacter() const { return passwordCharacter; } | |||
| void setPopupMenuEnabled (bool menuEnabled); | |||
| @@ -16729,7 +16727,7 @@ private: | |||
| VoidArray sections; | |||
| String textToShowWhenEmpty; | |||
| Colour colourForTextWhenEmpty; | |||
| tchar passwordCharacter; | |||
| juce_wchar passwordCharacter; | |||
| Value textValue; | |||
| enum | |||
| @@ -20413,10 +20411,11 @@ public: | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| VoidArray tasks; | |||
| class AnimationTask; | |||
| Array <AnimationTask*> tasks; | |||
| uint32 lastTime; | |||
| void* findTaskFor (Component* component) const; | |||
| AnimationTask* findTaskFor (Component* component) const; | |||
| void timerCallback(); | |||
| }; | |||
| @@ -20537,7 +20536,7 @@ private: | |||
| Array <ToolbarItemComponent*> items; | |||
| friend class ItemDragAndDropOverlayComponent; | |||
| static const tchar* const toolbarDragDescriptor; | |||
| static const char* const toolbarDragDescriptor; | |||
| void addItemInternal (ToolbarItemFactory& factory, const int itemId, const int insertIndex); | |||
| @@ -20704,7 +20703,7 @@ public: | |||
| const Position movedByLines (int deltaLines) const throw(); | |||
| const tchar getCharacter() const throw(); | |||
| const juce_wchar getCharacter() const throw(); | |||
| const String getLineText() const throw(); | |||
| @@ -24628,41 +24627,41 @@ class JUCE_API TextLayout | |||
| { | |||
| public: | |||
| TextLayout() throw(); | |||
| TextLayout(); | |||
| TextLayout (const TextLayout& other) throw(); | |||
| TextLayout (const TextLayout& other); | |||
| TextLayout (const String& text, const Font& font) throw(); | |||
| TextLayout (const String& text, const Font& font); | |||
| ~TextLayout() throw(); | |||
| ~TextLayout(); | |||
| TextLayout& operator= (const TextLayout& layoutToCopy) throw(); | |||
| TextLayout& operator= (const TextLayout& layoutToCopy); | |||
| void clear() throw(); | |||
| void clear(); | |||
| void appendText (const String& textToAppend, | |||
| const Font& fontToUse) throw(); | |||
| const Font& fontToUse); | |||
| void setText (const String& newText, | |||
| const Font& fontToUse) throw(); | |||
| const Font& fontToUse); | |||
| void layout (int maximumWidth, | |||
| const Justification& justification, | |||
| bool attemptToBalanceLineLengths) throw(); | |||
| bool attemptToBalanceLineLengths); | |||
| int getWidth() const throw(); | |||
| int getWidth() const; | |||
| int getHeight() const throw(); | |||
| int getHeight() const; | |||
| int getNumLines() const throw() { return totalLines; } | |||
| int getNumLines() const { return totalLines; } | |||
| int getLineWidth (int lineNumber) const throw(); | |||
| int getLineWidth (int lineNumber) const; | |||
| void draw (Graphics& g, int topLeftX, int topLeftY) const throw(); | |||
| void draw (Graphics& g, int topLeftX, int topLeftY) const; | |||
| void drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& layoutFlags) const throw(); | |||
| const Justification& layoutFlags) const; | |||
| juce_UseDebuggingNewOperator | |||
| @@ -34,7 +34,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static const char* const aiffFormatName = "AIFF file"; | |||
| static const tchar* const aiffExtensions[] = { T(".aiff"), T(".aif"), 0 }; | |||
| static const juce_wchar* const aiffExtensions[] = { T(".aiff"), T(".aif"), 0 }; | |||
| //============================================================================== | |||
| @@ -93,8 +93,8 @@ public: | |||
| || (byte0 == 0x40 && sampleRateBytes[1] > 0x1C)) | |||
| break; | |||
| unsigned int sampRate = ByteOrder::bigEndianInt ((char*) sampleRateBytes + 2); | |||
| sampRate >>= (16414 - ByteOrder::bigEndianShort ((char*) sampleRateBytes)); | |||
| unsigned int sampRate = ByteOrder::bigEndianInt (sampleRateBytes + 2); | |||
| sampRate >>= (16414 - ByteOrder::bigEndianShort (sampleRateBytes)); | |||
| sampleRate = (int) sampRate; | |||
| if (length <= 18) | |||
| @@ -190,7 +190,7 @@ public: | |||
| { | |||
| if (littleEndian) | |||
| { | |||
| const short* src = (const short*) tempBuffer; | |||
| const short* src = reinterpret_cast <const short*> (tempBuffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -229,7 +229,7 @@ public: | |||
| } | |||
| else | |||
| { | |||
| const char* src = (const char*) tempBuffer; | |||
| const char* src = tempBuffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -360,9 +360,9 @@ public: | |||
| } | |||
| else if (bitsPerSample == 32) | |||
| { | |||
| const unsigned int* src = (const unsigned int*) tempBuffer; | |||
| unsigned int* l = (unsigned int*) left; | |||
| unsigned int* r = (unsigned int*) right; | |||
| const unsigned int* src = reinterpret_cast <const unsigned int*> (tempBuffer); | |||
| unsigned int* l = reinterpret_cast <unsigned int*> (left); | |||
| unsigned int* r = reinterpret_cast <unsigned int*> (right); | |||
| if (littleEndian) | |||
| { | |||
| @@ -439,12 +439,12 @@ public: | |||
| } | |||
| } | |||
| left = (int*) l; | |||
| right = (int*) r; | |||
| left = reinterpret_cast <int*> (l); | |||
| right = reinterpret_cast <int*> (r); | |||
| } | |||
| else if (bitsPerSample == 8) | |||
| { | |||
| const char* src = (const char*) tempBuffer; | |||
| const char* src = tempBuffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -628,7 +628,7 @@ public: | |||
| const int bytes = numChannels * numSamples * bitsPerSample / 8; | |||
| tempBlock.ensureSize (bytes, false); | |||
| char* buffer = (char*) tempBlock.getData(); | |||
| char* buffer = static_cast <char*> (tempBlock.getData()); | |||
| const int* left = data[0]; | |||
| const int* right = data[1]; | |||
| @@ -637,7 +637,7 @@ public: | |||
| if (bitsPerSample == 16) | |||
| { | |||
| short* b = (short*) buffer; | |||
| short* b = reinterpret_cast <short*> (buffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -657,7 +657,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 24) | |||
| { | |||
| char* b = (char*) buffer; | |||
| char* b = buffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -680,7 +680,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 32) | |||
| { | |||
| uint32* b = (uint32*) buffer; | |||
| uint32* b = reinterpret_cast <uint32*> (buffer); | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -700,7 +700,7 @@ public: | |||
| } | |||
| else if (bitsPerSample == 8) | |||
| { | |||
| char* b = (char*) buffer; | |||
| char* b = buffer; | |||
| if (numChannels > 1) | |||
| { | |||
| @@ -743,7 +743,7 @@ public: | |||
| //============================================================================== | |||
| AiffAudioFormat::AiffAudioFormat() | |||
| : AudioFormat (TRANS (aiffFormatName), (const tchar**) aiffExtensions) | |||
| : AudioFormat (TRANS (aiffFormatName), (const juce_wchar**) aiffExtensions) | |||
| { | |||
| } | |||
| @@ -70,7 +70,7 @@ BEGIN_JUCE_NAMESPACE | |||
| bool juce_OpenQuickTimeMovieFromStream (InputStream* input, Movie& movie, Handle& dataHandle); | |||
| static const char* const quickTimeFormatName = "QuickTime file"; | |||
| static const tchar* const quickTimeExtensions[] = { T(".mov"), T(".mp3"), T(".mp4"), 0 }; | |||
| static const juce_wchar* const quickTimeExtensions[] = { T(".mov"), T(".mp3"), T(".mp4"), 0 }; | |||
| //============================================================================== | |||
| class QTAudioReader : public AudioFormatReader | |||
| @@ -345,7 +345,7 @@ private: | |||
| //============================================================================== | |||
| QuickTimeAudioFormat::QuickTimeAudioFormat() | |||
| : AudioFormat (TRANS (quickTimeFormatName), (const tchar**) quickTimeExtensions) | |||
| : AudioFormat (TRANS (quickTimeFormatName), (const juce_wchar**) quickTimeExtensions) | |||
| { | |||
| } | |||
| @@ -36,17 +36,17 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static const char* const wavFormatName = "WAV file"; | |||
| static const tchar* const wavExtensions[] = { T(".wav"), T(".bwf"), 0 }; | |||
| static const juce_wchar* const wavExtensions[] = { T(".wav"), T(".bwf"), 0 }; | |||
| //============================================================================== | |||
| const tchar* const WavAudioFormat::bwavDescription = T("bwav description"); | |||
| const tchar* const WavAudioFormat::bwavOriginator = T("bwav originator"); | |||
| const tchar* const WavAudioFormat::bwavOriginatorRef = T("bwav originator ref"); | |||
| const tchar* const WavAudioFormat::bwavOriginationDate = T("bwav origination date"); | |||
| const tchar* const WavAudioFormat::bwavOriginationTime = T("bwav origination time"); | |||
| const tchar* const WavAudioFormat::bwavTimeReference = T("bwav time reference"); | |||
| const tchar* const WavAudioFormat::bwavCodingHistory = T("bwav coding history"); | |||
| const char* const WavAudioFormat::bwavDescription = "bwav description"; | |||
| const char* const WavAudioFormat::bwavOriginator = "bwav originator"; | |||
| const char* const WavAudioFormat::bwavOriginatorRef = "bwav originator ref"; | |||
| const char* const WavAudioFormat::bwavOriginationDate = "bwav origination date"; | |||
| const char* const WavAudioFormat::bwavOriginationTime = "bwav origination time"; | |||
| const char* const WavAudioFormat::bwavTimeReference = "bwav time reference"; | |||
| const char* const WavAudioFormat::bwavCodingHistory = "bwav coding history"; | |||
| const StringPairArray WavAudioFormat::createBWAVMetadata (const String& description, | |||
| const String& originator, | |||
| @@ -820,7 +820,7 @@ public: | |||
| //============================================================================== | |||
| WavAudioFormat::WavAudioFormat() | |||
| : AudioFormat (TRANS (wavFormatName), (const tchar**) wavExtensions) | |||
| : AudioFormat (TRANS (wavFormatName), (const juce_wchar**) wavExtensions) | |||
| { | |||
| } | |||
| @@ -51,21 +51,21 @@ public: | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavDescription; | |||
| static const char* const bwavDescription; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavOriginator; | |||
| static const char* const bwavOriginator; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavOriginatorRef; | |||
| static const char* const bwavOriginatorRef; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @@ -74,7 +74,7 @@ public: | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavOriginationDate; | |||
| static const char* const bwavOriginationDate; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @@ -83,7 +83,7 @@ public: | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavOriginationTime; | |||
| static const char* const bwavOriginationTime; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @@ -95,7 +95,7 @@ public: | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavTimeReference; | |||
| static const char* const bwavTimeReference; | |||
| /** Metadata property name used by wav readers and writers for adding | |||
| a BWAV chunk to the file. | |||
| @@ -104,7 +104,7 @@ public: | |||
| @see AudioFormatReader::metadataValues, createWriterFor | |||
| */ | |||
| static const tchar* const bwavCodingHistory; | |||
| static const char* const bwavCodingHistory; | |||
| /** Utility function to fill out the appropriate metadata for a BWAV file. | |||
| @@ -167,11 +167,6 @@ void PropertySet::removeValue (const String& keyName) throw() | |||
| } | |||
| } | |||
| void PropertySet::setValue (const String& keyName, const tchar* const value) throw() | |||
| { | |||
| setValue (keyName, String (value)); | |||
| } | |||
| void PropertySet::setValue (const String& keyName, const int value) throw() | |||
| { | |||
| setValue (keyName, String (value)); | |||
| @@ -135,13 +135,6 @@ public: | |||
| */ | |||
| void setValue (const String& keyName, const String& value) throw(); | |||
| /** Sets a named property as a string. | |||
| @param keyName the name of the property to set. (This mustn't be an empty string) | |||
| @param value the new value to set it to | |||
| */ | |||
| void setValue (const String& keyName, const tchar* const value) throw(); | |||
| /** Sets a named property to an integer. | |||
| @param keyName the name of the property to set. (This mustn't be an empty string) | |||
| @@ -391,7 +391,7 @@ void ValueTree::SharedObject::removeAllChildren (UndoManager* const undoManager) | |||
| //============================================================================== | |||
| ValueTree ValueTree::invalid ((ValueTree::SharedObject*) 0); | |||
| ValueTree ValueTree::invalid (static_cast <ValueTree::SharedObject*> (0)); | |||
| ValueTree::ValueTree (const String& type_) | |||
| : object (new ValueTree::SharedObject (type_)) | |||
| @@ -43,13 +43,13 @@ CPlusPlusCodeTokeniser::~CPlusPlusCodeTokeniser() | |||
| namespace CppTokeniser | |||
| { | |||
| static bool isIdentifierStart (const tchar c) throw() | |||
| static bool isIdentifierStart (const juce_wchar c) throw() | |||
| { | |||
| return CharacterFunctions::isLetter (c) | |||
| || c == '_' || c == '@'; | |||
| } | |||
| static bool isIdentifierBody (const tchar c) throw() | |||
| static bool isIdentifierBody (const juce_wchar c) throw() | |||
| { | |||
| return CharacterFunctions::isLetter (c) | |||
| || CharacterFunctions::isDigit (c) | |||
| @@ -58,26 +58,26 @@ static bool isIdentifierBody (const tchar c) throw() | |||
| static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| { | |||
| static const tchar* keywords2Char[] = | |||
| static const juce_wchar* keywords2Char[] = | |||
| { T("if"), T("do"), T("or"), 0 }; | |||
| static const tchar* keywords3Char[] = | |||
| static const juce_wchar* keywords3Char[] = | |||
| { T("for"), T("int"), T("new"), T("try"), T("xor"), T("and"), T("asm"), T("not"), 0 }; | |||
| static const tchar* keywords4Char[] = | |||
| static const juce_wchar* keywords4Char[] = | |||
| { T("bool"), T("void"), T("this"), T("true"), T("long"), T("else"), T("char"), | |||
| T("enum"), T("case"), T("goto"), T("auto"), 0 }; | |||
| static const tchar* keywords5Char[] = | |||
| static const juce_wchar* keywords5Char[] = | |||
| { T("while"), T("bitor"), T("break"), T("catch"), T("class"), T("compl"), T("const"), T("false"), | |||
| T("float"), T("short"), T("throw"), T("union"), T("using"), T("or_eq"), 0 }; | |||
| static const tchar* keywords6Char[] = | |||
| static const juce_wchar* keywords6Char[] = | |||
| { T("return"), T("struct"), T("and_eq"), T("bitand"), T("delete"), T("double"), T("extern"), | |||
| T("friend"), T("inline"), T("not_eq"), T("public"), T("sizeof"), T("static"), T("signed"), | |||
| T("switch"), T("typeid"), T("wchar_t"), T("xor_eq"), 0}; | |||
| static const tchar* keywordsOther[] = | |||
| static const juce_wchar* keywordsOther[] = | |||
| { T("const_cast"), T("continue"), T("default"), T("explicit"), T("mutable"), T("namespace"), | |||
| T("operator"), T("private"), T("protected"), T("register"), T("reinterpret_cast"), T("static_cast"), | |||
| T("template"), T("typedef"), T("typename"), T("unsigned"), T("virtual"), T("volatile"), | |||
| @@ -85,11 +85,11 @@ static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| T("@private"), T("@property"), T("@protected"), T("@class"), 0 }; | |||
| int tokenLength = 0; | |||
| tchar possibleIdentifier [19]; | |||
| juce_wchar possibleIdentifier [19]; | |||
| while (isIdentifierBody (source.peekNextChar())) | |||
| { | |||
| const tchar c = source.nextChar(); | |||
| const juce_wchar c = source.nextChar(); | |||
| if (tokenLength < numElementsInArray (possibleIdentifier) - 1) | |||
| possibleIdentifier [tokenLength] = c; | |||
| @@ -100,7 +100,7 @@ static int parseIdentifier (CodeDocument::Iterator& source) throw() | |||
| if (tokenLength > 1 && tokenLength <= 16) | |||
| { | |||
| possibleIdentifier [tokenLength] = 0; | |||
| const tchar** k; | |||
| const juce_wchar** k; | |||
| switch (tokenLength) | |||
| { | |||
| @@ -329,7 +329,7 @@ int CPlusPlusCodeTokeniser::readNextToken (CodeDocument::Iterator& source) | |||
| int result = tokenType_error; | |||
| source.skipWhitespace(); | |||
| tchar firstChar = source.peekNextChar(); | |||
| juce_wchar firstChar = source.peekNextChar(); | |||
| switch (firstChar) | |||
| { | |||
| @@ -34,7 +34,7 @@ BEGIN_JUCE_NAMESPACE | |||
| class CodeDocumentLine | |||
| { | |||
| public: | |||
| CodeDocumentLine (const tchar* const line_, | |||
| CodeDocumentLine (const juce_wchar* const line_, | |||
| const int lineLength_, | |||
| const int numNewLineChars, | |||
| const int lineStartInFile_) | |||
| @@ -404,7 +404,7 @@ const CodeDocument::Position CodeDocument::Position::movedByLines (const int del | |||
| return p; | |||
| } | |||
| const tchar CodeDocument::Position::getCharacter() const throw() | |||
| const juce_wchar CodeDocument::Position::getCharacter() const throw() | |||
| { | |||
| const CodeDocumentLine* const l = owner->lines [line]; | |||
| return l == 0 ? 0 : l->line [getIndexInLine()]; | |||
| @@ -603,7 +603,7 @@ bool CodeDocument::hasChangedSinceSavePoint() const throw() | |||
| } | |||
| //============================================================================== | |||
| static int getCodeCharacterCategory (const tchar character) throw() | |||
| static int getCodeCharacterCategory (const juce_wchar character) throw() | |||
| { | |||
| return (CharacterFunctions::isLetterOrDigit (character) || character == '_') | |||
| ? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1); | |||
| @@ -656,7 +656,7 @@ const CodeDocument::Position CodeDocument::findWordBreakBefore (const Position& | |||
| while (i < maxDistance) | |||
| { | |||
| const tchar c = p.movedBy (-1).getCharacter(); | |||
| const juce_wchar c = p.movedBy (-1).getCharacter(); | |||
| if (c == '\r' || c == '\n') | |||
| { | |||
| @@ -175,7 +175,7 @@ public: | |||
| /** Returns the character in the document at this position. | |||
| @see getLineText | |||
| */ | |||
| const tchar getCharacter() const throw(); | |||
| const juce_wchar getCharacter() const throw(); | |||
| /** Returns the line from the document that this position is within. | |||
| @see getCharacter, getLineNumber | |||
| @@ -49,7 +49,7 @@ struct TextAtom | |||
| bool isWhitespace() const { return CharacterFunctions::isWhitespace (atomText[0]); } | |||
| bool isNewLine() const { return atomText[0] == '\r' || atomText[0] == '\n'; } | |||
| const String getText (const tchar passwordCharacter) const | |||
| const String getText (const juce_wchar passwordCharacter) const | |||
| { | |||
| if (passwordCharacter == 0) | |||
| return atomText; | |||
| @@ -58,7 +58,7 @@ struct TextAtom | |||
| atomText.length()); | |||
| } | |||
| const String getTrimmedText (const tchar passwordCharacter) const | |||
| const String getTrimmedText (const juce_wchar passwordCharacter) const | |||
| { | |||
| if (passwordCharacter == 0) | |||
| return atomText.substring (0, numChars); | |||
| @@ -78,7 +78,7 @@ public: | |||
| UniformTextSection (const String& text, | |||
| const Font& font_, | |||
| const Colour& colour_, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| : font (font_), | |||
| colour (colour_) | |||
| { | |||
| @@ -118,7 +118,7 @@ public: | |||
| return (TextAtom*) atoms.getUnchecked (index); | |||
| } | |||
| void append (const UniformTextSection& other, const tchar passwordCharacter) | |||
| void append (const UniformTextSection& other, const juce_wchar passwordCharacter) | |||
| { | |||
| if (other.atoms.size() > 0) | |||
| { | |||
| @@ -153,7 +153,7 @@ public: | |||
| } | |||
| UniformTextSection* split (const int indexToBreakAt, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| UniformTextSection* const section2 = new UniformTextSection (String::empty, | |||
| font, colour, | |||
| @@ -248,7 +248,7 @@ public: | |||
| } | |||
| void setFont (const Font& newFont, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| if (font != newFont) | |||
| { | |||
| @@ -273,7 +273,7 @@ private: | |||
| //============================================================================== | |||
| void initialiseAtoms (const String& textToParse, | |||
| const tchar passwordCharacter) | |||
| const juce_wchar passwordCharacter) | |||
| { | |||
| int i = 0; | |||
| const int len = textToParse.length(); | |||
| @@ -339,7 +339,7 @@ public: | |||
| //============================================================================== | |||
| TextEditorIterator (const VoidArray& sections_, | |||
| const float wordWrapWidth_, | |||
| const tchar passwordCharacter_) | |||
| const juce_wchar passwordCharacter_) | |||
| : indexInText (0), | |||
| lineY (0), | |||
| lineHeight (0), | |||
| @@ -730,7 +730,7 @@ private: | |||
| const VoidArray& sections; | |||
| int sectionIndex, atomIndex; | |||
| const float wordWrapWidth; | |||
| const tchar passwordCharacter; | |||
| const juce_wchar passwordCharacter; | |||
| TextAtom tempAtom; | |||
| TextEditorIterator& operator= (const TextEditorIterator&); | |||
| @@ -963,7 +963,7 @@ namespace TextEditorDefs | |||
| //============================================================================== | |||
| TextEditor::TextEditor (const String& name, | |||
| const tchar passwordCharacter_) | |||
| const juce_wchar passwordCharacter_) | |||
| : Component (name), | |||
| borderSize (1, 1, 1, 3), | |||
| readOnly (false), | |||
| @@ -1154,7 +1154,7 @@ void TextEditor::setTextToShowWhenEmpty (const String& text, const Colour& colou | |||
| colourForTextWhenEmpty = colourToUse; | |||
| } | |||
| void TextEditor::setPasswordCharacter (const tchar newPasswordCharacter) | |||
| void TextEditor::setPasswordCharacter (const juce_wchar newPasswordCharacter) | |||
| { | |||
| if (passwordCharacter != newPasswordCharacter) | |||
| { | |||
| @@ -2530,7 +2530,7 @@ int TextEditor::indexAtPosition (const float x, const float y) | |||
| } | |||
| //============================================================================== | |||
| static int getCharacterCategory (const tchar character) | |||
| static int getCharacterCategory (const juce_wchar character) | |||
| { | |||
| return CharacterFunctions::isLetterOrDigit (character) | |||
| ? 2 : (CharacterFunctions::isWhitespace (character) ? 0 : 1); | |||
| @@ -90,7 +90,7 @@ public: | |||
| which is a bullet (probably the best choice for linux). | |||
| */ | |||
| explicit TextEditor (const String& componentName = String::empty, | |||
| tchar passwordCharacter = 0); | |||
| juce_wchar passwordCharacter = 0); | |||
| /** Destructor. */ | |||
| virtual ~TextEditor(); | |||
| @@ -187,7 +187,7 @@ public: | |||
| /** Returns true if scrollbars are enabled. | |||
| @see setScrollbarsShown | |||
| */ | |||
| bool areScrollbarsShown() const { return scrollbarVisible; } | |||
| bool areScrollbarsShown() const { return scrollbarVisible; } | |||
| /** Changes the password character used to disguise the text. | |||
| @@ -199,12 +199,12 @@ public: | |||
| for a black splodge (not all fonts include this, though), or 0x2022, | |||
| which is a bullet (probably the best choice for linux). | |||
| */ | |||
| void setPasswordCharacter (tchar passwordCharacter); | |||
| void setPasswordCharacter (juce_wchar passwordCharacter); | |||
| /** Returns the current password character. | |||
| @see setPasswordCharacter | |||
| l */ | |||
| tchar getPasswordCharacter() const { return passwordCharacter; } | |||
| */ | |||
| juce_wchar getPasswordCharacter() const { return passwordCharacter; } | |||
| //============================================================================== | |||
| @@ -640,7 +640,7 @@ private: | |||
| VoidArray sections; | |||
| String textToShowWhenEmpty; | |||
| Colour colourForTextWhenEmpty; | |||
| tchar passwordCharacter; | |||
| juce_wchar passwordCharacter; | |||
| Value textValue; | |||
| enum | |||
| @@ -40,7 +40,7 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "juce_ComboBox.h" | |||
| #include "../buttons/juce_TextButton.h" | |||
| const tchar* const Toolbar::toolbarDragDescriptor = T("_toolbarItem_"); | |||
| const char* const Toolbar::toolbarDragDescriptor = "_toolbarItem_"; | |||
| //============================================================================== | |||
| @@ -303,7 +303,7 @@ private: | |||
| Array <ToolbarItemComponent*> items; | |||
| friend class ItemDragAndDropOverlayComponent; | |||
| static const tchar* const toolbarDragDescriptor; | |||
| static const char* const toolbarDragDescriptor; | |||
| void addItemInternal (ToolbarItemFactory& factory, const int itemId, const int insertIndex); | |||
| @@ -79,8 +79,8 @@ bool KeyPress::operator== (const KeyPress& other) const throw() | |||
| && (keyCode == other.keyCode | |||
| || (keyCode < 256 | |||
| && other.keyCode < 256 | |||
| && CharacterFunctions::toLowerCase ((tchar) keyCode) | |||
| == CharacterFunctions::toLowerCase ((tchar) other.keyCode))); | |||
| && CharacterFunctions::toLowerCase ((juce_wchar) keyCode) | |||
| == CharacterFunctions::toLowerCase ((juce_wchar) other.keyCode))); | |||
| } | |||
| bool KeyPress::operator!= (const KeyPress& other) const throw() | |||
| @@ -168,7 +168,7 @@ const KeyPress KeyPress::createFromDescription (const String& desc) | |||
| // see if it's a numpad key.. | |||
| if (desc.containsIgnoreCase (KeyPressHelpers::numberPadPrefix())) | |||
| { | |||
| const tchar lastChar = desc.trimEnd().getLastCharacter(); | |||
| const juce_wchar lastChar = desc.trimEnd().getLastCharacter(); | |||
| if (lastChar >= '0' && lastChar <= '9') | |||
| key = numberPad0 + lastChar - '0'; | |||
| @@ -255,7 +255,7 @@ const String KeyPress::getTextDescription() const | |||
| else if (keyCode >= numberPad0 && keyCode <= numberPad9) | |||
| desc << KeyPressHelpers::numberPadPrefix() << (keyCode - numberPad0); | |||
| else if (keyCode >= 33 && keyCode < 176) | |||
| desc += CharacterFunctions::toUpperCase ((tchar) keyCode); | |||
| desc += CharacterFunctions::toUpperCase ((juce_wchar) keyCode); | |||
| else if (keyCode == numberPadAdd) | |||
| desc << KeyPressHelpers::numberPadPrefix() << '+'; | |||
| else if (keyCode == numberPadSubtract) | |||
| @@ -32,8 +32,9 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| struct AnimationTask | |||
| class ComponentAnimator::AnimationTask | |||
| { | |||
| public: | |||
| AnimationTask (Component* const comp) | |||
| : component (comp) | |||
| { | |||
| @@ -112,10 +113,10 @@ ComponentAnimator::~ComponentAnimator() | |||
| } | |||
| //============================================================================== | |||
| void* ComponentAnimator::findTaskFor (Component* const component) const | |||
| ComponentAnimator::AnimationTask* ComponentAnimator::findTaskFor (Component* const component) const | |||
| { | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| if (component == ((AnimationTask*) tasks.getUnchecked(i))->component.getComponent()) | |||
| if (component == tasks.getUnchecked(i)->component.getComponent()) | |||
| return tasks.getUnchecked(i); | |||
| return 0; | |||
| @@ -129,7 +130,7 @@ void ComponentAnimator::animateComponent (Component* const component, | |||
| { | |||
| if (component != 0) | |||
| { | |||
| AnimationTask* at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* at = findTaskFor (component); | |||
| if (at == 0) | |||
| { | |||
| @@ -168,7 +169,7 @@ void ComponentAnimator::cancelAllAnimations (const bool moveComponentsToTheirFin | |||
| { | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) tasks.getUnchecked(i); | |||
| AnimationTask* const at = tasks.getUnchecked(i); | |||
| if (moveComponentsToTheirFinalPositions) | |||
| at->moveToFinalDestination(); | |||
| @@ -182,7 +183,7 @@ void ComponentAnimator::cancelAllAnimations (const bool moveComponentsToTheirFin | |||
| void ComponentAnimator::cancelAnimation (Component* const component, | |||
| const bool moveComponentToItsFinalPosition) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* const at = findTaskFor (component); | |||
| if (at != 0) | |||
| { | |||
| @@ -197,7 +198,7 @@ void ComponentAnimator::cancelAnimation (Component* const component, | |||
| const Rectangle<int> ComponentAnimator::getComponentDestination (Component* const component) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) findTaskFor (component); | |||
| AnimationTask* const at = findTaskFor (component); | |||
| if (at != 0) | |||
| return at->destination; | |||
| @@ -223,7 +224,7 @@ void ComponentAnimator::timerCallback() | |||
| for (int i = tasks.size(); --i >= 0;) | |||
| { | |||
| AnimationTask* const at = (AnimationTask*) tasks.getUnchecked(i); | |||
| AnimationTask* const at = tasks.getUnchecked(i); | |||
| if (! at->useTimeslice (elapsed)) | |||
| { | |||
| @@ -127,10 +127,11 @@ public: | |||
| juce_UseDebuggingNewOperator | |||
| private: | |||
| VoidArray tasks; | |||
| class AnimationTask; | |||
| Array <AnimationTask*> tasks; | |||
| uint32 lastTime; | |||
| void* findTaskFor (Component* component) const; | |||
| AnimationTask* findTaskFor (Component* component) const; | |||
| void timerCallback(); | |||
| }; | |||
| @@ -39,18 +39,13 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "../../../application/juce_Application.h" | |||
| #include "../../../containers/juce_ScopedPointer.h" | |||
| static const int titleH = 24; | |||
| static const int iconWidth = 80; | |||
| //============================================================================== | |||
| class AlertWindowTextEditor : public TextEditor | |||
| { | |||
| public: | |||
| static const tchar passwordChar; | |||
| AlertWindowTextEditor (const String& name, const bool isPasswordBox) | |||
| : TextEditor (name, isPasswordBox ? passwordChar : 0) | |||
| : TextEditor (name, isPasswordBox ? getDefaultPasswordChar() : 0) | |||
| { | |||
| setSelectAllWhenFocused (true); | |||
| } | |||
| @@ -74,13 +69,17 @@ public: | |||
| private: | |||
| AlertWindowTextEditor (const AlertWindowTextEditor&); | |||
| AlertWindowTextEditor& operator= (const AlertWindowTextEditor&); | |||
| static juce_wchar getDefaultPasswordChar() throw() | |||
| { | |||
| #if JUCE_LINUX | |||
| return 0x2022; | |||
| #else | |||
| return 0x25cf; | |||
| #endif | |||
| } | |||
| }; | |||
| #if JUCE_LINUX | |||
| const tchar AlertWindowTextEditor::passwordChar = 0x2022; | |||
| #else | |||
| const tchar AlertWindowTextEditor::passwordChar = 0x25cf; | |||
| #endif | |||
| //============================================================================== | |||
| AlertWindow::AlertWindow (const String& title, | |||
| @@ -402,6 +401,9 @@ void AlertWindow::paint (Graphics& g) | |||
| void AlertWindow::updateLayout (const bool onlyIncreaseSize) | |||
| { | |||
| const int titleH = 24; | |||
| const int iconWidth = 80; | |||
| const int wid = jmax (font.getStringWidth (text), | |||
| font.getStringWidth (getName())); | |||
| @@ -219,7 +219,7 @@ private: | |||
| int index = 0; | |||
| float lastX = 0, lastY = 0; | |||
| float lastX2 = 0, lastY2 = 0; | |||
| tchar lastCommandChar = 0; | |||
| juce_wchar lastCommandChar = 0; | |||
| bool isRelative = true; | |||
| bool carryOn = true; | |||
| @@ -894,8 +894,8 @@ private: | |||
| { | |||
| const float dpi = 96.0f; | |||
| const tchar n1 = s [len - 2]; | |||
| const tchar n2 = s [len - 1]; | |||
| const juce_wchar n1 = s [len - 2]; | |||
| const juce_wchar n2 = s [len - 1]; | |||
| if (n1 == 'i' && n2 == 'n') | |||
| n *= dpi; | |||
| @@ -993,7 +993,7 @@ private: | |||
| } | |||
| //============================================================================== | |||
| static bool isIdentifierChar (const tchar c) | |||
| static bool isIdentifierChar (const juce_wchar c) | |||
| { | |||
| return CharacterFunctions::isLetter (c) || c == '-'; | |||
| } | |||
| @@ -55,7 +55,7 @@ public: | |||
| isNewLine = t.containsChar ('\n') || t.containsChar ('\r'); | |||
| } | |||
| Token (const Token& other) throw() | |||
| Token (const Token& other) | |||
| : text (other.text), | |||
| font (other.font), | |||
| x (other.x), | |||
| @@ -69,7 +69,7 @@ public: | |||
| { | |||
| } | |||
| ~Token() throw() | |||
| ~Token() | |||
| { | |||
| } | |||
| @@ -92,27 +92,26 @@ public: | |||
| //============================================================================== | |||
| TextLayout::TextLayout() throw() | |||
| TextLayout::TextLayout() | |||
| : totalLines (0) | |||
| { | |||
| tokens.ensureStorageAllocated (64); | |||
| } | |||
| TextLayout::TextLayout (const String& text, | |||
| const Font& font) throw() | |||
| TextLayout::TextLayout (const String& text, const Font& font) | |||
| : totalLines (0) | |||
| { | |||
| tokens.ensureStorageAllocated (64); | |||
| appendText (text, font); | |||
| } | |||
| TextLayout::TextLayout (const TextLayout& other) throw() | |||
| TextLayout::TextLayout (const TextLayout& other) | |||
| : totalLines (0) | |||
| { | |||
| *this = other; | |||
| } | |||
| TextLayout& TextLayout::operator= (const TextLayout& other) throw() | |||
| TextLayout& TextLayout::operator= (const TextLayout& other) | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -127,28 +126,27 @@ TextLayout& TextLayout::operator= (const TextLayout& other) throw() | |||
| return *this; | |||
| } | |||
| TextLayout::~TextLayout() throw() | |||
| TextLayout::~TextLayout() | |||
| { | |||
| clear(); | |||
| } | |||
| //============================================================================== | |||
| void TextLayout::clear() throw() | |||
| void TextLayout::clear() | |||
| { | |||
| tokens.clear(); | |||
| totalLines = 0; | |||
| } | |||
| void TextLayout::appendText (const String& text, | |||
| const Font& font) throw() | |||
| void TextLayout::appendText (const String& text, const Font& font) | |||
| { | |||
| const tchar* t = text; | |||
| const juce_wchar* t = text; | |||
| String currentString; | |||
| int lastCharType = 0; | |||
| for (;;) | |||
| { | |||
| const tchar c = *t++; | |||
| const juce_wchar c = *t++; | |||
| if (c == 0) | |||
| break; | |||
| @@ -191,7 +189,7 @@ void TextLayout::appendText (const String& text, | |||
| tokens.add (new Token (currentString, font, lastCharType == 2)); | |||
| } | |||
| void TextLayout::setText (const String& text, const Font& font) throw() | |||
| void TextLayout::setText (const String& text, const Font& font) | |||
| { | |||
| clear(); | |||
| appendText (text, font); | |||
| @@ -200,7 +198,7 @@ void TextLayout::setText (const String& text, const Font& font) throw() | |||
| //============================================================================== | |||
| void TextLayout::layout (int maxWidth, | |||
| const Justification& justification, | |||
| const bool attemptToBalanceLineLengths) throw() | |||
| const bool attemptToBalanceLineLengths) | |||
| { | |||
| if (attemptToBalanceLineLengths) | |||
| { | |||
| @@ -316,7 +314,7 @@ void TextLayout::layout (int maxWidth, | |||
| } | |||
| //============================================================================== | |||
| int TextLayout::getLineWidth (const int lineNumber) const throw() | |||
| int TextLayout::getLineWidth (const int lineNumber) const | |||
| { | |||
| int maxW = 0; | |||
| @@ -331,7 +329,7 @@ int TextLayout::getLineWidth (const int lineNumber) const throw() | |||
| return maxW; | |||
| } | |||
| int TextLayout::getWidth() const throw() | |||
| int TextLayout::getWidth() const | |||
| { | |||
| int maxW = 0; | |||
| @@ -345,7 +343,7 @@ int TextLayout::getWidth() const throw() | |||
| return maxW; | |||
| } | |||
| int TextLayout::getHeight() const throw() | |||
| int TextLayout::getHeight() const | |||
| { | |||
| int maxH = 0; | |||
| @@ -363,7 +361,7 @@ int TextLayout::getHeight() const throw() | |||
| //============================================================================== | |||
| void TextLayout::draw (Graphics& g, | |||
| const int xOffset, | |||
| const int yOffset) const throw() | |||
| const int yOffset) const | |||
| { | |||
| for (int i = tokens.size(); --i >= 0;) | |||
| tokens.getUnchecked(i)->draw (g, xOffset, yOffset); | |||
| @@ -371,7 +369,7 @@ void TextLayout::draw (Graphics& g, | |||
| void TextLayout::drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& justification) const throw() | |||
| const Justification& justification) const | |||
| { | |||
| justification.applyToRectangle (x, y, getWidth(), getHeight(), | |||
| x, y, w, h); | |||
| @@ -54,23 +54,23 @@ public: | |||
| Text can then be appended using the appendText() method. | |||
| */ | |||
| TextLayout() throw(); | |||
| TextLayout(); | |||
| /** Creates a copy of another layout object. */ | |||
| TextLayout (const TextLayout& other) throw(); | |||
| TextLayout (const TextLayout& other); | |||
| /** Creates a text layout from an initial string and font. */ | |||
| TextLayout (const String& text, const Font& font) throw(); | |||
| TextLayout (const String& text, const Font& font); | |||
| /** Destructor. */ | |||
| ~TextLayout() throw(); | |||
| ~TextLayout(); | |||
| /** Copies another layout onto this one. */ | |||
| TextLayout& operator= (const TextLayout& layoutToCopy) throw(); | |||
| TextLayout& operator= (const TextLayout& layoutToCopy); | |||
| //============================================================================== | |||
| /** Clears the layout, removing all its text. */ | |||
| void clear() throw(); | |||
| void clear(); | |||
| /** Adds a string to the end of the arrangement. | |||
| @@ -79,14 +79,14 @@ public: | |||
| to wrap long lines into a paragraph and justify it. | |||
| */ | |||
| void appendText (const String& textToAppend, | |||
| const Font& fontToUse) throw(); | |||
| const Font& fontToUse); | |||
| /** Replaces all the text with a new string. | |||
| This is equivalent to calling clear() followed by appendText(). | |||
| */ | |||
| void setText (const String& newText, | |||
| const Font& fontToUse) throw(); | |||
| const Font& fontToUse); | |||
| //============================================================================== | |||
| /** Breaks the text up to form a paragraph with the given width. | |||
| @@ -103,29 +103,29 @@ public: | |||
| */ | |||
| void layout (int maximumWidth, | |||
| const Justification& justification, | |||
| bool attemptToBalanceLineLengths) throw(); | |||
| bool attemptToBalanceLineLengths); | |||
| //============================================================================== | |||
| /** Returns the overall width of the entire text layout. */ | |||
| int getWidth() const throw(); | |||
| int getWidth() const; | |||
| /** Returns the overall height of the entire text layout. */ | |||
| int getHeight() const throw(); | |||
| int getHeight() const; | |||
| /** Returns the total number of lines of text. */ | |||
| int getNumLines() const throw() { return totalLines; } | |||
| int getNumLines() const { return totalLines; } | |||
| /** Returns the width of a particular line of text. | |||
| @param lineNumber the line, from 0 to (getNumLines() - 1) | |||
| */ | |||
| int getLineWidth (int lineNumber) const throw(); | |||
| int getLineWidth (int lineNumber) const; | |||
| //============================================================================== | |||
| /** Renders the text at a specified position using a graphics context. | |||
| */ | |||
| void draw (Graphics& g, int topLeftX, int topLeftY) const throw(); | |||
| void draw (Graphics& g, int topLeftX, int topLeftY) const; | |||
| /** Renders the text within a specified rectangle using a graphics context. | |||
| @@ -134,7 +134,7 @@ public: | |||
| */ | |||
| void drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& layoutFlags) const throw(); | |||
| const Justification& layoutFlags) const; | |||
| //============================================================================== | |||
| @@ -64,12 +64,12 @@ namespace PathHelpers | |||
| } | |||
| } | |||
| static const String nextToken (const tchar*& t) | |||
| static const String nextToken (const juce_wchar*& t) | |||
| { | |||
| while (CharacterFunctions::isWhitespace (*t)) | |||
| ++t; | |||
| const tchar* const start = t; | |||
| const juce_wchar* const start = t; | |||
| while (*t != 0 && ! CharacterFunctions::isWhitespace (*t)) | |||
| ++t; | |||
| @@ -413,16 +413,12 @@ public: | |||
| } | |||
| // Add a glyph to a font | |||
| bool addGlyphToFont (const uint32 character, | |||
| const tchar* fontName, bool bold, bool italic, | |||
| CustomTypeface& dest) | |||
| bool addGlyphToFont (const uint32 character, const String& fontName, | |||
| bool bold, bool italic, CustomTypeface& dest) | |||
| { | |||
| FT_Face face = createFT_Face (fontName, bold, italic); | |||
| if (face != 0) | |||
| return addGlyph (face, dest, character); | |||
| return false; | |||
| return face != 0 && addGlyph (face, dest, character); | |||
| } | |||
| //============================================================================== | |||
| @@ -62,7 +62,7 @@ public: | |||
| CFRelease (runLoopSource); | |||
| while (messages.size() > 0) | |||
| delete ((Message*) messages.remove(0)); | |||
| delete static_cast <Message*> (messages.remove(0)); | |||
| } | |||
| virtual NSApplicationTerminateReply shouldTerminate() | |||
| @@ -163,7 +163,7 @@ private: | |||
| static void runLoopSourceCallback (void* info) | |||
| { | |||
| ((AppDelegateRedirector*) info)->runLoopCallback(); | |||
| static_cast <AppDelegateRedirector*> (info)->runLoopCallback(); | |||
| } | |||
| }; | |||
| @@ -764,11 +764,11 @@ bool KeyPress::isKeyCurrentlyDown (const int keyCode) | |||
| return true; | |||
| if (keyCode >= 'A' && keyCode <= 'Z' | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toLowerCase ((tchar) keyCode))) | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toLowerCase ((juce_wchar) keyCode))) | |||
| return true; | |||
| if (keyCode >= 'a' && keyCode <= 'z' | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toUpperCase ((tchar) keyCode))) | |||
| && NSViewComponentPeer::keysCurrentlyDown.contains ((int) CharacterFunctions::toUpperCase ((juce_wchar) keyCode))) | |||
| return true; | |||
| return false; | |||
| @@ -121,11 +121,11 @@ const String PlatformUtilities::convertToPrecomposedUnicode (const String& s) | |||
| { | |||
| result.preallocateStorage (bytesRead / sizeof (UniChar) + 2); | |||
| tchar* t = result; | |||
| juce_wchar* t = result; | |||
| unsigned int i; | |||
| for (i = 0; i < bytesRead / sizeof (UniChar); ++i) | |||
| t[i] = (tchar) tempOut[i]; | |||
| t[i] = (juce_wchar) tempOut[i]; | |||
| t[i] = 0; | |||
| } | |||
| @@ -71,7 +71,7 @@ const String SystemClipboard::getTextFromClipboard() | |||
| if (data != 0) | |||
| { | |||
| result = String (data, (int) (GlobalSize (bufH) / sizeof (tchar))); | |||
| result = String (data, (int) (GlobalSize (bufH) / sizeof (wchar_t))); | |||
| GlobalUnlock (bufH); | |||
| } | |||
| @@ -89,7 +89,7 @@ public: | |||
| if (headers != 0) | |||
| { | |||
| V_VT (&headersVar) = VT_BSTR; | |||
| V_BSTR (&headersVar) = SysAllocString ((const tchar*) headers->joinIntoString ("\r\n")); | |||
| V_BSTR (&headersVar) = SysAllocString ((const OLECHAR*) headers->joinIntoString ("\r\n")); | |||
| } | |||
| if (postData != 0 && postData->getSize() > 0) | |||
| @@ -54,11 +54,11 @@ const String LocalisedStrings::translate (const String& text) const | |||
| static int findCloseQuote (const String& text, int startPos) | |||
| { | |||
| tchar lastChar = 0; | |||
| juce_wchar lastChar = 0; | |||
| for (;;) | |||
| { | |||
| const tchar c = text [startPos]; | |||
| const juce_wchar c = text [startPos]; | |||
| if (c == 0 || (c == '"' && lastChar != '\\')) | |||
| break; | |||