| @@ -545,13 +545,13 @@ private: | |||
| //============================================================================== | |||
| void Typeface::initialiseTypefaceCharacteristics (const String& fontName, | |||
| bool bold, bool italic, | |||
| bool addAllGlyphsToFont) | |||
| bool addAllGlyphsToFont) throw() | |||
| { | |||
| FreeTypeInterface::getInstance() | |||
| ->createTypeface (fontName, bold, italic, *this, addAllGlyphsToFont); | |||
| } | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) throw() | |||
| { | |||
| FreeTypeInterface::getInstance() | |||
| ->addGlyphToFont (character, getName(), isBold(), isItalic(), *this); | |||
| @@ -176,7 +176,7 @@ void Thread::sleep (int millisecs) throw() | |||
| } | |||
| //============================================================================== | |||
| JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| CriticalSection::CriticalSection() throw() | |||
| { | |||
| pthread_mutexattr_t atts; | |||
| pthread_mutexattr_init (&atts); | |||
| @@ -184,22 +184,22 @@ JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| pthread_mutex_init (&internal, &atts); | |||
| } | |||
| JUCE_CALLTYPE CriticalSection::~CriticalSection() throw() | |||
| CriticalSection::~CriticalSection() throw() | |||
| { | |||
| pthread_mutex_destroy (&internal); | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::enter() const throw() | |||
| void CriticalSection::enter() const throw() | |||
| { | |||
| pthread_mutex_lock (&internal); | |||
| } | |||
| bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw() | |||
| bool CriticalSection::tryEnter() const throw() | |||
| { | |||
| return pthread_mutex_trylock (&internal) == 0; | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::exit() const throw() | |||
| void CriticalSection::exit() const throw() | |||
| { | |||
| pthread_mutex_unlock (&internal); | |||
| } | |||
| @@ -393,7 +393,7 @@ juce_ImplementSingleton_SingleThreaded (ATSFontHelperCache) | |||
| void Typeface::initialiseTypefaceCharacteristics (const String& fontName, | |||
| bool bold, | |||
| bool italic, | |||
| bool addAllGlyphsToFont) | |||
| bool addAllGlyphsToFont) throw() | |||
| { | |||
| ATSFontHelper* const helper = ATSFontHelperCache::getInstance() | |||
| ->getFont (fontName, bold, italic); | |||
| @@ -414,7 +414,7 @@ void Typeface::initialiseTypefaceCharacteristics (const String& fontName, | |||
| ATSFontHelperCache::getInstance()->releaseFont (helper); | |||
| } | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) throw() | |||
| { | |||
| ATSFontHelper* const helper = ATSFontHelperCache::getInstance() | |||
| ->getFont (getName(), isBold(), isItalic()); | |||
| @@ -47,7 +47,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| CriticalSection::CriticalSection() throw() | |||
| { | |||
| pthread_mutexattr_t atts; | |||
| pthread_mutexattr_init (&atts); | |||
| @@ -55,22 +55,22 @@ JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| pthread_mutex_init (&internal, &atts); | |||
| } | |||
| JUCE_CALLTYPE CriticalSection::~CriticalSection() throw() | |||
| CriticalSection::~CriticalSection() throw() | |||
| { | |||
| pthread_mutex_destroy (&internal); | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::enter() const throw() | |||
| void CriticalSection::enter() const throw() | |||
| { | |||
| pthread_mutex_lock (&internal); | |||
| } | |||
| bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw() | |||
| bool CriticalSection::tryEnter() const throw() | |||
| { | |||
| return pthread_mutex_trylock (&internal) == 0; | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::exit() const throw() | |||
| void CriticalSection::exit() const throw() | |||
| { | |||
| pthread_mutex_unlock (&internal); | |||
| } | |||
| @@ -537,7 +537,7 @@ static void addGlyphToTypeface (HDC dc, | |||
| } | |||
| //============================================================================== | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) | |||
| void Typeface::findAndAddSystemGlyph (juce_wchar character) throw() | |||
| { | |||
| HDC dc = FontDCHolder::getInstance()->loadFont (getName(), isBold(), isItalic(), 0); | |||
| addGlyphToTypeface (dc, character, *this, true); | |||
| @@ -595,7 +595,7 @@ void Typeface::findAndAddSystemGlyph (juce_wchar character) | |||
| void Typeface::initialiseTypefaceCharacteristics (const String& fontName, | |||
| bool bold, | |||
| bool italic, | |||
| bool addAllGlyphsToFont) | |||
| bool addAllGlyphsToFont) throw() | |||
| { | |||
| zerostruct (identityMatrix); | |||
| identityMatrix.eM11.value = 1; | |||
| @@ -57,7 +57,7 @@ extern HWND juce_messageWindowHandle; | |||
| //============================================================================== | |||
| JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| CriticalSection::CriticalSection() throw() | |||
| { | |||
| // (just to check the MS haven't changed this structure and broken things...) | |||
| #if _MSC_VER >= 1400 | |||
| @@ -69,22 +69,22 @@ JUCE_CALLTYPE CriticalSection::CriticalSection() throw() | |||
| InitializeCriticalSection ((CRITICAL_SECTION*) internal); | |||
| } | |||
| JUCE_CALLTYPE CriticalSection::~CriticalSection() throw() | |||
| CriticalSection::~CriticalSection() throw() | |||
| { | |||
| DeleteCriticalSection ((CRITICAL_SECTION*) internal); | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::enter() const throw() | |||
| void CriticalSection::enter() const throw() | |||
| { | |||
| EnterCriticalSection ((CRITICAL_SECTION*) internal); | |||
| } | |||
| bool JUCE_CALLTYPE CriticalSection::tryEnter() const throw() | |||
| bool CriticalSection::tryEnter() const throw() | |||
| { | |||
| return TryEnterCriticalSection ((CRITICAL_SECTION*) internal) != FALSE; | |||
| } | |||
| void JUCE_CALLTYPE CriticalSection::exit() const throw() | |||
| void CriticalSection::exit() const throw() | |||
| { | |||
| LeaveCriticalSection ((CRITICAL_SECTION*) internal); | |||
| } | |||
| @@ -110,7 +110,7 @@ static HPALETTE palette = 0; | |||
| static bool createPaletteIfNeeded = true; | |||
| static bool shouldDeactivateTitleBar = true; | |||
| static HICON JUCE_CALLTYPE createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY); | |||
| static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw(); | |||
| #define WM_TRAYNOTIFY WM_USER + 100 | |||
| //============================================================================== | |||
| @@ -232,8 +232,8 @@ public: | |||
| unsigned char* bitmapData; | |||
| //============================================================================== | |||
| JUCE_CALLTYPE WindowsBitmapImage (const PixelFormat format_, | |||
| const int w, const int h, const bool clearImage) | |||
| WindowsBitmapImage (const PixelFormat format_, | |||
| const int w, const int h, const bool clearImage) | |||
| : Image (format_, w, h) | |||
| { | |||
| jassert (format_ == RGB || format_ == ARGB); | |||
| @@ -292,7 +292,7 @@ public: | |||
| imageData = bitmapData - (lineStride * (h - 1)); | |||
| } | |||
| JUCE_CALLTYPE ~WindowsBitmapImage() | |||
| ~WindowsBitmapImage() | |||
| { | |||
| DeleteDC (hdc); | |||
| DeleteObject (hBitmap); | |||
| @@ -300,8 +300,8 @@ public: | |||
| } | |||
| void JUCE_CALLTYPE blitToWindow (HWND hwnd, HDC dc, const bool transparent, | |||
| int x, int y, const RectangleList& maskedRegion) throw() | |||
| void blitToWindow (HWND hwnd, HDC dc, const bool transparent, | |||
| int x, int y, const RectangleList& maskedRegion) throw() | |||
| { | |||
| static HDRAWDIB hdd = 0; | |||
| static bool needToCreateDrawDib = true; | |||
| @@ -424,7 +424,7 @@ long improbableWindowNumber = 0xf965aa01; // also referenced by messaging.cpp | |||
| //============================================================================== | |||
| static int currentModifiers = 0; | |||
| static void JUCE_CALLTYPE updateKeyModifiers() | |||
| static void updateKeyModifiers() throw() | |||
| { | |||
| currentModifiers &= ~(ModifierKeys::shiftModifier | |||
| | ModifierKeys::ctrlModifier | |||
| @@ -489,7 +489,7 @@ const ModifierKeys ModifierKeys::getCurrentModifiersRealtime() | |||
| return ModifierKeys (currentModifiers); | |||
| } | |||
| static int64 JUCE_CALLTYPE getMouseEventTime() | |||
| static int64 getMouseEventTime() throw() | |||
| { | |||
| static int64 eventTimeOffset = 0; | |||
| static DWORD lastMessageTime = 0; | |||
| @@ -510,8 +510,8 @@ class Win32ComponentPeer : public ComponentPeer | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JUCE_CALLTYPE Win32ComponentPeer (Component* const component, | |||
| const int windowStyleFlags) | |||
| Win32ComponentPeer (Component* const component, | |||
| const int windowStyleFlags) | |||
| : ComponentPeer (component, windowStyleFlags), | |||
| dontRepaint (false), | |||
| fullScreen (false), | |||
| @@ -862,7 +862,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| static Win32ComponentPeer* JUCE_CALLTYPE getOwnerOfWindow (HWND h) | |||
| static Win32ComponentPeer* getOwnerOfWindow (HWND h) throw() | |||
| { | |||
| if (h != 0 && GetWindowLongPtr (h, GWLP_USERDATA) == improbableWindowNumber) | |||
| return (Win32ComponentPeer*) GetWindowLongPtr (h, 8); | |||
| @@ -941,18 +941,18 @@ private: | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JUCE_CALLTYPE TemporaryImage() | |||
| TemporaryImage() | |||
| : image (0) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE ~TemporaryImage() | |||
| ~TemporaryImage() | |||
| { | |||
| delete image; | |||
| } | |||
| //============================================================================== | |||
| WindowsBitmapImage* JUCE_CALLTYPE getImage (const bool transparent, const int w, const int h) | |||
| WindowsBitmapImage* getImage (const bool transparent, const int w, const int h) throw() | |||
| { | |||
| const Image::PixelFormat format = transparent ? Image::ARGB : Image::RGB; | |||
| @@ -992,7 +992,7 @@ private: | |||
| class WindowClassHolder : public DeletedAtShutdown | |||
| { | |||
| public: | |||
| JUCE_CALLTYPE WindowClassHolder() | |||
| WindowClassHolder() | |||
| : windowClassName ("JUCE_") | |||
| { | |||
| // this name has to be different for each app/dll instance because otherwise | |||
| @@ -1047,7 +1047,7 @@ private: | |||
| } | |||
| } | |||
| JUCE_CALLTYPE ~WindowClassHolder() | |||
| ~WindowClassHolder() | |||
| { | |||
| if (ComponentPeer::getNumPeers() == 0) | |||
| UnregisterClass (windowClassName, (HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle()); | |||
| @@ -1056,7 +1056,7 @@ private: | |||
| String windowClassName; | |||
| }; | |||
| void JUCE_CALLTYPE createWindow() | |||
| void createWindow() | |||
| { | |||
| DWORD exstyle = WS_EX_ACCEPTFILES; | |||
| DWORD type = WS_CLIPSIBLINGS | WS_CLIPCHILDREN; | |||
| @@ -1202,7 +1202,7 @@ private: | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE handlePaintMessage() | |||
| void handlePaintMessage() | |||
| { | |||
| #if DEBUG_REPAINT_TIMES | |||
| const double paintStart = Time::getMillisecondCounterHiRes(); | |||
| @@ -1352,7 +1352,7 @@ private: | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE doMouseMove (const int x, const int y) | |||
| void doMouseMove (const int x, const int y) | |||
| { | |||
| static uint32 lastMouseTime = 0; | |||
| // this can be set to throttle the mouse-messages to less than a | |||
| @@ -1417,7 +1417,7 @@ private: | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE doMouseDown (const int x, const int y, const WPARAM wParam) | |||
| void doMouseDown (const int x, const int y, const WPARAM wParam) | |||
| { | |||
| if (GetCapture() != hwnd) | |||
| SetCapture (hwnd); | |||
| @@ -1441,7 +1441,7 @@ private: | |||
| handleMouseDown (x, y, getMouseEventTime()); | |||
| } | |||
| void JUCE_CALLTYPE doMouseUp (const int x, const int y, const WPARAM wParam) | |||
| void doMouseUp (const int x, const int y, const WPARAM wParam) | |||
| { | |||
| int numButtons = 0; | |||
| @@ -1479,7 +1479,7 @@ private: | |||
| handleMouseUp (oldModifiers, x, y, getMouseEventTime()); | |||
| } | |||
| void JUCE_CALLTYPE doCaptureChanged() | |||
| void doCaptureChanged() | |||
| { | |||
| if (isDragging) | |||
| { | |||
| @@ -1494,7 +1494,7 @@ private: | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE doMouseExit() | |||
| void doMouseExit() | |||
| { | |||
| if (isMouseOver) | |||
| { | |||
| @@ -1510,7 +1510,7 @@ private: | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE doMouseWheel (const WPARAM wParam, const bool isVertical) | |||
| void doMouseWheel (const WPARAM wParam, const bool isVertical) | |||
| { | |||
| updateKeyModifiers(); | |||
| @@ -1522,7 +1522,7 @@ private: | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE doKeyUp (const WPARAM key) | |||
| void doKeyUp (const WPARAM key) | |||
| { | |||
| updateKeyModifiers(); | |||
| @@ -1549,7 +1549,7 @@ private: | |||
| handleKeyUpOrDown(); | |||
| } | |||
| void JUCE_CALLTYPE doKeyDown (const WPARAM key) | |||
| void doKeyDown (const WPARAM key) | |||
| { | |||
| updateKeyModifiers(); | |||
| @@ -1637,7 +1637,7 @@ private: | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE doKeyChar (int key, const LPARAM flags) | |||
| void doKeyChar (int key, const LPARAM flags) | |||
| { | |||
| updateKeyModifiers(); | |||
| @@ -1685,7 +1685,7 @@ private: | |||
| handleKeyPress (key, textChar); | |||
| } | |||
| bool JUCE_CALLTYPE doAppCommand (const LPARAM lParam) | |||
| bool doAppCommand (const LPARAM lParam) | |||
| { | |||
| int key = 0; | |||
| @@ -1723,7 +1723,7 @@ private: | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE doDroppedFiles (HDROP hdrop) | |||
| void doDroppedFiles (HDROP hdrop) | |||
| { | |||
| POINT p; | |||
| DragQueryPoint (hdrop, &p); | |||
| @@ -1754,7 +1754,7 @@ private: | |||
| handleFilesDropped (p.x, p.y, files); | |||
| } | |||
| void JUCE_CALLTYPE doSettingChange() | |||
| void doSettingChange() | |||
| { | |||
| Desktop::getInstance().refreshMonitorSizes(); | |||
| @@ -1781,7 +1781,7 @@ public: | |||
| } | |||
| private: | |||
| LRESULT JUCE_CALLTYPE peerWindowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) | |||
| LRESULT peerWindowProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) | |||
| { | |||
| { | |||
| const MessageManagerLock messLock; | |||
| @@ -2259,7 +2259,7 @@ void juce_updateMultiMonitorInfo (Array <Rectangle>& monitorCoords, const bool c | |||
| } | |||
| //============================================================================== | |||
| static Image* JUCE_CALLTYPE createImageFromHBITMAP (HBITMAP bitmap) | |||
| static Image* createImageFromHBITMAP (HBITMAP bitmap) throw() | |||
| { | |||
| Image* im = 0; | |||
| @@ -2297,7 +2297,7 @@ static Image* JUCE_CALLTYPE createImageFromHBITMAP (HBITMAP bitmap) | |||
| return im; | |||
| } | |||
| static Image* JUCE_CALLTYPE createImageFromHICON (HICON icon) | |||
| static Image* createImageFromHICON (HICON icon) throw() | |||
| { | |||
| ICONINFO info; | |||
| @@ -2331,7 +2331,7 @@ static Image* JUCE_CALLTYPE createImageFromHICON (HICON icon) | |||
| return 0; | |||
| } | |||
| static HICON JUCE_CALLTYPE createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) | |||
| static HICON createHICONFromImage (const Image& image, const BOOL isIcon, int hotspotX, int hotspotY) throw() | |||
| { | |||
| HBITMAP mask = CreateBitmap (image.getWidth(), image.getHeight(), 1, 1, 0); | |||
| @@ -2834,7 +2834,7 @@ public: | |||
| HRESULT __stdcall EnumDAdvise (IEnumSTATDATA __RPC_FAR *__RPC_FAR *) { return OLE_E_ADVISENOTSUPPORTED; } | |||
| }; | |||
| static HDROP JUCE_CALLTYPE createHDrop (const StringArray& fileNames) | |||
| static HDROP createHDrop (const StringArray& fileNames) throw() | |||
| { | |||
| int totalChars = 0; | |||
| for (int i = fileNames.size(); --i >= 0;) | |||
| @@ -2882,7 +2882,7 @@ static HDROP JUCE_CALLTYPE createHDrop (const StringArray& fileNames) | |||
| return hDrop; | |||
| } | |||
| static bool JUCE_CALLTYPE performDragDrop (FORMATETC* format, STGMEDIUM* medium, const DWORD whatToDo) | |||
| static bool performDragDrop (FORMATETC* format, STGMEDIUM* medium, const DWORD whatToDo) throw() | |||
| { | |||
| JuceDropSource* const source = new JuceDropSource(); | |||
| JuceDataObject* const data = new JuceDataObject (source, format, medium, 1); | |||
| @@ -38,24 +38,24 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| JUCE_CALLTYPE ChangeBroadcaster::ChangeBroadcaster() throw() | |||
| ChangeBroadcaster::ChangeBroadcaster() throw() | |||
| { | |||
| // are you trying to create this object before or after juce has been intialised?? | |||
| jassert (MessageManager::instance != 0); | |||
| } | |||
| JUCE_CALLTYPE ChangeBroadcaster::~ChangeBroadcaster() | |||
| ChangeBroadcaster::~ChangeBroadcaster() | |||
| { | |||
| // all event-based objects must be deleted BEFORE juce is shut down! | |||
| jassert (MessageManager::instance != 0); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::addChangeListener (ChangeListener* const listener) throw() | |||
| void ChangeBroadcaster::addChangeListener (ChangeListener* const listener) throw() | |||
| { | |||
| changeListenerList.addChangeListener (listener); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) throw() | |||
| void ChangeBroadcaster::removeChangeListener (ChangeListener* const listener) throw() | |||
| { | |||
| jassert (changeListenerList.isValidMessageListener()); | |||
| @@ -63,22 +63,22 @@ void JUCE_CALLTYPE ChangeBroadcaster::removeChangeListener (ChangeListener* cons | |||
| changeListenerList.removeChangeListener (listener); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::removeAllChangeListeners() throw() | |||
| void ChangeBroadcaster::removeAllChangeListeners() throw() | |||
| { | |||
| changeListenerList.removeAllChangeListeners(); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged) throw() | |||
| void ChangeBroadcaster::sendChangeMessage (void* objectThatHasChanged) throw() | |||
| { | |||
| changeListenerList.sendChangeMessage (objectThatHasChanged); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::sendSynchronousChangeMessage (void* objectThatHasChanged) | |||
| void ChangeBroadcaster::sendSynchronousChangeMessage (void* objectThatHasChanged) | |||
| { | |||
| changeListenerList.sendSynchronousChangeMessage (objectThatHasChanged); | |||
| } | |||
| void JUCE_CALLTYPE ChangeBroadcaster::dispatchPendingMessages() | |||
| void ChangeBroadcaster::dispatchPendingMessages() | |||
| { | |||
| changeListenerList.dispatchPendingMessages(); | |||
| } | |||
| @@ -48,7 +48,7 @@ class JUCE_API ChangeBroadcaster | |||
| public: | |||
| //============================================================================== | |||
| /** Creates an ChangeBroadcaster. */ | |||
| JUCE_CALLTYPE ChangeBroadcaster() throw(); | |||
| ChangeBroadcaster() throw(); | |||
| /** Destructor. */ | |||
| virtual ~ChangeBroadcaster(); | |||
| @@ -58,16 +58,16 @@ public: | |||
| (Trying to add a listener that's already on the list will have no effect). | |||
| */ | |||
| void JUCE_CALLTYPE addChangeListener (ChangeListener* const listener) throw(); | |||
| void addChangeListener (ChangeListener* const listener) throw(); | |||
| /** Removes a listener from the list. | |||
| If the listener isn't on the list, this won't have any effect. | |||
| */ | |||
| void JUCE_CALLTYPE removeChangeListener (ChangeListener* const listener) throw(); | |||
| void removeChangeListener (ChangeListener* const listener) throw(); | |||
| /** Removes all listeners from the list. */ | |||
| void JUCE_CALLTYPE removeAllChangeListeners() throw(); | |||
| void removeAllChangeListeners() throw(); | |||
| //============================================================================== | |||
| /** Broadcasts a change message to all the registered listeners. | |||
| @@ -78,18 +78,18 @@ public: | |||
| @see ChangeListenerList::sendActionMessage | |||
| */ | |||
| void JUCE_CALLTYPE sendChangeMessage (void* objectThatHasChanged) throw(); | |||
| void sendChangeMessage (void* objectThatHasChanged) throw(); | |||
| /** Sends a synchronous change message to all the registered listeners. | |||
| @see ChangeListenerList::sendSynchronousChangeMessage | |||
| */ | |||
| void JUCE_CALLTYPE sendSynchronousChangeMessage (void* objectThatHasChanged); | |||
| void sendSynchronousChangeMessage (void* objectThatHasChanged); | |||
| /** If a change message has been sent but not yet dispatched, this will | |||
| use sendSynchronousChangeMessage() to make the callback immediately. | |||
| */ | |||
| void JUCE_CALLTYPE dispatchPendingMessages(); | |||
| void dispatchPendingMessages(); | |||
| private: | |||
| @@ -37,17 +37,17 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| JUCE_CALLTYPE ChangeListenerList::ChangeListenerList() throw() | |||
| ChangeListenerList::ChangeListenerList() throw() | |||
| : lastChangedObject (0), | |||
| messagePending (false) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE ChangeListenerList::~ChangeListenerList() throw() | |||
| ChangeListenerList::~ChangeListenerList() throw() | |||
| { | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::addChangeListener (ChangeListener* const listener) throw() | |||
| void ChangeListenerList::addChangeListener (ChangeListener* const listener) throw() | |||
| { | |||
| const ScopedLock sl (lock); | |||
| @@ -57,19 +57,19 @@ void JUCE_CALLTYPE ChangeListenerList::addChangeListener (ChangeListener* const | |||
| listeners.add (listener); | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::removeChangeListener (ChangeListener* const listener) throw() | |||
| void ChangeListenerList::removeChangeListener (ChangeListener* const listener) throw() | |||
| { | |||
| const ScopedLock sl (lock); | |||
| listeners.removeValue (listener); | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::removeAllChangeListeners() throw() | |||
| void ChangeListenerList::removeAllChangeListeners() throw() | |||
| { | |||
| const ScopedLock sl (lock); | |||
| listeners.clear(); | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::sendChangeMessage (void* objectThatHasChanged) throw() | |||
| void ChangeListenerList::sendChangeMessage (void* objectThatHasChanged) throw() | |||
| { | |||
| const ScopedLock sl (lock); | |||
| @@ -86,7 +86,7 @@ void ChangeListenerList::handleMessage (const Message& message) | |||
| sendSynchronousChangeMessage (message.pointerParameter); | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::sendSynchronousChangeMessage (void* objectThatHasChanged) | |||
| void ChangeListenerList::sendSynchronousChangeMessage (void* objectThatHasChanged) | |||
| { | |||
| const ScopedLock sl (lock); | |||
| messagePending = false; | |||
| @@ -104,7 +104,7 @@ void JUCE_CALLTYPE ChangeListenerList::sendSynchronousChangeMessage (void* objec | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE ChangeListenerList::dispatchPendingMessages() | |||
| void ChangeListenerList::dispatchPendingMessages() | |||
| { | |||
| if (messagePending) | |||
| sendSynchronousChangeMessage (lastChangedObject); | |||
| @@ -52,26 +52,26 @@ class JUCE_API ChangeListenerList : public MessageListener | |||
| public: | |||
| //============================================================================== | |||
| /** Creates an empty list. */ | |||
| JUCE_CALLTYPE ChangeListenerList() throw(); | |||
| ChangeListenerList() throw(); | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~ChangeListenerList() throw(); | |||
| ~ChangeListenerList() throw(); | |||
| //============================================================================== | |||
| /** Adds a listener to the list. | |||
| (Trying to add a listener that's already on the list will have no effect). | |||
| */ | |||
| void JUCE_CALLTYPE addChangeListener (ChangeListener* const listener) throw(); | |||
| void addChangeListener (ChangeListener* const listener) throw(); | |||
| /** Removes a listener from the list. | |||
| If the listener isn't on the list, this won't have any effect. | |||
| */ | |||
| void JUCE_CALLTYPE removeChangeListener (ChangeListener* const listener) throw(); | |||
| void removeChangeListener (ChangeListener* const listener) throw(); | |||
| /** Removes all listeners from the list. */ | |||
| void JUCE_CALLTYPE removeAllChangeListeners() throw(); | |||
| void removeAllChangeListeners() throw(); | |||
| //============================================================================== | |||
| /** Posts an asynchronous change message to all the listeners. | |||
| @@ -91,19 +91,19 @@ public: | |||
| and can be any value the application needs | |||
| @see sendSynchronousChangeMessage | |||
| */ | |||
| void JUCE_CALLTYPE sendChangeMessage (void* objectThatHasChanged) throw(); | |||
| void sendChangeMessage (void* objectThatHasChanged) throw(); | |||
| /** This will synchronously callback all the ChangeListeners. | |||
| Use this if you need to synchronously force a call to all the | |||
| listeners' ChangeListener::changeListenerCallback() methods. | |||
| */ | |||
| void JUCE_CALLTYPE sendSynchronousChangeMessage (void* objectThatHasChanged); | |||
| void sendSynchronousChangeMessage (void* objectThatHasChanged); | |||
| /** If a change message has been sent but not yet dispatched, this will | |||
| use sendSynchronousChangeMessage() to make the callback immediately. | |||
| */ | |||
| void JUCE_CALLTYPE dispatchPendingMessages(); | |||
| void dispatchPendingMessages(); | |||
| //============================================================================== | |||
| /** @internal */ | |||
| @@ -37,7 +37,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| JUCE_CALLTYPE MessageListener::MessageListener() throw() | |||
| MessageListener::MessageListener() throw() | |||
| { | |||
| // are you trying to create a messagelistener before or after juce has been intialised?? | |||
| jassert (MessageManager::instance != 0); | |||
| @@ -46,13 +46,13 @@ JUCE_CALLTYPE MessageListener::MessageListener() throw() | |||
| MessageManager::instance->messageListeners.add (this); | |||
| } | |||
| JUCE_CALLTYPE MessageListener::~MessageListener() | |||
| MessageListener::~MessageListener() | |||
| { | |||
| if (MessageManager::instance != 0) | |||
| MessageManager::instance->messageListeners.removeValue (this); | |||
| } | |||
| void JUCE_CALLTYPE MessageListener::postMessage (Message* const message) const throw() | |||
| void MessageListener::postMessage (Message* const message) const throw() | |||
| { | |||
| message->messageRecipient = const_cast <MessageListener*> (this); | |||
| @@ -62,7 +62,7 @@ void JUCE_CALLTYPE MessageListener::postMessage (Message* const message) const t | |||
| MessageManager::instance->postMessageToQueue (message); | |||
| } | |||
| bool JUCE_CALLTYPE MessageListener::isValidMessageListener() const throw() | |||
| bool MessageListener::isValidMessageListener() const throw() | |||
| { | |||
| return (MessageManager::instance != 0) | |||
| && MessageManager::instance->messageListeners.contains (this); | |||
| @@ -46,7 +46,7 @@ class JUCE_API MessageListener | |||
| protected: | |||
| //============================================================================== | |||
| /** Creates a MessageListener. */ | |||
| JUCE_CALLTYPE MessageListener() throw(); | |||
| MessageListener() throw(); | |||
| public: | |||
| //============================================================================== | |||
| @@ -56,7 +56,7 @@ public: | |||
| of registered listeners, so that the isValidMessageListener() method | |||
| will no longer return true. | |||
| */ | |||
| virtual JUCE_CALLTYPE ~MessageListener(); | |||
| virtual ~MessageListener(); | |||
| //============================================================================== | |||
| /** This is the callback method that receives incoming messages. | |||
| @@ -78,7 +78,7 @@ public: | |||
| references to it after calling this method. | |||
| @see handleMessage | |||
| */ | |||
| void JUCE_CALLTYPE postMessage (Message* const message) const throw(); | |||
| void postMessage (Message* const message) const throw(); | |||
| //============================================================================== | |||
| /** Checks whether this MessageListener has been deleted. | |||
| @@ -92,7 +92,7 @@ public: | |||
| exact same memory location, but I can't think of a good way of avoiding | |||
| this. | |||
| */ | |||
| bool JUCE_CALLTYPE isValidMessageListener() const throw(); | |||
| bool isValidMessageListener() const throw(); | |||
| }; | |||
| @@ -52,7 +52,7 @@ MessageManager* MessageManager::instance = 0; | |||
| static const int quitMessageId = 0xfffff321; | |||
| JUCE_CALLTYPE MessageManager::MessageManager() throw() | |||
| MessageManager::MessageManager() throw() | |||
| : broadcastListeners (0), | |||
| quitMessagePosted (false), | |||
| quitMessageReceived (false), | |||
| @@ -67,7 +67,7 @@ JUCE_CALLTYPE MessageManager::MessageManager() throw() | |||
| currentLockingThreadId = messageThreadId = Thread::getCurrentThreadId(); | |||
| } | |||
| JUCE_CALLTYPE MessageManager::~MessageManager() throw() | |||
| MessageManager::~MessageManager() throw() | |||
| { | |||
| jassert (instance == this); | |||
| instance = 0; | |||
| @@ -76,7 +76,7 @@ JUCE_CALLTYPE MessageManager::~MessageManager() throw() | |||
| doPlatformSpecificShutdown(); | |||
| } | |||
| MessageManager* JUCE_CALLTYPE MessageManager::getInstance() throw() | |||
| MessageManager* MessageManager::getInstance() throw() | |||
| { | |||
| if (instance == 0) | |||
| { | |||
| @@ -89,7 +89,7 @@ MessageManager* JUCE_CALLTYPE MessageManager::getInstance() throw() | |||
| return instance; | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::postMessageToQueue (Message* const message) | |||
| void MessageManager::postMessageToQueue (Message* const message) | |||
| { | |||
| if (quitMessagePosted || ! juce_postMessageToSystemQueue (message)) | |||
| delete message; | |||
| @@ -97,7 +97,7 @@ void JUCE_CALLTYPE MessageManager::postMessageToQueue (Message* const message) | |||
| //============================================================================== | |||
| // not for public use.. | |||
| void JUCE_CALLTYPE MessageManager::deliverMessage (void* message) | |||
| void MessageManager::deliverMessage (void* message) | |||
| { | |||
| const MessageManagerLock lock; | |||
| @@ -130,8 +130,8 @@ void JUCE_CALLTYPE MessageManager::deliverMessage (void* message) | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE MessageManager::dispatchNextMessage (const bool returnImmediatelyIfNoMessages, | |||
| bool* const wasAMessageDispatched) | |||
| bool MessageManager::dispatchNextMessage (const bool returnImmediatelyIfNoMessages, | |||
| bool* const wasAMessageDispatched) | |||
| { | |||
| if (quitMessageReceived) | |||
| { | |||
| @@ -163,7 +163,7 @@ bool JUCE_CALLTYPE MessageManager::dispatchNextMessage (const bool returnImmedia | |||
| return result || ! returnImmediatelyIfNoMessages; | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::dispatchPendingMessages (int maxNumberOfMessagesToDispatch) | |||
| void MessageManager::dispatchPendingMessages (int maxNumberOfMessagesToDispatch) | |||
| { | |||
| jassert (isThisTheMessageThread()); // must only be called by the message thread | |||
| @@ -187,7 +187,7 @@ void JUCE_CALLTYPE MessageManager::dispatchPendingMessages (int maxNumberOfMessa | |||
| } | |||
| } | |||
| bool JUCE_CALLTYPE MessageManager::runDispatchLoop() | |||
| bool MessageManager::runDispatchLoop() | |||
| { | |||
| jassert (isThisTheMessageThread()); // must only be called by the message thread | |||
| @@ -199,7 +199,7 @@ bool JUCE_CALLTYPE MessageManager::runDispatchLoop() | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE MessageManager::postQuitMessage (const bool useMaximumForce) | |||
| void MessageManager::postQuitMessage (const bool useMaximumForce) | |||
| { | |||
| if (! quitMessagePosted) | |||
| { | |||
| @@ -213,13 +213,13 @@ void JUCE_CALLTYPE MessageManager::postQuitMessage (const bool useMaximumForce) | |||
| } | |||
| } | |||
| bool JUCE_CALLTYPE MessageManager::hasQuitMessageBeenPosted() const | |||
| bool MessageManager::hasQuitMessageBeenPosted() const | |||
| { | |||
| return quitMessagePosted; | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE MessageManager::deliverBroadcastMessage (const String& value) | |||
| void MessageManager::deliverBroadcastMessage (const String& value) | |||
| { | |||
| if (broadcastListeners == 0) | |||
| broadcastListeners = new ActionListenerList(); | |||
| @@ -227,7 +227,7 @@ void JUCE_CALLTYPE MessageManager::deliverBroadcastMessage (const String& value) | |||
| broadcastListeners->sendActionMessage (value); | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::registerBroadcastListener (ActionListener* listener) | |||
| void MessageManager::registerBroadcastListener (ActionListener* listener) | |||
| { | |||
| if (broadcastListeners == 0) | |||
| broadcastListeners = new ActionListenerList(); | |||
| @@ -235,7 +235,7 @@ void JUCE_CALLTYPE MessageManager::registerBroadcastListener (ActionListener* li | |||
| broadcastListeners->addActionListener (listener); | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::deregisterBroadcastListener (ActionListener* listener) | |||
| void MessageManager::deregisterBroadcastListener (ActionListener* listener) | |||
| { | |||
| if (broadcastListeners == 0) | |||
| broadcastListeners = new ActionListenerList(); | |||
| @@ -246,13 +246,13 @@ void JUCE_CALLTYPE MessageManager::deregisterBroadcastListener (ActionListener* | |||
| //============================================================================== | |||
| // This gets called occasionally by the timer thread (to save using an extra thread | |||
| // for it). | |||
| void JUCE_CALLTYPE MessageManager::inactivityCheckCallback() | |||
| void MessageManager::inactivityCheckCallback() | |||
| { | |||
| if (instance != 0) | |||
| instance->inactivityCheckCallbackInt(); | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::inactivityCheckCallbackInt() | |||
| void MessageManager::inactivityCheckCallbackInt() | |||
| { | |||
| const unsigned int now = Time::getApproximateMillisecondCounter(); | |||
| @@ -277,7 +277,7 @@ void JUCE_CALLTYPE MessageManager::inactivityCheckCallbackInt() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::delayWaitCursor() | |||
| void MessageManager::delayWaitCursor() | |||
| { | |||
| if (instance != 0) | |||
| { | |||
| @@ -291,7 +291,7 @@ void JUCE_CALLTYPE MessageManager::delayWaitCursor() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::setTimeBeforeShowingWaitCursor (const int millisecs) | |||
| void MessageManager::setTimeBeforeShowingWaitCursor (const int millisecs) | |||
| { | |||
| // if this is a bit too small you'll get a lot of unwanted hourglass cursors.. | |||
| jassert (millisecs <= 0 || millisecs > 200); | |||
| @@ -311,28 +311,28 @@ void MessageManager::timerCallback() | |||
| ++messageCounter; | |||
| } | |||
| int JUCE_CALLTYPE MessageManager::getTimeBeforeShowingWaitCursor() const | |||
| int MessageManager::getTimeBeforeShowingWaitCursor() const | |||
| { | |||
| return timeBeforeWaitCursor; | |||
| } | |||
| bool JUCE_CALLTYPE MessageManager::isThisTheMessageThread() const | |||
| bool MessageManager::isThisTheMessageThread() const | |||
| { | |||
| return Thread::getCurrentThreadId() == messageThreadId; | |||
| } | |||
| void JUCE_CALLTYPE MessageManager::setCurrentMessageThread (const int threadId) | |||
| void MessageManager::setCurrentMessageThread (const int threadId) | |||
| { | |||
| messageThreadId = threadId; | |||
| } | |||
| bool JUCE_CALLTYPE MessageManager::currentThreadHasLockedMessageManager() const | |||
| bool MessageManager::currentThreadHasLockedMessageManager() const | |||
| { | |||
| return Thread::getCurrentThreadId() == currentLockingThreadId; | |||
| } | |||
| //============================================================================== | |||
| JUCE_CALLTYPE MessageManagerLock::MessageManagerLock() | |||
| MessageManagerLock::MessageManagerLock() | |||
| { | |||
| if (MessageManager::instance != 0) | |||
| { | |||
| @@ -342,7 +342,7 @@ JUCE_CALLTYPE MessageManagerLock::MessageManagerLock() | |||
| } | |||
| } | |||
| JUCE_CALLTYPE MessageManagerLock::~MessageManagerLock() | |||
| MessageManagerLock::~MessageManagerLock() | |||
| { | |||
| if (MessageManager::instance != 0) | |||
| { | |||
| @@ -56,7 +56,7 @@ class JUCE_API MessageManager : private DeletedAtShutdown, | |||
| public: | |||
| //============================================================================== | |||
| /** Returns the global instance of the MessageManager. */ | |||
| static MessageManager* JUCE_CALLTYPE getInstance() throw(); | |||
| static MessageManager* getInstance() throw(); | |||
| //============================================================================== | |||
| /** Synchronously dispatches up to a certain number of messages from the queue. | |||
| @@ -64,7 +64,7 @@ public: | |||
| This will return when the queue becomes empty, or when the given number of | |||
| messages has been sent. | |||
| */ | |||
| void JUCE_CALLTYPE dispatchPendingMessages (int maxNumberOfMessagesToDispatch = 1000); | |||
| void dispatchPendingMessages (int maxNumberOfMessagesToDispatch = 1000); | |||
| /** Synchronously sends the next pending message. | |||
| @@ -79,8 +79,8 @@ public: | |||
| @returns false if the thing that's calling it should stop calling - i.e. if the | |||
| app is trying to quit. | |||
| */ | |||
| bool JUCE_CALLTYPE dispatchNextMessage (const bool returnImmediatelyIfNoMessages = false, | |||
| bool* const wasAMessageDispatched = 0); | |||
| bool dispatchNextMessage (const bool returnImmediatelyIfNoMessages = false, | |||
| bool* const wasAMessageDispatched = 0); | |||
| //============================================================================== | |||
| /** Calls a function using the message-thread. | |||
| @@ -101,25 +101,25 @@ public: | |||
| @returns the value that the callback function returns. | |||
| @see MessageManagerLock | |||
| */ | |||
| void* JUCE_CALLTYPE callFunctionOnMessageThread (MessageCallbackFunction* callback, | |||
| void* userData); | |||
| void* callFunctionOnMessageThread (MessageCallbackFunction* callback, | |||
| void* userData); | |||
| /** Returns true if the caller-thread is the message thread. */ | |||
| bool JUCE_CALLTYPE isThisTheMessageThread() const; | |||
| bool isThisTheMessageThread() const; | |||
| /** Called to tell the manager which thread is the one that's running the dispatch loop. | |||
| (Best to ignore this method unless you really know what you're doing..) | |||
| @see getCurrentMessageThread | |||
| */ | |||
| void JUCE_CALLTYPE setCurrentMessageThread (const int threadId); | |||
| void setCurrentMessageThread (const int threadId); | |||
| /** Returns the ID of the current message thread, as set by setCurrentMessageThread(). | |||
| (Best to ignore this method unless you really know what you're doing..) | |||
| @see setCurrentMessageThread | |||
| */ | |||
| int JUCE_CALLTYPE getCurrentMessageThread() const throw() { return messageThreadId; } | |||
| int getCurrentMessageThread() const throw() { return messageThreadId; } | |||
| /** Returns true if the caller thread has currenltly got the message manager locked. | |||
| @@ -128,7 +128,7 @@ public: | |||
| This will be true if the caller is the message thread, because that automatically | |||
| gains a lock while a message is being dispatched. | |||
| */ | |||
| bool JUCE_CALLTYPE currentThreadHasLockedMessageManager() const; | |||
| bool currentThreadHasLockedMessageManager() const; | |||
| //============================================================================== | |||
| /** Sends a message to all other JUCE applications that are running. | |||
| @@ -137,7 +137,7 @@ public: | |||
| method of the broadcast listeners in the other app. | |||
| @see registerBroadcastListener, ActionListener | |||
| */ | |||
| static void JUCE_CALLTYPE broadcastMessage (const String& messageText); | |||
| static void broadcastMessage (const String& messageText); | |||
| /** Registers a listener to get told about broadcast messages. | |||
| @@ -146,10 +146,10 @@ public: | |||
| @see broadcastMessage | |||
| */ | |||
| void JUCE_CALLTYPE registerBroadcastListener (ActionListener* listener); | |||
| void registerBroadcastListener (ActionListener* listener); | |||
| /** Deregisters a broadcast listener. */ | |||
| void JUCE_CALLTYPE deregisterBroadcastListener (ActionListener* listener); | |||
| void deregisterBroadcastListener (ActionListener* listener); | |||
| //============================================================================== | |||
| /** Sets a time-limit for the app to be 'busy' before an hourglass cursor will be shown. | |||
| @@ -159,30 +159,30 @@ public: | |||
| Mac the system might still decide to show it after a while). | |||
| @see MouseCursor::showWaitCursor | |||
| */ | |||
| void JUCE_CALLTYPE setTimeBeforeShowingWaitCursor (const int millisecs); | |||
| void setTimeBeforeShowingWaitCursor (const int millisecs); | |||
| /** Returns the time-out before the 'busy' cursor is shown when the app is busy. | |||
| @see setTimeBeforeShowingWaitCursor, MouseCursor::showWaitCursor | |||
| */ | |||
| int JUCE_CALLTYPE getTimeBeforeShowingWaitCursor() const; | |||
| int getTimeBeforeShowingWaitCursor() const; | |||
| /** Tells the message manager that the system isn't locked-up, even if the message | |||
| loop isn't active. | |||
| Used internally, this is handy when an OS enters its own modal loop. | |||
| */ | |||
| static void JUCE_CALLTYPE delayWaitCursor(); | |||
| static void delayWaitCursor(); | |||
| //============================================================================== | |||
| /** Returns true if JUCEApplication::quit() has been called. */ | |||
| bool JUCE_CALLTYPE hasQuitMessageBeenPosted() const; | |||
| bool hasQuitMessageBeenPosted() const; | |||
| //============================================================================== | |||
| /** @internal */ | |||
| void JUCE_CALLTYPE deliverMessage (void*); | |||
| void deliverMessage (void*); | |||
| /** @internal */ | |||
| void JUCE_CALLTYPE deliverBroadcastMessage (const String&); | |||
| void deliverBroadcastMessage (const String&); | |||
| /** @internal */ | |||
| void timerCallback(); | |||
| @@ -210,16 +210,16 @@ private: | |||
| int volatile timeBeforeWaitCursor; | |||
| unsigned int lastActivityCheckOkTime; | |||
| bool JUCE_CALLTYPE runDispatchLoop(); | |||
| void JUCE_CALLTYPE postMessageToQueue (Message* const message); | |||
| void JUCE_CALLTYPE postQuitMessage (const bool useMaximumForce); | |||
| bool runDispatchLoop(); | |||
| void postMessageToQueue (Message* const message); | |||
| void postQuitMessage (const bool useMaximumForce); | |||
| static void doPlatformSpecificInitialisation(); | |||
| static void doPlatformSpecificShutdown(); | |||
| friend class InternalTimerThread; | |||
| static void JUCE_CALLTYPE inactivityCheckCallback(); | |||
| void JUCE_CALLTYPE inactivityCheckCallbackInt(); | |||
| static void inactivityCheckCallback(); | |||
| void inactivityCheckCallbackInt(); | |||
| friend class MessageManagerLock; | |||
| CriticalSection messageDispatchLock; | |||
| @@ -274,14 +274,14 @@ public: | |||
| If the current thread already has the lock, nothing will be done, so it's perfectly | |||
| safe to create these locks recursively. | |||
| */ | |||
| JUCE_CALLTYPE MessageManagerLock(); | |||
| MessageManagerLock(); | |||
| /** Releases the current thread's lock on the message manager. | |||
| Make sure this object is created and deleted by the same thread, | |||
| otherwise there are no guarantees what will happen! | |||
| */ | |||
| JUCE_CALLTYPE ~MessageManagerLock(); | |||
| ~MessageManagerLock(); | |||
| private: | |||
| int lastLockingThreadId; | |||
| @@ -61,7 +61,7 @@ private: | |||
| InternalTimerThread (const InternalTimerThread&); | |||
| const InternalTimerThread& operator= (const InternalTimerThread&); | |||
| void JUCE_CALLTYPE addTimer (Timer* const t) throw() | |||
| void addTimer (Timer* const t) throw() | |||
| { | |||
| #ifdef JUCE_DEBUG | |||
| Timer* tt = firstTimer; | |||
| @@ -106,7 +106,7 @@ private: | |||
| notify(); | |||
| } | |||
| void JUCE_CALLTYPE removeTimer (Timer* const t) throw() | |||
| void removeTimer (Timer* const t) throw() | |||
| { | |||
| #ifdef JUCE_DEBUG | |||
| Timer* tt = firstTimer; | |||
| @@ -319,7 +319,7 @@ void juce_callAnyTimersSynchronously() | |||
| static SortedSet <Timer*> activeTimers; | |||
| #endif | |||
| JUCE_CALLTYPE Timer::Timer() throw() | |||
| Timer::Timer() throw() | |||
| : countdownMs (0), | |||
| periodMs (0), | |||
| previous (0), | |||
| @@ -330,7 +330,7 @@ JUCE_CALLTYPE Timer::Timer() throw() | |||
| #endif | |||
| } | |||
| JUCE_CALLTYPE Timer::Timer (const Timer&) throw() | |||
| Timer::Timer (const Timer&) throw() | |||
| : countdownMs (0), | |||
| periodMs (0), | |||
| previous (0), | |||
| @@ -341,7 +341,7 @@ JUCE_CALLTYPE Timer::Timer (const Timer&) throw() | |||
| #endif | |||
| } | |||
| JUCE_CALLTYPE Timer::~Timer() | |||
| Timer::~Timer() | |||
| { | |||
| stopTimer(); | |||
| @@ -350,7 +350,7 @@ JUCE_CALLTYPE Timer::~Timer() | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE Timer::startTimer (const int interval) throw() | |||
| void Timer::startTimer (const int interval) throw() | |||
| { | |||
| const ScopedLock sl (InternalTimerThread::lock); | |||
| @@ -371,7 +371,7 @@ void JUCE_CALLTYPE Timer::startTimer (const int interval) throw() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Timer::stopTimer() throw() | |||
| void Timer::stopTimer() throw() | |||
| { | |||
| const ScopedLock sl (InternalTimerThread::lock); | |||
| @@ -65,19 +65,19 @@ protected: | |||
| When created, the timer is stopped, so use startTimer() to get it going. | |||
| */ | |||
| JUCE_CALLTYPE Timer() throw(); | |||
| Timer() throw(); | |||
| /** Creates a copy of another timer. | |||
| Note that this timer won't be started, even if the one you're copying | |||
| is running. | |||
| */ | |||
| JUCE_CALLTYPE Timer (const Timer& other) throw(); | |||
| Timer (const Timer& other) throw(); | |||
| public: | |||
| //============================================================================== | |||
| /** Destructor. */ | |||
| virtual JUCE_CALLTYPE ~Timer(); | |||
| virtual ~Timer(); | |||
| //============================================================================== | |||
| /** The user-defined callback routine that actually gets called periodically. | |||
| @@ -97,7 +97,7 @@ public: | |||
| @param intervalInMilliseconds the interval to use (any values less than 1 will be | |||
| rounded up to 1) | |||
| */ | |||
| void JUCE_CALLTYPE startTimer (const int intervalInMilliseconds) throw(); | |||
| void startTimer (const int intervalInMilliseconds) throw(); | |||
| /** Stops the timer. | |||
| @@ -107,20 +107,20 @@ public: | |||
| be currently executing may be allowed to finish before the method | |||
| returns. | |||
| */ | |||
| void JUCE_CALLTYPE stopTimer() throw(); | |||
| void stopTimer() throw(); | |||
| //============================================================================== | |||
| /** Checks if the timer has been started. | |||
| @returns true if the timer is running. | |||
| */ | |||
| bool JUCE_CALLTYPE isTimerRunning() const throw() { return periodMs > 0; } | |||
| bool isTimerRunning() const throw() { return periodMs > 0; } | |||
| /** Returns the timer's interval. | |||
| @returns the timer's interval in milliseconds if it's running, or 0 if it's not. | |||
| */ | |||
| int JUCE_CALLTYPE getTimerInterval() const throw() { return periodMs; } | |||
| int getTimerInterval() const throw() { return periodMs; } | |||
| //============================================================================== | |||
| @@ -82,7 +82,7 @@ bool ComboBox::isTextEditable() const throw() | |||
| return label->isEditableOnDoubleClick() || label->isEditableOnSingleClick(); | |||
| } | |||
| void ComboBox::setJustificationType (const Justification& justification) | |||
| void ComboBox::setJustificationType (const Justification& justification) throw() | |||
| { | |||
| label->setJustificationType (justification); | |||
| } | |||
| @@ -100,7 +100,7 @@ void ComboBox::setTooltip (const String& newTooltip) | |||
| //============================================================================== | |||
| void ComboBox::addItem (const String& newItemText, | |||
| const int newItemId) | |||
| const int newItemId) throw() | |||
| { | |||
| // you can't add empty strings to the list.. | |||
| jassert (newItemText.isNotEmpty()); | |||
| @@ -133,12 +133,12 @@ void ComboBox::addItem (const String& newItemText, | |||
| } | |||
| } | |||
| void ComboBox::addSeparator() | |||
| void ComboBox::addSeparator() throw() | |||
| { | |||
| separatorPending = (items.size() > 0); | |||
| } | |||
| void ComboBox::addSectionHeading (const String& headingName) | |||
| void ComboBox::addSectionHeading (const String& headingName) throw() | |||
| { | |||
| // you can't add empty strings to the list.. | |||
| jassert (headingName.isNotEmpty()); | |||
| @@ -166,7 +166,7 @@ void ComboBox::addSectionHeading (const String& headingName) | |||
| } | |||
| void ComboBox::setItemEnabled (const int itemId, | |||
| const bool isEnabled) | |||
| const bool isEnabled) throw() | |||
| { | |||
| ItemInfo* const item = getItemForId (itemId); | |||
| @@ -175,7 +175,7 @@ void ComboBox::setItemEnabled (const int itemId, | |||
| } | |||
| void ComboBox::changeItemText (const int itemId, | |||
| const String& newText) | |||
| const String& newText) throw() | |||
| { | |||
| ItemInfo* const item = getItemForId (itemId); | |||
| @@ -195,7 +195,7 @@ void ComboBox::clear() | |||
| } | |||
| //============================================================================== | |||
| ComboBox::ItemInfo* ComboBox::getItemForId (const int id) const | |||
| ComboBox::ItemInfo* ComboBox::getItemForId (const int id) const throw() | |||
| { | |||
| jassert (id != 0); | |||
| @@ -209,7 +209,7 @@ ComboBox::ItemInfo* ComboBox::getItemForId (const int id) const | |||
| return 0; | |||
| } | |||
| ComboBox::ItemInfo* ComboBox::getItemForIndex (const int index) const | |||
| ComboBox::ItemInfo* ComboBox::getItemForIndex (const int index) const throw() | |||
| { | |||
| int n = 0; | |||
| @@ -227,7 +227,7 @@ ComboBox::ItemInfo* ComboBox::getItemForIndex (const int index) const | |||
| return 0; | |||
| } | |||
| int ComboBox::getNumItems() const | |||
| int ComboBox::getNumItems() const throw() | |||
| { | |||
| int n = 0; | |||
| @@ -242,7 +242,7 @@ int ComboBox::getNumItems() const | |||
| return n; | |||
| } | |||
| const String ComboBox::getItemText (const int index) const | |||
| const String ComboBox::getItemText (const int index) const throw() | |||
| { | |||
| ItemInfo* const item = getItemForIndex (index); | |||
| @@ -252,7 +252,7 @@ const String ComboBox::getItemText (const int index) const | |||
| return String::empty; | |||
| } | |||
| int ComboBox::getItemId (const int index) const | |||
| int ComboBox::getItemId (const int index) const throw() | |||
| { | |||
| ItemInfo* const item = getItemForIndex (index); | |||
| @@ -272,7 +272,7 @@ bool ComboBox::ItemInfo::isRealItem() const throw() | |||
| } | |||
| //============================================================================== | |||
| int ComboBox::getSelectedItemIndex() const | |||
| int ComboBox::getSelectedItemIndex() const throw() | |||
| { | |||
| return (currentIndex >= 0 && getText() == getItemText (currentIndex)) | |||
| ? currentIndex | |||
| @@ -309,7 +309,7 @@ void ComboBox::setSelectedId (const int newItemId, | |||
| } | |||
| } | |||
| int ComboBox::getSelectedId() const | |||
| int ComboBox::getSelectedId() const throw() | |||
| { | |||
| const ItemInfo* const item = getItemForIndex (currentIndex); | |||
| @@ -341,7 +341,7 @@ void ComboBox::handleAsyncUpdate() | |||
| } | |||
| //============================================================================== | |||
| const String ComboBox::getText() const | |||
| const String ComboBox::getText() const throw() | |||
| { | |||
| return label->getText(); | |||
| } | |||
| @@ -375,7 +375,7 @@ void ComboBox::setText (const String& newText, | |||
| } | |||
| //============================================================================== | |||
| void ComboBox::setTextWhenNothingSelected (const String& newMessage) | |||
| void ComboBox::setTextWhenNothingSelected (const String& newMessage) throw() | |||
| { | |||
| textWhenNothingSelected = newMessage; | |||
| repaint(); | |||
| @@ -386,7 +386,7 @@ const String ComboBox::getTextWhenNothingSelected() const throw() | |||
| return textWhenNothingSelected; | |||
| } | |||
| void ComboBox::setTextWhenNoChoicesAvailable (const String& newMessage) | |||
| void ComboBox::setTextWhenNoChoicesAvailable (const String& newMessage) throw() | |||
| { | |||
| noChoicesMessage = newMessage; | |||
| } | |||
| @@ -111,7 +111,7 @@ public: | |||
| The default is Justification::centredLeft. The text is displayed using a | |||
| Label component inside the ComboBox. | |||
| */ | |||
| void setJustificationType (const Justification& justification); | |||
| void setJustificationType (const Justification& justification) throw(); | |||
| /** Returns the current justification for the text box. | |||
| @see setJustificationType | |||
| @@ -127,13 +127,13 @@ public: | |||
| @see setItemEnabled, addSeparator, addSectionHeading, removeItem, getNumItems, getItemText, getItemId | |||
| */ | |||
| void addItem (const String& newItemText, | |||
| const int newItemId); | |||
| const int newItemId) throw(); | |||
| /** Adds a separator line to the drop-down list. | |||
| This is like adding a separator to a popup menu. See PopupMenu::addSeparator(). | |||
| */ | |||
| void addSeparator(); | |||
| void addSeparator() throw(); | |||
| /** Adds a heading to the drop-down list, so that you can group the items into | |||
| different sections. | |||
| @@ -144,7 +144,7 @@ public: | |||
| @see addItem, addSeparator | |||
| */ | |||
| void addSectionHeading (const String& headingName); | |||
| void addSectionHeading (const String& headingName) throw(); | |||
| /** This allows items in the drop-down list to be selectively disabled. | |||
| @@ -155,12 +155,12 @@ public: | |||
| current selection - it just stops the user choosing that item from the list. | |||
| */ | |||
| void setItemEnabled (const int itemId, | |||
| const bool isEnabled); | |||
| const bool isEnabled) throw(); | |||
| /** Changes the text for an existing item. | |||
| */ | |||
| void changeItemText (const int itemId, | |||
| const String& newText); | |||
| const String& newText) throw(); | |||
| /** Removes all the items from the drop-down list. | |||
| @@ -172,7 +172,7 @@ public: | |||
| Note that this doesn't include headers or separators. | |||
| */ | |||
| int getNumItems() const; | |||
| int getNumItems() const throw(); | |||
| /** Returns the text for one of the items in the list. | |||
| @@ -180,7 +180,7 @@ public: | |||
| @param index the item's index from 0 to (getNumItems() - 1) | |||
| */ | |||
| const String getItemText (const int index) const; | |||
| const String getItemText (const int index) const throw(); | |||
| /** Returns the ID for one of the items in the list. | |||
| @@ -188,7 +188,7 @@ public: | |||
| @param index the item's index from 0 to (getNumItems() - 1) | |||
| */ | |||
| int getItemId (const int index) const; | |||
| int getItemId (const int index) const throw(); | |||
| //============================================================================== | |||
| /** Returns the ID of the item that's currently shown in the box. | |||
| @@ -199,7 +199,7 @@ public: | |||
| @see setSelectedId, getSelectedItemIndex, getText | |||
| */ | |||
| int getSelectedId() const; | |||
| int getSelectedId() const throw(); | |||
| /** Sets one of the items to be the current selection. | |||
| @@ -223,7 +223,7 @@ public: | |||
| @see setSelectedItemIndex, getSelectedId, getText | |||
| */ | |||
| int getSelectedItemIndex() const; | |||
| int getSelectedItemIndex() const throw(); | |||
| /** Sets one of the items to be the current selection. | |||
| @@ -247,7 +247,7 @@ public: | |||
| @see setText, getSelectedId, getSelectedItemIndex | |||
| */ | |||
| const String getText() const; | |||
| const String getText() const throw(); | |||
| /** Sets the contents of the combo-box's text field. | |||
| @@ -276,7 +276,7 @@ public: | |||
| @see getTextWhenNothingSelected | |||
| */ | |||
| void setTextWhenNothingSelected (const String& newMessage); | |||
| void setTextWhenNothingSelected (const String& newMessage) throw(); | |||
| /** Returns the text that is shown when no item is selected. | |||
| @@ -291,7 +291,7 @@ public: | |||
| By default it just says "no choices", but this lets you change it to something more | |||
| meaningful. | |||
| */ | |||
| void setTextWhenNoChoicesAvailable (const String& newMessage); | |||
| void setTextWhenNoChoicesAvailable (const String& newMessage) throw(); | |||
| /** Returns the text shown when no items have been added to the list. | |||
| @see setTextWhenNoChoicesAvailable | |||
| @@ -371,8 +371,8 @@ private: | |||
| void showPopup(); | |||
| ItemInfo* getItemForId (const int id) const; | |||
| ItemInfo* getItemForIndex (const int index) const; | |||
| ItemInfo* getItemForId (const int id) const throw(); | |||
| ItemInfo* getItemForIndex (const int index) const throw(); | |||
| ComboBox (const ComboBox&); | |||
| const ComboBox& operator= (const ComboBox&); | |||
| @@ -87,27 +87,27 @@ void Label::setText (const String& newText, | |||
| } | |||
| } | |||
| const String Label::getText (const bool returnActiveEditorContents) const | |||
| const String Label::getText (const bool returnActiveEditorContents) const throw() | |||
| { | |||
| return (returnActiveEditorContents && isBeingEdited()) | |||
| ? editor->getText() | |||
| : text; | |||
| } | |||
| void Label::setFont (const Font& newFont) | |||
| void Label::setFont (const Font& newFont) throw() | |||
| { | |||
| font = newFont; | |||
| repaint(); | |||
| } | |||
| const Font Label::getFont() const | |||
| const Font& Label::getFont() const throw() | |||
| { | |||
| return font; | |||
| } | |||
| void Label::setEditable (const bool editOnSingleClick, | |||
| const bool editOnDoubleClick, | |||
| const bool lossOfFocusDiscardsChanges_) | |||
| const bool lossOfFocusDiscardsChanges_) throw() | |||
| { | |||
| editSingleClick = editOnSingleClick; | |||
| editDoubleClick = editOnDoubleClick; | |||
| @@ -117,7 +117,7 @@ void Label::setEditable (const bool editOnSingleClick, | |||
| setFocusContainer (editOnSingleClick || editOnDoubleClick); | |||
| } | |||
| void Label::setJustificationType (const Justification& justification_) | |||
| void Label::setJustificationType (const Justification& justification_) throw() | |||
| { | |||
| justification = justification_; | |||
| repaint(); | |||
| @@ -250,7 +250,7 @@ void Label::inputAttemptWhenModal() | |||
| } | |||
| } | |||
| bool Label::isBeingEdited() const | |||
| bool Label::isBeingEdited() const throw() | |||
| { | |||
| return editor != 0; | |||
| } | |||
| @@ -104,20 +104,20 @@ public: | |||
| the user has finished typing and pressed the return | |||
| key. | |||
| */ | |||
| const String getText (const bool returnActiveEditorContents = false) const; | |||
| const String getText (const bool returnActiveEditorContents = false) const throw(); | |||
| //============================================================================== | |||
| /** Changes the font to use to draw the text. | |||
| @see getFont | |||
| */ | |||
| void setFont (const Font& newFont); | |||
| void setFont (const Font& newFont) throw(); | |||
| /** Returns the font currently being used. | |||
| @see setFont | |||
| */ | |||
| const Font getFont() const; | |||
| const Font& getFont() const throw(); | |||
| //============================================================================== | |||
| /** A set of colour IDs to use to change the colour of various aspects of the label. | |||
| @@ -143,7 +143,7 @@ public: | |||
| (The default is Justification::centredLeft) | |||
| */ | |||
| void setJustificationType (const Justification& justification); | |||
| void setJustificationType (const Justification& justification) throw(); | |||
| /** Returns the type of justification, as set in setJustificationType(). */ | |||
| const Justification getJustificationType() const throw() { return justification; } | |||
| @@ -204,7 +204,7 @@ public: | |||
| */ | |||
| void setEditable (const bool editOnSingleClick, | |||
| const bool editOnDoubleClick = false, | |||
| const bool lossOfFocusDiscardsChanges = false); | |||
| const bool lossOfFocusDiscardsChanges = false) throw(); | |||
| /** Returns true if this option was set using setEditable(). */ | |||
| bool isEditableOnSingleClick() const throw() { return editSingleClick; } | |||
| @@ -235,7 +235,7 @@ public: | |||
| void hideEditor (const bool discardCurrentEditorContents); | |||
| /** Returns true if the editor is currently focused and active. */ | |||
| bool isBeingEdited() const; | |||
| bool isBeingEdited() const throw(); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| @@ -948,7 +948,7 @@ void TextEditor::setMultiLine (const bool shouldBeMultiLine, | |||
| scrollToMakeSureCursorIsVisible(); | |||
| } | |||
| bool TextEditor::isMultiLine() const | |||
| bool TextEditor::isMultiLine() const throw() | |||
| { | |||
| return multiline; | |||
| } | |||
| @@ -113,7 +113,7 @@ public: | |||
| /** Returns true if the editor is in multi-line mode. | |||
| */ | |||
| bool isMultiLine() const; | |||
| bool isMultiLine() const throw(); | |||
| //============================================================================== | |||
| /** Changes the behaviour of the return key. | |||
| @@ -79,15 +79,15 @@ class FileListItemComponent : public Component, | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JUCE_CALLTYPE FileListItemComponent (FileListComponent& owner_, | |||
| TimeSliceThread& thread_) throw() | |||
| FileListItemComponent (FileListComponent& owner_, | |||
| TimeSliceThread& thread_) throw() | |||
| : owner (owner_), | |||
| thread (thread_), | |||
| icon (0) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE ~FileListItemComponent() throw() | |||
| ~FileListItemComponent() throw() | |||
| { | |||
| thread.removeTimeSliceClient (this); | |||
| @@ -115,10 +115,10 @@ public: | |||
| owner.sendDoubleClickMessage (file); | |||
| } | |||
| void JUCE_CALLTYPE update (const File& root, | |||
| const DirectoryContentsList::FileInfo* const fileInfo, | |||
| const int index_, | |||
| const bool highlighted_) throw() | |||
| void update (const File& root, | |||
| const DirectoryContentsList::FileInfo* const fileInfo, | |||
| const int index_, | |||
| const bool highlighted_) throw() | |||
| { | |||
| thread.removeTimeSliceClient (this); | |||
| @@ -190,13 +190,13 @@ private: | |||
| Image* icon; | |||
| bool isDirectory; | |||
| void JUCE_CALLTYPE clearIcon() throw() | |||
| void clearIcon() throw() | |||
| { | |||
| ImageCache::release (icon); | |||
| icon = 0; | |||
| } | |||
| void JUCE_CALLTYPE updateIcon (const bool onlyUpdateIfCached) throw() | |||
| void updateIcon (const bool onlyUpdateIfCached) throw() | |||
| { | |||
| if (icon == 0) | |||
| { | |||
| @@ -49,11 +49,11 @@ class FileListTreeItem : public TreeViewItem, | |||
| { | |||
| public: | |||
| //============================================================================== | |||
| JUCE_CALLTYPE FileListTreeItem (FileTreeComponent& owner_, | |||
| DirectoryContentsList* const parentContentsList_, | |||
| const int indexInContentsList_, | |||
| const File& file_, | |||
| TimeSliceThread& thread_) throw() | |||
| FileListTreeItem (FileTreeComponent& owner_, | |||
| DirectoryContentsList* const parentContentsList_, | |||
| const int indexInContentsList_, | |||
| const File& file_, | |||
| TimeSliceThread& thread_) throw() | |||
| : file (file_), | |||
| owner (owner_), | |||
| parentContentsList (parentContentsList_), | |||
| @@ -120,7 +120,7 @@ public: | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE setSubContentsList (DirectoryContentsList* newList) throw() | |||
| void setSubContentsList (DirectoryContentsList* newList) throw() | |||
| { | |||
| jassert (subContentsList == 0); | |||
| subContentsList = newList; | |||
| @@ -206,7 +206,7 @@ private: | |||
| String fileSize; | |||
| String modTime; | |||
| void JUCE_CALLTYPE updateIcon (const bool onlyUpdateIfCached) throw() | |||
| void updateIcon (const bool onlyUpdateIfCached) throw() | |||
| { | |||
| if (icon == 0) | |||
| { | |||
| @@ -68,7 +68,7 @@ int juce_LastMousePosY = 0; | |||
| int juce_MouseClickCounter = 0; | |||
| bool juce_MouseHasMovedSignificantlySincePressed = false; | |||
| static int countMouseClicks() | |||
| static int countMouseClicks() throw() | |||
| { | |||
| int numClicks = 0; | |||
| @@ -424,7 +424,7 @@ bool Component::isValidComponent() const throw() | |||
| return (this != 0) && isValidMessageListener(); | |||
| } | |||
| void* Component::getWindowHandle() const | |||
| void* Component::getWindowHandle() const throw() | |||
| { | |||
| const ComponentPeer* const peer = getPeer(); | |||
| @@ -538,7 +538,7 @@ void Component::removeFromDesktop() | |||
| } | |||
| } | |||
| bool Component::isOnDesktop() const | |||
| bool Component::isOnDesktop() const throw() | |||
| { | |||
| return flags.hasHeavyweightPeerFlag; | |||
| } | |||
| @@ -560,7 +560,7 @@ void Component::minimisationStateChanged (bool) | |||
| } | |||
| //============================================================================== | |||
| void Component::setOpaque (const bool shouldBeOpaque) | |||
| void Component::setOpaque (const bool shouldBeOpaque) throw() | |||
| { | |||
| if (shouldBeOpaque != flags.opaqueFlag) | |||
| { | |||
| @@ -587,7 +587,7 @@ bool Component::isOpaque() const throw() | |||
| } | |||
| //============================================================================== | |||
| void Component::setBufferedToImage (const bool shouldBeBuffered) | |||
| void Component::setBufferedToImage (const bool shouldBeBuffered) throw() | |||
| { | |||
| if (shouldBeBuffered != flags.bufferToImageFlag) | |||
| { | |||
| @@ -763,7 +763,7 @@ void Component::setAlwaysOnTop (const bool shouldStayOnTop) | |||
| } | |||
| } | |||
| bool Component::isAlwaysOnTop() const | |||
| bool Component::isAlwaysOnTop() const throw() | |||
| { | |||
| return flags.alwaysOnTopFlag; | |||
| } | |||
| @@ -820,7 +820,7 @@ int Component::getScreenY() const throw() | |||
| : compY_); | |||
| } | |||
| void Component::relativePositionToGlobal (int& x, int& y) const | |||
| void Component::relativePositionToGlobal (int& x, int& y) const throw() | |||
| { | |||
| const Component* c = this; | |||
| @@ -839,7 +839,7 @@ void Component::relativePositionToGlobal (int& x, int& y) const | |||
| while (c != 0); | |||
| } | |||
| void Component::globalPositionToRelative (int& x, int& y) const | |||
| void Component::globalPositionToRelative (int& x, int& y) const throw() | |||
| { | |||
| if (flags.hasHeavyweightPeerFlag) | |||
| { | |||
| @@ -855,7 +855,7 @@ void Component::globalPositionToRelative (int& x, int& y) const | |||
| } | |||
| } | |||
| void Component::relativePositionToOtherComponent (const Component* const targetComponent, int& x, int& y) const | |||
| void Component::relativePositionToOtherComponent (const Component* const targetComponent, int& x, int& y) const throw() | |||
| { | |||
| if (targetComponent != 0) | |||
| { | |||
| @@ -1111,14 +1111,14 @@ bool Component::hitTest (int x, int y) | |||
| } | |||
| void Component::setInterceptsMouseClicks (const bool allowClicks, | |||
| const bool allowClicksOnChildComponents) | |||
| const bool allowClicksOnChildComponents) throw() | |||
| { | |||
| flags.ignoresMouseClicksFlag = ! allowClicks; | |||
| flags.allowChildMouseClicksFlag = allowClicksOnChildComponents; | |||
| } | |||
| void Component::getInterceptsMouseClicks (bool& allowsClicksOnThisComponent, | |||
| bool& allowsClicksOnChildComponents) | |||
| bool& allowsClicksOnChildComponents) const throw() | |||
| { | |||
| allowsClicksOnThisComponent = ! flags.ignoresMouseClicksFlag; | |||
| allowsClicksOnChildComponents = flags.allowChildMouseClicksFlag; | |||
| @@ -1146,8 +1146,7 @@ bool Component::contains (const int x, const int y) | |||
| return false; | |||
| } | |||
| bool Component::reallyContains (int x, int y, | |||
| const bool returnTrueIfWithinAChild) | |||
| bool Component::reallyContains (int x, int y, const bool returnTrueIfWithinAChild) | |||
| { | |||
| if (! contains (x, y)) | |||
| return false; | |||
| @@ -1191,8 +1190,7 @@ Component* Component::getComponentAt (const int x, const int y) | |||
| } | |||
| //============================================================================== | |||
| void Component::addChildComponent (Component* const child, | |||
| int zOrder) | |||
| void Component::addChildComponent (Component* const child, int zOrder) | |||
| { | |||
| // if component methods are being called from threads other than the message | |||
| // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. | |||
| @@ -1231,8 +1229,7 @@ void Component::addChildComponent (Component* const child, | |||
| } | |||
| } | |||
| void Component::addAndMakeVisible (Component* const child, | |||
| int zOrder) | |||
| void Component::addAndMakeVisible (Component* const child, int zOrder) | |||
| { | |||
| if (child != 0) | |||
| { | |||
| @@ -1318,12 +1315,12 @@ Component* Component::getChildComponent (const int index) const throw() | |||
| return childComponentList_ [index]; | |||
| } | |||
| int Component::getIndexOfChildComponent (const Component* const child) const | |||
| int Component::getIndexOfChildComponent (const Component* const child) const throw() | |||
| { | |||
| return childComponentList_.indexOf (const_cast <Component*> (child)); | |||
| } | |||
| Component* Component::getTopLevelComponent() const | |||
| Component* Component::getTopLevelComponent() const throw() | |||
| { | |||
| const Component* comp = this; | |||
| @@ -1333,7 +1330,7 @@ Component* Component::getTopLevelComponent() const | |||
| return (Component*) comp; | |||
| } | |||
| bool Component::isParentOf (const Component* possibleChild) const | |||
| bool Component::isParentOf (const Component* possibleChild) const throw() | |||
| { | |||
| while (possibleChild->isValidComponent()) | |||
| { | |||
| @@ -1539,13 +1536,13 @@ void Component::exitModalState (const int returnValue) | |||
| } | |||
| } | |||
| bool Component::isCurrentlyModal() const | |||
| bool Component::isCurrentlyModal() const throw() | |||
| { | |||
| return flags.currentlyModalFlag | |||
| && getCurrentlyModalComponent() == this; | |||
| } | |||
| bool Component::isCurrentlyBlockedByAnotherModalComponent() const | |||
| bool Component::isCurrentlyBlockedByAnotherModalComponent() const throw() | |||
| { | |||
| Component* const mc = getCurrentlyModalComponent(); | |||
| @@ -1555,7 +1552,7 @@ bool Component::isCurrentlyBlockedByAnotherModalComponent() const | |||
| && ! mc->canModalEventBeSentToComponent (this); | |||
| } | |||
| Component* Component::getCurrentlyModalComponent() | |||
| Component* Component::getCurrentlyModalComponent() throw() | |||
| { | |||
| Component* const c = (Component*) modalComponentStack.getLast(); | |||
| @@ -1563,7 +1560,7 @@ Component* Component::getCurrentlyModalComponent() | |||
| } | |||
| //============================================================================== | |||
| void Component::setBroughtToFrontOnMouseClick (const bool shouldBeBroughtToFront) | |||
| void Component::setBroughtToFrontOnMouseClick (const bool shouldBeBroughtToFront) throw() | |||
| { | |||
| flags.bringToFrontOnClickFlag = shouldBeBroughtToFront; | |||
| } | |||
| @@ -1574,7 +1571,7 @@ bool Component::isBroughtToFrontOnMouseClick() const throw() | |||
| } | |||
| //============================================================================== | |||
| void Component::setMouseCursor (const MouseCursor& cursor) | |||
| void Component::setMouseCursor (const MouseCursor& cursor) throw() | |||
| { | |||
| cursor_ = cursor; | |||
| @@ -1595,12 +1592,12 @@ const MouseCursor Component::getMouseCursor() | |||
| return cursor_; | |||
| } | |||
| void Component::updateMouseCursor() const | |||
| void Component::updateMouseCursor() const throw() | |||
| { | |||
| sendFakeMouseMove(); | |||
| } | |||
| void Component::internalUpdateMouseCursor (const bool forcedUpdate) | |||
| void Component::internalUpdateMouseCursor (const bool forcedUpdate) throw() | |||
| { | |||
| ComponentPeer* const peer = getPeer(); | |||
| @@ -1626,13 +1623,13 @@ void Component::internalUpdateMouseCursor (const bool forcedUpdate) | |||
| } | |||
| //============================================================================== | |||
| void Component::setRepaintsOnMouseActivity (const bool shouldRepaint) | |||
| void Component::setRepaintsOnMouseActivity (const bool shouldRepaint) throw() | |||
| { | |||
| flags.repaintOnMouseActivityFlag = shouldRepaint; | |||
| } | |||
| //============================================================================== | |||
| void Component::repaintParent() | |||
| void Component::repaintParent() throw() | |||
| { | |||
| if (flags.visibleFlag) | |||
| internalRepaint (0, 0, compW_, compH_); | |||
| @@ -1972,7 +1969,7 @@ const Rectangle Component::getUnclippedArea() const | |||
| } | |||
| void Component::clipObscuredRegions (Graphics& g, const Rectangle& clipRect, | |||
| const int deltaX, const int deltaY) const | |||
| const int deltaX, const int deltaY) const throw() | |||
| { | |||
| for (int i = childComponentList_.size(); --i >= 0;) | |||
| { | |||
| @@ -2034,7 +2031,7 @@ void Component::subtractObscuredRegions (RectangleList& result, | |||
| const int deltaX, | |||
| const int deltaY, | |||
| const Rectangle& clipRect, | |||
| const Component* const compToAvoid) const | |||
| const Component* const compToAvoid) const throw() | |||
| { | |||
| for (int i = childComponentList_.size(); --i >= 0;) | |||
| { | |||
| @@ -2196,7 +2193,7 @@ void Component::handleMessage (const Message& message) | |||
| } | |||
| //============================================================================== | |||
| void Component::postCommandMessage (const int commandId) | |||
| void Component::postCommandMessage (const int commandId) throw() | |||
| { | |||
| postMessage (new Message (customCommandMessage, commandId, 0, 0)); | |||
| } | |||
| @@ -2208,7 +2205,7 @@ void Component::handleCommandMessage (int) | |||
| //============================================================================== | |||
| void Component::addMouseListener (MouseListener* const newListener, | |||
| const bool wantsEventsForAllNestedChildComponents) | |||
| const bool wantsEventsForAllNestedChildComponents) throw() | |||
| { | |||
| // if component methods are being called from threads other than the message | |||
| // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. | |||
| @@ -2231,7 +2228,7 @@ void Component::addMouseListener (MouseListener* const newListener, | |||
| } | |||
| } | |||
| void Component::removeMouseListener (MouseListener* const listenerToRemove) | |||
| void Component::removeMouseListener (MouseListener* const listenerToRemove) throw() | |||
| { | |||
| // if component methods are being called from threads other than the message | |||
| // thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe. | |||
| @@ -3137,7 +3134,7 @@ void Component::internalChildFocusChange (FocusChangeType cause) | |||
| } | |||
| //============================================================================== | |||
| bool Component::isEnabled() const | |||
| bool Component::isEnabled() const throw() | |||
| { | |||
| return (! flags.isDisabledFlag) | |||
| && (parentComponent_ == 0 || parentComponent_->isEnabled()); | |||
| @@ -3184,7 +3181,7 @@ void Component::enablementChanged() | |||
| } | |||
| //============================================================================== | |||
| void Component::setWantsKeyboardFocus (const bool wantsFocus) | |||
| void Component::setWantsKeyboardFocus (const bool wantsFocus) throw() | |||
| { | |||
| flags.wantsFocusFlag = wantsFocus; | |||
| } | |||
| @@ -3410,7 +3407,7 @@ bool Component::isMouseButtonDownAnywhere() throw() | |||
| return ModifierKeys::getCurrentModifiers().isAnyMouseButtonDown(); | |||
| } | |||
| void Component::getMouseXYRelative (int& mx, int& my) const | |||
| void Component::getMouseXYRelative (int& mx, int& my) const throw() | |||
| { | |||
| Desktop::getMousePosition (mx, my); | |||
| globalPositionToRelative (mx, my); | |||
| @@ -3420,7 +3417,7 @@ void Component::getMouseXYRelative (int& mx, int& my) const | |||
| } | |||
| void Component::enableUnboundedMouseMovement (bool enable, | |||
| bool keepCursorVisibleUntilOffscreen) | |||
| bool keepCursorVisibleUntilOffscreen) throw() | |||
| { | |||
| enable = enable && isMouseButtonDown(); | |||
| isCursorVisibleUntilOffscreen = keepCursorVisibleUntilOffscreen; | |||
| @@ -3468,7 +3465,7 @@ const Rectangle Component::getParentMonitorArea() const throw() | |||
| } | |||
| //============================================================================== | |||
| void Component::addKeyListener (KeyListener* const newListener) | |||
| void Component::addKeyListener (KeyListener* const newListener) throw() | |||
| { | |||
| if (keyListeners_ == 0) | |||
| keyListeners_ = new VoidArray (4); | |||
| @@ -3476,7 +3473,7 @@ void Component::addKeyListener (KeyListener* const newListener) | |||
| keyListeners_->addIfNotAlreadyThere (newListener); | |||
| } | |||
| void Component::removeKeyListener (KeyListener* const listenerToRemove) | |||
| void Component::removeKeyListener (KeyListener* const listenerToRemove) throw() | |||
| { | |||
| if (keyListeners_ != 0) | |||
| keyListeners_->removeValue (listenerToRemove); | |||
| @@ -3602,7 +3599,7 @@ void Component::internalFilesDropped (const int x, | |||
| } | |||
| } | |||
| ComponentPeer* Component::getPeer() const | |||
| ComponentPeer* Component::getPeer() const throw() | |||
| { | |||
| if (flags.hasHeavyweightPeerFlag) | |||
| return ComponentPeer::getPeerFor (this); | |||
| @@ -202,7 +202,8 @@ public: | |||
| getPeer, ComponentPeer::setMinimised, ComponentPeer::StyleFlags, | |||
| ComponentPeer::getStyleFlags, ComponentPeer::setFullScreen | |||
| */ | |||
| virtual void addToDesktop (int windowStyleFlags, void* nativeWindowToAttachTo = 0); | |||
| virtual void addToDesktop (int windowStyleFlags, | |||
| void* nativeWindowToAttachTo = 0); | |||
| /** If the component is currently showing on the desktop, this will hide it. | |||
| @@ -217,7 +218,7 @@ public: | |||
| @see addToDesktop, removeFromDesktop | |||
| */ | |||
| bool isOnDesktop() const; | |||
| bool isOnDesktop() const throw(); | |||
| /** Returns the heavyweight window that contains this component. | |||
| @@ -229,7 +230,7 @@ public: | |||
| @see addToDesktop, isOnDesktop | |||
| */ | |||
| ComponentPeer* getPeer() const; | |||
| ComponentPeer* getPeer() const throw(); | |||
| /** For components on the desktop, this is called if the system wants to close the window. | |||
| @@ -286,7 +287,7 @@ public: | |||
| @see setAlwaysOnTop | |||
| */ | |||
| bool isAlwaysOnTop() const; | |||
| bool isAlwaysOnTop() const throw(); | |||
| //============================================================================== | |||
| /** Returns the x co-ordinate of the component's left edge. | |||
| @@ -357,13 +358,13 @@ public: | |||
| @see globalPositionToRelative, relativePositionToOtherComponent | |||
| */ | |||
| void relativePositionToGlobal (int& x, int& y) const; | |||
| void relativePositionToGlobal (int& x, int& y) const throw(); | |||
| /** Converts a screen co-ordinate into a position relative to this component's top-left. | |||
| @see relativePositionToGlobal, relativePositionToOtherComponent | |||
| */ | |||
| void globalPositionToRelative (int& x, int& y) const; | |||
| void globalPositionToRelative (int& x, int& y) const throw(); | |||
| /** Converts a position relative to this component's top-left into a position | |||
| relative to another component's top-left. | |||
| @@ -371,7 +372,7 @@ public: | |||
| @see relativePositionToGlobal, globalPositionToRelative | |||
| */ | |||
| void relativePositionToOtherComponent (const Component* const targetComponent, | |||
| int& x, int& y) const; | |||
| int& x, int& y) const throw(); | |||
| //============================================================================== | |||
| /** Moves the component to a new position. | |||
| @@ -535,7 +536,7 @@ public: | |||
| @see getNumChildComponents, getChildComponent, addChildComponent, toFront, toBack, toBehind | |||
| */ | |||
| int getIndexOfChildComponent (const Component* const child) const; | |||
| int getIndexOfChildComponent (const Component* const child) const throw(); | |||
| /** Adds a child component to this one. | |||
| @@ -597,7 +598,7 @@ public: | |||
| If this is the highest-level component or hasn't yet been added to | |||
| a parent, this will return null. | |||
| */ | |||
| Component* getParentComponent() const throw() { return parentComponent_; } | |||
| Component* getParentComponent() const throw() { return parentComponent_; } | |||
| /** Searches the parent components for a component of a specified class. | |||
| @@ -630,14 +631,14 @@ public: | |||
| finds the highest one that doesn't have a parent (i.e. is on the desktop or | |||
| not yet added to a parent), and will return that. | |||
| */ | |||
| Component* getTopLevelComponent() const; | |||
| Component* getTopLevelComponent() const throw(); | |||
| /** Checks whether a component is anywhere inside this component or its children. | |||
| This will recursively check through this components children to see if the | |||
| given component is anywhere inside. | |||
| */ | |||
| bool isParentOf (const Component* possibleChild) const; | |||
| bool isParentOf (const Component* possibleChild) const throw(); | |||
| //============================================================================== | |||
| /** Called to indicate that the component's parents have changed. | |||
| @@ -715,7 +716,7 @@ public: | |||
| @see hitTest, getInterceptsMouseClicks | |||
| */ | |||
| void setInterceptsMouseClicks (const bool allowClicksOnThisComponent, | |||
| const bool allowClicksOnChildComponents); | |||
| const bool allowClicksOnChildComponents) throw(); | |||
| /** Retrieves the current state of the mouse-click interception flags. | |||
| @@ -725,7 +726,7 @@ public: | |||
| @see setInterceptsMouseClicks | |||
| */ | |||
| void getInterceptsMouseClicks (bool& allowsClicksOnThisComponent, | |||
| bool& allowsClicksOnChildComponents); | |||
| bool& allowsClicksOnChildComponents) const throw(); | |||
| /** Returns true if a given point lies within this component or one of its children. | |||
| @@ -821,7 +822,7 @@ public: | |||
| @see repaint, paint, createComponentSnapshot | |||
| */ | |||
| void setBufferedToImage (const bool shouldBeBuffered); | |||
| void setBufferedToImage (const bool shouldBeBuffered) throw(); | |||
| /** Generates a snapshot of part of this component. | |||
| @@ -879,7 +880,7 @@ public: | |||
| @see setComponentEffect | |||
| */ | |||
| ImageEffectFilter* getComponentEffect() const throw() { return effect_; } | |||
| ImageEffectFilter* getComponentEffect() const throw() { return effect_; } | |||
| //============================================================================== | |||
| /** Finds the appropriate look-and-feel to use for this component. | |||
| @@ -943,7 +944,7 @@ public: | |||
| @see isOpaque, getVisibleArea | |||
| */ | |||
| void setOpaque (const bool shouldBeOpaque); | |||
| void setOpaque (const bool shouldBeOpaque) throw(); | |||
| /** Returns true if no parts of this component are transparent. | |||
| @@ -965,7 +966,7 @@ public: | |||
| @see setMouseClickGrabsKeyboardFocus | |||
| */ | |||
| void setBroughtToFrontOnMouseClick (const bool shouldBeBroughtToFront); | |||
| void setBroughtToFrontOnMouseClick (const bool shouldBeBroughtToFront) throw(); | |||
| /** Indicates whether the component should be brought to the front when clicked-on. | |||
| @@ -986,7 +987,7 @@ public: | |||
| @see grabKeyboardFocus, getWantsKeyboardFocus | |||
| */ | |||
| void setWantsKeyboardFocus (const bool wantsFocus); | |||
| void setWantsKeyboardFocus (const bool wantsFocus) throw(); | |||
| /** Returns true if the component is interested in getting keyboard focus. | |||
| @@ -1096,7 +1097,7 @@ public: | |||
| @see setEnabled, enablementChanged | |||
| */ | |||
| bool isEnabled() const; | |||
| bool isEnabled() const throw(); | |||
| /** Enables or disables this component. | |||
| @@ -1130,7 +1131,7 @@ public: | |||
| @see MouseCursor | |||
| */ | |||
| void setMouseCursor (const MouseCursor& cursorType); | |||
| void setMouseCursor (const MouseCursor& cursorType) throw(); | |||
| /** Returns the mouse cursor shape to use when the mouse is over this component. | |||
| @@ -1151,7 +1152,7 @@ public: | |||
| This isn't needed if you're only using setMouseCursor(). | |||
| */ | |||
| void updateMouseCursor() const; | |||
| void updateMouseCursor() const throw(); | |||
| //============================================================================== | |||
| /** Components can override this method to draw their content. | |||
| @@ -1351,7 +1352,7 @@ public: | |||
| @see mouseEnter, mouseExit, mouseDown, mouseUp | |||
| */ | |||
| void setRepaintsOnMouseActivity (const bool shouldRepaint); | |||
| void setRepaintsOnMouseActivity (const bool shouldRepaint) throw(); | |||
| /** Registers a listener to be told when mouse events occur in this component. | |||
| @@ -1371,13 +1372,13 @@ public: | |||
| @see MouseListener, removeMouseListener | |||
| */ | |||
| void addMouseListener (MouseListener* const newListener, | |||
| const bool wantsEventsForAllNestedChildComponents); | |||
| const bool wantsEventsForAllNestedChildComponents) throw(); | |||
| /** Deregisters a mouse listener. | |||
| @see addMouseListener, MouseListener | |||
| */ | |||
| void removeMouseListener (MouseListener* const listenerToRemove); | |||
| void removeMouseListener (MouseListener* const listenerToRemove) throw(); | |||
| //============================================================================== | |||
| /** Adds a listener that wants to hear about keypresses that this component receives. | |||
| @@ -1390,13 +1391,13 @@ public: | |||
| @see keyPressed, keyStateChanged, removeKeyListener | |||
| */ | |||
| void addKeyListener (KeyListener* const newListener); | |||
| void addKeyListener (KeyListener* const newListener) throw(); | |||
| /** Removes a previously-registered key listener. | |||
| @see addKeyListener | |||
| */ | |||
| void removeKeyListener (KeyListener* const listenerToRemove); | |||
| void removeKeyListener (KeyListener* const listenerToRemove) throw(); | |||
| /** Called when a key is pressed. | |||
| @@ -1534,7 +1535,7 @@ public: | |||
| The co-ordinates are relative to the component's top-left corner. | |||
| */ | |||
| void getMouseXYRelative (int& x, int& y) const; | |||
| void getMouseXYRelative (int& x, int& y) const throw(); | |||
| /** Returns the component that's currently underneath the mouse. | |||
| @@ -1562,7 +1563,7 @@ public: | |||
| is moved beyond the edge of the screen | |||
| */ | |||
| void enableUnboundedMouseMovement (bool shouldUnboundedMovementBeEnabled, | |||
| bool keepCursorVisibleUntilOffscreen = false); | |||
| bool keepCursorVisibleUntilOffscreen = false) throw(); | |||
| //============================================================================== | |||
| /** Called when this component's size has been changed. | |||
| @@ -1671,7 +1672,7 @@ public: | |||
| @see handleCommandMessage | |||
| */ | |||
| void postCommandMessage (const int commandId); | |||
| void postCommandMessage (const int commandId) throw(); | |||
| /** Called to handle a command that was sent by postCommandMessage(). | |||
| @@ -1732,14 +1733,14 @@ public: | |||
| @see getCurrentlyModalComponent | |||
| */ | |||
| bool isCurrentlyModal() const; | |||
| bool isCurrentlyModal() const throw(); | |||
| /** Returns the component that is currently modal. | |||
| @returns the modal component, or null if no components are modal | |||
| @see runModalLoop, isCurrentlyModal | |||
| */ | |||
| static Component* getCurrentlyModalComponent(); | |||
| static Component* getCurrentlyModalComponent() throw(); | |||
| /** Checks whether there's a modal component somewhere that's stopping this one | |||
| from receiving messages. | |||
| @@ -1749,7 +1750,7 @@ public: | |||
| @see runModalLoop, getCurrentlyModalComponent | |||
| */ | |||
| bool isCurrentlyBlockedByAnotherModalComponent() const; | |||
| bool isCurrentlyBlockedByAnotherModalComponent() const throw(); | |||
| /** When a component is modal, this callback allows it to choose which other | |||
| components can still receive events. | |||
| @@ -1895,7 +1896,7 @@ public: | |||
| @see getComponentProperty, setComponentProperty | |||
| */ | |||
| PropertySet* getComponentProperties() const throw() { return propertySet_; } | |||
| PropertySet* getComponentProperties() const throw() { return propertySet_; } | |||
| //============================================================================== | |||
| /** Looks for a colour that has been registered with the given colour ID number. | |||
| @@ -1952,7 +1953,7 @@ public: | |||
| This is platform-dependent and strictly for power-users only! | |||
| */ | |||
| void* getWindowHandle() const; | |||
| void* getWindowHandle() const throw(); | |||
| /** When created, each component is given a number to uniquely identify it. | |||
| @@ -1960,7 +1961,7 @@ public: | |||
| unique way of identifying a component than using its memory location (which | |||
| may be reused after the component is deleted, of course). | |||
| */ | |||
| uint32 getComponentUID() const throw() { return componentUID; } | |||
| uint32 getComponentUID() const throw() { return componentUID; } | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| @@ -2036,9 +2037,9 @@ private: | |||
| void internalChildrenChanged(); | |||
| void internalHierarchyChanged(); | |||
| void internalFilesDropped (const int x, const int y, const StringArray& files); | |||
| void internalUpdateMouseCursor (const bool forcedUpdate); | |||
| void internalUpdateMouseCursor (const bool forcedUpdate) throw(); | |||
| void sendMovedResizedMessages (const bool wasMoved, const bool wasResized); | |||
| void repaintParent(); | |||
| void repaintParent() throw(); | |||
| void sendFakeMouseMove() const; | |||
| void takeKeyboardFocus (FocusChangeType cause); | |||
| void grabFocusInternal (FocusChangeType cause, const bool canTryParent = true); | |||
| @@ -2048,9 +2049,9 @@ private: | |||
| void subtractObscuredRegions (RectangleList& result, | |||
| const int deltaX, const int deltaY, | |||
| const Rectangle& clipRect, | |||
| const Component* const compToAvoid) const; | |||
| const Component* const compToAvoid) const throw(); | |||
| void clipObscuredRegions (Graphics& g, const Rectangle& clipRect, | |||
| const int deltaX, const int deltaY) const; | |||
| const int deltaX, const int deltaY) const throw(); | |||
| // how much of the component is not off the edges of its parents | |||
| const Rectangle getUnclippedArea() const; | |||
| @@ -70,7 +70,7 @@ public: | |||
| //============================================================================== | |||
| /** There's only one dektop object, and this method will return it. | |||
| */ | |||
| static Desktop& JUCE_CALLTYPE getInstance(); | |||
| static Desktop& getInstance(); | |||
| //============================================================================== | |||
| /** Returns a list of the positions of all the monitors available. | |||
| @@ -45,7 +45,7 @@ public: | |||
| int direction; | |||
| ScrollbarButton (const int direction_, | |||
| ScrollBar& owner_) | |||
| ScrollBar& owner_) throw() | |||
| : Button (String::empty), | |||
| direction (direction_), | |||
| owner (owner_) | |||
| @@ -131,7 +131,7 @@ void ScrollBar::setRangeLimits (const double newMinimum, | |||
| } | |||
| void ScrollBar::setCurrentRange (double newStart, | |||
| double newSize) | |||
| double newSize) throw() | |||
| { | |||
| newSize = jlimit (0.0, maximum - minimum, newSize); | |||
| newStart = jlimit (minimum, maximum - newSize, newStart); | |||
| @@ -147,39 +147,39 @@ void ScrollBar::setCurrentRange (double newStart, | |||
| } | |||
| } | |||
| void ScrollBar::setCurrentRangeStart (double newStart) | |||
| void ScrollBar::setCurrentRangeStart (double newStart) throw() | |||
| { | |||
| setCurrentRange (newStart, rangeSize); | |||
| } | |||
| void ScrollBar::setSingleStepSize (const double newSingleStepSize) | |||
| void ScrollBar::setSingleStepSize (const double newSingleStepSize) throw() | |||
| { | |||
| singleStepSize = newSingleStepSize; | |||
| } | |||
| void ScrollBar::moveScrollbarInSteps (const int howManySteps) | |||
| void ScrollBar::moveScrollbarInSteps (const int howManySteps) throw() | |||
| { | |||
| setCurrentRangeStart (rangeStart + howManySteps * singleStepSize); | |||
| } | |||
| void ScrollBar::moveScrollbarInPages (const int howManyPages) | |||
| void ScrollBar::moveScrollbarInPages (const int howManyPages) throw() | |||
| { | |||
| setCurrentRangeStart (rangeStart + howManyPages * rangeSize); | |||
| } | |||
| void ScrollBar::scrollToTop() | |||
| void ScrollBar::scrollToTop() throw() | |||
| { | |||
| setCurrentRangeStart (minimum); | |||
| } | |||
| void ScrollBar::scrollToBottom() | |||
| void ScrollBar::scrollToBottom() throw() | |||
| { | |||
| setCurrentRangeStart (maximum - rangeSize); | |||
| } | |||
| void ScrollBar::setButtonRepeatSpeed (const int initialDelayInMillisecs_, | |||
| const int repeatDelayInMillisecs_, | |||
| const int minimumDelayInMillisecs_) | |||
| const int minimumDelayInMillisecs_) throw() | |||
| { | |||
| initialDelayInMillisecs = initialDelayInMillisecs_; | |||
| repeatDelayInMillisecs = repeatDelayInMillisecs_; | |||
| @@ -217,7 +217,7 @@ void ScrollBar::handleAsyncUpdate() | |||
| } | |||
| //============================================================================== | |||
| void ScrollBar::updateThumbPosition() | |||
| void ScrollBar::updateThumbPosition() throw() | |||
| { | |||
| int newThumbSize = roundDoubleToInt ((maximum > minimum) ? (rangeSize * thumbAreaSize) / (maximum - minimum) | |||
| : thumbAreaSize); | |||
| @@ -251,7 +251,7 @@ void ScrollBar::updateThumbPosition() | |||
| } | |||
| } | |||
| void ScrollBar::setOrientation (const bool shouldBeVertical) | |||
| void ScrollBar::setOrientation (const bool shouldBeVertical) throw() | |||
| { | |||
| if (vertical != shouldBeVertical) | |||
| { | |||
| @@ -102,7 +102,7 @@ public: | |||
| //============================================================================== | |||
| /** Returns true if the scrollbar is vertical, false if it's horizontal. */ | |||
| bool isVertical() const { return vertical; } | |||
| bool isVertical() const throw() { return vertical; } | |||
| /** Changes the scrollbar's direction. | |||
| @@ -111,7 +111,7 @@ public: | |||
| @param shouldBeVertical true makes it vertical; false makes it horizontal. | |||
| */ | |||
| void setOrientation (const bool shouldBeVertical); | |||
| void setOrientation (const bool shouldBeVertical) throw(); | |||
| /** Shows or hides the scrollbar's buttons. */ | |||
| void setButtonVisibility (const bool buttonsAreVisible); | |||
| @@ -131,13 +131,13 @@ public: | |||
| This is the value set by setRangeLimits(). | |||
| */ | |||
| double getMinimumRangeLimit() const { return minimum; } | |||
| double getMinimumRangeLimit() const throw() { return minimum; } | |||
| /** Returns the upper value that the thumb can be set to. | |||
| This is the value set by setRangeLimits(). | |||
| */ | |||
| double getMaximumRangeLimit() const { return maximum; } | |||
| double getMaximumRangeLimit() const throw() { return maximum; } | |||
| //============================================================================== | |||
| /** Changes the position of the scrollbar's 'thumb'. | |||
| @@ -158,7 +158,7 @@ public: | |||
| @see setCurrentRangeStart, getCurrentRangeStart, getCurrentRangeSize | |||
| */ | |||
| void setCurrentRange (double newStart, | |||
| double newSize); | |||
| double newSize) throw(); | |||
| /** Moves the bar's thumb position. | |||
| @@ -171,19 +171,19 @@ public: | |||
| @see setCurrentRange | |||
| */ | |||
| void setCurrentRangeStart (double newStart); | |||
| void setCurrentRangeStart (double newStart) throw(); | |||
| /** Returns the position of the top of the thumb. | |||
| @see setCurrentRangeStart | |||
| */ | |||
| double getCurrentRangeStart() const { return rangeStart; } | |||
| double getCurrentRangeStart() const throw() { return rangeStart; } | |||
| /** Returns the current size of the thumb. | |||
| @see setCurrentRange | |||
| */ | |||
| double getCurrentRangeSize() const { return rangeSize; } | |||
| double getCurrentRangeSize() const throw() { return rangeSize; } | |||
| //============================================================================== | |||
| /** Sets the amount by which the up and down buttons will move the bar. | |||
| @@ -191,7 +191,7 @@ public: | |||
| The value here is in terms of the total range, and is added or subtracted | |||
| from the thumb position when the user clicks an up/down (or left/right) button. | |||
| */ | |||
| void setSingleStepSize (const double newSingleStepSize); | |||
| void setSingleStepSize (const double newSingleStepSize) throw(); | |||
| /** Moves the scrollbar by a number of single-steps. | |||
| @@ -201,7 +201,7 @@ public: | |||
| A positive value here will move the bar down or to the right, a negative | |||
| value moves it up or to the left. | |||
| */ | |||
| void moveScrollbarInSteps (const int howManySteps); | |||
| void moveScrollbarInSteps (const int howManySteps) throw(); | |||
| /** Moves the scroll bar up or down in pages. | |||
| @@ -211,19 +211,19 @@ public: | |||
| A positive value here will move the bar down or to the right, a negative | |||
| value moves it up or to the left. | |||
| */ | |||
| void moveScrollbarInPages (const int howManyPages); | |||
| void moveScrollbarInPages (const int howManyPages) throw(); | |||
| /** Scrolls to the top (or left). | |||
| This is the same as calling setCurrentRangeStart (getMinimumRangeLimit()); | |||
| */ | |||
| void scrollToTop(); | |||
| void scrollToTop() throw(); | |||
| /** Scrolls to the bottom (or right). | |||
| This is the same as calling setCurrentRangeStart (getMaximumRangeLimit() - getCurrentRangeSize()); | |||
| */ | |||
| void scrollToBottom(); | |||
| void scrollToBottom() throw(); | |||
| /** Changes the delay before the up and down buttons autorepeat when they are held | |||
| down. | |||
| @@ -234,7 +234,7 @@ public: | |||
| */ | |||
| void setButtonRepeatSpeed (const int initialDelayInMillisecs, | |||
| const int repeatDelayInMillisecs, | |||
| const int minimumDelayInMillisecs = -1); | |||
| const int minimumDelayInMillisecs = -1) throw(); | |||
| //============================================================================== | |||
| /** A set of colour IDs to use to change the colour of various aspects of the component. | |||
| @@ -292,7 +292,7 @@ private: | |||
| Button* downButton; | |||
| SortedSet <void*> listeners; | |||
| void updateThumbPosition(); | |||
| void updateThumbPosition() throw(); | |||
| void timerCallback(); | |||
| ScrollBar (const ScrollBar&); | |||
| @@ -104,12 +104,12 @@ void Viewport::setViewedComponent (Component* const newViewedComponent) | |||
| } | |||
| } | |||
| int Viewport::getMaximumVisibleWidth() const | |||
| int Viewport::getMaximumVisibleWidth() const throw() | |||
| { | |||
| return jmax (0, getWidth() - (verticalScrollBar->isVisible() ? getScrollBarThickness() : 0)); | |||
| } | |||
| int Viewport::getMaximumVisibleHeight() const | |||
| int Viewport::getMaximumVisibleHeight() const throw() | |||
| { | |||
| return jmax (0, getHeight() - (horizontalScrollBar->isVisible() ? getScrollBarThickness() : 0)); | |||
| } | |||
| @@ -250,7 +250,7 @@ void Viewport::setScrollBarThickness (const int thickness) | |||
| updateVisibleRegion(); | |||
| } | |||
| int Viewport::getScrollBarThickness() const | |||
| int Viewport::getScrollBarThickness() const throw() | |||
| { | |||
| return (scrollBarThickness > 0) ? scrollBarThickness | |||
| : getLookAndFeel().getDefaultScrollbarWidth(); | |||
| @@ -139,14 +139,14 @@ public: | |||
| This will be the width of the viewport component minus the width of a | |||
| vertical scrollbar (if visible). | |||
| */ | |||
| int getMaximumVisibleWidth() const; | |||
| int getMaximumVisibleWidth() const throw(); | |||
| /** Returns the height available within this component for the contents. | |||
| This will be the height of the viewport component minus the space taken up | |||
| by a horizontal scrollbar (if visible). | |||
| */ | |||
| int getMaximumVisibleHeight() const; | |||
| int getMaximumVisibleHeight() const throw(); | |||
| //============================================================================== | |||
| /** Callback method that is called when the visible area changes. | |||
| @@ -188,7 +188,7 @@ public: | |||
| @see setScrollBarThickness | |||
| */ | |||
| int getScrollBarThickness() const; | |||
| int getScrollBarThickness() const throw(); | |||
| /** Changes the distance that a single-step click on a scrollbar button | |||
| will move the viewport. | |||
| @@ -37,7 +37,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static forcedinline uint8 JUCE_CALLTYPE floatAlphaToInt (const float alpha) | |||
| static forcedinline uint8 floatAlphaToInt (const float alpha) | |||
| { | |||
| return (uint8) jlimit (0, 0xff, roundFloatToInt (alpha * 255.0f)); | |||
| } | |||
| @@ -46,57 +46,57 @@ static const float oneOver255 = 1.0f / 255.0f; | |||
| //============================================================================== | |||
| JUCE_CALLTYPE Colour::Colour() throw() | |||
| Colour::Colour() throw() | |||
| : argb (0) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const Colour& other) throw() | |||
| Colour::Colour (const Colour& other) throw() | |||
| : argb (other.argb) | |||
| { | |||
| } | |||
| const Colour& JUCE_CALLTYPE Colour::operator= (const Colour& other) throw() | |||
| const Colour& Colour::operator= (const Colour& other) throw() | |||
| { | |||
| argb = other.argb; | |||
| return *this; | |||
| } | |||
| bool JUCE_CALLTYPE Colour::operator== (const Colour& other) const throw() | |||
| bool Colour::operator== (const Colour& other) const throw() | |||
| { | |||
| return argb.getARGB() == other.argb.getARGB(); | |||
| } | |||
| bool JUCE_CALLTYPE Colour::operator!= (const Colour& other) const throw() | |||
| bool Colour::operator!= (const Colour& other) const throw() | |||
| { | |||
| return argb.getARGB() != other.argb.getARGB(); | |||
| } | |||
| //============================================================================== | |||
| JUCE_CALLTYPE Colour::Colour (const uint32 argb_) throw() | |||
| Colour::Colour (const uint32 argb_) throw() | |||
| : argb (argb_) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue) throw() | |||
| Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue) throw() | |||
| { | |||
| argb.setARGB (0xff, red, green, blue); | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const uint8 alpha) throw() | |||
| Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const uint8 alpha) throw() | |||
| { | |||
| argb.setARGB (alpha, red, green, blue); | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const float alpha) throw() | |||
| Colour::Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const float alpha) throw() | |||
| { | |||
| argb.setARGB (floatAlphaToInt (alpha), red, green, blue); | |||
| } | |||
| @@ -168,10 +168,10 @@ static void convertHSBtoRGB (float h, const float s, float v, | |||
| } | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const float alpha) throw() | |||
| Colour::Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const float alpha) throw() | |||
| { | |||
| uint8 r = getRed(), g = getGreen(), b = getBlue(); | |||
| convertHSBtoRGB (hue, saturation, brightness, r, g, b); | |||
| @@ -179,10 +179,10 @@ JUCE_CALLTYPE Colour::Colour (const float hue, | |||
| argb.setARGB (floatAlphaToInt (alpha), r, g, b); | |||
| } | |||
| JUCE_CALLTYPE Colour::Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const uint8 alpha) throw() | |||
| Colour::Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const uint8 alpha) throw() | |||
| { | |||
| uint8 r = getRed(), g = getGreen(), b = getBlue(); | |||
| convertHSBtoRGB (hue, saturation, brightness, r, g, b); | |||
| @@ -190,51 +190,51 @@ JUCE_CALLTYPE Colour::Colour (const float hue, | |||
| argb.setARGB (alpha, r, g, b); | |||
| } | |||
| JUCE_CALLTYPE Colour::~Colour() throw() | |||
| Colour::~Colour() throw() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| const PixelARGB JUCE_CALLTYPE Colour::getPixelARGB() const throw() | |||
| const PixelARGB Colour::getPixelARGB() const throw() | |||
| { | |||
| PixelARGB p (argb); | |||
| p.premultiply(); | |||
| return p; | |||
| } | |||
| uint32 JUCE_CALLTYPE Colour::getARGB() const throw() | |||
| uint32 Colour::getARGB() const throw() | |||
| { | |||
| return argb.getARGB(); | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE Colour::isTransparent() const throw() | |||
| bool Colour::isTransparent() const throw() | |||
| { | |||
| return getAlpha() == 0; | |||
| } | |||
| bool JUCE_CALLTYPE Colour::isOpaque() const throw() | |||
| bool Colour::isOpaque() const throw() | |||
| { | |||
| return getAlpha() == 0xff; | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withAlpha (const uint8 newAlpha) const throw() | |||
| const Colour Colour::withAlpha (const uint8 newAlpha) const throw() | |||
| { | |||
| return Colour (getRed(), getGreen(), getBlue(), newAlpha); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withAlpha (const float newAlpha) const throw() | |||
| const Colour Colour::withAlpha (const float newAlpha) const throw() | |||
| { | |||
| return withAlpha (floatAlphaToInt (newAlpha)); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withMultipliedAlpha (const float alphaMultiplier) const throw() | |||
| const Colour Colour::withMultipliedAlpha (const float alphaMultiplier) const throw() | |||
| { | |||
| return withAlpha ((uint8) jlimit (0, 0xff, roundFloatToInt (alphaMultiplier * getAlpha()))); | |||
| } | |||
| //============================================================================== | |||
| const Colour JUCE_CALLTYPE Colour::overlaidWith (const Colour& src) const throw() | |||
| const Colour Colour::overlaidWith (const Colour& src) const throw() | |||
| { | |||
| const int destAlpha = getAlpha(); | |||
| @@ -262,28 +262,28 @@ const Colour JUCE_CALLTYPE Colour::overlaidWith (const Colour& src) const throw( | |||
| } | |||
| //============================================================================== | |||
| float JUCE_CALLTYPE Colour::getFloatRed() const throw() | |||
| float Colour::getFloatRed() const throw() | |||
| { | |||
| return getRed() * oneOver255; | |||
| } | |||
| float JUCE_CALLTYPE Colour::getFloatGreen() const throw() | |||
| float Colour::getFloatGreen() const throw() | |||
| { | |||
| return getGreen() * oneOver255; | |||
| } | |||
| float JUCE_CALLTYPE Colour::getFloatBlue() const throw() | |||
| float Colour::getFloatBlue() const throw() | |||
| { | |||
| return getBlue() * oneOver255; | |||
| } | |||
| float JUCE_CALLTYPE Colour::getFloatAlpha() const throw() | |||
| float Colour::getFloatAlpha() const throw() | |||
| { | |||
| return getAlpha() * oneOver255; | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Colour::getHSB (float& h, float& s, float& v) const throw() | |||
| void Colour::getHSB (float& h, float& s, float& v) const throw() | |||
| { | |||
| const int r = getRed(); | |||
| const int g = getGreen(); | |||
| @@ -331,14 +331,14 @@ void JUCE_CALLTYPE Colour::getHSB (float& h, float& s, float& v) const throw() | |||
| } | |||
| //============================================================================== | |||
| float JUCE_CALLTYPE Colour::getHue() const throw() | |||
| float Colour::getHue() const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| return h; | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withHue (const float hue) const throw() | |||
| const Colour Colour::withHue (const float hue) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -346,7 +346,7 @@ const Colour JUCE_CALLTYPE Colour::withHue (const float hue) const throw() | |||
| return Colour (hue, s, b, getAlpha()); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withRotatedHue (const float amountToRotate) const throw() | |||
| const Colour Colour::withRotatedHue (const float amountToRotate) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -358,14 +358,14 @@ const Colour JUCE_CALLTYPE Colour::withRotatedHue (const float amountToRotate) c | |||
| } | |||
| //============================================================================== | |||
| float JUCE_CALLTYPE Colour::getSaturation() const throw() | |||
| float Colour::getSaturation() const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| return s; | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withSaturation (const float saturation) const throw() | |||
| const Colour Colour::withSaturation (const float saturation) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -373,7 +373,7 @@ const Colour JUCE_CALLTYPE Colour::withSaturation (const float saturation) const | |||
| return Colour (h, saturation, b, getAlpha()); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withMultipliedSaturation (const float amount) const throw() | |||
| const Colour Colour::withMultipliedSaturation (const float amount) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -382,14 +382,14 @@ const Colour JUCE_CALLTYPE Colour::withMultipliedSaturation (const float amount) | |||
| } | |||
| //============================================================================== | |||
| float JUCE_CALLTYPE Colour::getBrightness() const throw() | |||
| float Colour::getBrightness() const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| return b; | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withBrightness (const float brightness) const throw() | |||
| const Colour Colour::withBrightness (const float brightness) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -397,7 +397,7 @@ const Colour JUCE_CALLTYPE Colour::withBrightness (const float brightness) const | |||
| return Colour (h, s, brightness, getAlpha()); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::withMultipliedBrightness (const float amount) const throw() | |||
| const Colour Colour::withMultipliedBrightness (const float amount) const throw() | |||
| { | |||
| float h, s, b; | |||
| getHSB (h, s, b); | |||
| @@ -411,7 +411,7 @@ const Colour JUCE_CALLTYPE Colour::withMultipliedBrightness (const float amount) | |||
| } | |||
| //============================================================================== | |||
| const Colour JUCE_CALLTYPE Colour::brighter (float amount) const throw() | |||
| const Colour Colour::brighter (float amount) const throw() | |||
| { | |||
| amount = 1.0f / (1.0f + amount); | |||
| @@ -421,7 +421,7 @@ const Colour JUCE_CALLTYPE Colour::brighter (float amount) const throw() | |||
| getAlpha()); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::darker (float amount) const throw() | |||
| const Colour Colour::darker (float amount) const throw() | |||
| { | |||
| amount = 1.0f / (1.0f + amount); | |||
| @@ -432,7 +432,7 @@ const Colour JUCE_CALLTYPE Colour::darker (float amount) const throw() | |||
| } | |||
| //============================================================================== | |||
| const Colour JUCE_CALLTYPE Colour::greyLevel (const float brightness) throw() | |||
| const Colour Colour::greyLevel (const float brightness) throw() | |||
| { | |||
| const uint8 level | |||
| = (uint8) jlimit (0x00, 0xff, roundFloatToInt (brightness * 255.0f)); | |||
| @@ -441,15 +441,15 @@ const Colour JUCE_CALLTYPE Colour::greyLevel (const float brightness) throw() | |||
| } | |||
| //============================================================================== | |||
| const Colour JUCE_CALLTYPE Colour::contrasting (const float amount) const throw() | |||
| const Colour Colour::contrasting (const float amount) const throw() | |||
| { | |||
| return overlaidWith ((((int) getRed() + (int) getGreen() + (int) getBlue() >= 3 * 128) | |||
| ? Colours::black | |||
| : Colours::white).withAlpha (amount)); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::contrasting (const Colour& colour1, | |||
| const Colour& colour2) throw() | |||
| const Colour Colour::contrasting (const Colour& colour1, | |||
| const Colour& colour2) throw() | |||
| { | |||
| const float b1 = colour1.getBrightness(); | |||
| const float b2 = colour2.getBrightness(); | |||
| @@ -474,12 +474,12 @@ const Colour JUCE_CALLTYPE Colour::contrasting (const Colour& colour1, | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE Colour::toString() const throw() | |||
| const String Colour::toString() const throw() | |||
| { | |||
| return String::toHexString ((int) argb.getARGB()); | |||
| } | |||
| const Colour JUCE_CALLTYPE Colour::fromString (const String& encodedColourString) | |||
| const Colour Colour::fromString (const String& encodedColourString) | |||
| { | |||
| return Colour ((uint32) encodedColourString.getHexValue32()); | |||
| } | |||
| @@ -46,10 +46,10 @@ class JUCE_API Colour | |||
| public: | |||
| //============================================================================== | |||
| /** Creates a transparent black colour. */ | |||
| JUCE_CALLTYPE Colour() throw(); | |||
| Colour() throw(); | |||
| /** Creates a copy of another Colour object. */ | |||
| JUCE_CALLTYPE Colour (const Colour& other) throw(); | |||
| Colour (const Colour& other) throw(); | |||
| /** Creates a colour from a 32-bit ARGB value. | |||
| @@ -61,28 +61,28 @@ public: | |||
| @see getPixelARGB | |||
| */ | |||
| explicit JUCE_CALLTYPE Colour (const uint32 argb) throw(); | |||
| explicit Colour (const uint32 argb) throw(); | |||
| /** Creates an opaque colour using 8-bit red, green and blue values */ | |||
| JUCE_CALLTYPE Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue) throw(); | |||
| Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue) throw(); | |||
| /** Creates a colour using 8-bit red, green, blue and alpha values. */ | |||
| JUCE_CALLTYPE Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const uint8 alpha) throw(); | |||
| Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const uint8 alpha) throw(); | |||
| /** Creates a colour from 8-bit red, green, and blue values, and a floating-point alpha. | |||
| Alpha of 0.0 is transparent, alpha of 1.0f is opaque. | |||
| Values outside the valid range will be clipped. | |||
| */ | |||
| JUCE_CALLTYPE Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const float alpha) throw(); | |||
| Colour (const uint8 red, | |||
| const uint8 green, | |||
| const uint8 blue, | |||
| const float alpha) throw(); | |||
| /** Creates a colour using floating point hue, saturation and brightness values, and an 8-bit alpha. | |||
| @@ -90,116 +90,116 @@ public: | |||
| An alpha of 0x00 is completely transparent, alpha of 0xff is opaque. | |||
| Values outside the valid range will be clipped. | |||
| */ | |||
| JUCE_CALLTYPE Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const uint8 alpha) throw(); | |||
| Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const uint8 alpha) throw(); | |||
| /** Creates a colour using floating point hue, saturation, brightness and alpha values. | |||
| All values must be between 0.0 and 1.0. | |||
| Numbers outside the valid range will be clipped. | |||
| */ | |||
| JUCE_CALLTYPE Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const float alpha) throw(); | |||
| Colour (const float hue, | |||
| const float saturation, | |||
| const float brightness, | |||
| const float alpha) throw(); | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~Colour() throw(); | |||
| ~Colour() throw(); | |||
| /** Copies another Colour object. */ | |||
| const Colour& JUCE_CALLTYPE operator= (const Colour& other) throw(); | |||
| const Colour& operator= (const Colour& other) throw(); | |||
| /** Compares two colours. */ | |||
| bool JUCE_CALLTYPE operator== (const Colour& other) const throw(); | |||
| bool operator== (const Colour& other) const throw(); | |||
| /** Compares two colours. */ | |||
| bool JUCE_CALLTYPE operator!= (const Colour& other) const throw(); | |||
| bool operator!= (const Colour& other) const throw(); | |||
| //============================================================================== | |||
| /** Returns the red component of this colour. | |||
| @returns a value between 0x00 and 0xff. | |||
| */ | |||
| uint8 JUCE_CALLTYPE getRed() const throw() { return argb.getRed(); } | |||
| uint8 getRed() const throw() { return argb.getRed(); } | |||
| /** Returns the green component of this colour. | |||
| @returns a value between 0x00 and 0xff. | |||
| */ | |||
| uint8 JUCE_CALLTYPE getGreen() const throw() { return argb.getGreen(); } | |||
| uint8 getGreen() const throw() { return argb.getGreen(); } | |||
| /** Returns the blue component of this colour. | |||
| @returns a value between 0x00 and 0xff. | |||
| */ | |||
| uint8 JUCE_CALLTYPE getBlue() const throw() { return argb.getBlue(); } | |||
| uint8 getBlue() const throw() { return argb.getBlue(); } | |||
| /** Returns the red component of this colour as a floating point value. | |||
| @returns a value between 0.0 and 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getFloatRed() const throw(); | |||
| float getFloatRed() const throw(); | |||
| /** Returns the green component of this colour as a floating point value. | |||
| @returns a value between 0.0 and 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getFloatGreen() const throw(); | |||
| float getFloatGreen() const throw(); | |||
| /** Returns the blue component of this colour as a floating point value. | |||
| @returns a value between 0.0 and 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getFloatBlue() const throw(); | |||
| float getFloatBlue() const throw(); | |||
| /** Returns a premultiplied ARGB pixel object that represents this colour. | |||
| */ | |||
| const PixelARGB JUCE_CALLTYPE getPixelARGB() const throw(); | |||
| const PixelARGB getPixelARGB() const throw(); | |||
| /** Returns a 32-bit integer that represents this colour. | |||
| The format of this number is: | |||
| ((alpha << 24) | (red << 16) | (green << 16) | blue). | |||
| */ | |||
| uint32 JUCE_CALLTYPE getARGB() const throw(); | |||
| uint32 getARGB() const throw(); | |||
| //============================================================================== | |||
| /** Returns the colour's alpha (opacity). | |||
| Alpha of 0x00 is completely transparent, 0xff is completely opaque. | |||
| */ | |||
| uint8 JUCE_CALLTYPE getAlpha() const throw() { return argb.getAlpha(); } | |||
| uint8 getAlpha() const throw() { return argb.getAlpha(); } | |||
| /** Returns the colour's alpha (opacity) as a floating point value. | |||
| Alpha of 0.0 is completely transparent, 1.0 is completely opaque. | |||
| */ | |||
| float JUCE_CALLTYPE getFloatAlpha() const throw(); | |||
| float getFloatAlpha() const throw(); | |||
| /** Returns true if this colour is completely opaque. | |||
| Equivalent to (getAlpha() == 0xff). | |||
| */ | |||
| bool JUCE_CALLTYPE isOpaque() const throw(); | |||
| bool isOpaque() const throw(); | |||
| /** Returns true if this colour is completely transparent. | |||
| Equivalent to (getAlpha() == 0x00). | |||
| */ | |||
| bool JUCE_CALLTYPE isTransparent() const throw(); | |||
| bool isTransparent() const throw(); | |||
| /** Returns a colour that's the same colour as this one, but with a new alpha value. */ | |||
| const Colour JUCE_CALLTYPE withAlpha (const uint8 newAlpha) const throw(); | |||
| const Colour withAlpha (const uint8 newAlpha) const throw(); | |||
| /** Returns a colour that's the same colour as this one, but with a new alpha value. */ | |||
| const Colour JUCE_CALLTYPE withAlpha (const float newAlpha) const throw(); | |||
| const Colour withAlpha (const float newAlpha) const throw(); | |||
| /** Returns a colour that's the same colour as this one, but with a modified alpha value. | |||
| The new colour's alpha will be this object's alpha multiplied by the value passed-in. | |||
| */ | |||
| const Colour JUCE_CALLTYPE withMultipliedAlpha (const float alphaMultiplier) const throw(); | |||
| const Colour withMultipliedAlpha (const float alphaMultiplier) const throw(); | |||
| //============================================================================== | |||
| /** Returns a colour that is the result of alpha-compositing a new colour over this one. | |||
| @@ -207,42 +207,42 @@ public: | |||
| If the foreground colour is semi-transparent, it is blended onto this colour | |||
| accordingly. | |||
| */ | |||
| const Colour JUCE_CALLTYPE overlaidWith (const Colour& foregroundColour) const throw(); | |||
| const Colour overlaidWith (const Colour& foregroundColour) const throw(); | |||
| //============================================================================== | |||
| /** Returns the colour's hue component. | |||
| The value returned is in the range 0.0 to 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getHue() const throw(); | |||
| float getHue() const throw(); | |||
| /** Returns the colour's saturation component. | |||
| The value returned is in the range 0.0 to 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getSaturation() const throw(); | |||
| float getSaturation() const throw(); | |||
| /** Returns the colour's brightness component. | |||
| The value returned is in the range 0.0 to 1.0 | |||
| */ | |||
| float JUCE_CALLTYPE getBrightness() const throw(); | |||
| float getBrightness() const throw(); | |||
| /** Returns the colour's hue, saturation and brightness components all at once. | |||
| The values returned are in the range 0.0 to 1.0 | |||
| */ | |||
| void JUCE_CALLTYPE getHSB (float& hue, | |||
| float& saturation, | |||
| float& brightness) const throw(); | |||
| void getHSB (float& hue, | |||
| float& saturation, | |||
| float& brightness) const throw(); | |||
| //============================================================================== | |||
| /** Returns a copy of this colour with a different hue. */ | |||
| const Colour JUCE_CALLTYPE withHue (const float newHue) const throw(); | |||
| const Colour withHue (const float newHue) const throw(); | |||
| /** Returns a copy of this colour with a different saturation. */ | |||
| const Colour JUCE_CALLTYPE withSaturation (const float newSaturation) const throw(); | |||
| const Colour withSaturation (const float newSaturation) const throw(); | |||
| /** Returns a copy of this colour with a different brightness. | |||
| @see brighter, darker, withMultipliedBrightness | |||
| */ | |||
| const Colour JUCE_CALLTYPE withBrightness (const float newBrightness) const throw(); | |||
| const Colour withBrightness (const float newBrightness) const throw(); | |||
| /** Returns a copy of this colour with it hue rotated. | |||
| @@ -250,21 +250,21 @@ public: | |||
| @see brighter, darker, withMultipliedBrightness | |||
| */ | |||
| const Colour JUCE_CALLTYPE withRotatedHue (const float amountToRotate) const throw(); | |||
| const Colour withRotatedHue (const float amountToRotate) const throw(); | |||
| /** Returns a copy of this colour with its saturation multiplied by the given value. | |||
| The new colour's saturation is (this->getSaturation() * multiplier) | |||
| (the result is clipped to legal limits). | |||
| */ | |||
| const Colour JUCE_CALLTYPE withMultipliedSaturation (const float multiplier) const throw(); | |||
| const Colour withMultipliedSaturation (const float multiplier) const throw(); | |||
| /** Returns a copy of this colour with its brightness multiplied by the given value. | |||
| The new colour's saturation is (this->getBrightness() * multiplier) | |||
| (the result is clipped to legal limits). | |||
| */ | |||
| const Colour JUCE_CALLTYPE withMultipliedBrightness (const float amount) const throw(); | |||
| const Colour withMultipliedBrightness (const float amount) const throw(); | |||
| //============================================================================== | |||
| /** Returns a brighter version of this colour. | |||
| @@ -273,7 +273,7 @@ public: | |||
| unchanged, and higher values make it brighter | |||
| @see withMultipliedBrightness | |||
| */ | |||
| const Colour JUCE_CALLTYPE brighter (float amountBrighter = 0.4f) const throw(); | |||
| const Colour brighter (float amountBrighter = 0.4f) const throw(); | |||
| /** Returns a darker version of this colour. | |||
| @@ -281,7 +281,7 @@ public: | |||
| unchanged, and higher values make it darker | |||
| @see withMultipliedBrightness | |||
| */ | |||
| const Colour JUCE_CALLTYPE darker (float amountDarker = 0.4f) const throw(); | |||
| const Colour darker (float amountDarker = 0.4f) const throw(); | |||
| //============================================================================== | |||
| /** Returns a colour that will be clearly visible against this colour. | |||
| @@ -291,7 +291,7 @@ public: | |||
| that's just a little bit lighter; Colours::black.contrasting (1.0f) will | |||
| return white; Colours::white.contrasting (1.0f) will return black, etc. | |||
| */ | |||
| const Colour JUCE_CALLTYPE contrasting (const float amount = 1.0f) const throw(); | |||
| const Colour contrasting (const float amount = 1.0f) const throw(); | |||
| /** Returns a colour that contrasts against two colours. | |||
| @@ -299,26 +299,26 @@ public: | |||
| Handy for things like choosing a highlight colour in text editors, etc. | |||
| */ | |||
| static const Colour JUCE_CALLTYPE contrasting (const Colour& colour1, | |||
| const Colour& colour2) throw(); | |||
| static const Colour contrasting (const Colour& colour1, | |||
| const Colour& colour2) throw(); | |||
| //============================================================================== | |||
| /** Returns an opaque shade of grey. | |||
| @param brightness the level of grey to return - 0 is black, 1.0 is white | |||
| */ | |||
| static const Colour JUCE_CALLTYPE greyLevel (const float brightness) throw(); | |||
| static const Colour greyLevel (const float brightness) throw(); | |||
| //============================================================================== | |||
| /** Returns a stringified version of this colour. | |||
| The string can be turned back into a colour using the fromString() method. | |||
| */ | |||
| const String JUCE_CALLTYPE toString() const throw(); | |||
| const String toString() const throw(); | |||
| /** Reads the colour from a string that was created with toString(). | |||
| */ | |||
| static const Colour JUCE_CALLTYPE fromString (const String& encodedColourString); | |||
| static const Colour fromString (const String& encodedColourString); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| @@ -53,7 +53,7 @@ LowLevelGraphicsContext::~LowLevelGraphicsContext() | |||
| } | |||
| //============================================================================== | |||
| JUCE_CALLTYPE Graphics::Graphics (Image& imageToDrawOnto) throw() | |||
| Graphics::Graphics (Image& imageToDrawOnto) throw() | |||
| : context (imageToDrawOnto.createLowLevelContext()), | |||
| ownsContext (true), | |||
| state (new GraphicsState()), | |||
| @@ -61,7 +61,7 @@ JUCE_CALLTYPE Graphics::Graphics (Image& imageToDrawOnto) throw() | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Graphics::Graphics (LowLevelGraphicsContext* const internalContext) throw() | |||
| Graphics::Graphics (LowLevelGraphicsContext* const internalContext) throw() | |||
| : context (internalContext), | |||
| ownsContext (false), | |||
| state (new GraphicsState()), | |||
| @@ -69,7 +69,7 @@ JUCE_CALLTYPE Graphics::Graphics (LowLevelGraphicsContext* const internalContext | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Graphics::~Graphics() throw() | |||
| Graphics::~Graphics() throw() | |||
| { | |||
| delete state; | |||
| @@ -78,55 +78,55 @@ JUCE_CALLTYPE Graphics::~Graphics() throw() | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::resetToDefaultState() throw() | |||
| void Graphics::resetToDefaultState() throw() | |||
| { | |||
| setColour (Colours::black); | |||
| state->font.resetToDefaultState(); | |||
| state->quality = defaultQuality; | |||
| } | |||
| bool JUCE_CALLTYPE Graphics::isVectorDevice() const throw() | |||
| bool Graphics::isVectorDevice() const throw() | |||
| { | |||
| return context->isVectorDevice(); | |||
| } | |||
| bool JUCE_CALLTYPE Graphics::reduceClipRegion (const int x, const int y, | |||
| const int w, const int h) throw() | |||
| bool Graphics::reduceClipRegion (const int x, const int y, | |||
| const int w, const int h) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| return context->reduceClipRegion (x, y, w, h); | |||
| } | |||
| bool JUCE_CALLTYPE Graphics::reduceClipRegion (const RectangleList& clipRegion) throw() | |||
| bool Graphics::reduceClipRegion (const RectangleList& clipRegion) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| return context->reduceClipRegion (clipRegion); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::excludeClipRegion (const int x, const int y, | |||
| const int w, const int h) throw() | |||
| void Graphics::excludeClipRegion (const int x, const int y, | |||
| const int w, const int h) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| context->excludeClipRegion (x, y, w, h); | |||
| } | |||
| bool JUCE_CALLTYPE Graphics::isClipEmpty() const throw() | |||
| bool Graphics::isClipEmpty() const throw() | |||
| { | |||
| return context->isClipEmpty(); | |||
| } | |||
| const Rectangle JUCE_CALLTYPE Graphics::getClipBounds() const throw() | |||
| const Rectangle Graphics::getClipBounds() const throw() | |||
| { | |||
| return context->getClipBounds(); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::saveState() throw() | |||
| void Graphics::saveState() throw() | |||
| { | |||
| saveStateIfPending(); | |||
| saveStatePending = true; | |||
| } | |||
| void JUCE_CALLTYPE Graphics::restoreState() throw() | |||
| void Graphics::restoreState() throw() | |||
| { | |||
| if (saveStatePending) | |||
| { | |||
| @@ -154,7 +154,7 @@ void JUCE_CALLTYPE Graphics::restoreState() throw() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::saveStateIfPending() throw() | |||
| void Graphics::saveStateIfPending() throw() | |||
| { | |||
| if (saveStatePending) | |||
| { | |||
| @@ -165,39 +165,39 @@ void JUCE_CALLTYPE Graphics::saveStateIfPending() throw() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::setOrigin (const int newOriginX, | |||
| const int newOriginY) throw() | |||
| void Graphics::setOrigin (const int newOriginX, | |||
| const int newOriginY) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| context->setOrigin (newOriginX, newOriginY); | |||
| } | |||
| bool JUCE_CALLTYPE Graphics::clipRegionIntersects (const int x, const int y, | |||
| const int w, const int h) const throw() | |||
| bool Graphics::clipRegionIntersects (const int x, const int y, | |||
| const int w, const int h) const throw() | |||
| { | |||
| return context->clipRegionIntersects (x, y, w, h); | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::setColour (const Colour& newColour) throw() | |||
| void Graphics::setColour (const Colour& newColour) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| state->colour = newColour; | |||
| deleteAndZero (state->brush); | |||
| } | |||
| const Colour& JUCE_CALLTYPE Graphics::getCurrentColour() const throw() | |||
| const Colour& Graphics::getCurrentColour() const throw() | |||
| { | |||
| return state->colour; | |||
| } | |||
| void JUCE_CALLTYPE Graphics::setOpacity (const float newOpacity) throw() | |||
| void Graphics::setOpacity (const float newOpacity) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| state->colour = state->colour.withAlpha (newOpacity); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::setBrush (const Brush* const newBrush) throw() | |||
| void Graphics::setBrush (const Brush* const newBrush) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| delete state->brush; | |||
| @@ -209,14 +209,14 @@ void JUCE_CALLTYPE Graphics::setBrush (const Brush* const newBrush) throw() | |||
| } | |||
| //============================================================================== | |||
| JUCE_CALLTYPE Graphics::GraphicsState::GraphicsState() throw() | |||
| Graphics::GraphicsState::GraphicsState() throw() | |||
| : colour (Colours::black), | |||
| brush (0), | |||
| quality (defaultQuality) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Graphics::GraphicsState::GraphicsState (const GraphicsState& other) throw() | |||
| Graphics::GraphicsState::GraphicsState (const GraphicsState& other) throw() | |||
| : colour (other.colour), | |||
| brush (other.brush != 0 ? other.brush->createCopy() : 0), | |||
| font (other.font), | |||
| @@ -224,34 +224,34 @@ JUCE_CALLTYPE Graphics::GraphicsState::GraphicsState (const GraphicsState& other | |||
| { | |||
| } | |||
| JUCE_CALLTYPE Graphics::GraphicsState::~GraphicsState() throw() | |||
| Graphics::GraphicsState::~GraphicsState() throw() | |||
| { | |||
| delete brush; | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::setFont (const Font& newFont) throw() | |||
| void Graphics::setFont (const Font& newFont) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| state->font = newFont; | |||
| } | |||
| void JUCE_CALLTYPE Graphics::setFont (const float newFontHeight, | |||
| const int newFontStyleFlags) throw() | |||
| void Graphics::setFont (const float newFontHeight, | |||
| const int newFontStyleFlags) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| state->font.setSizeAndStyle (newFontHeight, newFontStyleFlags, 1.0f, 0.0f); | |||
| } | |||
| const Font& JUCE_CALLTYPE Graphics::getCurrentFont() const throw() | |||
| const Font& Graphics::getCurrentFont() const throw() | |||
| { | |||
| return state->font; | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::drawSingleLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY) const throw() | |||
| void Graphics::drawSingleLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY) const throw() | |||
| { | |||
| if (text.isNotEmpty() | |||
| && startX < context->getClipBounds().getRight()) | |||
| @@ -262,8 +262,8 @@ void JUCE_CALLTYPE Graphics::drawSingleLineText (const String& text, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawTextAsPath (const String& text, | |||
| const AffineTransform& transform) const throw() | |||
| void Graphics::drawTextAsPath (const String& text, | |||
| const AffineTransform& transform) const throw() | |||
| { | |||
| if (text.isNotEmpty()) | |||
| { | |||
| @@ -273,10 +273,10 @@ void JUCE_CALLTYPE Graphics::drawTextAsPath (const String& text, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawMultiLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY, | |||
| const int maximumLineWidth) const throw() | |||
| void Graphics::drawMultiLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY, | |||
| const int maximumLineWidth) const throw() | |||
| { | |||
| if (text.isNotEmpty() | |||
| && startX < context->getClipBounds().getRight()) | |||
| @@ -289,13 +289,13 @@ void JUCE_CALLTYPE Graphics::drawMultiLineText (const String& text, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationType, | |||
| const bool useEllipsesIfTooBig) const throw() | |||
| void Graphics::drawText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationType, | |||
| const bool useEllipsesIfTooBig) const throw() | |||
| { | |||
| if (text.isNotEmpty() && context->clipRegionIntersects (x, y, width, height)) | |||
| { | |||
| @@ -313,14 +313,14 @@ void JUCE_CALLTYPE Graphics::drawText (const String& text, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawFittedText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justification, | |||
| const int maximumNumberOfLines, | |||
| const float minimumHorizontalScale) const throw() | |||
| void Graphics::drawFittedText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justification, | |||
| const int maximumNumberOfLines, | |||
| const float minimumHorizontalScale) const throw() | |||
| { | |||
| if (text.isNotEmpty() | |||
| && width > 0 && height > 0 | |||
| @@ -340,16 +340,16 @@ void JUCE_CALLTYPE Graphics::drawFittedText (const String& text, | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::fillRect (int x, | |||
| int y, | |||
| int width, | |||
| int height) const throw() | |||
| void Graphics::fillRect (int x, | |||
| int y, | |||
| int width, | |||
| int height) const throw() | |||
| { | |||
| SolidColourBrush colourBrush (state->colour); | |||
| (state->brush != 0 ? *(state->brush) : (Brush&) colourBrush).paintRectangle (*context, x, y, width, height); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillRect (const Rectangle& r) const throw() | |||
| void Graphics::fillRect (const Rectangle& r) const throw() | |||
| { | |||
| fillRect (r.getX(), | |||
| r.getY(), | |||
| @@ -357,17 +357,17 @@ void JUCE_CALLTYPE Graphics::fillRect (const Rectangle& r) const throw() | |||
| r.getHeight()); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillRect (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw() | |||
| void Graphics::fillRect (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw() | |||
| { | |||
| Path p; | |||
| p.addRectangle (x, y, width, height); | |||
| fillPath (p); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::setPixel (int x, int y) const throw() | |||
| void Graphics::setPixel (int x, int y) const throw() | |||
| { | |||
| if (context->clipRegionIntersects (x, y, 1, 1)) | |||
| { | |||
| @@ -376,12 +376,12 @@ void JUCE_CALLTYPE Graphics::setPixel (int x, int y) const throw() | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillAll() const throw() | |||
| void Graphics::fillAll() const throw() | |||
| { | |||
| fillRect (context->getClipBounds()); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillAll (const Colour& colourToUse) const throw() | |||
| void Graphics::fillAll (const Colour& colourToUse) const throw() | |||
| { | |||
| if (! colourToUse.isTransparent()) | |||
| { | |||
| @@ -394,8 +394,8 @@ void JUCE_CALLTYPE Graphics::fillAll (const Colour& colourToUse) const throw() | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::fillPath (const Path& path, | |||
| const AffineTransform& transform) const throw() | |||
| void Graphics::fillPath (const Path& path, | |||
| const AffineTransform& transform) const throw() | |||
| { | |||
| if ((! context->isClipEmpty()) && ! path.isEmpty()) | |||
| { | |||
| @@ -404,9 +404,9 @@ void JUCE_CALLTYPE Graphics::fillPath (const Path& path, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::strokePath (const Path& path, | |||
| const PathStrokeType& strokeType, | |||
| const AffineTransform& transform) const throw() | |||
| void Graphics::strokePath (const Path& path, | |||
| const PathStrokeType& strokeType, | |||
| const AffineTransform& transform) const throw() | |||
| { | |||
| if (! state->colour.isTransparent()) | |||
| { | |||
| @@ -417,11 +417,11 @@ void JUCE_CALLTYPE Graphics::strokePath (const Path& path, | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::drawRect (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int lineThickness) const throw() | |||
| void Graphics::drawRect (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int lineThickness) const throw() | |||
| { | |||
| SolidColourBrush colourBrush (state->colour); | |||
| Brush& b = (state->brush != 0 ? *(state->brush) : (Brush&) colourBrush); | |||
| @@ -432,14 +432,14 @@ void JUCE_CALLTYPE Graphics::drawRect (const int x, | |||
| b.paintRectangle (*context, x, y + height - lineThickness, width, lineThickness); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawBevel (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int bevelThickness, | |||
| const Colour& topLeftColour, | |||
| const Colour& bottomRightColour, | |||
| const bool useGradient) const throw() | |||
| void Graphics::drawBevel (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int bevelThickness, | |||
| const Colour& topLeftColour, | |||
| const Colour& bottomRightColour, | |||
| const bool useGradient) const throw() | |||
| { | |||
| if (clipRegionIntersects (x, y, width, height)) | |||
| { | |||
| @@ -460,57 +460,57 @@ void JUCE_CALLTYPE Graphics::drawBevel (const int x, | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::fillEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw() | |||
| void Graphics::fillEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw() | |||
| { | |||
| Path p; | |||
| p.addEllipse (x, y, width, height); | |||
| fillPath (p); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float lineThickness) const throw() | |||
| void Graphics::drawEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float lineThickness) const throw() | |||
| { | |||
| Path p; | |||
| p.addEllipse (x, y, width, height); | |||
| strokePath (p, PathStrokeType (lineThickness)); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize) const throw() | |||
| void Graphics::fillRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize) const throw() | |||
| { | |||
| Path p; | |||
| p.addRoundedRectangle (x, y, width, height, cornerSize); | |||
| fillPath (p); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize, | |||
| const float lineThickness) const throw() | |||
| void Graphics::drawRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize, | |||
| const float lineThickness) const throw() | |||
| { | |||
| Path p; | |||
| p.addRoundedRectangle (x, y, width, height, cornerSize); | |||
| strokePath (p, PathStrokeType (lineThickness)); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawArrow (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness, | |||
| const float arrowheadWidth, | |||
| const float arrowheadLength) const throw() | |||
| void Graphics::drawArrow (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness, | |||
| const float arrowheadWidth, | |||
| const float arrowheadLength) const throw() | |||
| { | |||
| Path p; | |||
| p.addArrow (startX, startY, endX, endY, | |||
| @@ -518,12 +518,12 @@ void JUCE_CALLTYPE Graphics::drawArrow (const float startX, | |||
| fillPath (p); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::fillCheckerBoard (int x, int y, | |||
| int width, int height, | |||
| const int checkWidth, | |||
| const int checkHeight, | |||
| const Colour& colour1, | |||
| const Colour& colour2) const throw() | |||
| void Graphics::fillCheckerBoard (int x, int y, | |||
| int width, int height, | |||
| const int checkWidth, | |||
| const int checkHeight, | |||
| const Colour& colour1, | |||
| const Colour& colour2) const throw() | |||
| { | |||
| jassert (checkWidth > 0 && checkHeight > 0); // can't be zero or less! | |||
| @@ -560,20 +560,20 @@ void JUCE_CALLTYPE Graphics::fillCheckerBoard (int x, int y, | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::drawVerticalLine (const int x, float top, float bottom) const throw() | |||
| void Graphics::drawVerticalLine (const int x, float top, float bottom) const throw() | |||
| { | |||
| SolidColourBrush colourBrush (state->colour); | |||
| (state->brush != 0 ? *(state->brush) : (Brush&) colourBrush).paintVerticalLine (*context, x, top, bottom); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawHorizontalLine (const int y, float left, float right) const throw() | |||
| void Graphics::drawHorizontalLine (const int y, float left, float right) const throw() | |||
| { | |||
| SolidColourBrush colourBrush (state->colour); | |||
| (state->brush != 0 ? *(state->brush) : (Brush&) colourBrush).paintHorizontalLine (*context, y, left, right); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawLine (float x1, float y1, | |||
| float x2, float y2) const throw() | |||
| void Graphics::drawLine (float x1, float y1, | |||
| float x2, float y2) const throw() | |||
| { | |||
| if (! context->isClipEmpty()) | |||
| { | |||
| @@ -582,35 +582,35 @@ void JUCE_CALLTYPE Graphics::drawLine (float x1, float y1, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness) const throw() | |||
| void Graphics::drawLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness) const throw() | |||
| { | |||
| Path p; | |||
| p.addLineSegment (startX, startY, endX, endY, lineThickness); | |||
| fillPath (p); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawLine (const Line& line) const throw() | |||
| void Graphics::drawLine (const Line& line) const throw() | |||
| { | |||
| drawLine (line.getStartX(), line.getStartY(), line.getEndX(), line.getEndY()); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawLine (const Line& line, | |||
| const float lineThickness) const throw() | |||
| void Graphics::drawLine (const Line& line, | |||
| const float lineThickness) const throw() | |||
| { | |||
| drawLine (line.getStartX(), line.getStartY(), line.getEndX(), line.getEndY(), lineThickness); | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawDashedLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float* const dashLengths, | |||
| const int numDashLengths, | |||
| const float lineThickness) const throw() | |||
| void Graphics::drawDashedLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float* const dashLengths, | |||
| const int numDashLengths, | |||
| const float lineThickness) const throw() | |||
| { | |||
| const double dx = endX - startX; | |||
| const double dy = endY - startY; | |||
| @@ -648,17 +648,17 @@ void JUCE_CALLTYPE Graphics::drawDashedLine (const float startX, | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::setImageResamplingQuality (const Graphics::ResamplingQuality newQuality) throw() | |||
| void Graphics::setImageResamplingQuality (const Graphics::ResamplingQuality newQuality) throw() | |||
| { | |||
| saveStateIfPending(); | |||
| state->quality = newQuality; | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE Graphics::drawImageAt (const Image* const imageToDraw, | |||
| const int topLeftX, | |||
| const int topLeftY, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| void Graphics::drawImageAt (const Image* const imageToDraw, | |||
| const int topLeftX, | |||
| const int topLeftY, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| { | |||
| if (imageToDraw != 0) | |||
| { | |||
| @@ -672,13 +672,13 @@ void JUCE_CALLTYPE Graphics::drawImageAt (const Image* const imageToDraw, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawImageWithin (const Image* const imageToDraw, | |||
| const int destX, | |||
| const int destY, | |||
| const int destW, | |||
| const int destH, | |||
| const RectanglePlacement& placementWithinTarget, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| void Graphics::drawImageWithin (const Image* const imageToDraw, | |||
| const int destX, | |||
| const int destY, | |||
| const int destW, | |||
| const int destH, | |||
| const RectanglePlacement& placementWithinTarget, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| { | |||
| if (imageToDraw != 0) | |||
| { | |||
| @@ -706,10 +706,10 @@ void JUCE_CALLTYPE Graphics::drawImageWithin (const Image* const imageToDraw, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawImage (const Image* const imageToDraw, | |||
| int dx, int dy, int dw, int dh, | |||
| int sx, int sy, int sw, int sh, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| void Graphics::drawImage (const Image* const imageToDraw, | |||
| int dx, int dy, int dw, int dh, | |||
| int sx, int sy, int sw, int sh, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| { | |||
| if (imageToDraw == 0 || ! context->clipRegionIntersects (dx, dy, dw, dh)) | |||
| return; | |||
| @@ -812,13 +812,13 @@ void JUCE_CALLTYPE Graphics::drawImage (const Image* const imageToDraw, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE Graphics::drawImageTransformed (const Image* const imageToDraw, | |||
| int sourceClipX, | |||
| int sourceClipY, | |||
| int sourceClipWidth, | |||
| int sourceClipHeight, | |||
| const AffineTransform& transform, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| void Graphics::drawImageTransformed (const Image* const imageToDraw, | |||
| int sourceClipX, | |||
| int sourceClipY, | |||
| int sourceClipWidth, | |||
| int sourceClipHeight, | |||
| const AffineTransform& transform, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw() | |||
| { | |||
| if (imageToDraw != 0 | |||
| && (! context->isClipEmpty()) | |||
| @@ -70,10 +70,10 @@ public: | |||
| Obviously you shouldn't delete the image before this context is deleted. | |||
| */ | |||
| JUCE_CALLTYPE Graphics (Image& imageToDrawOnto) throw(); | |||
| Graphics (Image& imageToDrawOnto) throw(); | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~Graphics() throw(); | |||
| ~Graphics() throw(); | |||
| //============================================================================== | |||
| /** Changes the current drawing colour. | |||
| @@ -86,7 +86,7 @@ public: | |||
| @see setOpacity, setBrush, getColour | |||
| */ | |||
| void JUCE_CALLTYPE setColour (const Colour& newColour) throw(); | |||
| void setColour (const Colour& newColour) throw(); | |||
| /** Returns the colour that's currently being used. | |||
| @@ -95,7 +95,7 @@ public: | |||
| @see setColour | |||
| */ | |||
| const Colour& JUCE_CALLTYPE getCurrentColour() const throw(); | |||
| const Colour& getCurrentColour() const throw(); | |||
| /** Changes the opacity to use with the current colour. | |||
| @@ -104,7 +104,7 @@ public: | |||
| A value of 0.0 is completely transparent, 1.0 is completely opaque. | |||
| */ | |||
| void JUCE_CALLTYPE setOpacity (const float newOpacity) throw(); | |||
| void setOpacity (const float newOpacity) throw(); | |||
| /** Changes the current brush to use for drawing. | |||
| @@ -116,7 +116,7 @@ public: | |||
| @see SolidColourBrush, GradientBrush, ImageBrush, Brush | |||
| */ | |||
| void JUCE_CALLTYPE setBrush (const Brush* const newBrush) throw(); | |||
| void setBrush (const Brush* const newBrush) throw(); | |||
| //============================================================================== | |||
| /** Changes the font to use for subsequent text-drawing functions. | |||
| @@ -126,7 +126,7 @@ public: | |||
| @see drawSingleLineText, drawMultiLineText, drawTextAsPath, drawText, drawFittedText | |||
| */ | |||
| void JUCE_CALLTYPE setFont (const Font& newFont) throw(); | |||
| void setFont (const Font& newFont) throw(); | |||
| /** Changes the size and style of the currently-selected font. | |||
| @@ -135,14 +135,14 @@ public: | |||
| @see Font | |||
| */ | |||
| void JUCE_CALLTYPE setFont (const float newFontHeight, | |||
| const int fontStyleFlags = Font::plain) throw(); | |||
| void setFont (const float newFontHeight, | |||
| const int fontStyleFlags = Font::plain) throw(); | |||
| /** Returns the font that's currently being used for text operations. | |||
| @see setFont | |||
| */ | |||
| const Font& JUCE_CALLTYPE getCurrentFont() const throw(); | |||
| const Font& getCurrentFont() const throw(); | |||
| /** Draws a one-line text string. | |||
| @@ -154,9 +154,9 @@ public: | |||
| @param baselineY the position of the text's baseline | |||
| @see drawMultiLineText, drawText, drawFittedText, GlyphArrangement::addLineOfText | |||
| */ | |||
| void JUCE_CALLTYPE drawSingleLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY) const throw(); | |||
| void drawSingleLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY) const throw(); | |||
| /** Draws text across multiple lines. | |||
| @@ -166,10 +166,10 @@ public: | |||
| @see setFont, drawSingleLineText, drawFittedText, GlyphArrangement::addJustifiedText | |||
| */ | |||
| void JUCE_CALLTYPE drawMultiLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY, | |||
| const int maximumLineWidth) const throw(); | |||
| void drawMultiLineText (const String& text, | |||
| const int startX, | |||
| const int baselineY, | |||
| const int maximumLineWidth) const throw(); | |||
| /** Renders a string of text as a vector path. | |||
| @@ -179,8 +179,8 @@ public: | |||
| @see setFont | |||
| */ | |||
| void JUCE_CALLTYPE drawTextAsPath (const String& text, | |||
| const AffineTransform& transform) const throw(); | |||
| void drawTextAsPath (const String& text, | |||
| const AffineTransform& transform) const throw(); | |||
| /** Draws a line of text within a specified rectangle. | |||
| @@ -191,13 +191,13 @@ public: | |||
| @see drawSingleLineText, drawFittedText, drawMultiLineText, GlyphArrangement::addJustifiedText | |||
| */ | |||
| void JUCE_CALLTYPE drawText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationType, | |||
| const bool useEllipsesIfTooBig) const throw(); | |||
| void drawText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationType, | |||
| const bool useEllipsesIfTooBig) const throw(); | |||
| /** Tries to draw a text string inside a given space. | |||
| @@ -218,14 +218,14 @@ public: | |||
| @see GlyphArrangement::addFittedText | |||
| */ | |||
| void JUCE_CALLTYPE drawFittedText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationFlags, | |||
| const int maximumNumberOfLines, | |||
| const float minimumHorizontalScale = 0.7f) const throw(); | |||
| void drawFittedText (const String& text, | |||
| const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const Justification& justificationFlags, | |||
| const int maximumNumberOfLines, | |||
| const float minimumHorizontalScale = 0.7f) const throw(); | |||
| //============================================================================== | |||
| /** Fills the context's entire clip region with the current colour or brush. | |||
| @@ -233,56 +233,56 @@ public: | |||
| (See also the fillAll (const Colour&) method which is a quick way of filling | |||
| it with a given colour). | |||
| */ | |||
| void JUCE_CALLTYPE fillAll() const throw(); | |||
| void fillAll() const throw(); | |||
| /** Fills the context's entire clip region with a given colour. | |||
| This leaves the context's current colour and brush unchanged, it just | |||
| uses the specified colour temporarily. | |||
| */ | |||
| void JUCE_CALLTYPE fillAll (const Colour& colourToUse) const throw(); | |||
| void fillAll (const Colour& colourToUse) const throw(); | |||
| //============================================================================== | |||
| /** Fills a rectangle with the current colour or brush. | |||
| @see drawRect, fillRoundedRectangle | |||
| */ | |||
| void JUCE_CALLTYPE fillRect (int x, | |||
| int y, | |||
| int width, | |||
| int height) const throw(); | |||
| void fillRect (int x, | |||
| int y, | |||
| int width, | |||
| int height) const throw(); | |||
| /** Fills a rectangle with the current colour or brush. */ | |||
| void JUCE_CALLTYPE fillRect (const Rectangle& rectangle) const throw(); | |||
| void fillRect (const Rectangle& rectangle) const throw(); | |||
| /** Fills a rectangle with the current colour or brush. | |||
| This uses sub-pixel positioning so is slower than the fillRect method which | |||
| takes integer co-ordinates. | |||
| */ | |||
| void JUCE_CALLTYPE fillRect (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw(); | |||
| void fillRect (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw(); | |||
| /** Uses the current colour or brush to fill a rectangle with rounded corners. | |||
| @see drawRoundedRectangle, Path::addRoundedRectangle | |||
| */ | |||
| void JUCE_CALLTYPE fillRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize) const throw(); | |||
| void fillRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize) const throw(); | |||
| /** Fills a rectangle with a checkerboard pattern, alternating between two colours. | |||
| */ | |||
| void JUCE_CALLTYPE fillCheckerBoard (int x, int y, | |||
| int width, int height, | |||
| const int checkWidth, | |||
| const int checkHeight, | |||
| const Colour& colour1, | |||
| const Colour& colour2) const throw(); | |||
| void fillCheckerBoard (int x, int y, | |||
| int width, int height, | |||
| const int checkWidth, | |||
| const int checkHeight, | |||
| const Colour& colour1, | |||
| const Colour& colour2) const throw(); | |||
| /** Draws four lines to form a rectangular outline, using the current colour or brush. | |||
| @@ -291,22 +291,22 @@ public: | |||
| @see fillRect | |||
| */ | |||
| void JUCE_CALLTYPE drawRect (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int lineThickness = 1) const throw(); | |||
| void drawRect (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int lineThickness = 1) const throw(); | |||
| /** Uses the current colour or brush to draw the outline of a rectangle with rounded corners. | |||
| @see fillRoundedRectangle, Path::addRoundedRectangle | |||
| */ | |||
| void JUCE_CALLTYPE drawRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize, | |||
| const float lineThickness) const throw(); | |||
| void drawRoundedRectangle (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float cornerSize, | |||
| const float lineThickness) const throw(); | |||
| /** Draws a 3D raised (or indented) bevel using two colours. | |||
| @@ -317,18 +317,18 @@ public: | |||
| bevel; the bottom-right colour is used for the bottom- and right-hand | |||
| edges. | |||
| */ | |||
| void JUCE_CALLTYPE drawBevel (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int bevelThickness, | |||
| const Colour& topLeftColour = Colours::white, | |||
| const Colour& bottomRightColour = Colours::black, | |||
| const bool useGradient = true) const throw(); | |||
| void drawBevel (const int x, | |||
| const int y, | |||
| const int width, | |||
| const int height, | |||
| const int bevelThickness, | |||
| const Colour& topLeftColour = Colours::white, | |||
| const Colour& bottomRightColour = Colours::black, | |||
| const bool useGradient = true) const throw(); | |||
| /** Draws a pixel using the current colour or brush. | |||
| */ | |||
| void JUCE_CALLTYPE setPixel (int x, int y) const throw(); | |||
| void setPixel (int x, int y) const throw(); | |||
| //============================================================================== | |||
| /** Fills an ellipse with the current colour or brush. | |||
| @@ -337,53 +337,53 @@ public: | |||
| @see drawEllipse, Path::addEllipse | |||
| */ | |||
| void JUCE_CALLTYPE fillEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw(); | |||
| void fillEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height) const throw(); | |||
| /** Draws an elliptical stroke using the current colour or brush. | |||
| @see fillEllipse, Path::addEllipse | |||
| */ | |||
| void JUCE_CALLTYPE drawEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float lineThickness) const throw(); | |||
| void drawEllipse (const float x, | |||
| const float y, | |||
| const float width, | |||
| const float height, | |||
| const float lineThickness) const throw(); | |||
| //============================================================================== | |||
| /** Draws a line between two points. | |||
| The line is 1 pixel wide and drawn with the current colour or brush. | |||
| */ | |||
| void JUCE_CALLTYPE drawLine (float startX, | |||
| float startY, | |||
| float endX, | |||
| float endY) const throw(); | |||
| void drawLine (float startX, | |||
| float startY, | |||
| float endX, | |||
| float endY) const throw(); | |||
| /** Draws a line between two points with a given thickness. | |||
| @see Path::addLineSegment | |||
| */ | |||
| void JUCE_CALLTYPE drawLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness) const throw(); | |||
| void drawLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness) const throw(); | |||
| /** Draws a line between two points. | |||
| The line is 1 pixel wide and drawn with the current colour or brush. | |||
| */ | |||
| void JUCE_CALLTYPE drawLine (const Line& line) const throw(); | |||
| void drawLine (const Line& line) const throw(); | |||
| /** Draws a line between two points with a given thickness. | |||
| @see Path::addLineSegment | |||
| */ | |||
| void JUCE_CALLTYPE drawLine (const Line& line, | |||
| const float lineThickness) const throw(); | |||
| void drawLine (const Line& line, | |||
| const float lineThickness) const throw(); | |||
| /** Draws a dashed line using a custom set of dash-lengths. | |||
| @@ -398,39 +398,39 @@ public: | |||
| @param lineThickness the thickness of the line to draw | |||
| @see PathStrokeType::createDashedStroke | |||
| */ | |||
| void JUCE_CALLTYPE drawDashedLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float* const dashLengths, | |||
| const int numDashLengths, | |||
| const float lineThickness = 1.0f) const throw(); | |||
| void drawDashedLine (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float* const dashLengths, | |||
| const int numDashLengths, | |||
| const float lineThickness = 1.0f) const throw(); | |||
| /** Draws a vertical line of pixels at a given x position. | |||
| The x position is an integer, but the top and bottom of the line can be sub-pixel | |||
| positions, and these will be anti-aliased if necessary. | |||
| */ | |||
| void JUCE_CALLTYPE drawVerticalLine (const int x, float top, float bottom) const throw(); | |||
| void drawVerticalLine (const int x, float top, float bottom) const throw(); | |||
| /** Draws a horizontal line of pixels at a given y position. | |||
| The y position is an integer, but the left and right ends of the line can be sub-pixel | |||
| positions, and these will be anti-aliased if necessary. | |||
| */ | |||
| void JUCE_CALLTYPE drawHorizontalLine (const int y, float left, float right) const throw(); | |||
| void drawHorizontalLine (const int y, float left, float right) const throw(); | |||
| //============================================================================== | |||
| /** Fills a path using the currently selected colour or brush. | |||
| */ | |||
| void JUCE_CALLTYPE fillPath (const Path& path, | |||
| const AffineTransform& transform = AffineTransform::identity) const throw(); | |||
| void fillPath (const Path& path, | |||
| const AffineTransform& transform = AffineTransform::identity) const throw(); | |||
| /** Draws a path's outline using the currently selected colour or brush. | |||
| */ | |||
| void JUCE_CALLTYPE strokePath (const Path& path, | |||
| const PathStrokeType& strokeType, | |||
| const AffineTransform& transform = AffineTransform::identity) const throw(); | |||
| void strokePath (const Path& path, | |||
| const PathStrokeType& strokeType, | |||
| const AffineTransform& transform = AffineTransform::identity) const throw(); | |||
| /** Draws a line with an arrowhead. | |||
| @@ -442,13 +442,13 @@ public: | |||
| @param arrowheadWidth the width of the arrow head (perpendicular to the line) | |||
| @param arrowheadLength the length of the arrow head (along the length of the line) | |||
| */ | |||
| void JUCE_CALLTYPE drawArrow (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness, | |||
| const float arrowheadWidth, | |||
| const float arrowheadLength) const throw(); | |||
| void drawArrow (const float startX, | |||
| const float startY, | |||
| const float endX, | |||
| const float endY, | |||
| const float lineThickness, | |||
| const float arrowheadWidth, | |||
| const float arrowheadLength) const throw(); | |||
| //============================================================================== | |||
| @@ -469,7 +469,7 @@ public: | |||
| @see Graphics::drawImage, Graphics::drawImageTransformed, Graphics::drawImageWithin | |||
| */ | |||
| void JUCE_CALLTYPE setImageResamplingQuality (const ResamplingQuality newQuality) throw(); | |||
| void setImageResamplingQuality (const ResamplingQuality newQuality) throw(); | |||
| /** Draws an image. | |||
| @@ -482,10 +482,10 @@ public: | |||
| don't want it to be drawn semi-transparently, be sure to call setOpacity (1.0f) | |||
| (or setColour() with an opaque colour) before drawing images. | |||
| */ | |||
| void JUCE_CALLTYPE drawImageAt (const Image* const imageToDraw, | |||
| const int topLeftX, | |||
| const int topLeftY, | |||
| const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
| void drawImageAt (const Image* const imageToDraw, | |||
| const int topLeftX, | |||
| const int topLeftY, | |||
| const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
| /** Draws part of an image, rescaling it to fit in a given target region. | |||
| @@ -512,16 +512,16 @@ public: | |||
| it will just fill the target with a solid rectangle) | |||
| @see setImageResamplingQuality, drawImageAt, drawImageWithin, fillAlphaMap | |||
| */ | |||
| void JUCE_CALLTYPE drawImage (const Image* const imageToDraw, | |||
| int destX, | |||
| int destY, | |||
| int destWidth, | |||
| int destHeight, | |||
| int sourceX, | |||
| int sourceY, | |||
| int sourceWidth, | |||
| int sourceHeight, | |||
| const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
| void drawImage (const Image* const imageToDraw, | |||
| int destX, | |||
| int destY, | |||
| int destWidth, | |||
| int destHeight, | |||
| int sourceX, | |||
| int sourceY, | |||
| int sourceWidth, | |||
| int sourceHeight, | |||
| const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
| /** Draws part of an image, having applied an affine transform to it. | |||
| @@ -540,13 +540,13 @@ public: | |||
| @see setImageResamplingQuality, drawImage | |||
| */ | |||
| void JUCE_CALLTYPE drawImageTransformed (const Image* const imageToDraw, | |||
| int sourceClipX, | |||
| int sourceClipY, | |||
| int sourceClipWidth, | |||
| int sourceClipHeight, | |||
| const AffineTransform& transform, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw(); | |||
| void drawImageTransformed (const Image* const imageToDraw, | |||
| int sourceClipX, | |||
| int sourceClipY, | |||
| int sourceClipWidth, | |||
| int sourceClipHeight, | |||
| const AffineTransform& transform, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw(); | |||
| /** Draws an image to fit within a designated rectangle. | |||
| @@ -569,13 +569,13 @@ public: | |||
| similar to fillAlphaMap(), and see also drawImage() | |||
| @see setImageResamplingQuality, drawImage, drawImageTransformed, drawImageAt, RectanglePlacement | |||
| */ | |||
| void JUCE_CALLTYPE drawImageWithin (const Image* const imageToDraw, | |||
| const int destX, | |||
| const int destY, | |||
| const int destWidth, | |||
| const int destHeight, | |||
| const RectanglePlacement& placementWithinTarget, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw(); | |||
| void drawImageWithin (const Image* const imageToDraw, | |||
| const int destX, | |||
| const int destY, | |||
| const int destWidth, | |||
| const int destHeight, | |||
| const RectanglePlacement& placementWithinTarget, | |||
| const bool fillAlphaChannelWithCurrentBrush) const throw(); | |||
| //============================================================================== | |||
| @@ -583,7 +583,7 @@ public: | |||
| @see getClipRegion, clipRegionIntersects | |||
| */ | |||
| const Rectangle JUCE_CALLTYPE getClipBounds() const throw(); | |||
| const Rectangle getClipBounds() const throw(); | |||
| /** Checks whether a rectangle overlaps the context's clipping region. | |||
| @@ -591,39 +591,39 @@ public: | |||
| method can be used to optimise a component's paint() method, by letting it | |||
| avoid drawing complex objects that aren't within the region being repainted. | |||
| */ | |||
| bool JUCE_CALLTYPE clipRegionIntersects (const int x, const int y, const int width, const int height) const throw(); | |||
| bool clipRegionIntersects (const int x, const int y, const int width, const int height) const throw(); | |||
| /** Intersects the current clipping region with another region. | |||
| @returns true if the resulting clipping region is non-zero in size | |||
| @see setOrigin, clipRegionIntersects, getClipLeft, getClipRight, getClipWidth, getClipHeight | |||
| */ | |||
| bool JUCE_CALLTYPE reduceClipRegion (const int x, const int y, | |||
| const int width, const int height) throw(); | |||
| bool reduceClipRegion (const int x, const int y, | |||
| const int width, const int height) throw(); | |||
| /** Intersects the current clipping region with a rectangle list region. | |||
| @returns true if the resulting clipping region is non-zero in size | |||
| @see setOrigin, clipRegionIntersects, getClipLeft, getClipRight, getClipWidth, getClipHeight | |||
| */ | |||
| bool JUCE_CALLTYPE reduceClipRegion (const RectangleList& clipRegion) throw(); | |||
| bool reduceClipRegion (const RectangleList& clipRegion) throw(); | |||
| /** Excludes a rectangle to stop it being drawn into. */ | |||
| void JUCE_CALLTYPE excludeClipRegion (const int x, const int y, | |||
| const int width, const int height) throw(); | |||
| void excludeClipRegion (const int x, const int y, | |||
| const int width, const int height) throw(); | |||
| /** Returns true if no drawing can be done because the clip region is zero. */ | |||
| bool JUCE_CALLTYPE isClipEmpty() const throw(); | |||
| bool isClipEmpty() const throw(); | |||
| /** Saves the current graphics state on an internal stack. | |||
| To restore the state, use restoreState(). | |||
| */ | |||
| void JUCE_CALLTYPE saveState() throw(); | |||
| void saveState() throw(); | |||
| /** Restores a graphics state that was previously saved with saveState(). | |||
| */ | |||
| void JUCE_CALLTYPE restoreState() throw(); | |||
| void restoreState() throw(); | |||
| /** Moves the position of the context's origin. | |||
| @@ -635,14 +635,14 @@ public: | |||
| @see reduceClipRegion | |||
| */ | |||
| void JUCE_CALLTYPE setOrigin (const int newOriginX, | |||
| const int newOriginY) throw(); | |||
| void setOrigin (const int newOriginX, | |||
| const int newOriginY) throw(); | |||
| /** Resets the current colour, brush, and font to default settings. */ | |||
| void JUCE_CALLTYPE resetToDefaultState() throw(); | |||
| void resetToDefaultState() throw(); | |||
| /** Returns true if this context is drawing to a vector-based device, such as a printer. */ | |||
| bool JUCE_CALLTYPE isVectorDevice() const throw(); | |||
| bool isVectorDevice() const throw(); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| @@ -653,10 +653,10 @@ public: | |||
| NB. The context will NOT be deleted by this object when it is deleted. | |||
| */ | |||
| JUCE_CALLTYPE Graphics (LowLevelGraphicsContext* const internalContext) throw(); | |||
| Graphics (LowLevelGraphicsContext* const internalContext) throw(); | |||
| /** @internal */ | |||
| LowLevelGraphicsContext* JUCE_CALLTYPE getInternalContext() const throw() { return context; } | |||
| LowLevelGraphicsContext* getInternalContext() const throw() { return context; } | |||
| private: | |||
| //============================================================================== | |||
| @@ -665,9 +665,9 @@ private: | |||
| struct GraphicsState | |||
| { | |||
| JUCE_CALLTYPE GraphicsState() throw(); | |||
| JUCE_CALLTYPE GraphicsState (const GraphicsState&) throw(); | |||
| JUCE_CALLTYPE ~GraphicsState() throw(); | |||
| GraphicsState() throw(); | |||
| GraphicsState (const GraphicsState&) throw(); | |||
| ~GraphicsState() throw(); | |||
| Colour colour; | |||
| Brush* brush; | |||
| @@ -679,7 +679,7 @@ private: | |||
| OwnedArray <GraphicsState> stateStack; | |||
| bool saveStatePending; | |||
| void JUCE_CALLTYPE saveStateIfPending() throw(); | |||
| void saveStateIfPending() throw(); | |||
| const Graphics& operator= (const Graphics& other); | |||
| Graphics (const Graphics&); | |||
| @@ -49,7 +49,7 @@ public: | |||
| TextLayoutToken (const String& t, | |||
| const Font& f, | |||
| const bool isWhitespace_) | |||
| const bool isWhitespace_) throw() | |||
| : text (t), | |||
| font (f), | |||
| x(0), | |||
| @@ -61,7 +61,7 @@ public: | |||
| isNewLine = t.containsAnyOf (T("\r\n")); | |||
| } | |||
| TextLayoutToken (const TextLayoutToken& other) | |||
| TextLayoutToken (const TextLayoutToken& other) throw() | |||
| : text (other.text), | |||
| font (other.font), | |||
| x (other.x), | |||
| @@ -75,13 +75,13 @@ public: | |||
| { | |||
| } | |||
| ~TextLayoutToken() | |||
| ~TextLayoutToken() throw() | |||
| { | |||
| } | |||
| void draw (Graphics& g, | |||
| const int xOffset, | |||
| const int yOffset) | |||
| const int yOffset) throw() | |||
| { | |||
| if (! isWhitespace) | |||
| { | |||
| @@ -98,28 +98,28 @@ public: | |||
| //============================================================================== | |||
| TextLayout::TextLayout() | |||
| TextLayout::TextLayout() throw() | |||
| : tokens (64), | |||
| totalLines (0) | |||
| { | |||
| } | |||
| TextLayout::TextLayout (const String& text, | |||
| const Font& font) | |||
| const Font& font) throw() | |||
| : tokens (64), | |||
| totalLines (0) | |||
| { | |||
| appendText (text, font); | |||
| } | |||
| TextLayout::TextLayout (const TextLayout& other) | |||
| TextLayout::TextLayout (const TextLayout& other) throw() | |||
| : tokens (64), | |||
| totalLines (0) | |||
| { | |||
| *this = other; | |||
| } | |||
| const TextLayout& TextLayout::operator= (const TextLayout& other) | |||
| const TextLayout& TextLayout::operator= (const TextLayout& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -134,13 +134,13 @@ const TextLayout& TextLayout::operator= (const TextLayout& other) | |||
| return *this; | |||
| } | |||
| TextLayout::~TextLayout() | |||
| TextLayout::~TextLayout() throw() | |||
| { | |||
| clear(); | |||
| } | |||
| //============================================================================== | |||
| void TextLayout::clear() | |||
| void TextLayout::clear() throw() | |||
| { | |||
| for (int i = tokens.size(); --i >= 0;) | |||
| { | |||
| @@ -153,7 +153,7 @@ void TextLayout::clear() | |||
| } | |||
| void TextLayout::appendText (const String& text, | |||
| const Font& font) | |||
| const Font& font) throw() | |||
| { | |||
| const tchar* t = text; | |||
| String currentString; | |||
| @@ -206,7 +206,7 @@ void TextLayout::appendText (const String& text, | |||
| lastCharType == 2)); | |||
| } | |||
| void TextLayout::setText (const String& text, const Font& font) | |||
| void TextLayout::setText (const String& text, const Font& font) throw() | |||
| { | |||
| clear(); | |||
| appendText (text, font); | |||
| @@ -215,7 +215,7 @@ void TextLayout::setText (const String& text, const Font& font) | |||
| //============================================================================== | |||
| void TextLayout::layout (int maxWidth, | |||
| const Justification& justification, | |||
| const bool attemptToBalanceLineLengths) | |||
| const bool attemptToBalanceLineLengths) throw() | |||
| { | |||
| if (attemptToBalanceLineLengths) | |||
| { | |||
| @@ -331,7 +331,7 @@ void TextLayout::layout (int maxWidth, | |||
| } | |||
| //============================================================================== | |||
| int TextLayout::getLineWidth (const int lineNumber) const | |||
| int TextLayout::getLineWidth (const int lineNumber) const throw() | |||
| { | |||
| int maxW = 0; | |||
| @@ -346,7 +346,7 @@ int TextLayout::getLineWidth (const int lineNumber) const | |||
| return maxW; | |||
| } | |||
| int TextLayout::getWidth() const | |||
| int TextLayout::getWidth() const throw() | |||
| { | |||
| int maxW = 0; | |||
| @@ -360,7 +360,7 @@ int TextLayout::getWidth() const | |||
| return maxW; | |||
| } | |||
| int TextLayout::getHeight() const | |||
| int TextLayout::getHeight() const throw() | |||
| { | |||
| int maxH = 0; | |||
| @@ -378,7 +378,7 @@ int TextLayout::getHeight() const | |||
| //============================================================================== | |||
| void TextLayout::draw (Graphics& g, | |||
| const int xOffset, | |||
| const int yOffset) const | |||
| const int yOffset) const throw() | |||
| { | |||
| for (int i = tokens.size(); --i >= 0;) | |||
| ((TextLayoutToken*) tokens.getUnchecked(i))->draw (g, xOffset, yOffset); | |||
| @@ -386,7 +386,7 @@ void TextLayout::draw (Graphics& g, | |||
| void TextLayout::drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& justification) const | |||
| const Justification& justification) const throw() | |||
| { | |||
| justification.applyToRectangle (x, y, getWidth(), getHeight(), | |||
| x, y, w, h); | |||
| @@ -394,4 +394,5 @@ void TextLayout::drawWithin (Graphics& g, | |||
| draw (g, x, y); | |||
| } | |||
| END_JUCE_NAMESPACE | |||
| @@ -59,23 +59,23 @@ public: | |||
| Text can then be appended using the appendText() method. | |||
| */ | |||
| TextLayout(); | |||
| TextLayout() throw(); | |||
| /** Creates a copy of another layout object. */ | |||
| TextLayout (const TextLayout& other); | |||
| TextLayout (const TextLayout& other) throw(); | |||
| /** Creates a text layout from an initial string and font. */ | |||
| TextLayout (const String& text, const Font& font); | |||
| TextLayout (const String& text, const Font& font) throw(); | |||
| /** Destructor. */ | |||
| ~TextLayout(); | |||
| ~TextLayout() throw(); | |||
| /** Copies another layout onto this one. */ | |||
| const TextLayout& operator= (const TextLayout& layoutToCopy); | |||
| const TextLayout& operator= (const TextLayout& layoutToCopy) throw(); | |||
| //============================================================================== | |||
| /** Clears the layout, removing all its text. */ | |||
| void clear(); | |||
| void clear() throw(); | |||
| /** Adds a string to the end of the arrangement. | |||
| @@ -84,14 +84,14 @@ public: | |||
| to wrap long lines into a paragraph and justify it. | |||
| */ | |||
| void appendText (const String& textToAppend, | |||
| const Font& fontToUse); | |||
| const Font& fontToUse) throw(); | |||
| /** 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); | |||
| const Font& fontToUse) throw(); | |||
| //============================================================================== | |||
| /** Breaks the text up to form a paragraph with the given width. | |||
| @@ -108,15 +108,15 @@ public: | |||
| */ | |||
| void layout (int maximumWidth, | |||
| const Justification& justification, | |||
| const bool attemptToBalanceLineLengths); | |||
| const bool attemptToBalanceLineLengths) throw(); | |||
| //============================================================================== | |||
| /** Returns the overall width of the entire text layout. */ | |||
| int getWidth() const; | |||
| int getWidth() const throw(); | |||
| /** Returns the overall height of the entire text layout. */ | |||
| int getHeight() const; | |||
| int getHeight() const throw(); | |||
| /** Returns the total number of lines of text. */ | |||
| int getNumLines() const throw() { return totalLines; } | |||
| @@ -125,14 +125,14 @@ public: | |||
| @param lineNumber the line, from 0 to (getNumLines() - 1) | |||
| */ | |||
| int getLineWidth (const int lineNumber) const; | |||
| int getLineWidth (const int lineNumber) const throw(); | |||
| //============================================================================== | |||
| /** Renders the text at a specified position using a graphics context. | |||
| */ | |||
| void draw (Graphics& g, | |||
| const int topLeftX, | |||
| const int topLeftY) const; | |||
| const int topLeftY) const throw(); | |||
| /** Renders the text within a specified rectangle using a graphics context. | |||
| @@ -141,7 +141,7 @@ public: | |||
| */ | |||
| void drawWithin (Graphics& g, | |||
| int x, int y, int w, int h, | |||
| const Justification& layoutFlags) const; | |||
| const Justification& layoutFlags) const throw(); | |||
| //============================================================================== | |||
| @@ -46,7 +46,7 @@ BEGIN_JUCE_NAMESPACE | |||
| TypefaceGlyphInfo::TypefaceGlyphInfo (const juce_wchar character_, | |||
| const Path& shape, | |||
| const float horizontalSeparation, | |||
| Typeface* const typeface_) | |||
| Typeface* const typeface_) throw() | |||
| : character (character_), | |||
| path (shape), | |||
| width (horizontalSeparation), | |||
| @@ -54,11 +54,11 @@ TypefaceGlyphInfo::TypefaceGlyphInfo (const juce_wchar character_, | |||
| { | |||
| } | |||
| TypefaceGlyphInfo::~TypefaceGlyphInfo() | |||
| TypefaceGlyphInfo::~TypefaceGlyphInfo() throw() | |||
| { | |||
| } | |||
| float TypefaceGlyphInfo::getHorizontalSpacing (const juce_wchar subsequentCharacter) const | |||
| float TypefaceGlyphInfo::getHorizontalSpacing (const juce_wchar subsequentCharacter) const throw() | |||
| { | |||
| if (subsequentCharacter != 0) | |||
| { | |||
| @@ -74,7 +74,7 @@ float TypefaceGlyphInfo::getHorizontalSpacing (const juce_wchar subsequentCharac | |||
| } | |||
| void TypefaceGlyphInfo::addKerningPair (const juce_wchar subsequentCharacter, | |||
| const float extraKerningAmount) | |||
| const float extraKerningAmount) throw() | |||
| { | |||
| const int numPairs = getNumKerningPairs(); | |||
| kerningPairs.setSize ((numPairs + 1) * sizeof (KerningPair)); | |||
| @@ -84,19 +84,19 @@ void TypefaceGlyphInfo::addKerningPair (const juce_wchar subsequentCharacter, | |||
| p.kerningAmount = extraKerningAmount; | |||
| } | |||
| TypefaceGlyphInfo::KerningPair& TypefaceGlyphInfo::getKerningPair (const int index) const | |||
| TypefaceGlyphInfo::KerningPair& TypefaceGlyphInfo::getKerningPair (const int index) const throw() | |||
| { | |||
| return ((KerningPair*) kerningPairs.getData()) [index]; | |||
| } | |||
| int TypefaceGlyphInfo::getNumKerningPairs() const | |||
| int TypefaceGlyphInfo::getNumKerningPairs() const throw() | |||
| { | |||
| return kerningPairs.getSize() / sizeof (KerningPair); | |||
| } | |||
| //============================================================================== | |||
| Typeface::Typeface() | |||
| Typeface::Typeface() throw() | |||
| : hash (0), | |||
| isFullyPopulated (false) | |||
| { | |||
| @@ -136,7 +136,7 @@ Typeface::~Typeface() | |||
| clear(); | |||
| } | |||
| const Typeface& Typeface::operator= (const Typeface& other) | |||
| const Typeface& Typeface::operator= (const Typeface& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -158,7 +158,7 @@ const Typeface& Typeface::operator= (const Typeface& other) | |||
| return *this; | |||
| } | |||
| void Typeface::updateHashCode() | |||
| void Typeface::updateHashCode() throw() | |||
| { | |||
| hash = typefaceName.hashCode(); | |||
| @@ -169,7 +169,7 @@ void Typeface::updateHashCode() | |||
| hash ^= 0xffff0000; | |||
| } | |||
| void Typeface::clear() | |||
| void Typeface::clear() throw() | |||
| { | |||
| zeromem (lookupTable, sizeof (lookupTable)); | |||
| typefaceName = String::empty; | |||
| @@ -265,7 +265,7 @@ void Typeface::serialise (OutputStream& outputStream) | |||
| } | |||
| } | |||
| const Path* Typeface::getOutlineForGlyph (const juce_wchar character) | |||
| const Path* Typeface::getOutlineForGlyph (const juce_wchar character) throw() | |||
| { | |||
| const TypefaceGlyphInfo* const g = (const TypefaceGlyphInfo*) getGlyph (character); | |||
| @@ -275,7 +275,7 @@ const Path* Typeface::getOutlineForGlyph (const juce_wchar character) | |||
| return 0; | |||
| } | |||
| const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) | |||
| const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) throw() | |||
| { | |||
| if (character > 0 && character < 128 && lookupTable [character] > 0) | |||
| return (const TypefaceGlyphInfo*) glyphs [(int)lookupTable [character]]; | |||
| @@ -325,7 +325,7 @@ const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) | |||
| void Typeface::addGlyph (const juce_wchar character, | |||
| const Path& path, | |||
| const float horizontalSpacing) | |||
| const float horizontalSpacing) throw() | |||
| { | |||
| if (character > 0 && character < 128) | |||
| lookupTable [character] = (short) glyphs.size(); | |||
| @@ -336,7 +336,7 @@ void Typeface::addGlyph (const juce_wchar character, | |||
| this)); | |||
| } | |||
| void Typeface::addGlyphCopy (const TypefaceGlyphInfo* const glyphInfoToCopy) | |||
| void Typeface::addGlyphCopy (const TypefaceGlyphInfo* const glyphInfoToCopy) throw() | |||
| { | |||
| if (glyphInfoToCopy != 0) | |||
| { | |||
| @@ -356,7 +356,7 @@ void Typeface::addGlyphCopy (const TypefaceGlyphInfo* const glyphInfoToCopy) | |||
| void Typeface::addKerningPair (const juce_wchar char1, | |||
| const juce_wchar char2, | |||
| const float extraAmount) | |||
| const float extraAmount) throw() | |||
| { | |||
| TypefaceGlyphInfo* const g = (TypefaceGlyphInfo*) getGlyph (char1); | |||
| @@ -444,7 +444,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| static TypefaceCache* getInstance() | |||
| static TypefaceCache* getInstance() throw() | |||
| { | |||
| if (typefaceCacheInstance == 0) | |||
| typefaceCacheInstance = new TypefaceCache(); | |||
| @@ -453,7 +453,7 @@ public: | |||
| } | |||
| //============================================================================== | |||
| const Typeface::Ptr findTypefaceFor (const Font& font) | |||
| const Typeface::Ptr findTypefaceFor (const Font& font) throw() | |||
| { | |||
| const int flags = font.getStyleFlags() & (Font::bold | Font::italic); | |||
| @@ -497,7 +497,7 @@ public: | |||
| } | |||
| }; | |||
| const Typeface::Ptr Typeface::getTypefaceFor (const Font& font) | |||
| const Typeface::Ptr Typeface::getTypefaceFor (const Font& font) throw() | |||
| { | |||
| return TypefaceCache::getInstance()->findTypefaceFor (font); | |||
| } | |||
| @@ -67,7 +67,7 @@ public: | |||
| The value returned is expressed as a proportion of the font's height. | |||
| */ | |||
| float getHorizontalSpacing (const juce_wchar subsequentCharacter) const; | |||
| float getHorizontalSpacing (const juce_wchar subsequentCharacter) const throw(); | |||
| /** Returns the typeface that this glyph belongs to. */ | |||
| Typeface* getTypeface() const throw() { return typeface; } | |||
| @@ -92,14 +92,14 @@ private: | |||
| TypefaceGlyphInfo (const juce_wchar character, | |||
| const Path& shape, | |||
| const float horizontalSeparation, | |||
| Typeface* const typeface); | |||
| ~TypefaceGlyphInfo(); | |||
| Typeface* const typeface) throw(); | |||
| ~TypefaceGlyphInfo() throw(); | |||
| KerningPair& getKerningPair (const int index) const; | |||
| int getNumKerningPairs() const; | |||
| KerningPair& getKerningPair (const int index) const throw(); | |||
| int getNumKerningPairs() const throw(); | |||
| void addKerningPair (const juce_wchar subsequentCharacter, | |||
| const float extraKerningAmount); | |||
| const float extraKerningAmount) throw(); | |||
| const TypefaceGlyphInfo& operator= (const TypefaceGlyphInfo&); | |||
| }; | |||
| @@ -136,7 +136,7 @@ public: | |||
| ~Typeface(); | |||
| /** Copies another typeface over this one. */ | |||
| const Typeface& operator= (const Typeface& other); | |||
| const Typeface& operator= (const Typeface& other) throw(); | |||
| /** Returns a unique ID for the typeface. | |||
| @@ -167,7 +167,7 @@ public: | |||
| that is asked for is not found, it will first try to return a default | |||
| character instead. | |||
| */ | |||
| const Path* getOutlineForGlyph (const juce_wchar character); | |||
| const Path* getOutlineForGlyph (const juce_wchar character) throw(); | |||
| /** Tries to find the information describing a glyph for this character. | |||
| @@ -175,11 +175,11 @@ public: | |||
| a default glyph instead; if the typeface is empty, it may return a null | |||
| pointer. | |||
| */ | |||
| const TypefaceGlyphInfo* getGlyph (const juce_wchar character); | |||
| const TypefaceGlyphInfo* getGlyph (const juce_wchar character) throw(); | |||
| //============================================================================== | |||
| /** Deletes all the glyphs and kerning data fom the typeface. */ | |||
| void clear(); | |||
| void clear() throw(); | |||
| /** Adds a glyph to the typeface. | |||
| @@ -188,7 +188,7 @@ public: | |||
| */ | |||
| void addGlyph (const juce_wchar character, | |||
| const Path& path, | |||
| const float horizontalSpacing); | |||
| const float horizontalSpacing) throw(); | |||
| /** Adds a kerning distance to the typeface. | |||
| @@ -200,7 +200,7 @@ public: | |||
| */ | |||
| void addKerningPair (const juce_wchar firstChar, | |||
| const juce_wchar secondChar, | |||
| const float extraAmount); | |||
| const float extraAmount) throw(); | |||
| /** Sets the typeface's name. | |||
| @@ -277,14 +277,14 @@ private: | |||
| bool bold, italic, isFullyPopulated; | |||
| juce_wchar defaultCharacter; // the char to use if a matching glyph can't be found. | |||
| Typeface(); | |||
| void addGlyphCopy (const TypefaceGlyphInfo* const glyphInfoToCopy); | |||
| Typeface() throw(); | |||
| void addGlyphCopy (const TypefaceGlyphInfo* const glyphInfoToCopy) throw(); | |||
| friend class Font; | |||
| friend class TypefaceCache; | |||
| friend class FontGlyphAlphaMap; | |||
| static const Ptr getTypefaceFor (const Font& font); | |||
| static const Ptr getTypefaceFor (const Font& font) throw(); | |||
| // this is a platform-dependent method that will look for the given typeface | |||
| // and set up its kerning tables, etc. accordingly. | |||
| @@ -292,12 +292,12 @@ private: | |||
| // to the typeface immediately, rather than having to add them later on-demand. | |||
| void initialiseTypefaceCharacteristics (const String& fontName, | |||
| bool bold, bool italic, | |||
| bool addAllGlyphsToFont); | |||
| bool addAllGlyphsToFont) throw(); | |||
| // platform-specific routine to look up and add a glyph to this typeface | |||
| void findAndAddSystemGlyph (juce_wchar character); | |||
| void findAndAddSystemGlyph (juce_wchar character) throw(); | |||
| void updateHashCode(); | |||
| void updateHashCode() throw(); | |||
| }; | |||
| @@ -42,21 +42,21 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| PathStrokeType::PathStrokeType (const float strokeThickness, | |||
| const JointStyle jointStyle_, | |||
| const EndCapStyle endStyle_) | |||
| const EndCapStyle endStyle_) throw() | |||
| : thickness (strokeThickness), | |||
| jointStyle (jointStyle_), | |||
| endStyle (endStyle_) | |||
| { | |||
| } | |||
| PathStrokeType::PathStrokeType (const PathStrokeType& other) | |||
| PathStrokeType::PathStrokeType (const PathStrokeType& other) throw() | |||
| : thickness (other.thickness), | |||
| jointStyle (other.jointStyle), | |||
| endStyle (other.endStyle) | |||
| { | |||
| } | |||
| const PathStrokeType& PathStrokeType::operator= (const PathStrokeType& other) | |||
| const PathStrokeType& PathStrokeType::operator= (const PathStrokeType& other) throw() | |||
| { | |||
| thickness = other.thickness; | |||
| jointStyle = other.jointStyle; | |||
| @@ -64,7 +64,7 @@ const PathStrokeType& PathStrokeType::operator= (const PathStrokeType& other) | |||
| return *this; | |||
| } | |||
| PathStrokeType::~PathStrokeType() | |||
| PathStrokeType::~PathStrokeType() throw() | |||
| { | |||
| } | |||
| @@ -87,7 +87,7 @@ static bool lineIntersection (const float x1, const float y1, | |||
| const float x4, const float y4, | |||
| float& intersectionX, | |||
| float& intersectionY, | |||
| float& distanceBeyondLine1EndSquared) | |||
| float& distanceBeyondLine1EndSquared) throw() | |||
| { | |||
| if (x2 != x3 || y2 != y3) | |||
| { | |||
| @@ -206,7 +206,7 @@ static void addEdgeAndJoint (Path& destPath, | |||
| const float x2, const float y2, | |||
| const float x3, const float y3, | |||
| const float x4, const float y4, | |||
| const float midX, const float midY) | |||
| const float midX, const float midY) throw() | |||
| { | |||
| if (style == PathStrokeType::beveled | |||
| || (x3 == x4 && y3 == y4) | |||
| @@ -271,7 +271,7 @@ static inline void addLineEnd (Path& destPath, | |||
| const PathStrokeType::EndCapStyle style, | |||
| const float x1, const float y1, | |||
| const float x2, const float y2, | |||
| const float width) | |||
| const float width) throw() | |||
| { | |||
| if (style == PathStrokeType::butt) | |||
| { | |||
| @@ -339,7 +339,7 @@ struct LineSection | |||
| static void addSubPath (Path& destPath, const Array <LineSection>& subPath, | |||
| const bool isClosed, | |||
| const float width, const float maxMiterExtensionSquared, | |||
| const PathStrokeType::JointStyle jointStyle, const PathStrokeType::EndCapStyle endStyle) | |||
| const PathStrokeType::JointStyle jointStyle, const PathStrokeType::EndCapStyle endStyle) throw() | |||
| { | |||
| jassert (subPath.size() > 0); | |||
| @@ -447,7 +447,7 @@ static void addSubPath (Path& destPath, const Array <LineSection>& subPath, | |||
| void PathStrokeType::createStrokedPath (Path& destPath, | |||
| const Path& source, | |||
| const AffineTransform& transform, | |||
| const float extraAccuracy) const | |||
| const float extraAccuracy) const throw() | |||
| { | |||
| if (thickness <= 0) | |||
| { | |||
| @@ -556,7 +556,7 @@ void PathStrokeType::createDashedStroke (Path& destPath, | |||
| const float* dashLengths, | |||
| int numDashLengths, | |||
| const AffineTransform& transform, | |||
| const float extraAccuracy) const | |||
| const float extraAccuracy) const throw() | |||
| { | |||
| if (thickness <= 0) | |||
| return; | |||
| @@ -80,16 +80,16 @@ public: | |||
| */ | |||
| PathStrokeType (const float strokeThickness, | |||
| const JointStyle jointStyle = mitered, | |||
| const EndCapStyle endStyle = butt); | |||
| const EndCapStyle endStyle = butt) throw(); | |||
| /** Createes a copy of another stroke type. */ | |||
| PathStrokeType (const PathStrokeType& other); | |||
| PathStrokeType (const PathStrokeType& other) throw(); | |||
| /** Copies another stroke onto this one. */ | |||
| const PathStrokeType& operator= (const PathStrokeType& other); | |||
| const PathStrokeType& operator= (const PathStrokeType& other) throw(); | |||
| /** Destructor. */ | |||
| ~PathStrokeType(); | |||
| ~PathStrokeType() throw(); | |||
| //============================================================================== | |||
| /** Applies this stroke type to a path and returns the resultant stroke as another Path. | |||
| @@ -110,7 +110,7 @@ public: | |||
| void createStrokedPath (Path& destPath, | |||
| const Path& sourcePath, | |||
| const AffineTransform& transform = AffineTransform::identity, | |||
| const float extraAccuracy = 1.0f) const; | |||
| const float extraAccuracy = 1.0f) const throw(); | |||
| //============================================================================== | |||
| @@ -141,7 +141,7 @@ public: | |||
| const float* dashLengths, | |||
| int numDashLengths, | |||
| const AffineTransform& transform = AffineTransform::identity, | |||
| const float extraAccuracy = 1.0f) const; | |||
| const float extraAccuracy = 1.0f) const throw(); | |||
| //============================================================================== | |||
| /** Returns the stroke thickness. */ | |||
| @@ -39,8 +39,7 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static inline int makeWord (unsigned char a, | |||
| unsigned char b) | |||
| static inline int makeWord (const unsigned char a, const unsigned char b) throw() | |||
| { | |||
| return (b << 8) | a; | |||
| } | |||
| @@ -95,7 +95,7 @@ static boolean jpegFill (j_decompress_ptr) throw() | |||
| } | |||
| //============================================================================== | |||
| Image* juce_loadJPEGImageFromStream (InputStream& in) | |||
| Image* juce_loadJPEGImageFromStream (InputStream& in) throw() | |||
| { | |||
| MemoryBlock mb; | |||
| in.readIntoMemoryBlock (mb); | |||
| @@ -207,7 +207,7 @@ static boolean jpegWriteFlush (j_compress_ptr cinfo) throw() | |||
| //============================================================================== | |||
| bool juce_writeJPEGImageToStream (const Image& image, | |||
| OutputStream& out, | |||
| float quality) | |||
| float quality) throw() | |||
| { | |||
| if (image.hasAlphaChannel()) | |||
| { | |||
| @@ -51,14 +51,14 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| static void pngReadCallback (png_structp pngReadStruct, png_bytep data, png_size_t length) | |||
| static void pngReadCallback (png_structp pngReadStruct, png_bytep data, png_size_t length) throw() | |||
| { | |||
| InputStream* const in = (InputStream*) png_get_io_ptr (pngReadStruct); | |||
| in->read (data, (int) length); | |||
| } | |||
| //============================================================================== | |||
| Image* juce_loadPNGImageFromStream (InputStream& in) | |||
| Image* juce_loadPNGImageFromStream (InputStream& in) throw() | |||
| { | |||
| Image* image = 0; | |||
| @@ -169,7 +169,7 @@ Image* juce_loadPNGImageFromStream (InputStream& in) | |||
| } | |||
| //============================================================================== | |||
| static void pngWriteDataCallback (png_structp png_ptr, png_bytep data, png_size_t length) | |||
| static void pngWriteDataCallback (png_structp png_ptr, png_bytep data, png_size_t length) throw() | |||
| { | |||
| OutputStream* const out = (OutputStream*) png_ptr->io_ptr; | |||
| @@ -179,8 +179,7 @@ static void pngWriteDataCallback (png_structp png_ptr, png_bytep data, png_size_ | |||
| jassert (ok); | |||
| } | |||
| bool juce_writePNGImageToStream (const Image& image, | |||
| OutputStream& out) | |||
| bool juce_writePNGImageToStream (const Image& image, OutputStream& out) throw() | |||
| { | |||
| const int width = image.getWidth(); | |||
| const int height = image.getHeight(); | |||
| @@ -40,8 +40,8 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "image_file_formats/juce_GIFLoader.h" | |||
| //============================================================================== | |||
| Image* juce_loadPNGImageFromStream (InputStream& inputStream); | |||
| bool juce_writePNGImageToStream (const Image& image, OutputStream& out); | |||
| Image* juce_loadPNGImageFromStream (InputStream& inputStream) throw(); | |||
| bool juce_writePNGImageToStream (const Image& image, OutputStream& out) throw(); | |||
| PNGImageFormat::PNGImageFormat() throw() {} | |||
| PNGImageFormat::~PNGImageFormat() throw() {} | |||
| @@ -74,8 +74,8 @@ bool PNGImageFormat::writeImageToStream (const Image& sourceImage, | |||
| } | |||
| //============================================================================== | |||
| Image* juce_loadJPEGImageFromStream (InputStream& inputStream); | |||
| bool juce_writeJPEGImageToStream (const Image& image, OutputStream& out, float quality); | |||
| Image* juce_loadJPEGImageFromStream (InputStream& inputStream) throw(); | |||
| bool juce_writeJPEGImageToStream (const Image& image, OutputStream& out, float quality) throw(); | |||
| JPEGImageFormat::JPEGImageFormat() throw() | |||
| : quality (-1.0f) | |||
| @@ -105,58 +105,58 @@ typedef wchar_t juce_wchar; | |||
| // Some indispensible min/max functions | |||
| /** Returns the larger of two values. */ | |||
| forcedinline int JUCE_CALLTYPE jmax (const int a, const int b) throw() { return (a < b) ? b : a; } | |||
| forcedinline int jmax (const int a, const int b) throw() { return (a < b) ? b : a; } | |||
| /** Returns the larger of two values. */ | |||
| forcedinline int64 JUCE_CALLTYPE jmax (const int64 a, const int64 b) throw() { return (a < b) ? b : a; } | |||
| forcedinline int64 jmax (const int64 a, const int64 b) throw() { return (a < b) ? b : a; } | |||
| /** Returns the larger of two values. */ | |||
| forcedinline float JUCE_CALLTYPE jmax (const float a, const float b) throw() { return (a < b) ? b : a; } | |||
| forcedinline float jmax (const float a, const float b) throw() { return (a < b) ? b : a; } | |||
| /** Returns the larger of two values. */ | |||
| forcedinline double JUCE_CALLTYPE jmax (const double a, const double b) throw() { return (a < b) ? b : a; } | |||
| forcedinline double jmax (const double a, const double b) throw() { return (a < b) ? b : a; } | |||
| /** Returns the larger of three values. */ | |||
| inline int JUCE_CALLTYPE jmax (const int a, const int b, const int c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| inline int jmax (const int a, const int b, const int c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| /** Returns the larger of three values. */ | |||
| inline int64 JUCE_CALLTYPE jmax (const int64 a, const int64 b, const int64 c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| inline int64 jmax (const int64 a, const int64 b, const int64 c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| /** Returns the larger of three values. */ | |||
| inline float JUCE_CALLTYPE jmax (const float a, const float b, const float c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| inline float jmax (const float a, const float b, const float c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| /** Returns the larger of three values. */ | |||
| inline double JUCE_CALLTYPE jmax (const double a, const double b, const double c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| inline double jmax (const double a, const double b, const double c) throw() { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); } | |||
| /** Returns the larger of four values. */ | |||
| inline int JUCE_CALLTYPE jmax (const int a, const int b, const int c, const int d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| inline int jmax (const int a, const int b, const int c, const int d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| /** Returns the larger of four values. */ | |||
| inline int64 JUCE_CALLTYPE jmax (const int64 a, const int64 b, const int64 c, const int64 d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| inline int64 jmax (const int64 a, const int64 b, const int64 c, const int64 d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| /** Returns the larger of four values. */ | |||
| inline float JUCE_CALLTYPE jmax (const float a, const float b, const float c, const float d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| inline float jmax (const float a, const float b, const float c, const float d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| /** Returns the larger of four values. */ | |||
| inline double JUCE_CALLTYPE jmax (const double a, const double b, const double c, const double d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| inline double jmax (const double a, const double b, const double c, const double d) throw() { return jmax (a, jmax (b, c, d)); } | |||
| /** Returns the smaller of two values. */ | |||
| inline int JUCE_CALLTYPE jmin (const int a, const int b) throw() { return (a > b) ? b : a; } | |||
| inline int jmin (const int a, const int b) throw() { return (a > b) ? b : a; } | |||
| /** Returns the smaller of two values. */ | |||
| inline int64 JUCE_CALLTYPE jmin (const int64 a, const int64 b) throw() { return (a > b) ? b : a; } | |||
| inline int64 jmin (const int64 a, const int64 b) throw() { return (a > b) ? b : a; } | |||
| /** Returns the smaller of two values. */ | |||
| inline float JUCE_CALLTYPE jmin (const float a, const float b) throw() { return (a > b) ? b : a; } | |||
| inline float jmin (const float a, const float b) throw() { return (a > b) ? b : a; } | |||
| /** Returns the smaller of two values. */ | |||
| inline double JUCE_CALLTYPE jmin (const double a, const double b) throw() { return (a > b) ? b : a; } | |||
| inline double jmin (const double a, const double b) throw() { return (a > b) ? b : a; } | |||
| /** Returns the smaller of three values. */ | |||
| inline int JUCE_CALLTYPE jmin (const int a, const int b, const int c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| inline int jmin (const int a, const int b, const int c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| /** Returns the smaller of three values. */ | |||
| inline int64 JUCE_CALLTYPE jmin (const int64 a, const int64 b, const int64 c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| inline int64 jmin (const int64 a, const int64 b, const int64 c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| /** Returns the smaller of three values. */ | |||
| inline float JUCE_CALLTYPE jmin (const float a, const float b, const float c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| inline float jmin (const float a, const float b, const float c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| /** Returns the smaller of three values. */ | |||
| inline double JUCE_CALLTYPE jmin (const double a, const double b, const double c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| inline double jmin (const double a, const double b, const double c) throw() { return (a > b) ? ((b > c) ? c : b) : ((a > c) ? c : a); } | |||
| /** Returns the smaller of four values. */ | |||
| inline int JUCE_CALLTYPE jmin (const int a, const int b, const int c, const int d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| inline int jmin (const int a, const int b, const int c, const int d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| /** Returns the smaller of four values. */ | |||
| inline int64 JUCE_CALLTYPE jmin (const int64 a, const int64 b, const int64 c, const int64 d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| inline int64 jmin (const int64 a, const int64 b, const int64 c, const int64 d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| /** Returns the smaller of four values. */ | |||
| inline float JUCE_CALLTYPE jmin (const float a, const float b, const float c, const float d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| inline float jmin (const float a, const float b, const float c, const float d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| /** Returns the smaller of four values. */ | |||
| inline double JUCE_CALLTYPE jmin (const double a, const double b, const double c, const double d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| inline double jmin (const double a, const double b, const double c, const double d) throw() { return jmin (a, jmin (b, c, d)); } | |||
| //============================================================================== | |||
| @@ -172,9 +172,9 @@ inline double JUCE_CALLTYPE jmin (const double a, const double b, const double c | |||
| and upperLimit (inclusive) | |||
| */ | |||
| template <class Type> | |||
| inline Type JUCE_CALLTYPE jlimit (const Type lowerLimit, | |||
| const Type upperLimit, | |||
| const Type valueToConstrain) throw() | |||
| inline Type jlimit (const Type lowerLimit, | |||
| const Type upperLimit, | |||
| const Type valueToConstrain) throw() | |||
| { | |||
| jassert (lowerLimit <= upperLimit); // if these are in the wrong order, results are unpredictable.. | |||
| @@ -187,7 +187,7 @@ inline Type JUCE_CALLTYPE jlimit (const Type lowerLimit, | |||
| /** Handy function to swap two values over. | |||
| */ | |||
| template <class Type> | |||
| inline void JUCE_CALLTYPE swapVariables (Type& variable1, Type& variable2) throw() | |||
| inline void swapVariables (Type& variable1, Type& variable2) throw() | |||
| { | |||
| const Type tempVal = variable1; | |||
| variable1 = variable2; | |||
| @@ -97,7 +97,7 @@ | |||
| static classname* _singletonInstance; \ | |||
| static CriticalSection _singletonLock; \ | |||
| \ | |||
| static classname* JUCE_CALLTYPE getInstance() \ | |||
| static classname* getInstance() \ | |||
| { \ | |||
| if (_singletonInstance == 0) \ | |||
| {\ | |||
| @@ -125,12 +125,12 @@ | |||
| return _singletonInstance; \ | |||
| } \ | |||
| \ | |||
| static inline classname* JUCE_CALLTYPE getInstanceWithoutCreating() throw() \ | |||
| static inline classname* getInstanceWithoutCreating() throw() \ | |||
| { \ | |||
| return _singletonInstance; \ | |||
| } \ | |||
| \ | |||
| static void JUCE_CALLTYPE deleteInstance() \ | |||
| static void deleteInstance() \ | |||
| { \ | |||
| const ScopedLock sl (_singletonLock); \ | |||
| if (_singletonInstance != 0) \ | |||
| @@ -141,7 +141,7 @@ | |||
| } \ | |||
| } \ | |||
| \ | |||
| void JUCE_CALLTYPE clearSingletonInstance() throw() \ | |||
| void clearSingletonInstance() throw() \ | |||
| { \ | |||
| if (_singletonInstance == this) \ | |||
| _singletonInstance = 0; \ | |||
| @@ -179,7 +179,7 @@ | |||
| \ | |||
| static classname* _singletonInstance; \ | |||
| \ | |||
| static classname* JUCE_CALLTYPE getInstance() \ | |||
| static classname* getInstance() \ | |||
| { \ | |||
| if (_singletonInstance == 0) \ | |||
| { \ | |||
| @@ -202,12 +202,12 @@ | |||
| return _singletonInstance; \ | |||
| } \ | |||
| \ | |||
| static inline classname* JUCE_CALLTYPE getInstanceWithoutCreating() throw() \ | |||
| static inline classname* getInstanceWithoutCreating() throw() \ | |||
| { \ | |||
| return _singletonInstance; \ | |||
| } \ | |||
| \ | |||
| static void JUCE_CALLTYPE deleteInstance() \ | |||
| static void deleteInstance() \ | |||
| { \ | |||
| if (_singletonInstance != 0) \ | |||
| { \ | |||
| @@ -217,7 +217,7 @@ | |||
| } \ | |||
| } \ | |||
| \ | |||
| void JUCE_CALLTYPE clearSingletonInstance() throw() \ | |||
| void clearSingletonInstance() throw() \ | |||
| { \ | |||
| if (_singletonInstance == this) \ | |||
| _singletonInstance = 0; \ | |||
| @@ -66,7 +66,7 @@ public: | |||
| @see ArrayAllocationBase | |||
| */ | |||
| JUCE_CALLTYPE Array (const int granularity = juceDefaultArrayGranularity) throw() | |||
| Array (const int granularity = juceDefaultArrayGranularity) throw() | |||
| : ArrayAllocationBase <ElementType> (granularity), | |||
| numUsed (0) | |||
| { | |||
| @@ -75,7 +75,7 @@ public: | |||
| /** Creates a copy of another array. | |||
| @param other the array to copy | |||
| */ | |||
| JUCE_CALLTYPE Array (const Array<ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| Array (const Array<ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| : ArrayAllocationBase <ElementType> (other.granularity) | |||
| { | |||
| other.lockArray(); | |||
| @@ -89,7 +89,7 @@ public: | |||
| @param values the array to copy from | |||
| */ | |||
| JUCE_CALLTYPE Array (const ElementType* values) throw() | |||
| Array (const ElementType* values) throw() | |||
| : ArrayAllocationBase <ElementType> (juceDefaultArrayGranularity), | |||
| numUsed (0) | |||
| { | |||
| @@ -102,7 +102,7 @@ public: | |||
| @param values the array to copy from | |||
| @param numValues the number of values in the array | |||
| */ | |||
| JUCE_CALLTYPE Array (const ElementType* values, int numValues) throw() | |||
| Array (const ElementType* values, int numValues) throw() | |||
| : ArrayAllocationBase <ElementType> (juceDefaultArrayGranularity), | |||
| numUsed (numValues) | |||
| { | |||
| @@ -111,14 +111,14 @@ public: | |||
| } | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~Array() throw() | |||
| ~Array() throw() | |||
| { | |||
| } | |||
| /** Copies another array. | |||
| @param other the array to copy | |||
| */ | |||
| const Array <ElementType, TypeOfCriticalSectionToUse>& JUCE_CALLTYPE operator= (const Array <ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| const Array <ElementType, TypeOfCriticalSectionToUse>& operator= (const Array <ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -145,7 +145,7 @@ public: | |||
| @param other the other array to compare with | |||
| */ | |||
| template <class OtherArrayType> | |||
| bool JUCE_CALLTYPE operator== (const OtherArrayType& other) const throw() | |||
| bool operator== (const OtherArrayType& other) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -174,7 +174,7 @@ public: | |||
| @param other the other array to compare with | |||
| */ | |||
| template <class OtherArrayType> | |||
| bool JUCE_CALLTYPE operator!= (const OtherArrayType& other) const throw() | |||
| bool operator!= (const OtherArrayType& other) const throw() | |||
| { | |||
| return ! operator== (other); | |||
| } | |||
| @@ -187,7 +187,7 @@ public: | |||
| @see clearQuick | |||
| */ | |||
| void JUCE_CALLTYPE clear() throw() | |||
| void clear() throw() | |||
| { | |||
| lock.enter(); | |||
| this->setAllocatedSize (0); | |||
| @@ -199,7 +199,7 @@ public: | |||
| @see clear | |||
| */ | |||
| void JUCE_CALLTYPE clearQuick() throw() | |||
| void clearQuick() throw() | |||
| { | |||
| lock.enter(); | |||
| numUsed = 0; | |||
| @@ -209,7 +209,7 @@ public: | |||
| //============================================================================== | |||
| /** Returns the current number of elements in the array. | |||
| */ | |||
| inline int JUCE_CALLTYPE size() const throw() | |||
| inline int size() const throw() | |||
| { | |||
| return numUsed; | |||
| } | |||
| @@ -224,7 +224,7 @@ public: | |||
| @param index the index of the element being requested (0 is the first element in the array) | |||
| @see getUnchecked, getFirst, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE operator[] (const int index) const throw() | |||
| inline ElementType operator[] (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (index >= 0 && index < numUsed) ? this->elements [index] | |||
| @@ -243,7 +243,7 @@ public: | |||
| @param index the index of the element being requested (0 is the first element in the array) | |||
| @see operator[], getFirst, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getUnchecked (const int index) const throw() | |||
| inline ElementType getUnchecked (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| jassert (index >= 0 && index < numUsed); | |||
| @@ -262,7 +262,7 @@ public: | |||
| @param index the index of the element being requested (0 is the first element in the array) | |||
| @see operator[], getFirst, getLast | |||
| */ | |||
| inline ElementType& JUCE_CALLTYPE getReference (const int index) const throw() | |||
| inline ElementType& getReference (const int index) const throw() | |||
| { | |||
| jassert (index >= 0 && index < numUsed); | |||
| return this->elements [index]; | |||
| @@ -272,7 +272,7 @@ public: | |||
| @see operator[], getUnchecked, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getFirst() const throw() | |||
| inline ElementType getFirst() const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (numUsed > 0) ? this->elements [0] | |||
| @@ -286,7 +286,7 @@ public: | |||
| @see operator[], getUnchecked, getFirst | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getLast() const throw() | |||
| inline ElementType getLast() const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] | |||
| @@ -305,7 +305,7 @@ public: | |||
| @param elementToLookFor the value or object to look for | |||
| @returns the index of the object, or -1 if it's not found | |||
| */ | |||
| int JUCE_CALLTYPE indexOf (const ElementType elementToLookFor) const throw() | |||
| int indexOf (const ElementType elementToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType* e = this->elements; | |||
| @@ -330,7 +330,7 @@ public: | |||
| @param elementToLookFor the value or object to look for | |||
| @returns true if the item is found | |||
| */ | |||
| bool JUCE_CALLTYPE contains (const ElementType elementToLookFor) const throw() | |||
| bool contains (const ElementType elementToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -374,7 +374,7 @@ public: | |||
| @param newElement the new object to add to the array | |||
| @see set, insert, addIfNotAlreadyThere, addSorted, addArray | |||
| */ | |||
| void JUCE_CALLTYPE add (const ElementType newElement) throw() | |||
| void add (const ElementType newElement) throw() | |||
| { | |||
| lock.enter(); | |||
| this->ensureAllocatedSize (numUsed + 1); | |||
| @@ -394,7 +394,7 @@ public: | |||
| @param newElement the new object to add to the array | |||
| @see add, addSorted, set | |||
| */ | |||
| void JUCE_CALLTYPE insert (int indexToInsertAt, const ElementType newElement) throw() | |||
| void insert (int indexToInsertAt, const ElementType newElement) throw() | |||
| { | |||
| lock.enter(); | |||
| this->ensureAllocatedSize (numUsed + 1); | |||
| @@ -433,8 +433,8 @@ public: | |||
| @param numberOfTimesToInsertIt how many copies of the value to insert | |||
| @see insert, add, addSorted, set | |||
| */ | |||
| void JUCE_CALLTYPE insertMultiple (int indexToInsertAt, const ElementType newElement, | |||
| int numberOfTimesToInsertIt) throw() | |||
| void insertMultiple (int indexToInsertAt, const ElementType newElement, | |||
| int numberOfTimesToInsertIt) throw() | |||
| { | |||
| if (numberOfTimesToInsertIt > 0) | |||
| { | |||
| @@ -474,9 +474,9 @@ public: | |||
| @param numberOfElements how many items are in the array | |||
| @see insert, add, addSorted, set | |||
| */ | |||
| void JUCE_CALLTYPE insertArray (int indexToInsertAt, | |||
| const ElementType* newElements, | |||
| int numberOfElements) throw() | |||
| void insertArray (int indexToInsertAt, | |||
| const ElementType* newElements, | |||
| int numberOfElements) throw() | |||
| { | |||
| if (numberOfElements > 0) | |||
| { | |||
| @@ -512,7 +512,7 @@ public: | |||
| @param newElement the new object to add to the array | |||
| */ | |||
| void JUCE_CALLTYPE addIfNotAlreadyThere (const ElementType newElement) throw() | |||
| void addIfNotAlreadyThere (const ElementType newElement) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -531,8 +531,8 @@ public: | |||
| @param newValue the new value to set for this index. | |||
| @see add, insert | |||
| */ | |||
| void JUCE_CALLTYPE set (const int indexToChange, | |||
| const ElementType newValue) throw() | |||
| void set (const int indexToChange, | |||
| const ElementType newValue) throw() | |||
| { | |||
| jassert (indexToChange >= 0); | |||
| @@ -563,8 +563,8 @@ public: | |||
| @param newValue the new value to set for this index. | |||
| @see set, getUnchecked | |||
| */ | |||
| void JUCE_CALLTYPE setUnchecked (const int indexToChange, | |||
| const ElementType newValue) throw() | |||
| void setUnchecked (const int indexToChange, | |||
| const ElementType newValue) throw() | |||
| { | |||
| lock.enter(); | |||
| jassert (indexToChange >= 0 && indexToChange < numUsed); | |||
| @@ -578,8 +578,8 @@ public: | |||
| @param numElementsToAdd how many elements are in this other array | |||
| @see add | |||
| */ | |||
| void JUCE_CALLTYPE addArray (const ElementType* elementsToAdd, | |||
| int numElementsToAdd) throw() | |||
| void addArray (const ElementType* elementsToAdd, | |||
| int numElementsToAdd) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -600,7 +600,7 @@ public: | |||
| because it just swaps their internal pointers. | |||
| */ | |||
| template <class OtherArrayType> | |||
| void JUCE_CALLTYPE swapWithArray (OtherArrayType& otherArray) throw() | |||
| void swapWithArray (OtherArrayType& otherArray) throw() | |||
| { | |||
| lock.enter(); | |||
| otherArray.lock.enter(); | |||
| @@ -621,9 +621,9 @@ public: | |||
| @see add | |||
| */ | |||
| template <class OtherArrayType> | |||
| void JUCE_CALLTYPE addArray (const OtherArrayType& arrayToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| void addArray (const OtherArrayType& arrayToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| { | |||
| arrayToAddFrom.lockArray(); | |||
| lock.enter(); | |||
| @@ -656,8 +656,8 @@ public: | |||
| @see add, sort | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE addSorted (ElementComparator& comparator, | |||
| const ElementType newElement) throw() | |||
| void addSorted (ElementComparator& comparator, | |||
| const ElementType newElement) throw() | |||
| { | |||
| lock.enter(); | |||
| insert (findInsertIndexInSortedArray (comparator, this->elements, newElement, 0, numUsed), newElement); | |||
| @@ -677,8 +677,8 @@ public: | |||
| @see addSorted, sort | |||
| */ | |||
| template <class ElementComparator> | |||
| int JUCE_CALLTYPE indexOfSorted (ElementComparator& comparator, | |||
| const ElementType elementToLookFor) const throw() | |||
| int indexOfSorted (ElementComparator& comparator, | |||
| const ElementType elementToLookFor) const throw() | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -727,7 +727,7 @@ public: | |||
| @returns the element that has been removed | |||
| @see removeValue, removeRange | |||
| */ | |||
| ElementType JUCE_CALLTYPE remove (const int indexToRemove) throw() | |||
| ElementType remove (const int indexToRemove) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -763,7 +763,7 @@ public: | |||
| @param valueToRemove the object to try to remove | |||
| @see remove, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeValue (const ElementType valueToRemove) throw() | |||
| void removeValue (const ElementType valueToRemove) throw() | |||
| { | |||
| lock.enter(); | |||
| ElementType* e = this->elements; | |||
| @@ -794,8 +794,8 @@ public: | |||
| @param numberToRemove how many elements should be removed | |||
| @see remove, removeValue | |||
| */ | |||
| void JUCE_CALLTYPE removeRange (int startIndex, | |||
| const int numberToRemove) throw() | |||
| void removeRange (int startIndex, | |||
| const int numberToRemove) throw() | |||
| { | |||
| lock.enter(); | |||
| const int endIndex = jlimit (0, numUsed, startIndex + numberToRemove); | |||
| @@ -826,7 +826,7 @@ public: | |||
| @param howManyToRemove how many elements to remove from the end of the array | |||
| @see remove, removeValue, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeLast (int howManyToRemove = 1) throw() | |||
| void removeLast (int howManyToRemove = 1) throw() | |||
| { | |||
| lock.enter(); | |||
| numUsed = jmax (0, numUsed - howManyToRemove); | |||
| @@ -843,7 +843,7 @@ public: | |||
| @see removeValuesNotIn, remove, removeValue, removeRange | |||
| */ | |||
| template <class OtherArrayType> | |||
| void JUCE_CALLTYPE removeValuesIn (const OtherArrayType& otherArray) throw() | |||
| void removeValuesIn (const OtherArrayType& otherArray) throw() | |||
| { | |||
| otherArray.lockArray(); | |||
| lock.enter(); | |||
| @@ -874,7 +874,7 @@ public: | |||
| @see removeValuesIn, remove, removeValue, removeRange | |||
| */ | |||
| template <class OtherArrayType> | |||
| void JUCE_CALLTYPE removeValuesNotIn (const OtherArrayType& otherArray) throw() | |||
| void removeValuesNotIn (const OtherArrayType& otherArray) throw() | |||
| { | |||
| otherArray.lockArray(); | |||
| lock.enter(); | |||
| @@ -905,8 +905,8 @@ public: | |||
| @param index1 index of one of the elements to swap | |||
| @param index2 index of the other element to swap | |||
| */ | |||
| void JUCE_CALLTYPE swap (const int index1, | |||
| const int index2) throw() | |||
| void swap (const int index1, | |||
| const int index2) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -934,8 +934,8 @@ public: | |||
| is less than zero, the value will be moved to the end | |||
| of the array | |||
| */ | |||
| void JUCE_CALLTYPE move (const int currentIndex, | |||
| int newIndex) throw() | |||
| void move (const int currentIndex, | |||
| int newIndex) throw() | |||
| { | |||
| if (currentIndex != newIndex) | |||
| { | |||
| @@ -975,7 +975,7 @@ public: | |||
| removing elements, they may have quite a lot of unused space allocated. | |||
| This method will reduce the amount of allocated storage to a minimum. | |||
| */ | |||
| void JUCE_CALLTYPE minimiseStorageOverheads() throw() | |||
| void minimiseStorageOverheads() throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -1000,7 +1000,7 @@ public: | |||
| the array won't have to keep dynamically resizing itself as the elements | |||
| are added, and it'll therefore be more efficient. | |||
| */ | |||
| void JUCE_CALLTYPE ensureStorageAllocated (const int minNumElements) throw() | |||
| void ensureStorageAllocated (const int minNumElements) throw() | |||
| { | |||
| this->ensureAllocatedSize (minNumElements); | |||
| } | |||
| @@ -1033,8 +1033,8 @@ public: | |||
| @see addSorted, indexOfSorted, sortArray | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| void sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -1051,7 +1051,7 @@ public: | |||
| @see unlockArray | |||
| */ | |||
| void JUCE_CALLTYPE lockArray() const throw() | |||
| void lockArray() const throw() | |||
| { | |||
| lock.enter(); | |||
| } | |||
| @@ -1063,7 +1063,7 @@ public: | |||
| @see lockArray | |||
| */ | |||
| void JUCE_CALLTYPE unlockArray() const throw() | |||
| void unlockArray() const throw() | |||
| { | |||
| lock.exit(); | |||
| } | |||
| @@ -60,7 +60,7 @@ protected: | |||
| @param granularity_ this is the size of increment by which the internal storage | |||
| will be increased. | |||
| */ | |||
| JUCE_CALLTYPE ArrayAllocationBase (const int granularity_) throw() | |||
| ArrayAllocationBase (const int granularity_) throw() | |||
| : elements (0), | |||
| numAllocated (0), | |||
| granularity (granularity_) | |||
| @@ -68,7 +68,7 @@ protected: | |||
| } | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~ArrayAllocationBase() throw() | |||
| ~ArrayAllocationBase() throw() | |||
| { | |||
| if (elements != 0) | |||
| juce_free (elements); | |||
| @@ -82,7 +82,7 @@ protected: | |||
| @param numElements the number of elements that are needed | |||
| */ | |||
| void JUCE_CALLTYPE setAllocatedSize (const int numElements) throw() | |||
| void setAllocatedSize (const int numElements) throw() | |||
| { | |||
| if (numAllocated != numElements) | |||
| { | |||
| @@ -114,7 +114,7 @@ protected: | |||
| @param minNumElements the minimum number of elements that are needed | |||
| */ | |||
| void JUCE_CALLTYPE ensureAllocatedSize (int minNumElements) throw() | |||
| void ensureAllocatedSize (int minNumElements) throw() | |||
| { | |||
| if (minNumElements > numAllocated) | |||
| { | |||
| @@ -62,11 +62,11 @@ | |||
| @see sortArrayRetainingOrder | |||
| */ | |||
| template <class ElementType, class ElementComparator> | |||
| static void JUCE_CALLTYPE sortArray (ElementComparator& comparator, | |||
| ElementType* const array, | |||
| int firstElement, | |||
| int lastElement, | |||
| const bool retainOrderOfEquivalentItems) | |||
| static void sortArray (ElementComparator& comparator, | |||
| ElementType* const array, | |||
| int firstElement, | |||
| int lastElement, | |||
| const bool retainOrderOfEquivalentItems) | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -216,11 +216,11 @@ static void JUCE_CALLTYPE sortArray (ElementComparator& comparator, | |||
| @param lastElement the index of the last element in the range (this is non-inclusive) | |||
| */ | |||
| template <class ElementType, class ElementComparator> | |||
| static int JUCE_CALLTYPE findInsertIndexInSortedArray (ElementComparator& comparator, | |||
| ElementType* const array, | |||
| const ElementType newElement, | |||
| int firstElement, | |||
| int lastElement) | |||
| static int findInsertIndexInSortedArray (ElementComparator& comparator, | |||
| ElementType* const array, | |||
| const ElementType newElement, | |||
| int firstElement, | |||
| int lastElement) | |||
| { | |||
| jassert (firstElement <= lastElement); | |||
| @@ -279,8 +279,8 @@ template <class ElementType> | |||
| class IntegerElementComparator | |||
| { | |||
| public: | |||
| static int JUCE_CALLTYPE compareElements (const ElementType first, | |||
| const ElementType second) throw() | |||
| static int compareElements (const ElementType first, | |||
| const ElementType second) throw() | |||
| { | |||
| return first - second; | |||
| } | |||
| @@ -307,8 +307,8 @@ template <class ElementType> | |||
| class FloatElementComparator | |||
| { | |||
| public: | |||
| static int JUCE_CALLTYPE compareElements (const ElementType first, | |||
| const ElementType second) throw() | |||
| static int compareElements (const ElementType first, | |||
| const ElementType second) throw() | |||
| { | |||
| return (first < second) ? -1 | |||
| : ((first == second) ? 0 | |||
| @@ -37,14 +37,14 @@ BEGIN_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| JUCE_CALLTYPE MemoryBlock::MemoryBlock() throw() | |||
| MemoryBlock::MemoryBlock() throw() | |||
| : data (0), | |||
| size (0) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE MemoryBlock::MemoryBlock (const int initialSize, | |||
| const bool initialiseToZero) throw() | |||
| MemoryBlock::MemoryBlock (const int initialSize, | |||
| const bool initialiseToZero) throw() | |||
| { | |||
| if (initialSize > 0) | |||
| { | |||
| @@ -62,7 +62,7 @@ JUCE_CALLTYPE MemoryBlock::MemoryBlock (const int initialSize, | |||
| } | |||
| } | |||
| JUCE_CALLTYPE MemoryBlock::MemoryBlock (const MemoryBlock& other) throw() | |||
| MemoryBlock::MemoryBlock (const MemoryBlock& other) throw() | |||
| : data (0), | |||
| size (other.size) | |||
| { | |||
| @@ -74,8 +74,8 @@ JUCE_CALLTYPE MemoryBlock::MemoryBlock (const MemoryBlock& other) throw() | |||
| } | |||
| } | |||
| JUCE_CALLTYPE MemoryBlock::MemoryBlock (const void* const dataToInitialiseFrom, | |||
| const int sizeInBytes) throw() | |||
| MemoryBlock::MemoryBlock (const void* const dataToInitialiseFrom, | |||
| const int sizeInBytes) throw() | |||
| : data (0), | |||
| size (jmax (0, sizeInBytes)) | |||
| { | |||
| @@ -92,7 +92,7 @@ JUCE_CALLTYPE MemoryBlock::MemoryBlock (const void* const dataToInitialiseFrom, | |||
| } | |||
| } | |||
| JUCE_CALLTYPE MemoryBlock::~MemoryBlock() throw() | |||
| MemoryBlock::~MemoryBlock() throw() | |||
| { | |||
| jassert (size >= 0); // should never happen | |||
| jassert (size == 0 || data != 0); // non-zero size but no data allocated? | |||
| @@ -100,7 +100,7 @@ JUCE_CALLTYPE MemoryBlock::~MemoryBlock() throw() | |||
| juce_free (data); | |||
| } | |||
| const MemoryBlock& JUCE_CALLTYPE MemoryBlock::operator= (const MemoryBlock& other) throw() | |||
| const MemoryBlock& MemoryBlock::operator= (const MemoryBlock& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -112,21 +112,21 @@ const MemoryBlock& JUCE_CALLTYPE MemoryBlock::operator= (const MemoryBlock& othe | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE MemoryBlock::operator== (const MemoryBlock& other) const throw() | |||
| bool MemoryBlock::operator== (const MemoryBlock& other) const throw() | |||
| { | |||
| return (size == other.size) | |||
| && (memcmp (data, other.data, size) == 0); | |||
| } | |||
| bool JUCE_CALLTYPE MemoryBlock::operator!= (const MemoryBlock& other) const throw() | |||
| bool MemoryBlock::operator!= (const MemoryBlock& other) const throw() | |||
| { | |||
| return ! operator== (other); | |||
| } | |||
| //============================================================================== | |||
| // this will resize the block to this size | |||
| void JUCE_CALLTYPE MemoryBlock::setSize (const int newSize, | |||
| const bool initialiseToZero) throw() | |||
| void MemoryBlock::setSize (const int newSize, | |||
| const bool initialiseToZero) throw() | |||
| { | |||
| if (size != newSize) | |||
| { | |||
| @@ -158,21 +158,21 @@ void JUCE_CALLTYPE MemoryBlock::setSize (const int newSize, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::ensureSize (const int minimumSize, | |||
| const bool initialiseToZero) throw() | |||
| void MemoryBlock::ensureSize (const int minimumSize, | |||
| const bool initialiseToZero) throw() | |||
| { | |||
| if (size < minimumSize) | |||
| setSize (minimumSize, initialiseToZero); | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE MemoryBlock::fillWith (const uint8 value) throw() | |||
| void MemoryBlock::fillWith (const uint8 value) throw() | |||
| { | |||
| memset (data, (int) value, size); | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::append (const void* const srcData, | |||
| const int numBytes) throw() | |||
| void MemoryBlock::append (const void* const srcData, | |||
| const int numBytes) throw() | |||
| { | |||
| if (numBytes > 0) | |||
| { | |||
| @@ -182,7 +182,7 @@ void JUCE_CALLTYPE MemoryBlock::append (const void* const srcData, | |||
| } | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::copyFrom (const void* const src, int offset, int num) throw() | |||
| void MemoryBlock::copyFrom (const void* const src, int offset, int num) throw() | |||
| { | |||
| const char* d = (const char*) src; | |||
| @@ -200,7 +200,7 @@ void JUCE_CALLTYPE MemoryBlock::copyFrom (const void* const src, int offset, int | |||
| memcpy (data + offset, d, num); | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::copyTo (void* const dst, int offset, int num) const throw() | |||
| void MemoryBlock::copyTo (void* const dst, int offset, int num) const throw() | |||
| { | |||
| char* d = (char*) dst; | |||
| @@ -224,7 +224,7 @@ void JUCE_CALLTYPE MemoryBlock::copyTo (void* const dst, int offset, int num) co | |||
| memcpy (d, data + offset, num); | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::removeSection (int startByte, int numBytesToRemove) throw() | |||
| void MemoryBlock::removeSection (int startByte, int numBytesToRemove) throw() | |||
| { | |||
| if (startByte < 0) | |||
| { | |||
| @@ -246,13 +246,13 @@ void JUCE_CALLTYPE MemoryBlock::removeSection (int startByte, int numBytesToRemo | |||
| } | |||
| } | |||
| const String JUCE_CALLTYPE MemoryBlock::toString() const throw() | |||
| const String MemoryBlock::toString() const throw() | |||
| { | |||
| return String (data, size); | |||
| } | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE MemoryBlock::getBitRange (const int bitRangeStart, int numBits) const throw() | |||
| int MemoryBlock::getBitRange (const int bitRangeStart, int numBits) const throw() | |||
| { | |||
| int res = 0; | |||
| @@ -276,7 +276,7 @@ int JUCE_CALLTYPE MemoryBlock::getBitRange (const int bitRangeStart, int numBits | |||
| return res; | |||
| } | |||
| void JUCE_CALLTYPE MemoryBlock::setBitRange (const int bitRangeStart, int numBits, int bitsToSet) throw() | |||
| void MemoryBlock::setBitRange (const int bitRangeStart, int numBits, int bitsToSet) throw() | |||
| { | |||
| int byte = bitRangeStart >> 3; | |||
| int offsetInByte = bitRangeStart & 7; | |||
| @@ -300,7 +300,7 @@ void JUCE_CALLTYPE MemoryBlock::setBitRange (const int bitRangeStart, int numBit | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE MemoryBlock::loadFromHexString (const String& hex) throw() | |||
| void MemoryBlock::loadFromHexString (const String& hex) throw() | |||
| { | |||
| ensureSize (hex.length() >> 1); | |||
| char* dest = data; | |||
| @@ -349,7 +349,7 @@ void JUCE_CALLTYPE MemoryBlock::loadFromHexString (const String& hex) throw() | |||
| static const char* const encodingTable | |||
| = ".ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; | |||
| const String JUCE_CALLTYPE MemoryBlock::toBase64Encoding() const throw() | |||
| const String MemoryBlock::toBase64Encoding() const throw() | |||
| { | |||
| const int numChars = ((size << 3) + 5) / 6; | |||
| @@ -368,7 +368,7 @@ const String JUCE_CALLTYPE MemoryBlock::toBase64Encoding() const throw() | |||
| return destString; | |||
| } | |||
| bool JUCE_CALLTYPE MemoryBlock::fromBase64Encoding (const String& s) throw() | |||
| bool MemoryBlock::fromBase64Encoding (const String& s) throw() | |||
| { | |||
| const int startPos = s.indexOfChar (T('.')) + 1; | |||
| @@ -45,48 +45,48 @@ class JUCE_API MemoryBlock | |||
| public: | |||
| //============================================================================== | |||
| /** Create an uninitialised block with 0 size. */ | |||
| JUCE_CALLTYPE MemoryBlock() throw(); | |||
| MemoryBlock() throw(); | |||
| /** Creates a memory block with a given initial size. | |||
| @param initialSize the size of block to create | |||
| @param initialiseToZero whether to clear the memory or just leave it uninitialised | |||
| */ | |||
| JUCE_CALLTYPE MemoryBlock (const int initialSize, | |||
| const bool initialiseToZero = false) throw(); | |||
| MemoryBlock (const int initialSize, | |||
| const bool initialiseToZero = false) throw(); | |||
| /** Creates a copy of another memory block. */ | |||
| JUCE_CALLTYPE MemoryBlock (const MemoryBlock& other) throw(); | |||
| MemoryBlock (const MemoryBlock& other) throw(); | |||
| /** Creates a memory block using a copy of a block of data. | |||
| @param dataToInitialiseFrom some data to copy into this block | |||
| @param sizeInBytes how much space to use | |||
| */ | |||
| JUCE_CALLTYPE MemoryBlock (const void* const dataToInitialiseFrom, | |||
| const int sizeInBytes) throw(); | |||
| MemoryBlock (const void* const dataToInitialiseFrom, | |||
| const int sizeInBytes) throw(); | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~MemoryBlock() throw(); | |||
| ~MemoryBlock() throw(); | |||
| /** Copies another memory block onto this one. | |||
| This block will be resized and copied to exactly match the other one. | |||
| */ | |||
| const MemoryBlock& JUCE_CALLTYPE operator= (const MemoryBlock& other) throw(); | |||
| const MemoryBlock& operator= (const MemoryBlock& other) throw(); | |||
| //============================================================================== | |||
| /** Compares two memory blocks. | |||
| @returns true only if the two blocks are the same size and have identical contents. | |||
| */ | |||
| bool JUCE_CALLTYPE operator== (const MemoryBlock& other) const throw(); | |||
| bool operator== (const MemoryBlock& other) const throw(); | |||
| /** Compares two memory blocks. | |||
| @returns true if the two blocks are different sizes or have different contents. | |||
| */ | |||
| bool JUCE_CALLTYPE operator!= (const MemoryBlock& other) const throw(); | |||
| bool operator!= (const MemoryBlock& other) const throw(); | |||
| //============================================================================== | |||
| /** Returns a pointer to the data, casting it to any type of primitive data required. | |||
| @@ -95,25 +95,25 @@ public: | |||
| block is resized. | |||
| */ | |||
| template <class DataType> | |||
| JUCE_CALLTYPE operator DataType*() const throw() { return (DataType*) data; } | |||
| operator DataType*() const throw() { return (DataType*) data; } | |||
| /** Returns a void pointer to the data. | |||
| Note that the pointer returned will probably become invalid when the | |||
| block is resized. | |||
| */ | |||
| void* JUCE_CALLTYPE getData() const throw() { return data; } | |||
| void* getData() const throw() { return data; } | |||
| /** Returns a byte from the memory block. | |||
| This returns a reference, so you can also use it to set a byte. | |||
| */ | |||
| char& JUCE_CALLTYPE operator[] (const int offset) const throw() { return data [offset]; } | |||
| char& operator[] (const int offset) const throw() { return data [offset]; } | |||
| //============================================================================== | |||
| /** Returns the block's current allocated size, in bytes. */ | |||
| int JUCE_CALLTYPE getSize() const throw() { return size; } | |||
| int getSize() const throw() { return size; } | |||
| /** Resizes the memory block. | |||
| @@ -127,8 +127,8 @@ public: | |||
| uninitialised | |||
| @see ensureSize | |||
| */ | |||
| void JUCE_CALLTYPE setSize (const int newSize, | |||
| const bool initialiseNewSpaceToZero = false) throw(); | |||
| void setSize (const int newSize, | |||
| const bool initialiseNewSpaceToZero = false) throw(); | |||
| /** Increases the block's size only if it's smaller than a given size. | |||
| @@ -139,22 +139,22 @@ public: | |||
| uninitialised | |||
| @see setSize | |||
| */ | |||
| void JUCE_CALLTYPE ensureSize (const int minimumSize, | |||
| const bool initialiseNewSpaceToZero = false) throw(); | |||
| void ensureSize (const int minimumSize, | |||
| const bool initialiseNewSpaceToZero = false) throw(); | |||
| //============================================================================== | |||
| /** Fills the entire memory block with a repeated byte value. | |||
| This is handy for clearing a block of memory to zero. | |||
| */ | |||
| void JUCE_CALLTYPE fillWith (const uint8 valueToUse) throw(); | |||
| void fillWith (const uint8 valueToUse) throw(); | |||
| /** Adds another block of data to the end of this one. | |||
| This block's size will be increased accordingly. | |||
| */ | |||
| void JUCE_CALLTYPE append (const void* const data, | |||
| const int numBytes) throw(); | |||
| void append (const void* const data, | |||
| const int numBytes) throw(); | |||
| //============================================================================== | |||
| /** Copies data into this MemoryBlock from a memory address. | |||
| @@ -164,9 +164,9 @@ public: | |||
| @param numBytes how much to copy in (if this goes beyond the size of the memory block, | |||
| it will be clipped so not to do anything nasty) | |||
| */ | |||
| void JUCE_CALLTYPE copyFrom (const void* srcData, | |||
| int destinationOffset, | |||
| int numBytes) throw(); | |||
| void copyFrom (const void* srcData, | |||
| int destinationOffset, | |||
| int numBytes) throw(); | |||
| /** Copies data from this MemoryBlock to a memory address. | |||
| @@ -175,9 +175,9 @@ public: | |||
| @param numBytes how much to copy (if this extends beyond the limits of the memory block, | |||
| zeros will be used for that portion of the data) | |||
| */ | |||
| void JUCE_CALLTYPE copyTo (void* destData, | |||
| int sourceOffset, | |||
| int numBytes) const throw(); | |||
| void copyTo (void* destData, | |||
| int sourceOffset, | |||
| int numBytes) const throw(); | |||
| /** Chops out a section of the block. | |||
| @@ -186,12 +186,12 @@ public: | |||
| If the range specified goes beyond the size of the block, it will be clipped. | |||
| */ | |||
| void JUCE_CALLTYPE removeSection (int startByte, int numBytesToRemove) throw(); | |||
| void removeSection (int startByte, int numBytesToRemove) throw(); | |||
| //============================================================================== | |||
| /** Attempts to parse the contents of the block as a zero-terminated string of 8-bit | |||
| characters in the system's default encoding. */ | |||
| const String JUCE_CALLTYPE toString() const throw(); | |||
| const String toString() const throw(); | |||
| //============================================================================== | |||
| /** Parses a string of hexadecimal numbers and writes this data into the memory block. | |||
| @@ -201,17 +201,17 @@ public: | |||
| @see String::toHexString() | |||
| */ | |||
| void JUCE_CALLTYPE loadFromHexString (const String& sourceHexString) throw(); | |||
| void loadFromHexString (const String& sourceHexString) throw(); | |||
| //============================================================================== | |||
| /** Sets a number of bits in the memory block, treating it as a long binary sequence. */ | |||
| void JUCE_CALLTYPE setBitRange (int bitRangeStart, | |||
| int numBits, | |||
| int binaryNumberToApply) throw(); | |||
| void setBitRange (int bitRangeStart, | |||
| int numBits, | |||
| int binaryNumberToApply) throw(); | |||
| /** Reads a number of bits from the memory block, treating it as one long binary sequence */ | |||
| int JUCE_CALLTYPE getBitRange (int bitRangeStart, | |||
| int numBitsToRead) const throw(); | |||
| int getBitRange (int bitRangeStart, | |||
| int numBitsToRead) const throw(); | |||
| //============================================================================== | |||
| /** Returns a string of characters that represent the binary contents of this block. | |||
| @@ -221,7 +221,7 @@ public: | |||
| @see fromBase64Encoding | |||
| */ | |||
| const String JUCE_CALLTYPE toBase64Encoding() const throw(); | |||
| const String toBase64Encoding() const throw(); | |||
| /** Takes a string of encoded characters and turns it into binary data. | |||
| @@ -230,7 +230,7 @@ public: | |||
| @see toBase64Encoding | |||
| */ | |||
| bool JUCE_CALLTYPE fromBase64Encoding (const String& encodedString) throw(); | |||
| bool fromBase64Encoding (const String& encodedString) throw(); | |||
| //============================================================================== | |||
| @@ -71,7 +71,7 @@ public: | |||
| @see ArrayAllocationBase | |||
| */ | |||
| JUCE_CALLTYPE OwnedArray (const int granularity = juceDefaultArrayGranularity) throw() | |||
| OwnedArray (const int granularity = juceDefaultArrayGranularity) throw() | |||
| : ArrayAllocationBase <ObjectClass*> (granularity), | |||
| numUsed (0) | |||
| { | |||
| @@ -82,14 +82,14 @@ public: | |||
| To get rid of the array without deleting its objects, use its | |||
| clear (false) method before deleting it. | |||
| */ | |||
| JUCE_CALLTYPE ~OwnedArray() | |||
| ~OwnedArray() | |||
| { | |||
| clear (true); | |||
| } | |||
| //============================================================================== | |||
| /** Clears the array, optionally deleting the objects inside it first. */ | |||
| void JUCE_CALLTYPE clear (const bool deleteObjects = true) | |||
| void clear (const bool deleteObjects = true) | |||
| { | |||
| lock.enter(); | |||
| @@ -108,7 +108,7 @@ public: | |||
| /** Returns the number of items currently in the array. | |||
| @see operator[] | |||
| */ | |||
| inline int JUCE_CALLTYPE size() const throw() | |||
| inline int size() const throw() | |||
| { | |||
| return numUsed; | |||
| } | |||
| @@ -121,7 +121,7 @@ public: | |||
| @see getUnchecked | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE operator[] (const int index) const throw() | |||
| inline ObjectClass* operator[] (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| ObjectClass* const result = (index >= 0 && index < numUsed) ? this->elements [index] | |||
| @@ -136,7 +136,7 @@ public: | |||
| This is a faster and less safe version of operator[] which doesn't check the index passed in, so | |||
| it can be used when you're sure the index if always going to be legal. | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getUnchecked (const int index) const throw() | |||
| inline ObjectClass* getUnchecked (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| jassert (index >= 0 && index < numUsed); | |||
| @@ -151,7 +151,7 @@ public: | |||
| This will return a null pointer if the array's empty. | |||
| @see getLast | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getFirst() const throw() | |||
| inline ObjectClass* getFirst() const throw() | |||
| { | |||
| lock.enter(); | |||
| ObjectClass* const result = (numUsed > 0) ? this->elements [0] | |||
| @@ -165,7 +165,7 @@ public: | |||
| This will return a null pointer if the array's empty. | |||
| @see getFirst | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getLast() const throw() | |||
| inline ObjectClass* getLast() const throw() | |||
| { | |||
| lock.enter(); | |||
| ObjectClass* const result = (numUsed > 0) ? this->elements [numUsed - 1] | |||
| @@ -181,7 +181,7 @@ public: | |||
| @param objectToLookFor the object to look for | |||
| @returns the index at which the object was found, or -1 if it's not found | |||
| */ | |||
| int JUCE_CALLTYPE indexOf (const ObjectClass* const objectToLookFor) const throw() | |||
| int indexOf (const ObjectClass* const objectToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| ObjectClass* const* e = this->elements; | |||
| @@ -206,7 +206,7 @@ public: | |||
| @param objectToLookFor the object to look for | |||
| @returns true if the object is in the array | |||
| */ | |||
| bool JUCE_CALLTYPE contains (const ObjectClass* const objectToLookFor) const throw() | |||
| bool contains (const ObjectClass* const objectToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -256,7 +256,7 @@ public: | |||
| @param newObject the new object to add to the array | |||
| @see set, insert, addIfNotAlreadyThere, addSorted | |||
| */ | |||
| void JUCE_CALLTYPE add (const ObjectClass* const newObject) throw() | |||
| void add (const ObjectClass* const newObject) throw() | |||
| { | |||
| lock.enter(); | |||
| this->ensureAllocatedSize (numUsed + 1); | |||
| @@ -281,8 +281,8 @@ public: | |||
| @param newObject the new object to add to the array | |||
| @see add, addSorted, addIfNotAlreadyThere, set | |||
| */ | |||
| void JUCE_CALLTYPE insert (int indexToInsertAt, | |||
| const ObjectClass* const newObject) throw() | |||
| void insert (int indexToInsertAt, | |||
| const ObjectClass* const newObject) throw() | |||
| { | |||
| if (indexToInsertAt >= 0) | |||
| { | |||
| @@ -317,7 +317,7 @@ public: | |||
| @param newObject the new object to add to the array | |||
| */ | |||
| void JUCE_CALLTYPE addIfNotAlreadyThere (const ObjectClass* const newObject) throw() | |||
| void addIfNotAlreadyThere (const ObjectClass* const newObject) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -340,9 +340,9 @@ public: | |||
| @param deleteOldElement whether to delete the object that's being replaced with the new one | |||
| @see add, insert, remove | |||
| */ | |||
| void JUCE_CALLTYPE set (const int indexToChange, | |||
| const ObjectClass* const newObject, | |||
| const bool deleteOldElement = true) | |||
| void set (const int indexToChange, | |||
| const ObjectClass* const newObject, | |||
| const bool deleteOldElement = true) | |||
| { | |||
| if (indexToChange >= 0) | |||
| { | |||
| @@ -383,8 +383,8 @@ public: | |||
| @see add, sort | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE addSorted (ElementComparator& comparator, | |||
| ObjectClass* const newObject) throw() | |||
| void addSorted (ElementComparator& comparator, | |||
| ObjectClass* const newObject) throw() | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -404,8 +404,8 @@ public: | |||
| @param deleteObject whether to delete the object that is removed | |||
| @see removeObject, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE remove (const int indexToRemove, | |||
| const bool deleteObject = true) | |||
| void remove (const int indexToRemove, | |||
| const bool deleteObject = true) | |||
| { | |||
| lock.enter(); | |||
| ObjectClass* toDelete = 0; | |||
| @@ -440,8 +440,8 @@ public: | |||
| @param deleteObject whether to delete the object (if it's found) | |||
| @see remove, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeObject (const ObjectClass* const objectToRemove, | |||
| const bool deleteObject = true) | |||
| void removeObject (const ObjectClass* const objectToRemove, | |||
| const bool deleteObject = true) | |||
| { | |||
| lock.enter(); | |||
| ObjectClass** e = this->elements; | |||
| @@ -473,9 +473,9 @@ public: | |||
| @param deleteObjects whether to delete the objects that get removed | |||
| @see remove, removeObject | |||
| */ | |||
| void JUCE_CALLTYPE removeRange (int startIndex, | |||
| const int numberToRemove, | |||
| const bool deleteObjects = true) | |||
| void removeRange (int startIndex, | |||
| const int numberToRemove, | |||
| const bool deleteObjects = true) | |||
| { | |||
| lock.enter(); | |||
| const int endIndex = jlimit (0, numUsed, startIndex + numberToRemove); | |||
| @@ -516,8 +516,8 @@ public: | |||
| @param deleteObjects whether to also delete the objects that are removed | |||
| @see remove, removeObject, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeLast (int howManyToRemove = 1, | |||
| const bool deleteObjects = true) | |||
| void removeLast (int howManyToRemove = 1, | |||
| const bool deleteObjects = true) | |||
| { | |||
| lock.enter(); | |||
| @@ -539,8 +539,8 @@ public: | |||
| If either of the indexes passed in is out-of-range, nothing will happen, | |||
| otherwise the two objects at these positions will be exchanged. | |||
| */ | |||
| void JUCE_CALLTYPE swap (const int index1, | |||
| const int index2) throw() | |||
| void swap (const int index1, | |||
| const int index2) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -567,8 +567,8 @@ public: | |||
| @param newIndex the index at which you'd like this object to end up. If this | |||
| is less than zero, it will be moved to the end of the array | |||
| */ | |||
| void JUCE_CALLTYPE move (const int currentIndex, | |||
| int newIndex) throw() | |||
| void move (const int currentIndex, | |||
| int newIndex) throw() | |||
| { | |||
| if (currentIndex != newIndex) | |||
| { | |||
| @@ -607,7 +607,7 @@ public: | |||
| because it just swaps their internal pointers. | |||
| */ | |||
| template <class OtherArrayType> | |||
| void JUCE_CALLTYPE swapWithArray (OtherArrayType& otherArray) throw() | |||
| void swapWithArray (OtherArrayType& otherArray) throw() | |||
| { | |||
| lock.enter(); | |||
| otherArray.lock.enter(); | |||
| @@ -625,7 +625,7 @@ public: | |||
| removing elements, they may have quite a lot of unused space allocated. | |||
| This method will reduce the amount of allocated storage to a minimum. | |||
| */ | |||
| void JUCE_CALLTYPE minimiseStorageOverheads() throw() | |||
| void minimiseStorageOverheads() throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -650,7 +650,7 @@ public: | |||
| the array won't have to keep dynamically resizing itself as the elements | |||
| are added, and it'll therefore be more efficient. | |||
| */ | |||
| void JUCE_CALLTYPE ensureStorageAllocated (const int minNumElements) throw() | |||
| void ensureStorageAllocated (const int minNumElements) throw() | |||
| { | |||
| this->ensureAllocatedSize (minNumElements); | |||
| } | |||
| @@ -682,8 +682,8 @@ public: | |||
| @see sortArray | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| void sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -701,7 +701,7 @@ public: | |||
| @see unlockArray | |||
| */ | |||
| void JUCE_CALLTYPE lockArray() const throw() | |||
| void lockArray() const throw() | |||
| { | |||
| lock.enter(); | |||
| } | |||
| @@ -713,7 +713,7 @@ public: | |||
| @see lockArray | |||
| */ | |||
| void JUCE_CALLTYPE unlockArray() const throw() | |||
| void unlockArray() const throw() | |||
| { | |||
| lock.exit(); | |||
| } | |||
| @@ -61,14 +61,14 @@ public: | |||
| @see ReferenceCountedObject, ArrayAllocationBase, Array, OwnedArray | |||
| */ | |||
| JUCE_CALLTYPE ReferenceCountedArray (const int granularity = juceDefaultArrayGranularity) throw() | |||
| ReferenceCountedArray (const int granularity = juceDefaultArrayGranularity) throw() | |||
| : ArrayAllocationBase <ObjectClass*> (granularity), | |||
| numUsed (0) | |||
| { | |||
| } | |||
| /** Creates a copy of another array */ | |||
| JUCE_CALLTYPE ReferenceCountedArray (const ReferenceCountedArray<ObjectClass>& other) throw() | |||
| ReferenceCountedArray (const ReferenceCountedArray<ObjectClass>& other) throw() | |||
| : ArrayAllocationBase <ObjectClass*> (other.granularity), | |||
| numUsed (other.numUsed) | |||
| { | |||
| @@ -84,7 +84,7 @@ public: | |||
| Any existing objects in this array will first be released. | |||
| */ | |||
| const ReferenceCountedArray<ObjectClass>& JUCE_CALLTYPE operator= (const ReferenceCountedArray<ObjectClass>& other) throw() | |||
| const ReferenceCountedArray<ObjectClass>& operator= (const ReferenceCountedArray<ObjectClass>& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -108,7 +108,7 @@ public: | |||
| Any objects in the array will be released, and may be deleted if not referenced from elsewhere. | |||
| */ | |||
| JUCE_CALLTYPE ~ReferenceCountedArray() | |||
| ~ReferenceCountedArray() | |||
| { | |||
| clear(); | |||
| } | |||
| @@ -118,7 +118,7 @@ public: | |||
| Any objects in the array that are not referenced from elsewhere will be deleted. | |||
| */ | |||
| void JUCE_CALLTYPE clear() | |||
| void clear() | |||
| { | |||
| while (numUsed > 0) | |||
| if (this->elements [--numUsed] != 0) | |||
| @@ -129,7 +129,7 @@ public: | |||
| } | |||
| /** Returns the current number of objects in the array. */ | |||
| inline int JUCE_CALLTYPE size() const throw() | |||
| inline int size() const throw() | |||
| { | |||
| return numUsed; | |||
| } | |||
| @@ -142,7 +142,7 @@ public: | |||
| @see getUnchecked | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE operator[] (const int index) const throw() | |||
| inline ObjectClass* operator[] (const int index) const throw() | |||
| { | |||
| return (index >= 0 && index < numUsed) ? this->elements [index] | |||
| : (ObjectClass*) 0; | |||
| @@ -153,7 +153,7 @@ public: | |||
| This is a faster and less safe version of operator[] which doesn't check the index passed in, so | |||
| it can be used when you're sure the index if always going to be legal. | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getUnchecked (const int index) const throw() | |||
| inline ObjectClass* getUnchecked (const int index) const throw() | |||
| { | |||
| jassert (index >= 0 && index < numUsed); | |||
| return this->elements [index]; | |||
| @@ -164,7 +164,7 @@ public: | |||
| This will return a null pointer if the array's empty. | |||
| @see getLast | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getFirst() const throw() | |||
| inline ObjectClass* getFirst() const throw() | |||
| { | |||
| return (numUsed > 0) ? this->elements [0] | |||
| : (ObjectClass*) 0; | |||
| @@ -175,7 +175,7 @@ public: | |||
| This will return a null pointer if the array's empty. | |||
| @see getFirst | |||
| */ | |||
| inline ObjectClass* JUCE_CALLTYPE getLast() const throw() | |||
| inline ObjectClass* getLast() const throw() | |||
| { | |||
| return (numUsed > 0) ? this->elements [numUsed - 1] | |||
| : (ObjectClass*) 0; | |||
| @@ -187,7 +187,7 @@ public: | |||
| @param objectToLookFor the object to look for | |||
| @returns the index at which the object was found, or -1 if it's not found | |||
| */ | |||
| int JUCE_CALLTYPE indexOf (const ObjectClass* const objectToLookFor) const throw() | |||
| int indexOf (const ObjectClass* const objectToLookFor) const throw() | |||
| { | |||
| ObjectClass** e = this->elements; | |||
| @@ -207,7 +207,7 @@ public: | |||
| @param objectToLookFor the object to look for | |||
| @returns true if the object is in the array | |||
| */ | |||
| bool JUCE_CALLTYPE contains (const ObjectClass* const objectToLookFor) const throw() | |||
| bool contains (const ObjectClass* const objectToLookFor) const throw() | |||
| { | |||
| ObjectClass** e = this->elements; | |||
| @@ -229,7 +229,7 @@ public: | |||
| @param newObject the new object to add to the array | |||
| @see set, insert, addIfNotAlreadyThere, addSorted, addArray | |||
| */ | |||
| void JUCE_CALLTYPE add (ObjectClass* const newObject) throw() | |||
| void add (ObjectClass* const newObject) throw() | |||
| { | |||
| this->ensureAllocatedSize (numUsed + 1); | |||
| this->elements [numUsed++] = newObject; | |||
| @@ -251,8 +251,8 @@ public: | |||
| @param newObject the new object to add to the array | |||
| @see add, addSorted, addIfNotAlreadyThere, set | |||
| */ | |||
| void JUCE_CALLTYPE insert (int indexToInsertAt, | |||
| ObjectClass* const newObject) throw() | |||
| void insert (int indexToInsertAt, | |||
| ObjectClass* const newObject) throw() | |||
| { | |||
| if (indexToInsertAt >= 0) | |||
| { | |||
| @@ -287,7 +287,7 @@ public: | |||
| @param newObject the new object to add to the array | |||
| */ | |||
| void JUCE_CALLTYPE addIfNotAlreadyThere (ObjectClass* const newObject) throw() | |||
| void addIfNotAlreadyThere (ObjectClass* const newObject) throw() | |||
| { | |||
| if (! contains (newObject)) | |||
| add (newObject); | |||
| @@ -305,8 +305,8 @@ public: | |||
| @param newObject the new value to set for this index. | |||
| @see add, insert, remove | |||
| */ | |||
| void JUCE_CALLTYPE set (const int indexToChange, | |||
| ObjectClass* const newObject) | |||
| void set (const int indexToChange, | |||
| ObjectClass* const newObject) | |||
| { | |||
| if (indexToChange >= 0) | |||
| { | |||
| @@ -337,9 +337,9 @@ public: | |||
| all available elements will be copied. | |||
| @see add | |||
| */ | |||
| void JUCE_CALLTYPE addArray (const ReferenceCountedArray<ObjectClass>& arrayToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| void addArray (const ReferenceCountedArray<ObjectClass>& arrayToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| { | |||
| if (startIndex < 0) | |||
| { | |||
| @@ -371,8 +371,8 @@ public: | |||
| @see add, sort | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE addSorted (ElementComparator& comparator, | |||
| ObjectClass* newObject) throw() | |||
| void addSorted (ElementComparator& comparator, | |||
| ObjectClass* newObject) throw() | |||
| { | |||
| insert (findInsertIndexInSortedArray (comparator, this->elements, newObject, 0, numUsed), newObject); | |||
| } | |||
| @@ -391,7 +391,7 @@ public: | |||
| @param indexToRemove the index of the element to remove | |||
| @see removeObject, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE remove (const int indexToRemove) | |||
| void remove (const int indexToRemove) | |||
| { | |||
| if (indexToRemove >= 0 && indexToRemove < numUsed) | |||
| { | |||
| @@ -419,7 +419,7 @@ public: | |||
| @param objectToRemove the object to try to remove | |||
| @see remove, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeObject (ObjectClass* const objectToRemove) | |||
| void removeObject (ObjectClass* const objectToRemove) | |||
| { | |||
| remove (indexOf (objectToRemove)); | |||
| } | |||
| @@ -439,8 +439,8 @@ public: | |||
| @param numberToRemove how many objects should be removed | |||
| @see remove, removeObject | |||
| */ | |||
| void JUCE_CALLTYPE removeRange (const int startIndex, | |||
| const int numberToRemove) | |||
| void removeRange (const int startIndex, | |||
| const int numberToRemove) | |||
| { | |||
| const int start = jlimit (0, numUsed, startIndex); | |||
| const int end = jlimit (0, numUsed, startIndex + numberToRemove); | |||
| @@ -481,7 +481,7 @@ public: | |||
| @param howManyToRemove how many objects to remove from the end of the array | |||
| @see remove, removeObject, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeLast (int howManyToRemove = 1) | |||
| void removeLast (int howManyToRemove = 1) | |||
| { | |||
| if (howManyToRemove > numUsed) | |||
| howManyToRemove = numUsed; | |||
| @@ -495,8 +495,8 @@ public: | |||
| If either of the indexes passed in is out-of-range, nothing will happen, | |||
| otherwise the two objects at these positions will be exchanged. | |||
| */ | |||
| void JUCE_CALLTYPE swap (const int index1, | |||
| const int index2) throw() | |||
| void swap (const int index1, | |||
| const int index2) throw() | |||
| { | |||
| if (index1 >= 0 && index1 < numUsed | |||
| && index2 >= 0 && index2 < numUsed) | |||
| @@ -519,8 +519,8 @@ public: | |||
| @param newIndex the index at which you'd like this object to end up. If this | |||
| is less than zero, it will be moved to the end of the array | |||
| */ | |||
| void JUCE_CALLTYPE move (const int currentIndex, | |||
| int newIndex) throw() | |||
| void move (const int currentIndex, | |||
| int newIndex) throw() | |||
| { | |||
| if (currentIndex != newIndex) | |||
| { | |||
| @@ -554,7 +554,7 @@ public: | |||
| @returns true only if the other array contains the same objects in the same order | |||
| */ | |||
| bool JUCE_CALLTYPE operator== (const ReferenceCountedArray<ObjectClass>& other) const throw() | |||
| bool operator== (const ReferenceCountedArray<ObjectClass>& other) const throw() | |||
| { | |||
| if (numUsed != other.numUsed) | |||
| return false; | |||
| @@ -570,7 +570,7 @@ public: | |||
| @see operator== | |||
| */ | |||
| bool JUCE_CALLTYPE operator!= (const ReferenceCountedArray<ObjectClass>& other) const throw() | |||
| bool operator!= (const ReferenceCountedArray<ObjectClass>& other) const throw() | |||
| { | |||
| return ! operator== (other); | |||
| } | |||
| @@ -603,8 +603,8 @@ public: | |||
| @see sortArray | |||
| */ | |||
| template <class ElementComparator> | |||
| void JUCE_CALLTYPE sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| void sort (ElementComparator& comparator, | |||
| const bool retainOrderOfEquivalentItems = false) const throw() | |||
| { | |||
| (void) comparator; // if you pass in an object with a static compareElements() method, this | |||
| // avoids getting warning messages about the parameter being unused | |||
| @@ -618,7 +618,7 @@ public: | |||
| removing elements, they may have quite a lot of unused space allocated. | |||
| This method will reduce the amount of allocated storage to a minimum. | |||
| */ | |||
| void JUCE_CALLTYPE minimiseStorageOverheads() throw() | |||
| void minimiseStorageOverheads() throw() | |||
| { | |||
| if (numUsed == 0) | |||
| { | |||
| @@ -72,7 +72,7 @@ public: | |||
| This is done automatically by the smart pointer, but is public just | |||
| in case it's needed for nefarious purposes. | |||
| */ | |||
| inline void JUCE_CALLTYPE incReferenceCount() throw() | |||
| inline void incReferenceCount() throw() | |||
| { | |||
| atomicIncrement (refCounts); | |||
| @@ -83,7 +83,7 @@ public: | |||
| If the count gets to zero, the object will be deleted. | |||
| */ | |||
| inline void JUCE_CALLTYPE decReferenceCount() throw() | |||
| inline void decReferenceCount() throw() | |||
| { | |||
| jassert (refCounts > 0); | |||
| @@ -92,7 +92,7 @@ public: | |||
| } | |||
| /** Returns the object's current reference count. */ | |||
| inline int JUCE_CALLTYPE getReferenceCount() const throw() | |||
| inline int getReferenceCount() const throw() | |||
| { | |||
| return refCounts; | |||
| } | |||
| @@ -101,13 +101,13 @@ public: | |||
| protected: | |||
| //============================================================================== | |||
| /** Creates the reference-counted object (with an initial ref count of zero). */ | |||
| JUCE_CALLTYPE ReferenceCountedObject() | |||
| ReferenceCountedObject() | |||
| : refCounts (0) | |||
| { | |||
| } | |||
| /** Destructor. */ | |||
| virtual JUCE_CALLTYPE ~ReferenceCountedObject() | |||
| virtual ~ReferenceCountedObject() | |||
| { | |||
| // it's dangerous to delete an object that's still referenced by something else! | |||
| jassert (refCounts == 0); | |||
| @@ -137,7 +137,7 @@ class ReferenceCountedObjectPtr | |||
| public: | |||
| //============================================================================== | |||
| /** Creates a pointer to a null object. */ | |||
| inline JUCE_CALLTYPE ReferenceCountedObjectPtr() throw() | |||
| inline ReferenceCountedObjectPtr() throw() | |||
| : referencedObject (0) | |||
| { | |||
| } | |||
| @@ -146,7 +146,7 @@ public: | |||
| This will increment the object's reference-count if it is non-null. | |||
| */ | |||
| inline JUCE_CALLTYPE ReferenceCountedObjectPtr (ReferenceCountedObjectClass* const refCountedObject) throw() | |||
| inline ReferenceCountedObjectPtr (ReferenceCountedObjectClass* const refCountedObject) throw() | |||
| : referencedObject (refCountedObject) | |||
| { | |||
| if (refCountedObject != 0) | |||
| @@ -157,7 +157,7 @@ public: | |||
| This will increment the object's reference-count (if it is non-null). | |||
| */ | |||
| inline JUCE_CALLTYPE ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& other) throw() | |||
| inline ReferenceCountedObjectPtr (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& other) throw() | |||
| : referencedObject (other.referencedObject) | |||
| { | |||
| if (referencedObject != 0) | |||
| @@ -169,7 +169,7 @@ public: | |||
| The reference count of the old object is decremented, and it might be | |||
| deleted if it hits zero. The new object's count is incremented. | |||
| */ | |||
| const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& JUCE_CALLTYPE operator= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& other) | |||
| const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& operator= (const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& other) | |||
| { | |||
| ReferenceCountedObjectClass* const newObject = other.referencedObject; | |||
| @@ -192,7 +192,7 @@ public: | |||
| The reference count of the old object is decremented, and it might be | |||
| deleted if it hits zero. The new object's count is incremented. | |||
| */ | |||
| const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& JUCE_CALLTYPE operator= (ReferenceCountedObjectClass* const newObject) | |||
| const ReferenceCountedObjectPtr<ReferenceCountedObjectClass>& operator= (ReferenceCountedObjectClass* const newObject) | |||
| { | |||
| if (referencedObject != newObject) | |||
| { | |||
| @@ -213,7 +213,7 @@ public: | |||
| This will decrement the object's reference-count, and may delete it if it | |||
| gets to zero. | |||
| */ | |||
| inline JUCE_CALLTYPE ~ReferenceCountedObjectPtr() | |||
| inline ~ReferenceCountedObjectPtr() | |||
| { | |||
| if (referencedObject != 0) | |||
| referencedObject->decReferenceCount(); | |||
| @@ -223,25 +223,25 @@ public: | |||
| The pointer returned may be zero, of course. | |||
| */ | |||
| inline JUCE_CALLTYPE operator ReferenceCountedObjectClass*() const throw() | |||
| inline operator ReferenceCountedObjectClass*() const throw() | |||
| { | |||
| return referencedObject; | |||
| } | |||
| /** Returns true if this pointer refers to the given object. */ | |||
| inline bool JUCE_CALLTYPE operator== (ReferenceCountedObjectClass* const object) const throw() | |||
| inline bool operator== (ReferenceCountedObjectClass* const object) const throw() | |||
| { | |||
| return referencedObject == object; | |||
| } | |||
| /** Returns true if this pointer doesn't refer to the given object. */ | |||
| inline bool JUCE_CALLTYPE operator!= (ReferenceCountedObjectClass* const object) const throw() | |||
| inline bool operator!= (ReferenceCountedObjectClass* const object) const throw() | |||
| { | |||
| return referencedObject != object; | |||
| } | |||
| // the -> operator is called on the referenced object | |||
| inline ReferenceCountedObjectClass* JUCE_CALLTYPE operator->() const throw() | |||
| inline ReferenceCountedObjectClass* operator->() const throw() | |||
| { | |||
| return referencedObject; | |||
| } | |||
| @@ -72,7 +72,7 @@ public: | |||
| @see ArrayAllocationBase | |||
| */ | |||
| JUCE_CALLTYPE SortedSet (const int granularity = juceDefaultArrayGranularity) throw() | |||
| SortedSet (const int granularity = juceDefaultArrayGranularity) throw() | |||
| : ArrayAllocationBase <ElementType> (granularity), | |||
| numUsed (0) | |||
| { | |||
| @@ -81,7 +81,7 @@ public: | |||
| /** Creates a copy of another set. | |||
| @param other the set to copy | |||
| */ | |||
| JUCE_CALLTYPE SortedSet (const SortedSet<ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| SortedSet (const SortedSet<ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| : ArrayAllocationBase <ElementType> (other.granularity) | |||
| { | |||
| other.lockSet(); | |||
| @@ -92,14 +92,14 @@ public: | |||
| } | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~SortedSet() throw() | |||
| ~SortedSet() throw() | |||
| { | |||
| } | |||
| /** Copies another set over this one. | |||
| @param other the set to copy | |||
| */ | |||
| const SortedSet <ElementType, TypeOfCriticalSectionToUse>& JUCE_CALLTYPE operator= (const SortedSet <ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| const SortedSet <ElementType, TypeOfCriticalSectionToUse>& operator= (const SortedSet <ElementType, TypeOfCriticalSectionToUse>& other) throw() | |||
| { | |||
| if (this != &other) | |||
| { | |||
| @@ -127,7 +127,7 @@ public: | |||
| @param other the other set to compare with | |||
| */ | |||
| bool JUCE_CALLTYPE operator== (const SortedSet<ElementType>& other) const throw() | |||
| bool operator== (const SortedSet<ElementType>& other) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -157,7 +157,7 @@ public: | |||
| @param other the other set to compare with | |||
| */ | |||
| bool JUCE_CALLTYPE operator!= (const SortedSet<ElementType>& other) const throw() | |||
| bool operator!= (const SortedSet<ElementType>& other) const throw() | |||
| { | |||
| return ! operator== (other); | |||
| } | |||
| @@ -171,7 +171,7 @@ public: | |||
| @see clearQuick | |||
| */ | |||
| void JUCE_CALLTYPE clear() throw() | |||
| void clear() throw() | |||
| { | |||
| lock.enter(); | |||
| this->setAllocatedSize (0); | |||
| @@ -183,7 +183,7 @@ public: | |||
| @see clear | |||
| */ | |||
| void JUCE_CALLTYPE clearQuick() throw() | |||
| void clearQuick() throw() | |||
| { | |||
| lock.enter(); | |||
| numUsed = 0; | |||
| @@ -193,7 +193,7 @@ public: | |||
| //============================================================================== | |||
| /** Returns the current number of elements in the set. | |||
| */ | |||
| inline int JUCE_CALLTYPE size() const throw() | |||
| inline int size() const throw() | |||
| { | |||
| return numUsed; | |||
| } | |||
| @@ -209,7 +209,7 @@ public: | |||
| @param index the index of the element being requested (0 is the first element in the set) | |||
| @see getUnchecked, getFirst, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE operator[] (const int index) const throw() | |||
| inline ElementType operator[] (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (index >= 0 && index < numUsed) ? this->elements [index] | |||
| @@ -227,7 +227,7 @@ public: | |||
| @param index the index of the element being requested (0 is the first element in the set) | |||
| @see operator[], getFirst, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getUnchecked (const int index) const throw() | |||
| inline ElementType getUnchecked (const int index) const throw() | |||
| { | |||
| lock.enter(); | |||
| jassert (index >= 0 && index < numUsed); | |||
| @@ -241,7 +241,7 @@ public: | |||
| @see operator[], getUnchecked, getLast | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getFirst() const throw() | |||
| inline ElementType getFirst() const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (numUsed > 0) ? this->elements [0] | |||
| @@ -255,7 +255,7 @@ public: | |||
| @see operator[], getUnchecked, getFirst | |||
| */ | |||
| inline ElementType JUCE_CALLTYPE getLast() const throw() | |||
| inline ElementType getLast() const throw() | |||
| { | |||
| lock.enter(); | |||
| const ElementType result = (numUsed > 0) ? this->elements [numUsed - 1] | |||
| @@ -274,7 +274,7 @@ public: | |||
| @param elementToLookFor the value or object to look for | |||
| @returns the index of the object, or -1 if it's not found | |||
| */ | |||
| int JUCE_CALLTYPE indexOf (const ElementType elementToLookFor) const throw() | |||
| int indexOf (const ElementType elementToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -315,7 +315,7 @@ public: | |||
| @param elementToLookFor the value or object to look for | |||
| @returns true if the item is found | |||
| */ | |||
| bool JUCE_CALLTYPE contains (const ElementType elementToLookFor) const throw() | |||
| bool contains (const ElementType elementToLookFor) const throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -357,7 +357,7 @@ public: | |||
| @param newElement the new object to add to the set | |||
| @see set, insert, addIfNotAlreadyThere, addSorted, addSet, addArray | |||
| */ | |||
| void JUCE_CALLTYPE add (const ElementType newElement) throw() | |||
| void add (const ElementType newElement) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -405,8 +405,8 @@ public: | |||
| @param numElementsToAdd how many elements are in this other array | |||
| @see add | |||
| */ | |||
| void JUCE_CALLTYPE addArray (const ElementType* elementsToAdd, | |||
| int numElementsToAdd) throw() | |||
| void addArray (const ElementType* elementsToAdd, | |||
| int numElementsToAdd) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -426,9 +426,9 @@ public: | |||
| @see add | |||
| */ | |||
| template <class OtherSetType> | |||
| void JUCE_CALLTYPE addSet (const OtherSetType& setToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| void addSet (const OtherSetType& setToAddFrom, | |||
| int startIndex = 0, | |||
| int numElementsToAdd = -1) throw() | |||
| { | |||
| setToAddFrom.lockSet(); | |||
| lock.enter(); | |||
| @@ -463,7 +463,7 @@ public: | |||
| @returns the element that has been removed | |||
| @see removeValue, removeRange | |||
| */ | |||
| ElementType JUCE_CALLTYPE remove (const int indexToRemove) throw() | |||
| ElementType remove (const int indexToRemove) throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -498,7 +498,7 @@ public: | |||
| @param valueToRemove the object to try to remove | |||
| @see remove, removeRange | |||
| */ | |||
| void JUCE_CALLTYPE removeValue (const ElementType valueToRemove) throw() | |||
| void removeValue (const ElementType valueToRemove) throw() | |||
| { | |||
| lock.enter(); | |||
| remove (indexOf (valueToRemove)); | |||
| @@ -511,7 +511,7 @@ public: | |||
| @see removeValuesNotIn, remove, removeValue, removeRange | |||
| */ | |||
| template <class OtherSetType> | |||
| void JUCE_CALLTYPE removeValuesIn (const OtherSetType& otherSet) throw() | |||
| void removeValuesIn (const OtherSetType& otherSet) throw() | |||
| { | |||
| otherSet.lockSet(); | |||
| lock.enter(); | |||
| @@ -542,7 +542,7 @@ public: | |||
| @see removeValuesIn, remove, removeValue, removeRange | |||
| */ | |||
| template <class OtherSetType> | |||
| void JUCE_CALLTYPE removeValuesNotIn (const OtherSetType& otherSet) throw() | |||
| void removeValuesNotIn (const OtherSetType& otherSet) throw() | |||
| { | |||
| otherSet.lockSet(); | |||
| lock.enter(); | |||
| @@ -572,7 +572,7 @@ public: | |||
| removing elements, they may have quite a lot of unused space allocated. | |||
| This method will reduce the amount of allocated storage to a minimum. | |||
| */ | |||
| void JUCE_CALLTYPE minimiseStorageOverheads() throw() | |||
| void minimiseStorageOverheads() throw() | |||
| { | |||
| lock.enter(); | |||
| @@ -599,7 +599,7 @@ public: | |||
| @see unlockSet | |||
| */ | |||
| void JUCE_CALLTYPE lockSet() const throw() | |||
| void lockSet() const throw() | |||
| { | |||
| lock.enter(); | |||
| } | |||
| @@ -611,7 +611,7 @@ public: | |||
| @see lockSet | |||
| */ | |||
| void JUCE_CALLTYPE unlockSet() const throw() | |||
| void unlockSet() const throw() | |||
| { | |||
| lock.exit(); | |||
| } | |||
| @@ -624,7 +624,7 @@ private: | |||
| int numUsed; | |||
| TypeOfCriticalSectionToUse lock; | |||
| void JUCE_CALLTYPE insertInternal (const int indexToInsertAt, const ElementType newElement) throw() | |||
| void insertInternal (const int indexToInsertAt, const ElementType newElement) throw() | |||
| { | |||
| this->ensureAllocatedSize (numUsed + 1); | |||
| @@ -53,24 +53,24 @@ class SparseSet | |||
| public: | |||
| //============================================================================== | |||
| /** Creates a new empty set. */ | |||
| JUCE_CALLTYPE SparseSet() throw() | |||
| SparseSet() throw() | |||
| { | |||
| } | |||
| /** Creates a copy of another SparseSet. */ | |||
| JUCE_CALLTYPE SparseSet (const SparseSet<Type>& other) throw() | |||
| SparseSet (const SparseSet<Type>& other) throw() | |||
| : values (other.values) | |||
| { | |||
| } | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~SparseSet() throw() | |||
| ~SparseSet() throw() | |||
| { | |||
| } | |||
| //============================================================================== | |||
| /** Clears the set. */ | |||
| void JUCE_CALLTYPE clear() throw() | |||
| void clear() throw() | |||
| { | |||
| values.clear(); | |||
| } | |||
| @@ -79,7 +79,7 @@ public: | |||
| This is much quicker than using (size() == 0). | |||
| */ | |||
| bool JUCE_CALLTYPE isEmpty() const throw() | |||
| bool isEmpty() const throw() | |||
| { | |||
| return values.size() == 0; | |||
| } | |||
| @@ -90,7 +90,7 @@ public: | |||
| are a lot of items in the set. Use isEmpty() for a quick test of whether there | |||
| are any items. | |||
| */ | |||
| Type JUCE_CALLTYPE size() const throw() | |||
| Type size() const throw() | |||
| { | |||
| Type num = 0; | |||
| @@ -105,7 +105,7 @@ public: | |||
| @param index the index of the value to retrieve, in the range 0 to (size() - 1). | |||
| @returns the value at this index, or 0 if it's out-of-range | |||
| */ | |||
| Type JUCE_CALLTYPE operator[] (int index) const throw() | |||
| Type operator[] (int index) const throw() | |||
| { | |||
| for (int i = 0; i < values.size(); i += 2) | |||
| { | |||
| @@ -122,7 +122,7 @@ public: | |||
| } | |||
| /** Checks whether a particular value is in the set. */ | |||
| bool JUCE_CALLTYPE contains (const Type valueToLookFor) const throw() | |||
| bool contains (const Type valueToLookFor) const throw() | |||
| { | |||
| bool on = false; | |||
| @@ -142,7 +142,7 @@ public: | |||
| @see getRange | |||
| */ | |||
| int JUCE_CALLTYPE getNumRanges() const throw() | |||
| int getNumRanges() const throw() | |||
| { | |||
| return values.size() >> 1; | |||
| } | |||
| @@ -156,9 +156,9 @@ public: | |||
| @see getTotalRange | |||
| */ | |||
| bool JUCE_CALLTYPE getRange (const int rangeIndex, | |||
| Type& startValue, | |||
| Type& numValues) const throw() | |||
| bool getRange (const int rangeIndex, | |||
| Type& startValue, | |||
| Type& numValues) const throw() | |||
| { | |||
| if (rangeIndex >= 0 && rangeIndex < getNumRanges()) | |||
| { | |||
| @@ -175,8 +175,8 @@ public: | |||
| @see getRange | |||
| */ | |||
| bool JUCE_CALLTYPE getTotalRange (Type& lowestValue, | |||
| Type& highestValue) const throw() | |||
| bool getTotalRange (Type& lowestValue, | |||
| Type& highestValue) const throw() | |||
| { | |||
| if (values.size() > 0) | |||
| { | |||
| @@ -196,8 +196,8 @@ public: | |||
| @param firstValue the start of the range of values to add | |||
| @param numValuesToAdd how many values to add | |||
| */ | |||
| void JUCE_CALLTYPE addRange (const Type firstValue, | |||
| const Type numValuesToAdd) throw() | |||
| void addRange (const Type firstValue, | |||
| const Type numValuesToAdd) throw() | |||
| { | |||
| jassert (numValuesToAdd >= 0); | |||
| @@ -220,8 +220,8 @@ public: | |||
| @param firstValue the start of the range of values to remove | |||
| @param numValuesToRemove how many values to remove | |||
| */ | |||
| void JUCE_CALLTYPE removeRange (const Type firstValue, | |||
| const Type numValuesToRemove) throw() | |||
| void removeRange (const Type firstValue, | |||
| const Type numValuesToRemove) throw() | |||
| { | |||
| jassert (numValuesToRemove >= 0); | |||
| @@ -258,8 +258,8 @@ public: | |||
| } | |||
| /** Does an XOR of the values in a given range. */ | |||
| void JUCE_CALLTYPE invertRange (const Type firstValue, | |||
| const Type numValues) | |||
| void invertRange (const Type firstValue, | |||
| const Type numValues) | |||
| { | |||
| SparseSet newItems; | |||
| newItems.addRange (firstValue, numValues); | |||
| @@ -285,8 +285,8 @@ public: | |||
| } | |||
| /** Checks whether any part of a given range overlaps any part of this one. */ | |||
| bool JUCE_CALLTYPE overlapsRange (const Type firstValue, | |||
| const Type numValues) throw() | |||
| bool overlapsRange (const Type firstValue, | |||
| const Type numValues) throw() | |||
| { | |||
| jassert (numValues >= 0); | |||
| @@ -306,8 +306,8 @@ public: | |||
| } | |||
| /** Checks whether the whole of a given range is contained within this one. */ | |||
| bool JUCE_CALLTYPE containsRange (const Type firstValue, | |||
| const Type numValues) throw() | |||
| bool containsRange (const Type firstValue, | |||
| const Type numValues) throw() | |||
| { | |||
| jassert (numValues >= 0); | |||
| @@ -328,12 +328,12 @@ public: | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE operator== (const SparseSet<Type>& other) throw() | |||
| bool operator== (const SparseSet<Type>& other) throw() | |||
| { | |||
| return values == other.values; | |||
| } | |||
| bool JUCE_CALLTYPE operator!= (const SparseSet<Type>& other) throw() | |||
| bool operator!= (const SparseSet<Type>& other) throw() | |||
| { | |||
| return values != other.values; | |||
| } | |||
| @@ -345,7 +345,7 @@ private: | |||
| // alternating start/end values of ranges of values that are present. | |||
| Array<Type> values; | |||
| void JUCE_CALLTYPE simplify() throw() | |||
| void simplify() throw() | |||
| { | |||
| jassert ((values.size() & 1) == 0); | |||
| @@ -96,7 +96,7 @@ void juce_findFileClose (void* handle) throw(); | |||
| //============================================================================== | |||
| static const String JUCE_CALLTYPE parseAbsolutePath (String path) throw() | |||
| static const String parseAbsolutePath (String path) throw() | |||
| { | |||
| if (path.isEmpty()) | |||
| return String::empty; | |||
| @@ -192,28 +192,28 @@ const File File::nonexistent; | |||
| //============================================================================== | |||
| JUCE_CALLTYPE File::File (const String& fullPathName) throw() | |||
| File::File (const String& fullPathName) throw() | |||
| : fullPath (parseAbsolutePath (fullPathName)) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE File::File (const String& path, int) throw() | |||
| File::File (const String& path, int) throw() | |||
| : fullPath (path) | |||
| { | |||
| } | |||
| JUCE_CALLTYPE File::File (const File& other) throw() | |||
| File::File (const File& other) throw() | |||
| : fullPath (other.fullPath) | |||
| { | |||
| } | |||
| const File& JUCE_CALLTYPE File::operator= (const String& newPath) throw() | |||
| const File& File::operator= (const String& newPath) throw() | |||
| { | |||
| fullPath = parseAbsolutePath (newPath); | |||
| return *this; | |||
| } | |||
| const File& JUCE_CALLTYPE File::operator= (const File& other) throw() | |||
| const File& File::operator= (const File& other) throw() | |||
| { | |||
| fullPath = other.fullPath; | |||
| return *this; | |||
| @@ -224,7 +224,7 @@ const File& JUCE_CALLTYPE File::operator= (const File& other) throw() | |||
| #define NAMES_ARE_CASE_SENSITIVE 1 | |||
| #endif | |||
| bool JUCE_CALLTYPE File::areFileNamesCaseSensitive() | |||
| bool File::areFileNamesCaseSensitive() | |||
| { | |||
| #if NAMES_ARE_CASE_SENSITIVE | |||
| return true; | |||
| @@ -233,7 +233,7 @@ bool JUCE_CALLTYPE File::areFileNamesCaseSensitive() | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE File::operator== (const File& other) const throw() | |||
| bool File::operator== (const File& other) const throw() | |||
| { | |||
| // case-insensitive on Windows, but not on linux. | |||
| #if NAMES_ARE_CASE_SENSITIVE | |||
| @@ -243,28 +243,28 @@ bool JUCE_CALLTYPE File::operator== (const File& other) const throw() | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE File::operator!= (const File& other) const throw() | |||
| bool File::operator!= (const File& other) const throw() | |||
| { | |||
| return ! operator== (other); | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE File::exists() const throw() | |||
| bool File::exists() const throw() | |||
| { | |||
| return juce_fileExists (fullPath, false); | |||
| } | |||
| bool JUCE_CALLTYPE File::existsAsFile() const throw() | |||
| bool File::existsAsFile() const throw() | |||
| { | |||
| return juce_fileExists (fullPath, true); | |||
| } | |||
| bool JUCE_CALLTYPE File::isDirectory() const throw() | |||
| bool File::isDirectory() const throw() | |||
| { | |||
| return juce_isDirectory (fullPath); | |||
| } | |||
| bool JUCE_CALLTYPE File::hasWriteAccess() const throw() | |||
| bool File::hasWriteAccess() const throw() | |||
| { | |||
| if (exists()) | |||
| return juce_canWriteToFile (fullPath); | |||
| @@ -282,8 +282,8 @@ bool JUCE_CALLTYPE File::hasWriteAccess() const throw() | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE File::setReadOnly (const bool shouldBeReadOnly, | |||
| const bool applyRecursively) const throw() | |||
| bool File::setReadOnly (const bool shouldBeReadOnly, | |||
| const bool applyRecursively) const throw() | |||
| { | |||
| bool worked = true; | |||
| @@ -299,13 +299,13 @@ bool JUCE_CALLTYPE File::setReadOnly (const bool shouldBeReadOnly, | |||
| return juce_setFileReadOnly (fullPath, shouldBeReadOnly) && worked; | |||
| } | |||
| bool JUCE_CALLTYPE File::deleteFile() const throw() | |||
| bool File::deleteFile() const throw() | |||
| { | |||
| return (! exists()) | |||
| || juce_deleteFile (fullPath); | |||
| } | |||
| bool JUCE_CALLTYPE File::deleteRecursively() const throw() | |||
| bool File::deleteRecursively() const throw() | |||
| { | |||
| bool worked = true; | |||
| @@ -321,7 +321,7 @@ bool JUCE_CALLTYPE File::deleteRecursively() const throw() | |||
| return deleteFile() && worked; | |||
| } | |||
| bool JUCE_CALLTYPE File::moveFileTo (const File& newFile) const throw() | |||
| bool File::moveFileTo (const File& newFile) const throw() | |||
| { | |||
| if (newFile.fullPath == fullPath) | |||
| return true; | |||
| @@ -335,7 +335,7 @@ bool JUCE_CALLTYPE File::moveFileTo (const File& newFile) const throw() | |||
| return juce_moveFile (fullPath, newFile.fullPath); | |||
| } | |||
| bool JUCE_CALLTYPE File::copyFileTo (const File& newFile) const throw() | |||
| bool File::copyFileTo (const File& newFile) const throw() | |||
| { | |||
| if (*this == newFile) | |||
| return true; | |||
| @@ -346,7 +346,7 @@ bool JUCE_CALLTYPE File::copyFileTo (const File& newFile) const throw() | |||
| return juce_copyFile (fullPath, newFile.fullPath); | |||
| } | |||
| bool JUCE_CALLTYPE File::copyDirectoryTo (const File& newDirectory) const throw() | |||
| bool File::copyDirectoryTo (const File& newDirectory) const throw() | |||
| { | |||
| if (isDirectory() && newDirectory.createDirectory()) | |||
| { | |||
| @@ -372,7 +372,7 @@ bool JUCE_CALLTYPE File::copyDirectoryTo (const File& newDirectory) const throw( | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE File::getPathUpToLastSlash() const throw() | |||
| const String File::getPathUpToLastSlash() const throw() | |||
| { | |||
| const int lastSlash = fullPath.lastIndexOfChar (separator); | |||
| @@ -384,28 +384,28 @@ const String JUCE_CALLTYPE File::getPathUpToLastSlash() const throw() | |||
| return fullPath; | |||
| } | |||
| const File JUCE_CALLTYPE File::getParentDirectory() const throw() | |||
| const File File::getParentDirectory() const throw() | |||
| { | |||
| return File (getPathUpToLastSlash()); | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE File::getFileName() const throw() | |||
| const String File::getFileName() const throw() | |||
| { | |||
| return fullPath.substring (fullPath.lastIndexOfChar (separator) + 1); | |||
| } | |||
| int JUCE_CALLTYPE File::hashCode() const throw() | |||
| int File::hashCode() const throw() | |||
| { | |||
| return fullPath.hashCode(); | |||
| } | |||
| int64 JUCE_CALLTYPE File::hashCode64() const throw() | |||
| int64 File::hashCode64() const throw() | |||
| { | |||
| return fullPath.hashCode64(); | |||
| } | |||
| const String JUCE_CALLTYPE File::getFileNameWithoutExtension() const throw() | |||
| const String File::getFileNameWithoutExtension() const throw() | |||
| { | |||
| const int lastSlash = fullPath.lastIndexOfChar (separator) + 1; | |||
| const int lastDot = fullPath.lastIndexOfChar (T('.')); | |||
| @@ -416,7 +416,7 @@ const String JUCE_CALLTYPE File::getFileNameWithoutExtension() const throw() | |||
| return fullPath.substring (lastSlash); | |||
| } | |||
| bool JUCE_CALLTYPE File::isAChildOf (const File& potentialParent) const throw() | |||
| bool File::isAChildOf (const File& potentialParent) const throw() | |||
| { | |||
| const String ourPath (getPathUpToLastSlash()); | |||
| @@ -439,7 +439,7 @@ bool JUCE_CALLTYPE File::isAChildOf (const File& potentialParent) const throw() | |||
| } | |||
| //============================================================================== | |||
| const File JUCE_CALLTYPE File::getChildFile (String relativePath) const throw() | |||
| const File File::getChildFile (String relativePath) const throw() | |||
| { | |||
| if (relativePath.startsWithChar (T('/')) | |||
| || relativePath.startsWithChar (T('\\')) | |||
| @@ -499,18 +499,18 @@ const File JUCE_CALLTYPE File::getChildFile (String relativePath) const throw() | |||
| } | |||
| } | |||
| const File JUCE_CALLTYPE File::getSiblingFile (const String& fileName) const throw() | |||
| const File File::getSiblingFile (const String& fileName) const throw() | |||
| { | |||
| return getParentDirectory().getChildFile (fileName); | |||
| } | |||
| //============================================================================== | |||
| int64 JUCE_CALLTYPE File::getSize() const throw() | |||
| int64 File::getSize() const throw() | |||
| { | |||
| return juce_getFileSize (fullPath); | |||
| } | |||
| const String JUCE_CALLTYPE File::descriptionOfSizeInBytes (const int64 bytes) | |||
| const String File::descriptionOfSizeInBytes (const int64 bytes) | |||
| { | |||
| if (bytes == 1) | |||
| { | |||
| @@ -535,7 +535,7 @@ const String JUCE_CALLTYPE File::descriptionOfSizeInBytes (const int64 bytes) | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE File::create() const throw() | |||
| bool File::create() const throw() | |||
| { | |||
| if (! exists()) | |||
| { | |||
| @@ -555,7 +555,7 @@ bool JUCE_CALLTYPE File::create() const throw() | |||
| return true; | |||
| } | |||
| bool JUCE_CALLTYPE File::createDirectory() const throw() | |||
| bool File::createDirectory() const throw() | |||
| { | |||
| if (! isDirectory()) | |||
| { | |||
| @@ -578,44 +578,44 @@ bool JUCE_CALLTYPE File::createDirectory() const throw() | |||
| } | |||
| //============================================================================== | |||
| const Time JUCE_CALLTYPE File::getCreationTime() const throw() | |||
| const Time File::getCreationTime() const throw() | |||
| { | |||
| int64 m, a, c; | |||
| juce_getFileTimes (fullPath, m, a, c); | |||
| return Time (c); | |||
| } | |||
| bool JUCE_CALLTYPE File::setCreationTime (const Time& t) const throw() | |||
| bool File::setCreationTime (const Time& t) const throw() | |||
| { | |||
| return juce_setFileTimes (fullPath, 0, 0, t.toMilliseconds()); | |||
| } | |||
| const Time JUCE_CALLTYPE File::getLastModificationTime() const throw() | |||
| const Time File::getLastModificationTime() const throw() | |||
| { | |||
| int64 m, a, c; | |||
| juce_getFileTimes (fullPath, m, a, c); | |||
| return Time (m); | |||
| } | |||
| bool JUCE_CALLTYPE File::setLastModificationTime (const Time& t) const throw() | |||
| bool File::setLastModificationTime (const Time& t) const throw() | |||
| { | |||
| return juce_setFileTimes (fullPath, t.toMilliseconds(), 0, 0); | |||
| } | |||
| const Time JUCE_CALLTYPE File::getLastAccessTime() const throw() | |||
| const Time File::getLastAccessTime() const throw() | |||
| { | |||
| int64 m, a, c; | |||
| juce_getFileTimes (fullPath, m, a, c); | |||
| return Time (a); | |||
| } | |||
| bool JUCE_CALLTYPE File::setLastAccessTime (const Time& t) const throw() | |||
| bool File::setLastAccessTime (const Time& t) const throw() | |||
| { | |||
| return juce_setFileTimes (fullPath, 0, t.toMilliseconds(), 0); | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE File::loadFileAsData (MemoryBlock& destBlock) const throw() | |||
| bool File::loadFileAsData (MemoryBlock& destBlock) const throw() | |||
| { | |||
| if (! existsAsFile()) | |||
| return false; | |||
| @@ -624,7 +624,7 @@ bool JUCE_CALLTYPE File::loadFileAsData (MemoryBlock& destBlock) const throw() | |||
| return getSize() == in.readIntoMemoryBlock (destBlock); | |||
| } | |||
| const String JUCE_CALLTYPE File::loadFileAsString() const throw() | |||
| const String File::loadFileAsString() const throw() | |||
| { | |||
| if (! existsAsFile()) | |||
| return String::empty; | |||
| @@ -644,10 +644,10 @@ static inline bool fileTypeMatches (const int whatToLookFor, | |||
| || (whatToLookFor & File::ignoreHiddenFiles) == 0); | |||
| } | |||
| int JUCE_CALLTYPE File::findChildFiles (OwnedArray<File>& results, | |||
| const int whatToLookFor, | |||
| const bool searchRecursively, | |||
| const String& wildCardPattern) const throw() | |||
| int File::findChildFiles (OwnedArray<File>& results, | |||
| const int whatToLookFor, | |||
| const bool searchRecursively, | |||
| const String& wildCardPattern) const throw() | |||
| { | |||
| // you have to specify the type of files you're looking for! | |||
| jassert (whatToLookFor > 0 && whatToLookFor <= 3); | |||
| @@ -711,8 +711,8 @@ int JUCE_CALLTYPE File::findChildFiles (OwnedArray<File>& results, | |||
| return total; | |||
| } | |||
| int JUCE_CALLTYPE File::getNumberOfChildFiles (const int whatToLookFor, | |||
| const String& wildCardPattern) const throw() | |||
| int File::getNumberOfChildFiles (const int whatToLookFor, | |||
| const String& wildCardPattern) const throw() | |||
| { | |||
| // you have to specify the type of files you're looking for! | |||
| jassert (whatToLookFor > 0 && whatToLookFor <= 3); | |||
| @@ -755,9 +755,9 @@ int JUCE_CALLTYPE File::getNumberOfChildFiles (const int whatToLookFor, | |||
| } | |||
| //============================================================================== | |||
| const File JUCE_CALLTYPE File::getNonexistentChildFile (const String& prefix_, | |||
| const String& suffix, | |||
| bool putNumbersInBrackets) const throw() | |||
| const File File::getNonexistentChildFile (const String& prefix_, | |||
| const String& suffix, | |||
| bool putNumbersInBrackets) const throw() | |||
| { | |||
| File f (getChildFile (prefix_ + suffix)); | |||
| @@ -800,7 +800,7 @@ const File JUCE_CALLTYPE File::getNonexistentChildFile (const String& prefix_, | |||
| return f; | |||
| } | |||
| const File JUCE_CALLTYPE File::getNonexistentSibling (const bool putNumbersInBrackets) const throw() | |||
| const File File::getNonexistentSibling (const bool putNumbersInBrackets) const throw() | |||
| { | |||
| if (exists()) | |||
| { | |||
| @@ -816,7 +816,7 @@ const File JUCE_CALLTYPE File::getNonexistentSibling (const bool putNumbersInBra | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE File::getFileExtension() const throw() | |||
| const String File::getFileExtension() const throw() | |||
| { | |||
| String ext; | |||
| @@ -831,7 +831,7 @@ const String JUCE_CALLTYPE File::getFileExtension() const throw() | |||
| return ext; | |||
| } | |||
| bool JUCE_CALLTYPE File::hasFileExtension (const String& possibleSuffix) const throw() | |||
| bool File::hasFileExtension (const String& possibleSuffix) const throw() | |||
| { | |||
| if (possibleSuffix.isEmpty()) | |||
| return fullPath.lastIndexOfChar (T('.')) <= fullPath.lastIndexOfChar (separator); | |||
| @@ -850,7 +850,7 @@ bool JUCE_CALLTYPE File::hasFileExtension (const String& possibleSuffix) const t | |||
| return false; | |||
| } | |||
| const File JUCE_CALLTYPE File::withFileExtension (const String& newExtension) const throw() | |||
| const File File::withFileExtension (const String& newExtension) const throw() | |||
| { | |||
| if (fullPath.isEmpty()) | |||
| return File::nonexistent; | |||
| @@ -870,14 +870,14 @@ const File JUCE_CALLTYPE File::withFileExtension (const String& newExtension) co | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE File::startAsProcess (const String& parameters) const throw() | |||
| bool File::startAsProcess (const String& parameters) const throw() | |||
| { | |||
| return exists() | |||
| && juce_launchFile (fullPath, parameters); | |||
| } | |||
| //============================================================================== | |||
| FileInputStream* JUCE_CALLTYPE File::createInputStream() const throw() | |||
| FileInputStream* File::createInputStream() const throw() | |||
| { | |||
| if (existsAsFile()) | |||
| return new FileInputStream (*this); | |||
| @@ -885,7 +885,7 @@ FileInputStream* JUCE_CALLTYPE File::createInputStream() const throw() | |||
| return 0; | |||
| } | |||
| FileOutputStream* JUCE_CALLTYPE File::createOutputStream (const int bufferSize) const throw() | |||
| FileOutputStream* File::createOutputStream (const int bufferSize) const throw() | |||
| { | |||
| FileOutputStream* const out = new FileOutputStream (*this, bufferSize); | |||
| @@ -901,8 +901,8 @@ FileOutputStream* JUCE_CALLTYPE File::createOutputStream (const int bufferSize) | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE File::appendData (const void* const dataToAppend, | |||
| const int numberOfBytes) const throw() | |||
| bool File::appendData (const void* const dataToAppend, | |||
| const int numberOfBytes) const throw() | |||
| { | |||
| if (numberOfBytes > 0) | |||
| { | |||
| @@ -918,8 +918,8 @@ bool JUCE_CALLTYPE File::appendData (const void* const dataToAppend, | |||
| return true; | |||
| } | |||
| bool JUCE_CALLTYPE File::replaceWithData (const void* const dataToWrite, | |||
| const int numberOfBytes) const throw() | |||
| bool File::replaceWithData (const void* const dataToWrite, | |||
| const int numberOfBytes) const throw() | |||
| { | |||
| jassert (numberOfBytes >= 0); // a negative number of bytes?? | |||
| @@ -938,9 +938,9 @@ bool JUCE_CALLTYPE File::replaceWithData (const void* const dataToWrite, | |||
| return false; | |||
| } | |||
| bool JUCE_CALLTYPE File::appendText (const String& text, | |||
| const bool asUnicode, | |||
| const bool writeUnicodeHeaderBytes) const throw() | |||
| bool File::appendText (const String& text, | |||
| const bool asUnicode, | |||
| const bool writeUnicodeHeaderBytes) const throw() | |||
| { | |||
| FileOutputStream* const out = createOutputStream(); | |||
| @@ -955,7 +955,7 @@ bool JUCE_CALLTYPE File::appendText (const String& text, | |||
| return false; | |||
| } | |||
| bool JUCE_CALLTYPE File::printf (const tchar* pf, ...) const throw() | |||
| bool File::printf (const tchar* pf, ...) const throw() | |||
| { | |||
| va_list list; | |||
| va_start (list, pf); | |||
| @@ -966,9 +966,9 @@ bool JUCE_CALLTYPE File::printf (const tchar* pf, ...) const throw() | |||
| return appendData ((const char*) text, text.length()); | |||
| } | |||
| bool JUCE_CALLTYPE File::replaceWithText (const String& textToWrite, | |||
| const bool asUnicode, | |||
| const bool writeUnicodeHeaderBytes) const throw() | |||
| bool File::replaceWithText (const String& textToWrite, | |||
| const bool asUnicode, | |||
| const bool writeUnicodeHeaderBytes) const throw() | |||
| { | |||
| const File tempFile (getSiblingFile (T(".") + getFileName()).getNonexistentSibling (false)); | |||
| @@ -983,7 +983,7 @@ bool JUCE_CALLTYPE File::replaceWithText (const String& textToWrite, | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE File::createLegalPathName (const String& original) throw() | |||
| const String File::createLegalPathName (const String& original) throw() | |||
| { | |||
| String s (original); | |||
| String start; | |||
| @@ -998,7 +998,7 @@ const String JUCE_CALLTYPE File::createLegalPathName (const String& original) th | |||
| .substring (0, 1024); | |||
| } | |||
| const String JUCE_CALLTYPE File::createLegalFileName (const String& original) throw() | |||
| const String File::createLegalFileName (const String& original) throw() | |||
| { | |||
| String s (original.removeCharacters (T("\"#@,;:<>*^|?\\/"))); | |||
| @@ -1024,7 +1024,7 @@ const String JUCE_CALLTYPE File::createLegalFileName (const String& original) th | |||
| } | |||
| //============================================================================== | |||
| const String JUCE_CALLTYPE File::getRelativePathFrom (const File& dir) const throw() | |||
| const String File::getRelativePathFrom (const File& dir) const throw() | |||
| { | |||
| String thisPath (fullPath); | |||
| @@ -1087,7 +1087,7 @@ const String JUCE_CALLTYPE File::getRelativePathFrom (const File& dir) const th | |||
| } | |||
| //============================================================================== | |||
| void JUCE_CALLTYPE File::findFileSystemRoots (OwnedArray<File>& destArray) throw() | |||
| void File::findFileSystemRoots (OwnedArray<File>& destArray) throw() | |||
| { | |||
| const StringArray roots (juce_getFileSystemRoots()); | |||
| @@ -1095,13 +1095,13 @@ void JUCE_CALLTYPE File::findFileSystemRoots (OwnedArray<File>& destArray) throw | |||
| destArray.add (new File (roots[i])); | |||
| } | |||
| const String JUCE_CALLTYPE File::getVolumeLabel() const throw() | |||
| const String File::getVolumeLabel() const throw() | |||
| { | |||
| int serialNum; | |||
| return juce_getVolumeLabel (fullPath, serialNum); | |||
| } | |||
| int JUCE_CALLTYPE File::getVolumeSerialNumber() const throw() | |||
| int File::getVolumeSerialNumber() const throw() | |||
| { | |||
| int serialNum; | |||
| juce_getVolumeLabel (fullPath, serialNum); | |||
| @@ -1110,7 +1110,7 @@ int JUCE_CALLTYPE File::getVolumeSerialNumber() const throw() | |||
| } | |||
| //============================================================================== | |||
| const File JUCE_CALLTYPE File::createTempFile (const String& fileNameEnding) throw() | |||
| const File File::createTempFile (const String& fileNameEnding) throw() | |||
| { | |||
| String tempName (T("temp")); | |||
| static int tempNum = 0; | |||
| @@ -64,7 +64,7 @@ public: | |||
| You can use its operator= method to point it at a proper file. | |||
| */ | |||
| JUCE_CALLTYPE File() throw() {} | |||
| File() throw() {} | |||
| /** Creates a file from an absolute path. | |||
| @@ -76,13 +76,13 @@ public: | |||
| On the Mac/Linux, the path can include "~" notation for referring to | |||
| user home directories. | |||
| */ | |||
| JUCE_CALLTYPE File (const String& path) throw(); | |||
| File (const String& path) throw(); | |||
| /** Creates a copy of another file object. */ | |||
| JUCE_CALLTYPE File (const File& other) throw(); | |||
| File (const File& other) throw(); | |||
| /** Destructor. */ | |||
| JUCE_CALLTYPE ~File() throw() {} | |||
| ~File() throw() {} | |||
| /** Sets the file based on an absolute pathname. | |||
| @@ -94,10 +94,10 @@ public: | |||
| On the Mac/Linux, the path can include "~" notation for referring to | |||
| user home directories. | |||
| */ | |||
| const File& JUCE_CALLTYPE operator= (const String& newFilePath) throw(); | |||
| const File& operator= (const String& newFilePath) throw(); | |||
| /** Copies from another file object. */ | |||
| const File& JUCE_CALLTYPE operator= (const File& otherFile) throw(); | |||
| const File& operator= (const File& otherFile) throw(); | |||
| //============================================================================== | |||
| /** This static constant is used for referring to an 'invalid' file. */ | |||
| @@ -109,7 +109,7 @@ public: | |||
| @returns true if the file exists, either as a file or a directory. | |||
| @see existsAsFile, isDirectory | |||
| */ | |||
| bool JUCE_CALLTYPE exists() const throw(); | |||
| bool exists() const throw(); | |||
| /** Checks whether the file exists and is a file rather than a directory. | |||
| @@ -117,7 +117,7 @@ public: | |||
| or doesn't exist | |||
| @see exists, isDirectory | |||
| */ | |||
| bool JUCE_CALLTYPE existsAsFile() const throw(); | |||
| bool existsAsFile() const throw(); | |||
| /** Checks whether the file is a directory that exists. | |||
| @@ -125,20 +125,20 @@ public: | |||
| false if it's a file or doesn't exist at all | |||
| @see exists, existsAsFile | |||
| */ | |||
| bool JUCE_CALLTYPE isDirectory() const throw(); | |||
| bool isDirectory() const throw(); | |||
| /** Returns the size of the file in bytes. | |||
| @returns the number of bytes in the file, or 0 if it doesn't exist. | |||
| */ | |||
| int64 JUCE_CALLTYPE getSize() const throw(); | |||
| int64 getSize() const throw(); | |||
| /** Utility function to convert a file size in bytes to a neat string description. | |||
| So for example 100 would return "100 bytes", 2000 would return "2 KB", | |||
| 2000000 would produce "2 MB", etc. | |||
| */ | |||
| static const String JUCE_CALLTYPE descriptionOfSizeInBytes (const int64 bytes); | |||
| static const String descriptionOfSizeInBytes (const int64 bytes); | |||
| //============================================================================== | |||
| /** Returns the complete, absolute path of this file. | |||
| @@ -152,7 +152,7 @@ public: | |||
| @see getFileName, getRelativePathFrom | |||
| */ | |||
| const String& JUCE_CALLTYPE getFullPathName() const throw() { return fullPath; } | |||
| const String& getFullPathName() const throw() { return fullPath; } | |||
| /** Returns the last section of the pathname. | |||
| @@ -167,7 +167,7 @@ public: | |||
| @see getFullPathName, getFileNameWithoutExtension | |||
| */ | |||
| const String JUCE_CALLTYPE getFileName() const throw(); | |||
| const String getFileName() const throw(); | |||
| /** Creates a relative path that refers to a file relatively to a given directory. | |||
| @@ -184,7 +184,7 @@ public: | |||
| If it doesn't exist, it's assumed to be a directory. | |||
| @see getChildFile | |||
| */ | |||
| const String JUCE_CALLTYPE getRelativePathFrom (const File& directoryToBeRelativeTo) const throw(); | |||
| const String getRelativePathFrom (const File& directoryToBeRelativeTo) const throw(); | |||
| //============================================================================== | |||
| /** Returns the file's extension. | |||
| @@ -195,7 +195,7 @@ public: | |||
| @see hasFileExtension, withFileExtension, getFileNameWithoutExtension | |||
| */ | |||
| const String JUCE_CALLTYPE getFileExtension() const throw(); | |||
| const String getFileExtension() const throw(); | |||
| /** Checks whether the file has a given extension. | |||
| @@ -206,7 +206,7 @@ public: | |||
| @see getFileExtension, withFileExtension, getFileNameWithoutExtension | |||
| */ | |||
| bool JUCE_CALLTYPE hasFileExtension (const String& extensionToTest) const throw(); | |||
| bool hasFileExtension (const String& extensionToTest) const throw(); | |||
| /** Returns a version of this file with a different file extension. | |||
| @@ -218,7 +218,7 @@ public: | |||
| @see getFileName, getFileExtension, hasFileExtension, getFileNameWithoutExtension | |||
| */ | |||
| const File JUCE_CALLTYPE withFileExtension (const String& newExtension) const throw(); | |||
| const File withFileExtension (const String& newExtension) const throw(); | |||
| /** Returns the last part of the filename, without its file extension. | |||
| @@ -226,7 +226,7 @@ public: | |||
| @see getFileName, getFileExtension, hasFileExtension, withFileExtension | |||
| */ | |||
| const String JUCE_CALLTYPE getFileNameWithoutExtension() const throw(); | |||
| const String getFileNameWithoutExtension() const throw(); | |||
| //============================================================================== | |||
| /** Returns a 32-bit hash-code that identifies this file. | |||
| @@ -234,14 +234,14 @@ public: | |||
| This is based on the filename. Obviously it's possible, although unlikely, that | |||
| two files will have the same hash-code. | |||
| */ | |||
| int JUCE_CALLTYPE hashCode() const throw(); | |||
| int hashCode() const throw(); | |||
| /** Returns a 64-bit hash-code that identifies this file. | |||
| This is based on the filename. Obviously it's possible, although unlikely, that | |||
| two files will have the same hash-code. | |||
| */ | |||
| int64 JUCE_CALLTYPE hashCode64() const throw(); | |||
| int64 hashCode64() const throw(); | |||
| //============================================================================== | |||
| /** Returns a file based on a relative path. | |||
| @@ -257,7 +257,7 @@ public: | |||
| @see getSiblingFile, getParentDirectory, getRelativePathFrom, isAChildOf | |||
| */ | |||
| const File JUCE_CALLTYPE getChildFile (String relativePath) const throw(); | |||
| const File getChildFile (String relativePath) const throw(); | |||
| /** Returns a file which is in the same directory as this one. | |||
| @@ -265,14 +265,14 @@ public: | |||
| @see getChildFile, getParentDirectory | |||
| */ | |||
| const File JUCE_CALLTYPE getSiblingFile (const String& siblingFileName) const throw(); | |||
| const File getSiblingFile (const String& siblingFileName) const throw(); | |||
| //============================================================================== | |||
| /** Returns the directory that contains this file or directory. | |||
| e.g. for "/moose/fish/foo.txt" this will return "/moose/fish". | |||
| */ | |||
| const File JUCE_CALLTYPE getParentDirectory() const throw(); | |||
| const File getParentDirectory() const throw(); | |||
| /** Checks whether a file is somewhere inside a directory. | |||
| @@ -283,7 +283,7 @@ public: | |||
| e.g. File ("/moose/fish/foo.txt").isAChildOf ("/moose") is true. | |||
| File ("/moose/fish/foo.txt").isAChildOf ("/moose/fish") is also true. | |||
| */ | |||
| bool JUCE_CALLTYPE isAChildOf (const File& potentialParentDirectory) const throw(); | |||
| bool isAChildOf (const File& potentialParentDirectory) const throw(); | |||
| //============================================================================== | |||
| /** Chooses a filename relative to this one that doesn't already exist. | |||
| @@ -303,9 +303,9 @@ public: | |||
| format "prefix(number)suffix", if false, it will leave the | |||
| brackets out. | |||
| */ | |||
| const File JUCE_CALLTYPE getNonexistentChildFile (const String& prefix, | |||
| const String& suffix, | |||
| bool putNumbersInBrackets = true) const throw(); | |||
| const File getNonexistentChildFile (const String& prefix, | |||
| const String& suffix, | |||
| bool putNumbersInBrackets = true) const throw(); | |||
| /** Chooses a filename for a sibling file to this one that doesn't already exist. | |||
| @@ -316,13 +316,13 @@ public: | |||
| @param putNumbersInBrackets whether to add brackets around the numbers that | |||
| get appended to the new filename. | |||
| */ | |||
| const File JUCE_CALLTYPE getNonexistentSibling (const bool putNumbersInBrackets = true) const throw(); | |||
| const File getNonexistentSibling (const bool putNumbersInBrackets = true) const throw(); | |||
| //============================================================================== | |||
| /** Compares the pathnames for two files. */ | |||
| bool JUCE_CALLTYPE operator== (const File& otherFile) const throw(); | |||
| bool operator== (const File& otherFile) const throw(); | |||
| /** Compares the pathnames for two files. */ | |||
| bool JUCE_CALLTYPE operator!= (const File& otherFile) const throw(); | |||
| bool operator!= (const File& otherFile) const throw(); | |||
| //============================================================================== | |||
| /** Checks whether a file can be created or written to. | |||
| @@ -332,7 +332,7 @@ public: | |||
| see if writing is allowed. | |||
| @see setReadOnly | |||
| */ | |||
| bool JUCE_CALLTYPE hasWriteAccess() const throw(); | |||
| bool hasWriteAccess() const throw(); | |||
| /** Changes the write-permission of a file or directory. | |||
| @@ -343,8 +343,8 @@ public: | |||
| @returns true if it manages to change the file's permissions. | |||
| @see hasWriteAccess | |||
| */ | |||
| bool JUCE_CALLTYPE setReadOnly (const bool shouldBeReadOnly, | |||
| const bool applyRecursively = false) const throw(); | |||
| bool setReadOnly (const bool shouldBeReadOnly, | |||
| const bool applyRecursively = false) const throw(); | |||
| //============================================================================== | |||
| /** Returns the last modification time of this file. | |||
| @@ -352,21 +352,21 @@ public: | |||
| @returns the time, or an invalid time if the file doesn't exist. | |||
| @see setLastModificationTime, getLastAccessTime, getCreationTime | |||
| */ | |||
| const Time JUCE_CALLTYPE getLastModificationTime() const throw(); | |||
| const Time getLastModificationTime() const throw(); | |||
| /** Returns the last time this file was accessed. | |||
| @returns the time, or an invalid time if the file doesn't exist. | |||
| @see setLastAccessTime, getLastModificationTime, getCreationTime | |||
| */ | |||
| const Time JUCE_CALLTYPE getLastAccessTime() const throw(); | |||
| const Time getLastAccessTime() const throw(); | |||
| /** Returns the time that this file was created. | |||
| @returns the time, or an invalid time if the file doesn't exist. | |||
| @see getLastModificationTime, getLastAccessTime | |||
| */ | |||
| const Time JUCE_CALLTYPE getCreationTime() const throw(); | |||
| const Time getCreationTime() const throw(); | |||
| /** Changes the modification time for this file. | |||
| @@ -374,7 +374,7 @@ public: | |||
| @returns true if it manages to change the file's time. | |||
| @see getLastModificationTime, setLastAccessTime, setCreationTime | |||
| */ | |||
| bool JUCE_CALLTYPE setLastModificationTime (const Time& newTime) const throw(); | |||
| bool setLastModificationTime (const Time& newTime) const throw(); | |||
| /** Changes the last-access time for this file. | |||
| @@ -382,7 +382,7 @@ public: | |||
| @returns true if it manages to change the file's time. | |||
| @see getLastAccessTime, setLastModificationTime, setCreationTime | |||
| */ | |||
| bool JUCE_CALLTYPE setLastAccessTime (const Time& newTime) const throw(); | |||
| bool setLastAccessTime (const Time& newTime) const throw(); | |||
| /** Changes the creation date for this file. | |||
| @@ -390,7 +390,7 @@ public: | |||
| @returns true if it manages to change the file's time. | |||
| @see getCreationTime, setLastModificationTime, setLastAccessTime | |||
| */ | |||
| bool JUCE_CALLTYPE setCreationTime (const Time& newTime) const throw(); | |||
| bool setCreationTime (const Time& newTime) const throw(); | |||
| //============================================================================== | |||
| /** Creates an empty file if it doesn't already exist. | |||
| @@ -403,7 +403,7 @@ public: | |||
| @returns true if the file has been created (or if it already existed). | |||
| @see createDirectory | |||
| */ | |||
| bool JUCE_CALLTYPE create() const throw(); | |||
| bool create() const throw(); | |||
| /** Creates a new directory for this filename. | |||
| @@ -414,7 +414,7 @@ public: | |||
| already existed beforehand). | |||
| @see create | |||
| */ | |||
| bool JUCE_CALLTYPE createDirectory() const throw(); | |||
| bool createDirectory() const throw(); | |||
| /** Deletes a file. | |||
| @@ -425,7 +425,7 @@ public: | |||
| begin with). | |||
| @see deleteRecursively | |||
| */ | |||
| bool JUCE_CALLTYPE deleteFile() const throw(); | |||
| bool deleteFile() const throw(); | |||
| /** Deletes a file or directory and all its subdirectories. | |||
| @@ -436,7 +436,7 @@ public: | |||
| (or if it didn't exist to begin with). | |||
| @see deleteFile | |||
| */ | |||
| bool JUCE_CALLTYPE deleteRecursively() const throw(); | |||
| bool deleteRecursively() const throw(); | |||
| /** Moves or renames a file. | |||
| @@ -446,7 +446,7 @@ public: | |||
| @returns true if the operation succeeds | |||
| */ | |||
| bool JUCE_CALLTYPE moveFileTo (const File& targetLocation) const throw(); | |||
| bool moveFileTo (const File& targetLocation) const throw(); | |||
| /** Copies a file. | |||
| @@ -456,7 +456,7 @@ public: | |||
| @returns true if the operation succeeds | |||
| */ | |||
| bool JUCE_CALLTYPE copyFileTo (const File& targetLocation) const throw(); | |||
| bool copyFileTo (const File& targetLocation) const throw(); | |||
| /** Copies a directory. | |||
| @@ -471,7 +471,7 @@ public: | |||
| write privileges to create it if it doesn't exist. Any files inside | |||
| it will be overwritten by similarly named ones that are copied. | |||
| */ | |||
| bool JUCE_CALLTYPE copyDirectoryTo (const File& newDirectory) const throw(); | |||
| bool copyDirectoryTo (const File& newDirectory) const throw(); | |||
| //============================================================================== | |||
| /** Used in file searching, to specify whether to return files, directories, or both. | |||
| @@ -501,10 +501,10 @@ public: | |||
| @see getNumberOfChildFiles, DirectoryIterator | |||
| */ | |||
| int JUCE_CALLTYPE findChildFiles (OwnedArray<File>& results, | |||
| const int whatToLookFor, | |||
| const bool searchRecursively, | |||
| const String& wildCardPattern = JUCE_T("*")) const throw(); | |||
| int findChildFiles (OwnedArray<File>& results, | |||
| const int whatToLookFor, | |||
| const bool searchRecursively, | |||
| const String& wildCardPattern = JUCE_T("*")) const throw(); | |||
| /** Searches inside a directory and counts how many files match a wildcard pattern. | |||
| @@ -522,8 +522,8 @@ public: | |||
| @returns the number of matches found | |||
| @see findChildFiles, DirectoryIterator | |||
| */ | |||
| int JUCE_CALLTYPE getNumberOfChildFiles (const int whatToLookFor, | |||
| const String& wildCardPattern = JUCE_T("*")) const throw(); | |||
| int getNumberOfChildFiles (const int whatToLookFor, | |||
| const String& wildCardPattern = JUCE_T("*")) const throw(); | |||
| //============================================================================== | |||
| /** Creates a stream to read from this file. | |||
| @@ -532,7 +532,7 @@ public: | |||
| start of the file), or 0 if the file can't be opened for some reason | |||
| @see createOutputStream, loadFileAsData | |||
| */ | |||
| FileInputStream* JUCE_CALLTYPE createInputStream() const throw(); | |||
| FileInputStream* createInputStream() const throw(); | |||
| /** Creates a stream to write to this file. | |||
| @@ -544,7 +544,7 @@ public: | |||
| end of the file), or 0 if the file can't be opened for some reason | |||
| @see createInputStream, printf, appendData, appendText | |||
| */ | |||
| FileOutputStream* JUCE_CALLTYPE createOutputStream (const int bufferSize = 0x8000) const throw(); | |||
| FileOutputStream* createOutputStream (const int bufferSize = 0x8000) const throw(); | |||
| //============================================================================== | |||
| /** Loads a file's contents into memory as a block of binary data. | |||
| @@ -557,7 +557,7 @@ public: | |||
| might want to clear it first | |||
| @returns true if the file could all be read into memory | |||
| */ | |||
| bool JUCE_CALLTYPE loadFileAsData (MemoryBlock& result) const throw(); | |||
| bool loadFileAsData (MemoryBlock& result) const throw(); | |||
| /** Reads a file into memory as a string. | |||
| @@ -566,7 +566,7 @@ public: | |||
| This makes use of InputStream::readEntireStreamAsString, which should | |||
| automatically cope with unicode/acsii file formats. | |||
| */ | |||
| const String JUCE_CALLTYPE loadFileAsString() const throw(); | |||
| const String loadFileAsString() const throw(); | |||
| //============================================================================== | |||
| /** Writes text to the end of the file. | |||
| @@ -575,7 +575,7 @@ public: | |||
| @returns false if it can't write to the file for some reason | |||
| */ | |||
| bool JUCE_CALLTYPE printf (const tchar* format, ...) const throw(); | |||
| bool printf (const tchar* format, ...) const throw(); | |||
| /** Appends a block of binary data to the end of the file. | |||
| @@ -583,8 +583,8 @@ public: | |||
| @returns false if it can't write to the file for some reason | |||
| */ | |||
| bool JUCE_CALLTYPE appendData (const void* const dataToAppend, | |||
| const int numberOfBytes) const throw(); | |||
| bool appendData (const void* const dataToAppend, | |||
| const int numberOfBytes) const throw(); | |||
| /** Replaces this file's contents with a given block of data. | |||
| @@ -600,8 +600,8 @@ public: | |||
| @see appendText | |||
| */ | |||
| bool JUCE_CALLTYPE replaceWithData (const void* const dataToWrite, | |||
| const int numberOfBytes) const throw(); | |||
| bool replaceWithData (const void* const dataToWrite, | |||
| const int numberOfBytes) const throw(); | |||
| /** Appends a string to the end of the file. | |||
| @@ -615,9 +615,9 @@ public: | |||
| @see replaceWithText | |||
| */ | |||
| bool JUCE_CALLTYPE appendText (const String& textToAppend, | |||
| const bool asUnicode = false, | |||
| const bool writeUnicodeHeaderBytes = false) const throw(); | |||
| bool appendText (const String& textToAppend, | |||
| const bool asUnicode = false, | |||
| const bool writeUnicodeHeaderBytes = false) const throw(); | |||
| /** Replaces this file's contents with a given text string. | |||
| @@ -635,9 +635,9 @@ public: | |||
| @see appendText | |||
| */ | |||
| bool JUCE_CALLTYPE replaceWithText (const String& textToWrite, | |||
| const bool asUnicode = false, | |||
| const bool writeUnicodeHeaderBytes = false) const throw(); | |||
| bool replaceWithText (const String& textToWrite, | |||
| const bool asUnicode = false, | |||
| const bool writeUnicodeHeaderBytes = false) const throw(); | |||
| //============================================================================== | |||
| /** Creates a set of files to represent each file root. | |||
| @@ -646,41 +646,41 @@ public: | |||
| to which ones are available. On the Mac/Linux, this will probably | |||
| just add a single entry for "/". | |||
| */ | |||
| static void JUCE_CALLTYPE findFileSystemRoots (OwnedArray<File>& results) throw(); | |||
| static void findFileSystemRoots (OwnedArray<File>& results) throw(); | |||
| /** Finds the name of the drive on which this file lives. | |||
| @returns the volume label of the drive, or an empty string if this isn't possible | |||
| */ | |||
| const String JUCE_CALLTYPE getVolumeLabel() const throw(); | |||
| const String getVolumeLabel() const throw(); | |||
| /** Returns the serial number of the volume on which this file lives. | |||
| @returns the serial number, or zero if there's a problem doing this | |||
| */ | |||
| int JUCE_CALLTYPE getVolumeSerialNumber() const throw(); | |||
| int getVolumeSerialNumber() const throw(); | |||
| /** Returns the number of bytes free on the drive that this file lives on. | |||
| @returns the number of bytes free, or 0 if there's a problem finding this out | |||
| */ | |||
| int64 JUCE_CALLTYPE getBytesFreeOnVolume() const throw(); | |||
| int64 getBytesFreeOnVolume() const throw(); | |||
| /** Returns true if this file is on a CD or DVD drive. */ | |||
| bool JUCE_CALLTYPE isOnCDRomDrive() const throw(); | |||
| bool isOnCDRomDrive() const throw(); | |||
| /** Returns true if this file is on a hard disk. | |||
| This will fail if it's a network drive, but will still be true for | |||
| removable hard-disks. | |||
| */ | |||
| bool JUCE_CALLTYPE isOnHardDisk() const throw(); | |||
| bool isOnHardDisk() const throw(); | |||
| /** Returns true if this file is on a removable disk drive. | |||
| This might be a usb-drive, a CD-rom, or maybe a network drive. | |||
| */ | |||
| bool JUCE_CALLTYPE isOnRemovableDrive() const throw(); | |||
| bool isOnRemovableDrive() const throw(); | |||
| //============================================================================== | |||
| /** Launches the file as a process. | |||
| @@ -692,7 +692,7 @@ public: | |||
| - if it's a folder, it will be opened in Explorer, Finder, or equivalent. | |||
| */ | |||
| bool JUCE_CALLTYPE startAsProcess (const String& parameters = String::empty) const throw(); | |||
| bool startAsProcess (const String& parameters = String::empty) const throw(); | |||
| //============================================================================== | |||
| /** A set of types of location that can be passed to the getSpecialLocation() method. | |||
| @@ -767,7 +767,7 @@ public: | |||
| @see SpecialLocationType | |||
| */ | |||
| static const File JUCE_CALLTYPE getSpecialLocation (const SpecialLocationType type); | |||
| static const File getSpecialLocation (const SpecialLocationType type); | |||
| //============================================================================== | |||
| /** Returns a temporary file in the system's temp directory. | |||
| @@ -776,7 +776,7 @@ public: | |||
| To get the temp folder, you can use getSpecialLocation (File::tempDirectory). | |||
| */ | |||
| static const File JUCE_CALLTYPE createTempFile (const String& fileNameEnding) throw(); | |||
| static const File createTempFile (const String& fileNameEnding) throw(); | |||
| //============================================================================== | |||
| @@ -784,7 +784,7 @@ public: | |||
| @see setAsCurrentWorkingDirectory | |||
| */ | |||
| static const File JUCE_CALLTYPE getCurrentWorkingDirectory() throw(); | |||
| static const File getCurrentWorkingDirectory() throw(); | |||
| /** Sets the current working directory to be this file. | |||
| @@ -793,7 +793,7 @@ public: | |||
| @returns true if the current directory has been changed. | |||
| @see getCurrentWorkingDirectory | |||
| */ | |||
| bool JUCE_CALLTYPE setAsCurrentWorkingDirectory() const throw(); | |||
| bool setAsCurrentWorkingDirectory() const throw(); | |||
| //============================================================================== | |||
| /** The system-specific file separator character. | |||
| @@ -819,7 +819,7 @@ public: | |||
| @see createLegalPathName | |||
| */ | |||
| static const String JUCE_CALLTYPE createLegalFileName (const String& fileNameToFix) throw(); | |||
| static const String createLegalFileName (const String& fileNameToFix) throw(); | |||
| /** Removes illegal characters from a pathname. | |||
| @@ -828,11 +828,11 @@ public: | |||
| @see createLegalFileName | |||
| */ | |||
| static const String JUCE_CALLTYPE createLegalPathName (const String& pathNameToFix) throw(); | |||
| static const String createLegalPathName (const String& pathNameToFix) throw(); | |||
| /** Indicates whether filenames are case-sensitive on the current operating system. | |||
| */ | |||
| static bool JUCE_CALLTYPE areFileNamesCaseSensitive(); | |||
| static bool areFileNamesCaseSensitive(); | |||
| //============================================================================== | |||
| juce_UseDebuggingNewOperator | |||
| @@ -844,7 +844,7 @@ private: | |||
| // internal way of contructing a file without checking the path | |||
| friend class DirectoryIterator; | |||
| File (const String&, int) throw(); | |||
| const String JUCE_CALLTYPE getPathUpToLastSlash() const throw(); | |||
| const String getPathUpToLastSlash() const throw(); | |||
| }; | |||
| #endif // __JUCE_FILE_JUCEHEADER__ | |||
| @@ -49,12 +49,12 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "juce_String.h" | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE CharacterFunctions::length (const char* const s) throw() | |||
| int CharacterFunctions::length (const char* const s) throw() | |||
| { | |||
| return (int) strlen (s); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::length (const juce_wchar* const s) throw() | |||
| int CharacterFunctions::length (const juce_wchar* const s) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| int n = 0; | |||
| @@ -67,12 +67,12 @@ int JUCE_CALLTYPE CharacterFunctions::length (const juce_wchar* const s) throw() | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::copy (char* dest, const char* src, const int maxChars) throw() | |||
| void CharacterFunctions::copy (char* dest, const char* src, const int maxChars) throw() | |||
| { | |||
| strncpy (dest, src, maxChars); | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::copy (juce_wchar* dest, const juce_wchar* src, int maxChars) throw() | |||
| void CharacterFunctions::copy (juce_wchar* dest, const juce_wchar* src, int maxChars) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| while (--maxChars >= 0 && *src != 0) | |||
| @@ -84,22 +84,22 @@ void JUCE_CALLTYPE CharacterFunctions::copy (juce_wchar* dest, const juce_wchar* | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::copy (juce_wchar* dest, const char* src, const int maxChars) throw() | |||
| void CharacterFunctions::copy (juce_wchar* dest, const char* src, const int maxChars) throw() | |||
| { | |||
| mbstowcs (dest, src, maxChars); | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::copy (char* dest, const juce_wchar* src, const int maxChars) throw() | |||
| void CharacterFunctions::copy (char* dest, const juce_wchar* src, const int maxChars) throw() | |||
| { | |||
| wcstombs (dest, src, maxChars); | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::append (char* dest, const char* src) throw() | |||
| void CharacterFunctions::append (char* dest, const char* src) throw() | |||
| { | |||
| strcat (dest, src); | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::append (juce_wchar* dest, const juce_wchar* src) throw() | |||
| void CharacterFunctions::append (juce_wchar* dest, const juce_wchar* src) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| while (*dest != 0) | |||
| @@ -114,12 +114,12 @@ void JUCE_CALLTYPE CharacterFunctions::append (juce_wchar* dest, const juce_wcha | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compare (const char* const s1, const char* const s2) throw() | |||
| int CharacterFunctions::compare (const char* const s1, const char* const s2) throw() | |||
| { | |||
| return strcmp (s1, s2); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compare (const juce_wchar* s1, const juce_wchar* s2) throw() | |||
| int CharacterFunctions::compare (const juce_wchar* s1, const juce_wchar* s2) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -146,14 +146,14 @@ int JUCE_CALLTYPE CharacterFunctions::compare (const juce_wchar* s1, const juce_ | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compare (const char* const s1, const char* const s2, const int maxChars) throw() | |||
| int CharacterFunctions::compare (const char* const s1, const char* const s2, const int maxChars) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| return strncmp (s1, s2, maxChars); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compare (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw() | |||
| int CharacterFunctions::compare (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -175,7 +175,7 @@ int JUCE_CALLTYPE CharacterFunctions::compare (const juce_wchar* s1, const juce_ | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const char* const s1, const char* const s2) throw() | |||
| int CharacterFunctions::compareIgnoreCase (const char* const s1, const char* const s2) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -186,7 +186,7 @@ int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const char* const s1, c | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2) throw() | |||
| int CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -213,7 +213,7 @@ int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, c | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const char* const s1, const char* const s2, const int maxChars) throw() | |||
| int CharacterFunctions::compareIgnoreCase (const char* const s1, const char* const s2, const int maxChars) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -224,7 +224,7 @@ int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const char* const s1, c | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw() | |||
| int CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw() | |||
| { | |||
| jassert (s1 != 0 && s2 != 0); | |||
| @@ -251,12 +251,12 @@ int JUCE_CALLTYPE CharacterFunctions::compareIgnoreCase (const juce_wchar* s1, c | |||
| #endif | |||
| } | |||
| const char* JUCE_CALLTYPE CharacterFunctions::find (const char* const haystack, const char* const needle) throw() | |||
| const char* CharacterFunctions::find (const char* const haystack, const char* const needle) throw() | |||
| { | |||
| return strstr (haystack, needle); | |||
| } | |||
| const juce_wchar* JUCE_CALLTYPE CharacterFunctions::find (const juce_wchar* haystack, const juce_wchar* const needle) throw() | |||
| const juce_wchar* CharacterFunctions::find (const juce_wchar* haystack, const juce_wchar* const needle) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| while (*haystack != 0) | |||
| @@ -285,7 +285,7 @@ const juce_wchar* JUCE_CALLTYPE CharacterFunctions::find (const juce_wchar* hays | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::indexOfChar (const char* const haystack, const char needle, const bool ignoreCase) throw() | |||
| int CharacterFunctions::indexOfChar (const char* const haystack, const char needle, const bool ignoreCase) throw() | |||
| { | |||
| if (haystack != 0) | |||
| { | |||
| @@ -324,7 +324,7 @@ int JUCE_CALLTYPE CharacterFunctions::indexOfChar (const char* const haystack, c | |||
| return -1; | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::indexOfChar (const juce_wchar* const haystack, const juce_wchar needle, const bool ignoreCase) throw() | |||
| int CharacterFunctions::indexOfChar (const juce_wchar* const haystack, const juce_wchar needle, const bool ignoreCase) throw() | |||
| { | |||
| if (haystack != 0) | |||
| { | |||
| @@ -363,7 +363,7 @@ int JUCE_CALLTYPE CharacterFunctions::indexOfChar (const juce_wchar* const hayst | |||
| return -1; | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::indexOfCharFast (const char* const haystack, const char needle) throw() | |||
| int CharacterFunctions::indexOfCharFast (const char* const haystack, const char needle) throw() | |||
| { | |||
| jassert (haystack != 0); | |||
| @@ -379,7 +379,7 @@ int JUCE_CALLTYPE CharacterFunctions::indexOfCharFast (const char* const haystac | |||
| return -1; | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::indexOfCharFast (const juce_wchar* const haystack, const juce_wchar needle) throw() | |||
| int CharacterFunctions::indexOfCharFast (const juce_wchar* const haystack, const juce_wchar needle) throw() | |||
| { | |||
| jassert (haystack != 0); | |||
| @@ -395,12 +395,12 @@ int JUCE_CALLTYPE CharacterFunctions::indexOfCharFast (const juce_wchar* const h | |||
| return -1; | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::getIntialSectionContainingOnly (const char* const text, const char* const allowedChars) throw() | |||
| int CharacterFunctions::getIntialSectionContainingOnly (const char* const text, const char* const allowedChars) throw() | |||
| { | |||
| return allowedChars == 0 ? 0 : (int) strspn (text, allowedChars); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::getIntialSectionContainingOnly (const juce_wchar* const text, const juce_wchar* const allowedChars) throw() | |||
| int CharacterFunctions::getIntialSectionContainingOnly (const juce_wchar* const text, const juce_wchar* const allowedChars) throw() | |||
| { | |||
| if (allowedChars == 0) | |||
| return 0; | |||
| @@ -418,12 +418,12 @@ int JUCE_CALLTYPE CharacterFunctions::getIntialSectionContainingOnly (const juce | |||
| return i; | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::ftime (char* const dest, const int maxChars, const char* const format, const struct tm* const tm) throw() | |||
| int CharacterFunctions::ftime (char* const dest, const int maxChars, const char* const format, const struct tm* const tm) throw() | |||
| { | |||
| return (int) strftime (dest, maxChars, format, tm); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::ftime (juce_wchar* const dest, const int maxChars, const juce_wchar* const format, const struct tm* const tm) throw() | |||
| int CharacterFunctions::ftime (juce_wchar* const dest, const int maxChars, const juce_wchar* const format, const struct tm* const tm) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| const String formatTemp (format); | |||
| @@ -437,12 +437,12 @@ int JUCE_CALLTYPE CharacterFunctions::ftime (juce_wchar* const dest, const int m | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::getIntValue (const char* const s) throw() | |||
| int CharacterFunctions::getIntValue (const char* const s) throw() | |||
| { | |||
| return atoi (s); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::getIntValue (const juce_wchar* s) throw() | |||
| int CharacterFunctions::getIntValue (const juce_wchar* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| return _wtoi (s); | |||
| @@ -470,7 +470,7 @@ int JUCE_CALLTYPE CharacterFunctions::getIntValue (const juce_wchar* s) throw() | |||
| #endif | |||
| } | |||
| int64 JUCE_CALLTYPE CharacterFunctions::getInt64Value (const char* s) throw() | |||
| int64 CharacterFunctions::getInt64Value (const char* s) throw() | |||
| { | |||
| #ifdef JUCE_LINUX | |||
| return atoll (s); | |||
| @@ -500,7 +500,7 @@ int64 JUCE_CALLTYPE CharacterFunctions::getInt64Value (const char* s) throw() | |||
| #endif | |||
| } | |||
| int64 JUCE_CALLTYPE CharacterFunctions::getInt64Value (const juce_wchar* s) throw() | |||
| int64 CharacterFunctions::getInt64Value (const juce_wchar* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| return _wtoi64 (s); | |||
| @@ -528,12 +528,12 @@ int64 JUCE_CALLTYPE CharacterFunctions::getInt64Value (const juce_wchar* s) thro | |||
| #endif | |||
| } | |||
| double JUCE_CALLTYPE CharacterFunctions::getDoubleValue (const char* const s) throw() | |||
| double CharacterFunctions::getDoubleValue (const char* const s) throw() | |||
| { | |||
| return atof (s); | |||
| } | |||
| double JUCE_CALLTYPE CharacterFunctions::getDoubleValue (const juce_wchar* const s) throw() | |||
| double CharacterFunctions::getDoubleValue (const juce_wchar* const s) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| String temp (s); | |||
| @@ -545,12 +545,12 @@ double JUCE_CALLTYPE CharacterFunctions::getDoubleValue (const juce_wchar* const | |||
| } | |||
| //============================================================================== | |||
| char JUCE_CALLTYPE CharacterFunctions::toUpperCase (const char character) throw() | |||
| char CharacterFunctions::toUpperCase (const char character) throw() | |||
| { | |||
| return (char) toupper (character); | |||
| } | |||
| juce_wchar JUCE_CALLTYPE CharacterFunctions::toUpperCase (const juce_wchar character) throw() | |||
| juce_wchar CharacterFunctions::toUpperCase (const juce_wchar character) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| return toupper ((char) character); | |||
| @@ -559,7 +559,7 @@ juce_wchar JUCE_CALLTYPE CharacterFunctions::toUpperCase (const juce_wchar chara | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::toUpperCase (char* s) throw() | |||
| void CharacterFunctions::toUpperCase (char* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| strupr (s); | |||
| @@ -572,7 +572,7 @@ void JUCE_CALLTYPE CharacterFunctions::toUpperCase (char* s) throw() | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::toUpperCase (juce_wchar* s) throw() | |||
| void CharacterFunctions::toUpperCase (juce_wchar* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| _wcsupr (s); | |||
| @@ -585,12 +585,12 @@ void JUCE_CALLTYPE CharacterFunctions::toUpperCase (juce_wchar* s) throw() | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isUpperCase (const char character) throw() | |||
| bool CharacterFunctions::isUpperCase (const char character) throw() | |||
| { | |||
| return isupper (character) != 0; | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isUpperCase (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isUpperCase (const juce_wchar character) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| return iswupper (character) != 0; | |||
| @@ -600,12 +600,12 @@ bool JUCE_CALLTYPE CharacterFunctions::isUpperCase (const juce_wchar character) | |||
| } | |||
| //============================================================================== | |||
| char JUCE_CALLTYPE CharacterFunctions::toLowerCase (const char character) throw() | |||
| char CharacterFunctions::toLowerCase (const char character) throw() | |||
| { | |||
| return (char) tolower (character); | |||
| } | |||
| juce_wchar JUCE_CALLTYPE CharacterFunctions::toLowerCase (const juce_wchar character) throw() | |||
| juce_wchar CharacterFunctions::toLowerCase (const juce_wchar character) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| return tolower ((char) character); | |||
| @@ -614,7 +614,7 @@ juce_wchar JUCE_CALLTYPE CharacterFunctions::toLowerCase (const juce_wchar chara | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::toLowerCase (char* s) throw() | |||
| void CharacterFunctions::toLowerCase (char* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| strlwr (s); | |||
| @@ -627,7 +627,7 @@ void JUCE_CALLTYPE CharacterFunctions::toLowerCase (char* s) throw() | |||
| #endif | |||
| } | |||
| void JUCE_CALLTYPE CharacterFunctions::toLowerCase (juce_wchar* s) throw() | |||
| void CharacterFunctions::toLowerCase (juce_wchar* s) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| _wcslwr (s); | |||
| @@ -640,12 +640,12 @@ void JUCE_CALLTYPE CharacterFunctions::toLowerCase (juce_wchar* s) throw() | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLowerCase (const char character) throw() | |||
| bool CharacterFunctions::isLowerCase (const char character) throw() | |||
| { | |||
| return islower (character) != 0; | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLowerCase (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isLowerCase (const juce_wchar character) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| return iswlower (character) != 0; | |||
| @@ -655,12 +655,12 @@ bool JUCE_CALLTYPE CharacterFunctions::isLowerCase (const juce_wchar character) | |||
| } | |||
| //============================================================================== | |||
| bool JUCE_CALLTYPE CharacterFunctions::isWhitespace (const char character) throw() | |||
| bool CharacterFunctions::isWhitespace (const char character) throw() | |||
| { | |||
| return character == T(' ') || (character <= 13 && character >= 9); | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isWhitespace (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isWhitespace (const juce_wchar character) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| return isWhitespace ((char) character); | |||
| @@ -669,23 +669,23 @@ bool JUCE_CALLTYPE CharacterFunctions::isWhitespace (const juce_wchar character) | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isDigit (const char character) throw() | |||
| bool CharacterFunctions::isDigit (const char character) throw() | |||
| { | |||
| return (character >= '0' && character <= '9'); | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isDigit (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isDigit (const juce_wchar character) throw() | |||
| { | |||
| return isdigit (character) != 0; | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLetter (const char character) throw() | |||
| bool CharacterFunctions::isLetter (const char character) throw() | |||
| { | |||
| return (character >= 'a' && character <= 'z') | |||
| || (character >= 'A' && character <= 'Z'); | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLetter (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isLetter (const juce_wchar character) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| return isLetter ((char) character); | |||
| @@ -694,14 +694,14 @@ bool JUCE_CALLTYPE CharacterFunctions::isLetter (const juce_wchar character) thr | |||
| #endif | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLetterOrDigit (const char character) throw() | |||
| bool CharacterFunctions::isLetterOrDigit (const char character) throw() | |||
| { | |||
| return (character >= 'a' && character <= 'z') | |||
| || (character >= 'A' && character <= 'Z') | |||
| || (character >= '0' && character <= '9'); | |||
| } | |||
| bool JUCE_CALLTYPE CharacterFunctions::isLetterOrDigit (const juce_wchar character) throw() | |||
| bool CharacterFunctions::isLetterOrDigit (const juce_wchar character) throw() | |||
| { | |||
| #ifdef MACOS_10_2_OR_EARLIER | |||
| return isLetterOrDigit ((char) character); | |||
| @@ -710,7 +710,7 @@ bool JUCE_CALLTYPE CharacterFunctions::isLetterOrDigit (const juce_wchar charact | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::getHexDigitValue (const tchar digit) throw() | |||
| int CharacterFunctions::getHexDigitValue (const tchar digit) throw() | |||
| { | |||
| if (digit >= T('0') && digit <= T('9')) | |||
| return digit - T('0'); | |||
| @@ -723,21 +723,21 @@ int JUCE_CALLTYPE CharacterFunctions::getHexDigitValue (const tchar digit) throw | |||
| } | |||
| //============================================================================== | |||
| int JUCE_CALLTYPE CharacterFunctions::printf (char* const dest, const int maxLength, const char* const format, ...) throw() | |||
| int CharacterFunctions::printf (char* const dest, const int maxLength, const char* const format, ...) throw() | |||
| { | |||
| va_list list; | |||
| va_start (list, format); | |||
| return vprintf (dest, maxLength, format, list); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::printf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, ...) throw() | |||
| int CharacterFunctions::printf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, ...) throw() | |||
| { | |||
| va_list list; | |||
| va_start (list, format); | |||
| return vprintf (dest, maxLength, format, list); | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::vprintf (char* const dest, const int maxLength, const char* const format, va_list& args) throw() | |||
| int CharacterFunctions::vprintf (char* const dest, const int maxLength, const char* const format, va_list& args) throw() | |||
| { | |||
| #if JUCE_WIN32 | |||
| return (int) _vsnprintf (dest, maxLength, format, args); | |||
| @@ -746,7 +746,7 @@ int JUCE_CALLTYPE CharacterFunctions::vprintf (char* const dest, const int maxLe | |||
| #endif | |||
| } | |||
| int JUCE_CALLTYPE CharacterFunctions::vprintf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, va_list& args) throw() | |||
| int CharacterFunctions::vprintf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, va_list& args) throw() | |||
| { | |||
| #ifdef MACOS_10_3_OR_EARLIER | |||
| const String formatTemp (format); | |||
| @@ -88,94 +88,94 @@ | |||
| class JUCE_API CharacterFunctions | |||
| { | |||
| public: | |||
| static int JUCE_CALLTYPE length (const char* const s) throw(); | |||
| static int JUCE_CALLTYPE length (const juce_wchar* const s) throw(); | |||
| static int length (const char* const s) throw(); | |||
| static int length (const juce_wchar* const s) throw(); | |||
| static void JUCE_CALLTYPE copy (char* dest, const char* src, const int maxChars) throw(); | |||
| static void JUCE_CALLTYPE copy (juce_wchar* dest, const juce_wchar* src, const int maxChars) throw(); | |||
| static void copy (char* dest, const char* src, const int maxChars) throw(); | |||
| static void copy (juce_wchar* dest, const juce_wchar* src, const int maxChars) throw(); | |||
| static void JUCE_CALLTYPE copy (juce_wchar* dest, const char* src, const int maxChars) throw(); | |||
| static void JUCE_CALLTYPE copy (char* dest, const juce_wchar* src, const int maxChars) throw(); | |||
| static void copy (juce_wchar* dest, const char* src, const int maxChars) throw(); | |||
| static void copy (char* dest, const juce_wchar* src, const int maxChars) throw(); | |||
| static void JUCE_CALLTYPE append (char* dest, const char* src) throw(); | |||
| static void JUCE_CALLTYPE append (juce_wchar* dest, const juce_wchar* src) throw(); | |||
| static void append (char* dest, const char* src) throw(); | |||
| static void append (juce_wchar* dest, const juce_wchar* src) throw(); | |||
| static int JUCE_CALLTYPE compare (const char* const s1, const char* const s2) throw(); | |||
| static int JUCE_CALLTYPE compare (const juce_wchar* s1, const juce_wchar* s2) throw(); | |||
| static int compare (const char* const s1, const char* const s2) throw(); | |||
| static int compare (const juce_wchar* s1, const juce_wchar* s2) throw(); | |||
| static int JUCE_CALLTYPE compare (const char* const s1, const char* const s2, const int maxChars) throw(); | |||
| static int JUCE_CALLTYPE compare (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw(); | |||
| static int compare (const char* const s1, const char* const s2, const int maxChars) throw(); | |||
| static int compare (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw(); | |||
| static int JUCE_CALLTYPE compareIgnoreCase (const char* const s1, const char* const s2) throw(); | |||
| static int JUCE_CALLTYPE compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2) throw(); | |||
| static int compareIgnoreCase (const char* const s1, const char* const s2) throw(); | |||
| static int compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2) throw(); | |||
| static int JUCE_CALLTYPE compareIgnoreCase (const char* const s1, const char* const s2, const int maxChars) throw(); | |||
| static int JUCE_CALLTYPE compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw(); | |||
| static int compareIgnoreCase (const char* const s1, const char* const s2, const int maxChars) throw(); | |||
| static int compareIgnoreCase (const juce_wchar* s1, const juce_wchar* s2, int maxChars) throw(); | |||
| static const char* JUCE_CALLTYPE find (const char* const haystack, const char* const needle) throw(); | |||
| static const juce_wchar* JUCE_CALLTYPE find (const juce_wchar* haystack, const juce_wchar* const needle) throw(); | |||
| static const char* find (const char* const haystack, const char* const needle) throw(); | |||
| static const juce_wchar* find (const juce_wchar* haystack, const juce_wchar* const needle) throw(); | |||
| static int JUCE_CALLTYPE indexOfChar (const char* const haystack, const char needle, const bool ignoreCase) throw(); | |||
| static int JUCE_CALLTYPE indexOfChar (const juce_wchar* const haystack, const juce_wchar needle, const bool ignoreCase) throw(); | |||
| static int indexOfChar (const char* const haystack, const char needle, const bool ignoreCase) throw(); | |||
| static int indexOfChar (const juce_wchar* const haystack, const juce_wchar needle, const bool ignoreCase) throw(); | |||
| static int JUCE_CALLTYPE indexOfCharFast (const char* const haystack, const char needle) throw(); | |||
| static int JUCE_CALLTYPE indexOfCharFast (const juce_wchar* const haystack, const juce_wchar needle) throw(); | |||
| static int indexOfCharFast (const char* const haystack, const char needle) throw(); | |||
| static int indexOfCharFast (const juce_wchar* const haystack, const juce_wchar needle) throw(); | |||
| static int JUCE_CALLTYPE getIntialSectionContainingOnly (const char* const text, const char* const allowedChars) throw(); | |||
| static int JUCE_CALLTYPE getIntialSectionContainingOnly (const juce_wchar* const text, const juce_wchar* const allowedChars) throw(); | |||
| static int getIntialSectionContainingOnly (const char* const text, const char* const allowedChars) throw(); | |||
| static int getIntialSectionContainingOnly (const juce_wchar* const text, const juce_wchar* const allowedChars) throw(); | |||
| static int JUCE_CALLTYPE ftime (char* const dest, const int maxChars, const char* const format, const struct tm* const tm) throw(); | |||
| static int JUCE_CALLTYPE ftime (juce_wchar* const dest, const int maxChars, const juce_wchar* const format, const struct tm* const tm) throw(); | |||
| static int ftime (char* const dest, const int maxChars, const char* const format, const struct tm* const tm) throw(); | |||
| static int ftime (juce_wchar* const dest, const int maxChars, const juce_wchar* const format, const struct tm* const tm) throw(); | |||
| static int JUCE_CALLTYPE getIntValue (const char* const s) throw(); | |||
| static int JUCE_CALLTYPE getIntValue (const juce_wchar* s) throw(); | |||
| static int getIntValue (const char* const s) throw(); | |||
| static int getIntValue (const juce_wchar* s) throw(); | |||
| static int64 JUCE_CALLTYPE getInt64Value (const char* s) throw(); | |||
| static int64 JUCE_CALLTYPE getInt64Value (const juce_wchar* s) throw(); | |||
| static int64 getInt64Value (const char* s) throw(); | |||
| static int64 getInt64Value (const juce_wchar* s) throw(); | |||
| static double JUCE_CALLTYPE getDoubleValue (const char* const s) throw(); | |||
| static double JUCE_CALLTYPE getDoubleValue (const juce_wchar* const s) throw(); | |||
| static double getDoubleValue (const char* const s) throw(); | |||
| static double getDoubleValue (const juce_wchar* const s) throw(); | |||
| //============================================================================== | |||
| static char JUCE_CALLTYPE toUpperCase (const char character) throw(); | |||
| static juce_wchar JUCE_CALLTYPE toUpperCase (const juce_wchar character) throw(); | |||
| static void JUCE_CALLTYPE toUpperCase (char* s) throw(); | |||
| static char toUpperCase (const char character) throw(); | |||
| static juce_wchar toUpperCase (const juce_wchar character) throw(); | |||
| static void toUpperCase (char* s) throw(); | |||
| static void JUCE_CALLTYPE toUpperCase (juce_wchar* s) throw(); | |||
| static bool JUCE_CALLTYPE isUpperCase (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isUpperCase (const juce_wchar character) throw(); | |||
| static void toUpperCase (juce_wchar* s) throw(); | |||
| static bool isUpperCase (const char character) throw(); | |||
| static bool isUpperCase (const juce_wchar character) throw(); | |||
| static char JUCE_CALLTYPE toLowerCase (const char character) throw(); | |||
| static juce_wchar JUCE_CALLTYPE toLowerCase (const juce_wchar character) throw(); | |||
| static void JUCE_CALLTYPE toLowerCase (char* s) throw(); | |||
| static void JUCE_CALLTYPE toLowerCase (juce_wchar* s) throw(); | |||
| static bool JUCE_CALLTYPE isLowerCase (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isLowerCase (const juce_wchar character) throw(); | |||
| static char toLowerCase (const char character) throw(); | |||
| static juce_wchar toLowerCase (const juce_wchar character) throw(); | |||
| static void toLowerCase (char* s) throw(); | |||
| static void toLowerCase (juce_wchar* s) throw(); | |||
| static bool isLowerCase (const char character) throw(); | |||
| static bool isLowerCase (const juce_wchar character) throw(); | |||
| //============================================================================== | |||
| static bool JUCE_CALLTYPE isWhitespace (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isWhitespace (const juce_wchar character) throw(); | |||
| static bool isWhitespace (const char character) throw(); | |||
| static bool isWhitespace (const juce_wchar character) throw(); | |||
| static bool JUCE_CALLTYPE isDigit (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isDigit (const juce_wchar character) throw(); | |||
| static bool isDigit (const char character) throw(); | |||
| static bool isDigit (const juce_wchar character) throw(); | |||
| static bool JUCE_CALLTYPE isLetter (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isLetter (const juce_wchar character) throw(); | |||
| static bool isLetter (const char character) throw(); | |||
| static bool isLetter (const juce_wchar character) throw(); | |||
| static bool JUCE_CALLTYPE isLetterOrDigit (const char character) throw(); | |||
| static bool JUCE_CALLTYPE isLetterOrDigit (const juce_wchar character) throw(); | |||
| static bool isLetterOrDigit (const char character) throw(); | |||
| static bool isLetterOrDigit (const juce_wchar character) throw(); | |||
| /** Returns 0 to 16 for '0' to 'F", or -1 for characters that aren't a legel | |||
| hex digit. | |||
| */ | |||
| static int JUCE_CALLTYPE getHexDigitValue (const tchar digit) throw(); | |||
| static int getHexDigitValue (const tchar digit) throw(); | |||
| //============================================================================== | |||
| static int JUCE_CALLTYPE printf (char* const dest, const int maxLength, const char* const format, ...) throw(); | |||
| static int JUCE_CALLTYPE printf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, ...) throw(); | |||
| static int printf (char* const dest, const int maxLength, const char* const format, ...) throw(); | |||
| static int printf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, ...) throw(); | |||
| static int JUCE_CALLTYPE vprintf (char* const dest, const int maxLength, const char* const format, va_list& args) throw(); | |||
| static int JUCE_CALLTYPE vprintf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, va_list& args) throw(); | |||
| static int vprintf (char* const dest, const int maxLength, const char* const format, va_list& args) throw(); | |||
| static int vprintf (juce_wchar* const dest, const int maxLength, const juce_wchar* const format, va_list& args) throw(); | |||
| }; | |||
| #endif // __JUCE_CHARACTERFUNCTIONS_JUCEHEADER__ | |||
| @@ -295,7 +295,7 @@ void StringArray::trim() throw() | |||
| class InternalStringArrayComparator | |||
| { | |||
| public: | |||
| static int JUCE_CALLTYPE compareElements (void* const first, void* const second) throw() | |||
| static int compareElements (void* const first, void* const second) throw() | |||
| { | |||
| return ((const String*) first)->compare (*(const String*) second); | |||
| } | |||
| @@ -304,7 +304,7 @@ public: | |||
| class InsensitiveInternalStringArrayComparator | |||
| { | |||
| public: | |||
| static int JUCE_CALLTYPE compareElements (void* const first, void* const second) throw() | |||
| static int compareElements (void* const first, void* const second) throw() | |||
| { | |||
| return ((const String*) first)->compareIgnoreCase (*(const String*) second); | |||
| } | |||
| @@ -46,14 +46,14 @@ public: | |||
| /** | |||
| Creates a CriticalSection object | |||
| */ | |||
| JUCE_CALLTYPE CriticalSection() throw(); | |||
| CriticalSection() throw(); | |||
| /** Destroys a CriticalSection object. | |||
| If the critical section is deleted whilst locked, its subsequent behaviour | |||
| is unpredictable. | |||
| */ | |||
| JUCE_CALLTYPE ~CriticalSection() throw(); | |||
| ~CriticalSection() throw(); | |||
| //============================================================================== | |||
| /** Locks this critical section. | |||
| @@ -65,7 +65,7 @@ public: | |||
| @see exit, ScopedLock | |||
| */ | |||
| void JUCE_CALLTYPE enter() const throw(); | |||
| void enter() const throw(); | |||
| /** Attempts to lock this critical section without blocking. | |||
| @@ -75,7 +75,7 @@ public: | |||
| @returns false if the lock is currently held by another thread, true otherwise. | |||
| @see enter | |||
| */ | |||
| bool JUCE_CALLTYPE tryEnter() const throw(); | |||
| bool tryEnter() const throw(); | |||
| /** Releases the lock. | |||
| @@ -87,7 +87,7 @@ public: | |||
| @see enter, ScopedLock | |||
| */ | |||
| void JUCE_CALLTYPE exit() const throw(); | |||
| void exit() const throw(); | |||
| //============================================================================== | |||
| @@ -72,7 +72,7 @@ public: | |||
| otherwise there are no guarantees what will happen! Best just to use it | |||
| as a local stack object, rather than creating one with the new() operator. | |||
| */ | |||
| inline JUCE_CALLTYPE ScopedReadLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterRead(); } | |||
| inline ScopedReadLock (const ReadWriteLock& lock) throw() : lock_ (lock) { lock.enterRead(); } | |||
| /** Destructor. | |||
| @@ -81,7 +81,7 @@ public: | |||
| Make sure this object is created and deleted by the same thread, | |||
| otherwise there are no guarantees what will happen! | |||
| */ | |||
| inline JUCE_CALLTYPE ~ScopedReadLock() throw() { lock_.exitRead(); } | |||
| inline ~ScopedReadLock() throw() { lock_.exitRead(); } | |||
| private: | |||