@@ -170,10 +170,10 @@ public: | |||
One thing to be careful about is that the parent component must be able to cope | |||
with this unknown component type being added to it. | |||
*/ | |||
void fadeOutComponent (const int lengthOfFadeOutInMilliseconds, | |||
const int deltaXToMove = 0, | |||
const int deltaYToMove = 0, | |||
const float scaleFactorAtEnd = 1.0f); | |||
void fadeOutComponent (int lengthOfFadeOutInMilliseconds, | |||
int deltaXToMove = 0, | |||
int deltaYToMove = 0, | |||
float scaleFactorAtEnd = 1.0f); | |||
//============================================================================== | |||
/** Makes this component appear as a window on the desktop. | |||
@@ -257,7 +257,7 @@ public: | |||
to the component (see grabKeyboardFocus() for more details) | |||
@see toBack, toBehind, setAlwaysOnTop | |||
*/ | |||
void toFront (const bool shouldAlsoGainFocus); | |||
void toFront (bool shouldAlsoGainFocus); | |||
/** Changes this component's z-order to be at the back of all its siblings. | |||
@@ -272,13 +272,13 @@ public: | |||
@see toFront, toBack | |||
*/ | |||
void toBehind (Component* const other); | |||
void toBehind (Component* other); | |||
/** Sets whether the component should always be kept at the front of its siblings. | |||
@see isAlwaysOnTop | |||
*/ | |||
void setAlwaysOnTop (const bool shouldStayOnTop); | |||
void setAlwaysOnTop (bool shouldStayOnTop); | |||
/** Returns true if this component is set to always stay in front of its siblings. | |||
@@ -339,7 +339,7 @@ public: | |||
that may be overlapping the component. | |||
*/ | |||
void getVisibleArea (RectangleList& result, | |||
const bool includeSiblings) const; | |||
bool includeSiblings) const; | |||
//============================================================================== | |||
/** Returns this component's x co-ordinate relative the the screen's top-left origin. | |||
@@ -379,7 +379,7 @@ public: | |||
@see relativePositionToGlobal, globalPositionToRelative | |||
*/ | |||
const Point<int> relativePositionToOtherComponent (const Component* const targetComponent, | |||
const Point<int> relativePositionToOtherComponent (const Component* targetComponent, | |||
const Point<int>& positionRelativeToThis) const; | |||
//============================================================================== | |||
@@ -392,7 +392,7 @@ public: | |||
@see setBounds, ComponentListener::componentMovedOrResized | |||
*/ | |||
void setTopLeftPosition (const int x, const int y); | |||
void setTopLeftPosition (int x, int y); | |||
/** Moves the component to a new position. | |||
@@ -401,13 +401,13 @@ public: | |||
If the component actually moves, this method will make a synchronous call to moved(). | |||
*/ | |||
void setTopRightPosition (const int x, const int y); | |||
void setTopRightPosition (int x, int y); | |||
/** Changes the size of the component. | |||
A synchronous call to resized() will be occur if the size actually changes. | |||
*/ | |||
void setSize (const int newWidth, const int newHeight); | |||
void setSize (int newWidth, int newHeight); | |||
/** Changes the component's position and size. | |||
@@ -434,8 +434,8 @@ public: | |||
width and height of the parent, with its top-left position 20% of | |||
the way across and down the parent. | |||
*/ | |||
void setBoundsRelative (const float proportionalX, const float proportionalY, | |||
const float proportionalWidth, const float proportionalHeight); | |||
void setBoundsRelative (float proportionalX, float proportionalY, | |||
float proportionalWidth, float proportionalHeight); | |||
/** Changes the component's position and size based on the amount of space to leave around it. | |||
@@ -458,14 +458,14 @@ public: | |||
*/ | |||
void setBoundsToFit (int x, int y, int width, int height, | |||
const Justification& justification, | |||
const bool onlyReduceInSize); | |||
bool onlyReduceInSize); | |||
/** Changes the position of the component's centre. | |||
Leaves the component's size unchanged, but sets the position of its centre | |||
relative to its parent's top-left. | |||
*/ | |||
void setCentrePosition (const int x, const int y); | |||
void setCentrePosition (int x, int y); | |||
/** Changes the position of the component's centre. | |||
@@ -473,27 +473,27 @@ public: | |||
parent's size. E.g. setCentreRelative (0.5f, 0.5f) would place it centrally in | |||
its parent. | |||
*/ | |||
void setCentreRelative (const float x, const float y); | |||
void setCentreRelative (float x, float y); | |||
/** Changes the component's size and centres it within its parent. | |||
After changing the size, the component will be moved so that it's | |||
centred within its parent. | |||
*/ | |||
void centreWithSize (const int width, const int height); | |||
void centreWithSize (int width, int height); | |||
//============================================================================== | |||
/** Returns a proportion of the component's width. | |||
This is a handy equivalent of (getWidth() * proportion). | |||
*/ | |||
int proportionOfWidth (const float proportion) const throw(); | |||
int proportionOfWidth (float proportion) const throw(); | |||
/** Returns a proportion of the component's height. | |||
This is a handy equivalent of (getHeight() * proportion). | |||
*/ | |||
int proportionOfHeight (const float proportion) const throw(); | |||
int proportionOfHeight (float proportion) const throw(); | |||
/** Returns the width of the component's parent. | |||
@@ -533,7 +533,7 @@ public: | |||
@see getNumChildComponents, getIndexOfChildComponent | |||
*/ | |||
Component* getChildComponent (const int index) const throw(); | |||
Component* getChildComponent (int index) const throw(); | |||
/** Returns the index of this component in the list of child components. | |||
@@ -544,7 +544,7 @@ public: | |||
@see getNumChildComponents, getChildComponent, addChildComponent, toFront, toBack, toBehind | |||
*/ | |||
int getIndexOfChildComponent (const Component* const child) const throw(); | |||
int getIndexOfChildComponent (const Component* child) const throw(); | |||
/** Adds a child component to this one. | |||
@@ -556,16 +556,14 @@ public: | |||
@see removeChildComponent, addAndMakeVisible, getChild, | |||
ComponentListener::componentChildrenChanged | |||
*/ | |||
void addChildComponent (Component* const child, | |||
int zOrder = -1); | |||
void addChildComponent (Component* child, int zOrder = -1); | |||
/** Adds a child component to this one, and also makes the child visible if it isn't. | |||
Quite a useful function, this is just the same as calling addChildComponent() | |||
followed by setVisible (true) on the child. | |||
*/ | |||
void addAndMakeVisible (Component* const child, | |||
int zOrder = -1); | |||
void addAndMakeVisible (Component* child, int zOrder = -1); | |||
/** Removes one of this component's child-components. | |||
@@ -576,7 +574,7 @@ public: | |||
@see addChildComponent, ComponentListener::componentChildrenChanged | |||
*/ | |||
void removeChildComponent (Component* const childToRemove); | |||
void removeChildComponent (Component* childToRemove); | |||
/** Removes one of this component's child-components by index. | |||
@@ -587,7 +585,7 @@ public: | |||
@see addChildComponent, ComponentListener::componentChildrenChanged | |||
*/ | |||
Component* removeChildComponent (const int childIndexToRemove); | |||
Component* removeChildComponent (int childIndexToRemove); | |||
/** Removes all this component's children. | |||
@@ -723,8 +721,8 @@ public: | |||
be clicked on | |||
@see hitTest, getInterceptsMouseClicks | |||
*/ | |||
void setInterceptsMouseClicks (const bool allowClicksOnThisComponent, | |||
const bool allowClicksOnChildComponents) throw(); | |||
void setInterceptsMouseClicks (bool allowClicksOnThisComponent, | |||
bool allowClicksOnChildComponents) throw(); | |||
/** Retrieves the current state of the mouse-click interception flags. | |||
@@ -762,8 +760,7 @@ public: | |||
@see contains, getComponentAt | |||
*/ | |||
bool reallyContains (int x, int y, | |||
const bool returnTrueIfWithinAChild); | |||
bool reallyContains (int x, int y, bool returnTrueIfWithinAChild); | |||
/** Returns the component at a certain point within this one. | |||
@@ -775,7 +772,7 @@ public: | |||
instead call getComponentAt on the top-level parent of this component. | |||
@see hitTest, contains, reallyContains | |||
*/ | |||
Component* getComponentAt (const int x, const int y); | |||
Component* getComponentAt (int x, int y); | |||
/** Returns the component at a certain point within this one. | |||
@@ -820,8 +817,7 @@ public: | |||
@see repaint() | |||
*/ | |||
void repaint (const int x, const int y, | |||
const int width, const int height); | |||
void repaint (int x, int y, int width, int height); | |||
//============================================================================== | |||
/** Makes the component use an internal buffer to optimise its redrawing. | |||
@@ -841,7 +837,7 @@ public: | |||
@see repaint, paint, createComponentSnapshot | |||
*/ | |||
void setBufferedToImage (const bool shouldBeBuffered); | |||
void setBufferedToImage (bool shouldBeBuffered); | |||
/** Generates a snapshot of part of this component. | |||
@@ -861,7 +857,7 @@ public: | |||
@see paintEntireComponent | |||
*/ | |||
Image* createComponentSnapshot (const Rectangle<int>& areaToGrab, | |||
const bool clipImageToComponentBounds = true); | |||
bool clipImageToComponentBounds = true); | |||
/** Draws this component and all its subcomponents onto the specified graphics | |||
context. | |||
@@ -893,7 +889,7 @@ public: | |||
@see ImageEffectFilter, DropShadowEffect, GlowEffect | |||
*/ | |||
void setComponentEffect (ImageEffectFilter* const newEffect); | |||
void setComponentEffect (ImageEffectFilter* newEffect); | |||
/** Returns the current component effect. | |||
@@ -925,7 +921,7 @@ public: | |||
@see getLookAndFeel, lookAndFeelChanged | |||
*/ | |||
void setLookAndFeel (LookAndFeel* const newLookAndFeel); | |||
void setLookAndFeel (LookAndFeel* newLookAndFeel); | |||
/** Called to let the component react to a change in the look-and-feel setting. | |||
@@ -963,7 +959,7 @@ public: | |||
@see isOpaque, getVisibleArea | |||
*/ | |||
void setOpaque (const bool shouldBeOpaque); | |||
void setOpaque (bool shouldBeOpaque); | |||
/** Returns true if no parts of this component are transparent. | |||
@@ -985,7 +981,7 @@ public: | |||
@see setMouseClickGrabsKeyboardFocus | |||
*/ | |||
void setBroughtToFrontOnMouseClick (const bool shouldBeBroughtToFront) throw(); | |||
void setBroughtToFrontOnMouseClick (bool shouldBeBroughtToFront) throw(); | |||
/** Indicates whether the component should be brought to the front when clicked-on. | |||
@@ -1006,7 +1002,7 @@ public: | |||
@see grabKeyboardFocus, getWantsKeyboardFocus | |||
*/ | |||
void setWantsKeyboardFocus (const bool wantsFocus) throw(); | |||
void setWantsKeyboardFocus (bool wantsFocus) throw(); | |||
/** Returns true if the component is interested in getting keyboard focus. | |||
@@ -1064,7 +1060,7 @@ public: | |||
@see grabKeyboardFocus, setWantsKeyboardFocus, getCurrentlyFocusedComponent, | |||
focusGained, focusLost | |||
*/ | |||
bool hasKeyboardFocus (const bool trueIfChildIsFocused) const; | |||
bool hasKeyboardFocus (bool trueIfChildIsFocused) const; | |||
/** Returns the component that currently has the keyboard focus. | |||
@@ -1084,7 +1080,7 @@ public: | |||
move backwards | |||
@see grabKeyboardFocus, setFocusContainer, setWantsKeyboardFocus | |||
*/ | |||
void moveKeyboardFocusToSibling (const bool moveToNext); | |||
void moveKeyboardFocusToSibling (bool moveToNext); | |||
/** Creates a KeyboardFocusTraverser object to use to determine the logic by | |||
which focus should be passed from this component. | |||
@@ -1127,7 +1123,7 @@ public: | |||
@see getExplicitFocusOrder, moveKeyboardFocusToSibling | |||
*/ | |||
void setExplicitFocusOrder (const int newFocusOrderIndex); | |||
void setExplicitFocusOrder (int newFocusOrderIndex); | |||
/** Indicates whether this component is a parent for components that can have | |||
their focus traversed. | |||
@@ -1141,7 +1137,7 @@ public: | |||
@see isFocusContainer, createFocusTraverser, moveKeyboardFocusToSibling | |||
*/ | |||
void setFocusContainer (const bool shouldBeFocusContainer) throw(); | |||
void setFocusContainer (bool shouldBeFocusContainer) throw(); | |||
/** Returns true if this component has been marked as a focus container. | |||
@@ -1175,7 +1171,7 @@ public: | |||
@see isEnabled, enablementChanged | |||
*/ | |||
void setEnabled (const bool shouldBeEnabled); | |||
void setEnabled (bool shouldBeEnabled); | |||
/** Callback to indicate that this component has been enabled or disabled. | |||
@@ -1405,7 +1401,7 @@ public: | |||
@see mouseDrag | |||
*/ | |||
static void beginDragAutoRepeat (const int millisecondIntervalBetweenCallbacks); | |||
static void beginDragAutoRepeat (int millisecondIntervalBetweenCallbacks); | |||
/** Causes automatic repaints when the mouse enters or exits this component. | |||
@@ -1418,7 +1414,7 @@ public: | |||
@see mouseEnter, mouseExit, mouseDown, mouseUp | |||
*/ | |||
void setRepaintsOnMouseActivity (const bool shouldRepaint) throw(); | |||
void setRepaintsOnMouseActivity (bool shouldRepaint) throw(); | |||
/** Registers a listener to be told when mouse events occur in this component. | |||
@@ -1437,13 +1433,13 @@ public: | |||
told about events that this component handles. | |||
@see MouseListener, removeMouseListener | |||
*/ | |||
void addMouseListener (MouseListener* const newListener, | |||
const bool wantsEventsForAllNestedChildComponents); | |||
void addMouseListener (MouseListener* newListener, | |||
bool wantsEventsForAllNestedChildComponents); | |||
/** Deregisters a mouse listener. | |||
@see addMouseListener, MouseListener | |||
*/ | |||
void removeMouseListener (MouseListener* const listenerToRemove); | |||
void removeMouseListener (MouseListener* listenerToRemove); | |||
//============================================================================== | |||
/** Adds a listener that wants to hear about keypresses that this component receives. | |||
@@ -1456,13 +1452,13 @@ public: | |||
@see keyPressed, keyStateChanged, removeKeyListener | |||
*/ | |||
void addKeyListener (KeyListener* const newListener); | |||
void addKeyListener (KeyListener* newListener); | |||
/** Removes a previously-registered key listener. | |||
@see addKeyListener | |||
*/ | |||
void removeKeyListener (KeyListener* const listenerToRemove); | |||
void removeKeyListener (KeyListener* listenerToRemove); | |||
/** Called when a key is pressed. | |||
@@ -1504,7 +1500,7 @@ public: | |||
@see keyPressed, KeyPress, getCurrentlyFocusedComponent, addKeyListener | |||
*/ | |||
virtual bool keyStateChanged (const bool isKeyDown); | |||
virtual bool keyStateChanged (bool isKeyDown); | |||
/** Called when a modifier key is pressed or released. | |||
@@ -1672,13 +1668,13 @@ public: | |||
will be ignored. | |||
@see ComponentListener, removeComponentListener | |||
*/ | |||
void addComponentListener (ComponentListener* const newListener); | |||
void addComponentListener (ComponentListener* newListener); | |||
/** Removes a component listener. | |||
@see addComponentListener | |||
*/ | |||
void removeComponentListener (ComponentListener* const listenerToRemove); | |||
void removeComponentListener (ComponentListener* listenerToRemove); | |||
//============================================================================== | |||
/** Dispatches a numbered message to this component. | |||
@@ -1692,7 +1688,7 @@ public: | |||
@see handleCommandMessage | |||
*/ | |||
void postCommandMessage (const int commandId); | |||
void postCommandMessage (int commandId); | |||
/** Called to handle a command that was sent by postCommandMessage(). | |||
@@ -1734,7 +1730,7 @@ public: | |||
@see exitModalState, runModalLoop | |||
*/ | |||
void enterModalState (const bool takeKeyboardFocus = true); | |||
void enterModalState (bool takeKeyboardFocus = true); | |||
/** Ends a component's modal state. | |||
@@ -1743,7 +1739,7 @@ public: | |||
@see runModalLoop, enterModalState, isCurrentlyModal | |||
*/ | |||
void exitModalState (const int returnValue); | |||
void exitModalState (int returnValue); | |||
/** Returns true if this component is the modal one. | |||
@@ -1837,7 +1833,7 @@ public: | |||
@see setColour, isColourSpecified, colourChanged, LookAndFeel::findColour, LookAndFeel::setColour | |||
*/ | |||
const Colour findColour (const int colourId, const bool inheritFromParent = false) const; | |||
const Colour findColour (int colourId, bool inheritFromParent = false) const; | |||
/** Registers a colour to be used for a particular purpose. | |||
@@ -1849,18 +1845,18 @@ public: | |||
@see findColour, isColourSpecified, colourChanged, LookAndFeel::findColour, LookAndFeel::setColour | |||
*/ | |||
void setColour (const int colourId, const Colour& colour); | |||
void setColour (int colourId, const Colour& colour); | |||
/** If a colour has been set with setColour(), this will remove it. | |||
This allows you to make a colour revert to its default state. | |||
*/ | |||
void removeColour (const int colourId); | |||
void removeColour (int colourId); | |||
/** Returns true if the specified colour ID has been explicitly set for this | |||
component using the setColour() method. | |||
*/ | |||
bool isColourSpecified (const int colourId) const; | |||
bool isColourSpecified (int colourId) const; | |||
/** This looks for any colours that have been specified for this component, | |||
and copies them to the specified target component. | |||
@@ -1967,8 +1963,8 @@ public: | |||
component1 must be a valid component; component2 can be null if you only need | |||
to check on one component. | |||
*/ | |||
BailOutChecker (Component* const component1, | |||
Component* const component2 = 0); | |||
BailOutChecker (Component* component1, | |||
Component* component2 = 0); | |||
/** Returns true if either of the two components have been deleted since this | |||
object was created. */ | |||
@@ -2049,7 +2045,7 @@ private: | |||
void internalMouseUp (MouseInputSource& source, const Point<int>& relativePos, const Time& time, const ModifierKeys& oldModifiers); | |||
void internalMouseDrag (MouseInputSource& source, const Point<int>& relativePos, const Time& time); | |||
void internalMouseMove (MouseInputSource& source, const Point<int>& relativePos, const Time& time); | |||
void internalMouseWheel (MouseInputSource& source, const Point<int>& relativePos, const Time& time, const float amountX, const float amountY); | |||
void internalMouseWheel (MouseInputSource& source, const Point<int>& relativePos, const Time& time, float amountX, float amountY); | |||
void internalBroughtToFront(); | |||
void internalFocusGain (const FocusChangeType cause); | |||
void internalFocusLoss (const FocusChangeType cause); | |||
@@ -2059,11 +2055,11 @@ private: | |||
void internalChildrenChanged(); | |||
void internalHierarchyChanged(); | |||
void renderComponent (Graphics& context); | |||
void sendMovedResizedMessages (const bool wasMoved, const bool wasResized); | |||
void sendMovedResizedMessages (bool wasMoved, bool wasResized); | |||
void repaintParent(); | |||
void sendFakeMouseMove() const; | |||
void takeKeyboardFocus (const FocusChangeType cause); | |||
void grabFocusInternal (const FocusChangeType cause, const bool canTryParent = true); | |||
void grabFocusInternal (const FocusChangeType cause, bool canTryParent = true); | |||
static void giveAwayFocus(); | |||
void sendEnablementChangeMessage(); | |||
static void* runModalLoopCallback (void*); | |||
@@ -2072,7 +2068,7 @@ private: | |||
const Rectangle<int>& clipRect, | |||
const Component* const compToAvoid) const; | |||
void clipObscuredRegions (Graphics& g, const Rectangle<int>& clipRect, | |||
const int deltaX, const int deltaY) const; | |||
int deltaX, int deltaY) const; | |||
// how much of the component is not off the edges of its parents | |||
const Rectangle<int> getUnclippedArea() const; | |||
@@ -79,14 +79,14 @@ public: | |||
If clippedToWorkArea is true, it will exclude any areas like the taskbar on Windows, | |||
or the menu bar on Mac. If clippedToWorkArea is false, the entire monitor area is returned. | |||
*/ | |||
const RectangleList getAllMonitorDisplayAreas (const bool clippedToWorkArea = true) const throw(); | |||
const RectangleList getAllMonitorDisplayAreas (bool clippedToWorkArea = true) const throw(); | |||
/** Returns the position and size of the main monitor. | |||
If clippedToWorkArea is true, it will exclude any areas like the taskbar on Windows, | |||
or the menu bar on Mac. If clippedToWorkArea is false, the entire monitor area is returned. | |||
*/ | |||
const Rectangle<int> getMainMonitorArea (const bool clippedToWorkArea = true) const throw(); | |||
const Rectangle<int> getMainMonitorArea (bool clippedToWorkArea = true) const throw(); | |||
/** Returns the position and size of the monitor which contains this co-ordinate. | |||
@@ -96,7 +96,7 @@ public: | |||
If clippedToWorkArea is true, it will exclude any areas like the taskbar on Windows, | |||
or the menu bar on Mac. If clippedToWorkArea is false, the entire monitor area is returned. | |||
*/ | |||
const Rectangle<int> getMonitorAreaContaining (const Point<int>& position, const bool clippedToWorkArea = true) const; | |||
const Rectangle<int> getMonitorAreaContaining (const Point<int>& position, bool clippedToWorkArea = true) const; | |||
//============================================================================== | |||
@@ -138,7 +138,7 @@ public: | |||
@see isScreenSaverEnabled | |||
*/ | |||
static void setScreenSaverEnabled (const bool isEnabled) throw(); | |||
static void setScreenSaverEnabled (bool isEnabled) throw(); | |||
/** Returns true if the screensaver has not been turned off. | |||
@@ -156,23 +156,23 @@ public: | |||
@see removeGlobalMouseListener | |||
*/ | |||
void addGlobalMouseListener (MouseListener* const listener); | |||
void addGlobalMouseListener (MouseListener* listener); | |||
/** Unregisters a MouseListener that was added with the addGlobalMouseListener() | |||
method. | |||
@see addGlobalMouseListener | |||
*/ | |||
void removeGlobalMouseListener (MouseListener* const listener); | |||
void removeGlobalMouseListener (MouseListener* listener); | |||
//============================================================================== | |||
/** Registers a MouseListener that will receive a callback whenever the focused | |||
component changes. | |||
*/ | |||
void addFocusChangeListener (FocusChangeListener* const listener); | |||
void addFocusChangeListener (FocusChangeListener* listener); | |||
/** Unregisters a listener that was added with addFocusChangeListener(). */ | |||
void removeFocusChangeListener (FocusChangeListener* const listener); | |||
void removeFocusChangeListener (FocusChangeListener* listener); | |||
//============================================================================== | |||
/** Takes a component and makes it full-screen, removing the taskbar, dock, etc. | |||
@@ -190,7 +190,7 @@ public: | |||
to hide as much on-screen paraphenalia as possible. | |||
*/ | |||
void setKioskModeComponent (Component* componentToUse, | |||
const bool allowMenusAndBars = true); | |||
bool allowMenusAndBars = true); | |||
/** Returns the component that is currently being used in kiosk-mode. | |||
@@ -214,7 +214,7 @@ public: | |||
@see getNumComponents, Component::addToDesktop | |||
*/ | |||
Component* getComponent (const int index) const throw(); | |||
Component* getComponent (int index) const throw(); | |||
/** Finds the component at a given screen location. | |||
@@ -306,11 +306,11 @@ private: | |||
void resetTimer(); | |||
int getNumDisplayMonitors() const throw(); | |||
const Rectangle<int> getDisplayMonitorCoordinates (const int index, const bool clippedToWorkArea) const throw(); | |||
const Rectangle<int> getDisplayMonitorCoordinates (int index, bool clippedToWorkArea) const throw(); | |||
void addDesktopComponent (Component* const c); | |||
void removeDesktopComponent (Component* const c); | |||
void componentBroughtToFront (Component* const c); | |||
void addDesktopComponent (Component* c); | |||
void removeDesktopComponent (Component* c); | |||
void componentBroughtToFront (Component* c); | |||
void triggerFocusCallback(); | |||
void handleAsyncUpdate(); | |||
@@ -65,12 +65,12 @@ public: | |||
MouseEvent (MouseInputSource& source, | |||
const Point<int>& position, | |||
const ModifierKeys& modifiers, | |||
Component* const originator, | |||
Component* originator, | |||
const Time& eventTime, | |||
const Point<int> mouseDownPos, | |||
const Time& mouseDownTime, | |||
const int numberOfClicks, | |||
const bool mouseWasDragged) throw(); | |||
int numberOfClicks, | |||
bool mouseWasDragged) throw(); | |||
/** Destructor. */ | |||
~MouseEvent() throw(); | |||
@@ -282,7 +282,7 @@ public: | |||
The x and y positions of the event that is returned will have been | |||
adjusted to be relative to the new component. | |||
*/ | |||
const MouseEvent getEventRelativeTo (Component* const otherComponent) const throw(); | |||
const MouseEvent getEventRelativeTo (Component* otherComponent) const throw(); | |||
/** Creates a copy of this event with a different position. | |||
All other members of the event object are the same, but the x and y are | |||
@@ -298,7 +298,7 @@ public: | |||
@see getDoubleClickTimeout, MouseListener::mouseDoubleClick | |||
*/ | |||
static void setDoubleClickTimeout (const int timeOutMilliseconds) throw(); | |||
static void setDoubleClickTimeout (int timeOutMilliseconds) throw(); | |||
/** Returns the application-wide setting for the double-click time limit. | |||
@@ -104,7 +104,7 @@ public: | |||
@param shortcutKey2 a second optional key that can be pressed to trigger this button | |||
*/ | |||
void addButton (const String& name, | |||
const int returnValue, | |||
int returnValue, | |||
const KeyPress& shortcutKey1 = KeyPress(), | |||
const KeyPress& shortcutKey2 = KeyPress()); | |||
@@ -127,7 +127,7 @@ public: | |||
void addTextEditor (const String& name, | |||
const String& initialContents, | |||
const String& onScreenLabel = String::empty, | |||
const bool isPasswordBox = false); | |||
bool isPasswordBox = false); | |||
/** Returns the contents of a named textbox. | |||
@@ -187,7 +187,7 @@ public: | |||
before it is passed in. The caller is responsible for deleting | |||
the component later on - the AlertWindow won't delete it. | |||
*/ | |||
void addCustomComponent (Component* const component); | |||
void addCustomComponent (Component* component); | |||
/** Returns the number of custom components in the dialog box. | |||
@@ -201,7 +201,7 @@ public: | |||
will return 0 | |||
@see getNumCustomComponents, addCustomComponent | |||
*/ | |||
Component* getCustomComponent (const int index) const; | |||
Component* getCustomComponent (int index) const; | |||
/** Removes one of the custom components in the dialog box. | |||
@@ -212,7 +212,7 @@ public: | |||
@returns the component that was removed (or zero) | |||
@see getNumCustomComponents, addCustomComponent | |||
*/ | |||
Component* removeCustomComponent (const int index); | |||
Component* removeCustomComponent (int index); | |||
//============================================================================== | |||
/** Returns true if the window contains any components other than just buttons.*/ | |||
@@ -87,8 +87,8 @@ public: | |||
The component is the one that we intend to represent, and the style flags are | |||
a combination of the values in the StyleFlags enum | |||
*/ | |||
ComponentPeer (Component* const component, | |||
const int styleFlags) throw(); | |||
ComponentPeer (Component* component, | |||
int styleFlags) throw(); | |||
/** Destructor. */ | |||
virtual ~ComponentPeer(); | |||
@@ -140,7 +140,7 @@ public: | |||
This should result in a callback to handleMovedOrResized(). | |||
*/ | |||
virtual void setBounds (int x, int y, int w, int h, const bool isNowFullScreen) = 0; | |||
virtual void setBounds (int x, int y, int w, int h, bool isNowFullScreen) = 0; | |||
/** Returns the current position and size of the window. | |||
@@ -184,7 +184,7 @@ public: | |||
The constrainer won't be deleted by this object, so the caller must manage its lifetime. | |||
*/ | |||
void setConstrainer (ComponentBoundsConstrainer* const newConstrainer) throw(); | |||
void setConstrainer (ComponentBoundsConstrainer* newConstrainer) throw(); | |||
/** Returns the current constrainer, if one has been set. */ | |||
ComponentBoundsConstrainer* getConstrainer() const throw() { return constrainer; } | |||
@@ -266,13 +266,13 @@ public: | |||
For keycode info, see the KeyPress class. | |||
Returns true if the keystroke was used. | |||
*/ | |||
bool handleKeyPress (const int keyCode, | |||
const juce_wchar textCharacter); | |||
bool handleKeyPress (int keyCode, | |||
juce_wchar textCharacter); | |||
/** Called whenever a key is pressed or released. | |||
Returns true if the keystroke was used. | |||
*/ | |||
bool handleKeyUpOrDown (const bool isKeyDown); | |||
bool handleKeyUpOrDown (bool isKeyDown); | |||
/** Called whenever a modifier key is pressed or released. */ | |||
void handleModifierKeysChange(); | |||
@@ -293,8 +293,8 @@ public: | |||
virtual void performAnyPendingRepaintsNow() = 0; | |||
//============================================================================== | |||
void handleMouseEvent (int touchIndex, const Point<int>& positionWithinPeer, const ModifierKeys& newMods, const int64 time); | |||
void handleMouseWheel (int touchIndex, const Point<int>& positionWithinPeer, const int64 time, float x, float y); | |||
void handleMouseEvent (int touchIndex, const Point<int>& positionWithinPeer, const ModifierKeys& newMods, int64 time); | |||
void handleMouseWheel (int touchIndex, const Point<int>& positionWithinPeer, int64 time, float x, float y); | |||
void handleUserClosingWindow(); | |||
@@ -334,13 +334,13 @@ public: | |||
@see getNumPeers | |||
*/ | |||
static ComponentPeer* getPeer (const int index) throw(); | |||
static ComponentPeer* getPeer (int index) throw(); | |||
/** Checks if this peer object is valid. | |||
@see getNumPeers | |||
*/ | |||
static bool isValidPeer (const ComponentPeer* const peer) throw(); | |||
static bool isValidPeer (const ComponentPeer* peer) throw(); | |||
//============================================================================== | |||
static void bringModalComponentToFront(); | |||
@@ -370,7 +370,7 @@ private: | |||
bool fakeMouseMessageSent : 1, isWindowMinimised : 1; | |||
friend class Component; | |||
static ComponentPeer* getPeerFor (const Component* const component) throw(); | |||
static ComponentPeer* getPeerFor (const Component* component) throw(); | |||
void setLastDragDropTarget (Component* comp); | |||
@@ -55,45 +55,45 @@ public: | |||
@see getPixelARGB | |||
*/ | |||
explicit Colour (const uint32 argb) throw(); | |||
explicit Colour (uint32 argb) throw(); | |||
/** Creates an opaque colour using 8-bit red, green and blue values */ | |||
Colour (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue) throw(); | |||
Colour (uint8 red, | |||
uint8 green, | |||
uint8 blue) throw(); | |||
/** Creates an opaque colour using 8-bit red, green and blue values */ | |||
static const Colour fromRGB (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue) throw(); | |||
static const Colour fromRGB (uint8 red, | |||
uint8 green, | |||
uint8 blue) throw(); | |||
/** Creates a colour using 8-bit red, green, blue and alpha values. */ | |||
Colour (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue, | |||
const uint8 alpha) throw(); | |||
Colour (uint8 red, | |||
uint8 green, | |||
uint8 blue, | |||
uint8 alpha) throw(); | |||
/** Creates a colour using 8-bit red, green, blue and alpha values. */ | |||
static const Colour fromRGBA (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue, | |||
const uint8 alpha) throw(); | |||
static const Colour fromRGBA (uint8 red, | |||
uint8 green, | |||
uint8 blue, | |||
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. | |||
*/ | |||
Colour (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue, | |||
const float alpha) throw(); | |||
Colour (uint8 red, | |||
uint8 green, | |||
uint8 blue, | |||
float alpha) throw(); | |||
/** Creates a colour using 8-bit red, green, blue and float alpha values. */ | |||
static const Colour fromRGBAFloat (const uint8 red, | |||
const uint8 green, | |||
const uint8 blue, | |||
const float alpha) throw(); | |||
static const Colour fromRGBAFloat (uint8 red, | |||
uint8 green, | |||
uint8 blue, | |||
float alpha) throw(); | |||
/** Creates a colour using floating point hue, saturation and brightness values, and an 8-bit alpha. | |||
@@ -101,20 +101,20 @@ public: | |||
An alpha of 0x00 is completely transparent, alpha of 0xff is opaque. | |||
Values outside the valid range will be clipped. | |||
*/ | |||
Colour (const float hue, | |||
const float saturation, | |||
const float brightness, | |||
const uint8 alpha) throw(); | |||
Colour (float hue, | |||
float saturation, | |||
float brightness, | |||
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. | |||
*/ | |||
Colour (const float hue, | |||
const float saturation, | |||
const float brightness, | |||
const float alpha) throw(); | |||
Colour (float hue, | |||
float saturation, | |||
float brightness, | |||
float alpha) throw(); | |||
/** Creates a colour using floating point hue, saturation and brightness values, and an 8-bit alpha. | |||
@@ -122,10 +122,10 @@ public: | |||
An alpha of 0x00 is completely transparent, alpha of 0xff is opaque. | |||
Values outside the valid range will be clipped. | |||
*/ | |||
static const Colour fromHSV (const float hue, | |||
const float saturation, | |||
const float brightness, | |||
const float alpha) throw(); | |||
static const Colour fromHSV (float hue, | |||
float saturation, | |||
float brightness, | |||
float alpha) throw(); | |||
/** Destructor. */ | |||
~Colour() throw(); | |||
@@ -212,16 +212,16 @@ public: | |||
bool isTransparent() const throw(); | |||
/** Returns a colour that's the same colour as this one, but with a new alpha value. */ | |||
const Colour withAlpha (const uint8 newAlpha) const throw(); | |||
const Colour withAlpha (uint8 newAlpha) const throw(); | |||
/** Returns a colour that's the same colour as this one, but with a new alpha value. */ | |||
const Colour withAlpha (const float newAlpha) const throw(); | |||
const Colour withAlpha (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 withMultipliedAlpha (const float alphaMultiplier) const throw(); | |||
const Colour withMultipliedAlpha (float alphaMultiplier) const throw(); | |||
//============================================================================== | |||
/** Returns a colour that is the result of alpha-compositing a new colour over this one. | |||
@@ -263,15 +263,15 @@ public: | |||
//============================================================================== | |||
/** Returns a copy of this colour with a different hue. */ | |||
const Colour withHue (const float newHue) const throw(); | |||
const Colour withHue (float newHue) const throw(); | |||
/** Returns a copy of this colour with a different saturation. */ | |||
const Colour withSaturation (const float newSaturation) const throw(); | |||
const Colour withSaturation (float newSaturation) const throw(); | |||
/** Returns a copy of this colour with a different brightness. | |||
@see brighter, darker, withMultipliedBrightness | |||
*/ | |||
const Colour withBrightness (const float newBrightness) const throw(); | |||
const Colour withBrightness (float newBrightness) const throw(); | |||
/** Returns a copy of this colour with it hue rotated. | |||
@@ -279,21 +279,21 @@ public: | |||
@see brighter, darker, withMultipliedBrightness | |||
*/ | |||
const Colour withRotatedHue (const float amountToRotate) const throw(); | |||
const Colour withRotatedHue (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 withMultipliedSaturation (const float multiplier) const throw(); | |||
const Colour withMultipliedSaturation (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 withMultipliedBrightness (const float amount) const throw(); | |||
const Colour withMultipliedBrightness (float amount) const throw(); | |||
//============================================================================== | |||
/** Returns a brighter version of this colour. | |||
@@ -320,7 +320,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 contrasting (const float amount = 1.0f) const throw(); | |||
const Colour contrasting (float amount = 1.0f) const throw(); | |||
/** Returns a colour that contrasts against two colours. | |||
@@ -336,7 +336,7 @@ public: | |||
@param brightness the level of grey to return - 0 is black, 1.0 is white | |||
*/ | |||
static const Colour greyLevel (const float brightness) throw(); | |||
static const Colour greyLevel (float brightness) throw(); | |||
//============================================================================== | |||
/** Returns a stringified version of this colour. | |||
@@ -59,13 +59,9 @@ public: | |||
@see ColourGradient | |||
*/ | |||
ColourGradient (const Colour& colour1, | |||
const float x1, | |||
const float y1, | |||
const Colour& colour2, | |||
const float x2, | |||
const float y2, | |||
const bool isRadial) throw(); | |||
ColourGradient (const Colour& colour1, float x1, float y1, | |||
const Colour& colour2, float x2, float y2, | |||
bool isRadial) throw(); | |||
/** Creates an uninitialised gradient. | |||
@@ -95,11 +91,11 @@ public: | |||
at which the colour should occur. | |||
@param colour the colour that should be used at this point | |||
*/ | |||
void addColour (const double proportionAlongGradient, | |||
void addColour (double proportionAlongGradient, | |||
const Colour& colour) throw(); | |||
/** Multiplies the alpha value of all the colours by the given scale factor */ | |||
void multiplyOpacity (const float multiplier) throw(); | |||
void multiplyOpacity (float multiplier) throw(); | |||
//============================================================================== | |||
/** Returns the number of colour-stops that have been added. */ | |||
@@ -109,18 +105,18 @@ public: | |||
The index is from 0 to getNumColours() - 1. The return value will be between 0.0 and 1.0 | |||
*/ | |||
double getColourPosition (const int index) const throw(); | |||
double getColourPosition (int index) const throw(); | |||
/** Returns the colour that was added with a given index. | |||
The index is from 0 to getNumColours() - 1. The return value will be between 0.0 and 1.0 | |||
*/ | |||
const Colour getColour (const int index) const throw(); | |||
const Colour getColour (int index) const throw(); | |||
/** Returns the an interpolated colour at any position along the gradient. | |||
@param position the position along the gradient, between 0 and 1 | |||
*/ | |||
const Colour getColourAtPosition (const float position) const throw(); | |||
const Colour getColourAtPosition (float position) const throw(); | |||
//============================================================================== | |||
/** Creates a set of interpolated premultiplied ARGB values. | |||
@@ -67,8 +67,7 @@ public: | |||
/** Creates an edge table containing a rectangle. | |||
*/ | |||
EdgeTable (const float x, const float y, | |||
const float w, const float h); | |||
EdgeTable (float x, float y, float w, float h); | |||
/** Creates a copy of another edge table. */ | |||
EdgeTable (const EdgeTable& other); | |||
@@ -200,12 +199,12 @@ private: | |||
int maxEdgesPerLine, lineStrideElements; | |||
bool needToCheckEmptinesss; | |||
void addEdgePoint (const int x, const int y, const int winding) throw(); | |||
void remapTableForNumEdges (const int newNumEdgesPerLine) throw(); | |||
void intersectWithEdgeTableLine (const int y, const int* otherLine) throw(); | |||
void addEdgePoint (int x, int y, int winding) throw(); | |||
void remapTableForNumEdges (int newNumEdgesPerLine) throw(); | |||
void intersectWithEdgeTableLine (int y, const int* otherLine) throw(); | |||
void clipEdgeTableLineToRange (int* line, int x1, int x2) throw(); | |||
void sanitiseLevels (const bool useNonZeroWinding) throw(); | |||
static void copyEdgeTableData (int* dest, const int destLineStride, const int* src, const int srcLineStride, int numLines) throw(); | |||
void sanitiseLevels (bool useNonZeroWinding) throw(); | |||
static void copyEdgeTableData (int* dest, int destLineStride, const int* src, int srcLineStride, int numLines) throw(); | |||
}; | |||
@@ -96,7 +96,7 @@ public: | |||
If the fill is a solid colour, this just changes the opacity of that colour. For | |||
gradients and image tiles, it changes the opacity that will be used for them. | |||
*/ | |||
void setOpacity (const float newOpacity) throw(); | |||
void setOpacity (float newOpacity) throw(); | |||
/** Returns the current opacity to be applied to the colour, gradient, or image. | |||
@see setOpacity | |||
@@ -102,9 +102,9 @@ public: | |||
this context! | |||
*/ | |||
void setTiledImageFill (const Image& imageToUse, | |||
const int anchorX, | |||
const int anchorY, | |||
const float opacity) throw(); | |||
int anchorX, | |||
int anchorY, | |||
float opacity) throw(); | |||
/** Changes the current fill settings. | |||
@see setColour, setGradientFill, setTiledImageFill | |||
@@ -128,8 +128,8 @@ public: | |||
@see Font | |||
*/ | |||
void setFont (const float newFontHeight, | |||
const int fontStyleFlags = Font::plain) throw(); | |||
void setFont (float newFontHeight, | |||
int fontStyleFlags = Font::plain) throw(); | |||
/** Draws a one-line text string. | |||
@@ -142,8 +142,7 @@ public: | |||
@see drawMultiLineText, drawText, drawFittedText, GlyphArrangement::addLineOfText | |||
*/ | |||
void drawSingleLineText (const String& text, | |||
const int startX, | |||
const int baselineY) const throw(); | |||
int startX, int baselineY) const throw(); | |||
/** Draws text across multiple lines. | |||
@@ -154,9 +153,8 @@ public: | |||
@see setFont, drawSingleLineText, drawFittedText, GlyphArrangement::addJustifiedText | |||
*/ | |||
void drawMultiLineText (const String& text, | |||
const int startX, | |||
const int baselineY, | |||
const int maximumLineWidth) const throw(); | |||
int startX, int baselineY, | |||
int maximumLineWidth) const throw(); | |||
/** Renders a string of text as a vector path. | |||
@@ -179,12 +177,9 @@ public: | |||
@see drawSingleLineText, drawFittedText, drawMultiLineText, GlyphArrangement::addJustifiedText | |||
*/ | |||
void drawText (const String& text, | |||
const int x, | |||
const int y, | |||
const int width, | |||
const int height, | |||
int x, int y, int width, int height, | |||
const Justification& justificationType, | |||
const bool useEllipsesIfTooBig) const throw(); | |||
bool useEllipsesIfTooBig) const throw(); | |||
/** Tries to draw a text string inside a given space. | |||
@@ -206,13 +201,10 @@ public: | |||
@see GlyphArrangement::addFittedText | |||
*/ | |||
void drawFittedText (const String& text, | |||
const int x, | |||
const int y, | |||
const int width, | |||
const int height, | |||
int x, int y, int width, int height, | |||
const Justification& justificationFlags, | |||
const int maximumNumberOfLines, | |||
const float minimumHorizontalScale = 0.7f) const throw(); | |||
int maximumNumberOfLines, | |||
float minimumHorizontalScale = 0.7f) const throw(); | |||
//============================================================================== | |||
/** Fills the context's entire clip region with the current colour or brush. | |||
@@ -234,10 +226,7 @@ public: | |||
@see drawRect, fillRoundedRectangle | |||
*/ | |||
void 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 fillRect (const Rectangle<int>& rectangle) const throw(); | |||
@@ -247,36 +236,27 @@ public: | |||
This uses sub-pixel positioning so is slower than the fillRect method which | |||
takes integer co-ordinates. | |||
*/ | |||
void fillRect (const float x, | |||
const float y, | |||
const float width, | |||
const float height) const throw(); | |||
void fillRect (float x, float y, float width, float height) const throw(); | |||
/** Uses the current colour or brush to fill a rectangle with rounded corners. | |||
@see drawRoundedRectangle, Path::addRoundedRectangle | |||
*/ | |||
void fillRoundedRectangle (const float x, | |||
const float y, | |||
const float width, | |||
const float height, | |||
const float cornerSize) const throw(); | |||
void fillRoundedRectangle (float x, float y, float width, float height, | |||
float cornerSize) const throw(); | |||
/** Uses the current colour or brush to fill a rectangle with rounded corners. | |||
@see drawRoundedRectangle, Path::addRoundedRectangle | |||
*/ | |||
void fillRoundedRectangle (const Rectangle<int>& rectangle, | |||
const float cornerSize) const throw(); | |||
float cornerSize) const throw(); | |||
/** Fills a rectangle with a checkerboard pattern, alternating between two colours. | |||
*/ | |||
void 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, | |||
int checkWidth, int checkHeight, | |||
const Colour& colour1, const Colour& colour2) const throw(); | |||
/** Draws four lines to form a rectangular outline, using the current colour or brush. | |||
@@ -285,11 +265,8 @@ public: | |||
@see fillRect | |||
*/ | |||
void drawRect (const int x, | |||
const int y, | |||
const int width, | |||
const int height, | |||
const int lineThickness = 1) const throw(); | |||
void drawRect (int x, int y, int width, int height, | |||
int lineThickness = 1) const throw(); | |||
/** Draws four lines to form a rectangular outline, using the current colour or brush. | |||
@@ -298,11 +275,8 @@ public: | |||
@see fillRect | |||
*/ | |||
void drawRect (const float x, | |||
const float y, | |||
const float width, | |||
const float height, | |||
const float lineThickness = 1.0f) const throw(); | |||
void drawRect (float x, float y, float width, float height, | |||
float lineThickness = 1.0f) const throw(); | |||
/** Draws four lines to form a rectangular outline, using the current colour or brush. | |||
@@ -312,26 +286,21 @@ public: | |||
@see fillRect | |||
*/ | |||
void drawRect (const Rectangle<int>& rectangle, | |||
const int lineThickness = 1) const throw(); | |||
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 drawRoundedRectangle (const float x, | |||
const float y, | |||
const float width, | |||
const float height, | |||
const float cornerSize, | |||
const float lineThickness) const throw(); | |||
void drawRoundedRectangle (float x, float y, float width, float height, | |||
float cornerSize, float lineThickness) const throw(); | |||
/** Uses the current colour or brush to draw the outline of a rectangle with rounded corners. | |||
@see fillRoundedRectangle, Path::addRoundedRectangle | |||
*/ | |||
void drawRoundedRectangle (const Rectangle<int>& rectangle, | |||
const float cornerSize, | |||
const float lineThickness) const throw(); | |||
float cornerSize, float lineThickness) const throw(); | |||
/** Draws a 3D raised (or indented) bevel using two colours. | |||
@@ -347,15 +316,12 @@ public: | |||
sharp, and it fades towards the centre; if sharpEdgeOnOutside is false, then | |||
the centre edges are sharp and it fades towards the outside. | |||
*/ | |||
void drawBevel (const int x, | |||
const int y, | |||
const int width, | |||
const int height, | |||
const int bevelThickness, | |||
void drawBevel (int x, int y, int width, int height, | |||
int bevelThickness, | |||
const Colour& topLeftColour = Colours::white, | |||
const Colour& bottomRightColour = Colours::black, | |||
const bool useGradient = true, | |||
const bool sharpEdgeOnOutside = true) const throw(); | |||
bool useGradient = true, | |||
bool sharpEdgeOnOutside = true) const throw(); | |||
/** Draws a pixel using the current colour or brush. | |||
*/ | |||
@@ -368,20 +334,14 @@ public: | |||
@see drawEllipse, Path::addEllipse | |||
*/ | |||
void fillEllipse (const float x, | |||
const float y, | |||
const float width, | |||
const float height) const throw(); | |||
void fillEllipse (float x, float y, float width, float height) const throw(); | |||
/** Draws an elliptical stroke using the current colour or brush. | |||
@see fillEllipse, Path::addEllipse | |||
*/ | |||
void drawEllipse (const float x, | |||
const float y, | |||
const float width, | |||
const float height, | |||
const float lineThickness) const throw(); | |||
void drawEllipse (float x, float y, float width, float height, | |||
float lineThickness) const throw(); | |||
//============================================================================== | |||
/** Draws a line between two points. | |||
@@ -397,11 +357,11 @@ public: | |||
@see Path::addLineSegment | |||
*/ | |||
void drawLine (const float startX, | |||
const float startY, | |||
const float endX, | |||
const float endY, | |||
const float lineThickness) const throw(); | |||
void drawLine (float startX, | |||
float startY, | |||
float endX, | |||
float endY, | |||
float lineThickness) const throw(); | |||
/** Draws a line between two points. | |||
@@ -414,7 +374,7 @@ public: | |||
@see Path::addLineSegment | |||
*/ | |||
void drawLine (const Line& line, | |||
const float lineThickness) const throw(); | |||
float lineThickness) const throw(); | |||
/** Draws a dashed line using a custom set of dash-lengths. | |||
@@ -429,27 +389,27 @@ public: | |||
@param lineThickness the thickness of the line to draw | |||
@see PathStrokeType::createDashedStroke | |||
*/ | |||
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(); | |||
void drawDashedLine (float startX, | |||
float startY, | |||
float endX, | |||
float endY, | |||
const float* dashLengths, | |||
int numDashLengths, | |||
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 drawVerticalLine (const int x, float top, float bottom) const throw(); | |||
void drawVerticalLine (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 drawHorizontalLine (const int y, float left, float right) const throw(); | |||
void drawHorizontalLine (int y, float left, float right) const throw(); | |||
//============================================================================== | |||
/** Fills a path using the currently selected colour or brush. | |||
@@ -473,13 +433,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 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 (float startX, | |||
float startY, | |||
float endX, | |||
float endY, | |||
float lineThickness, | |||
float arrowheadWidth, | |||
float arrowheadLength) const throw(); | |||
//============================================================================== | |||
@@ -514,9 +474,8 @@ public: | |||
(or setColour() with an opaque colour) before drawing images. | |||
*/ | |||
void drawImageAt (const Image* const imageToDraw, | |||
const int topLeftX, | |||
const int topLeftY, | |||
const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
int topLeftX, int topLeftY, | |||
bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
/** Draws part of an image, rescaling it to fit in a given target region. | |||
@@ -552,7 +511,7 @@ public: | |||
int sourceY, | |||
int sourceWidth, | |||
int sourceHeight, | |||
const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
/** Draws part of an image, having applied an affine transform to it. | |||
@@ -575,10 +534,10 @@ public: | |||
@see setImageResamplingQuality, drawImage | |||
*/ | |||
void drawImageTransformed (const Image* const imageToDraw, | |||
void drawImageTransformed (const Image* imageToDraw, | |||
const Rectangle<int>& imageSubRegion, | |||
const AffineTransform& transform, | |||
const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
/** Draws an image to fit within a designated rectangle. | |||
@@ -601,13 +560,10 @@ public: | |||
similar to fillAlphaMap(), and see also drawImage() | |||
@see setImageResamplingQuality, drawImage, drawImageTransformed, drawImageAt, RectanglePlacement | |||
*/ | |||
void drawImageWithin (const Image* const imageToDraw, | |||
const int destX, | |||
const int destY, | |||
const int destWidth, | |||
const int destHeight, | |||
void drawImageWithin (const Image* imageToDraw, | |||
int destX, int destY, int destWidth, int destHeight, | |||
const RectanglePlacement& placementWithinTarget, | |||
const bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
bool fillAlphaChannelWithCurrentBrush = false) const throw(); | |||
//============================================================================== | |||
@@ -623,15 +579,14 @@ 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 clipRegionIntersects (const int x, const int y, const int width, const int height) const throw(); | |||
bool clipRegionIntersects (int x, int y, int width, 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 | |||
*/ | |||
bool reduceClipRegion (const int x, const int y, | |||
const int width, const int height) throw(); | |||
bool reduceClipRegion (int x, int y, int width, int height) throw(); | |||
/** Intersects the current clipping region with a rectangle list region. | |||
@@ -690,8 +645,7 @@ public: | |||
@see reduceClipRegion | |||
*/ | |||
void setOrigin (const int newOriginX, | |||
const int newOriginY) throw(); | |||
void setOrigin (int newOriginX, int newOriginY) throw(); | |||
/** Resets the current colour, brush, and font to default settings. */ | |||
void resetToDefaultState() throw(); | |||
@@ -41,7 +41,7 @@ class JUCE_API Justification | |||
public: | |||
//============================================================================== | |||
/** Creates a Justification object using a combination of flags. */ | |||
inline Justification (const int flags_) throw() : flags (flags_) {} | |||
inline Justification (int flags_) throw() : flags (flags_) {} | |||
/** Creates a copy of another Justification object. */ | |||
Justification (const Justification& other) throw(); | |||
@@ -58,7 +58,7 @@ public: | |||
@returns true if any of the flags passed in are set on this object. | |||
*/ | |||
inline bool testFlags (const int flagsToTest) const throw() { return (flags & flagsToTest) != 0; } | |||
inline bool testFlags (int flagsToTest) const throw() { return (flags & flagsToTest) != 0; } | |||
/** Returns just the flags from this object that deal with vertical layout. */ | |||
int getOnlyVerticalFlags() const throw(); | |||
@@ -72,10 +72,8 @@ public: | |||
The (x, y) position of the rectangle will be updated to position it inside the | |||
given space according to the justification flags. | |||
*/ | |||
void applyToRectangle (int& x, int& y, | |||
const int w, const int h, | |||
const int spaceX, const int spaceY, | |||
const int spaceW, const int spaceH) const throw(); | |||
void applyToRectangle (int& x, int& y, int w, int h, | |||
int spaceX, int spaceY, int spaceW, int spaceH) const throw(); | |||
//============================================================================== | |||
@@ -85,15 +85,15 @@ public: | |||
virtual void setInterpolationQuality (Graphics::ResamplingQuality quality) = 0; | |||
//============================================================================== | |||
virtual void fillRect (const Rectangle<int>& r, const bool replaceExistingContents) = 0; | |||
virtual void fillRect (const Rectangle<int>& r, bool replaceExistingContents) = 0; | |||
virtual void fillPath (const Path& path, const AffineTransform& transform) = 0; | |||
virtual void drawImage (const Image& sourceImage, const Rectangle<int>& srcClip, | |||
const AffineTransform& transform, const bool fillEntireClipAsTiles) = 0; | |||
const AffineTransform& transform, bool fillEntireClipAsTiles) = 0; | |||
virtual void drawLine (double x1, double y1, double x2, double y2) = 0; | |||
virtual void drawVerticalLine (const int x, double top, double bottom) = 0; | |||
virtual void drawHorizontalLine (const int y, double left, double right) = 0; | |||
virtual void drawVerticalLine (int x, double top, double bottom) = 0; | |||
virtual void drawHorizontalLine (int y, double left, double right) = 0; | |||
virtual void setFont (const Font& newFont) = 0; | |||
virtual const Font getFont() = 0; | |||
@@ -62,7 +62,7 @@ public: | |||
/** Renders this Drawable object. | |||
@see drawWithin | |||
*/ | |||
void draw (Graphics& g, const float opacity, | |||
void draw (Graphics& g, float opacity, | |||
const AffineTransform& transform = AffineTransform::identity) const; | |||
/** Renders the Drawable at a given offset within the Graphics context. | |||
@@ -75,9 +75,8 @@ public: | |||
@endcode | |||
*/ | |||
void drawAt (Graphics& g, | |||
const float x, | |||
const float y, | |||
const float opacity) const; | |||
float x, float y, | |||
float opacity) const; | |||
/** Renders the Drawable within a rectangle, scaling it to fit neatly inside without | |||
changing its aspect-ratio. | |||
@@ -95,12 +94,12 @@ public: | |||
@param opacity the opacity to use, in the range 0 to 1.0 | |||
*/ | |||
void drawWithin (Graphics& g, | |||
const int destX, | |||
const int destY, | |||
const int destWidth, | |||
const int destHeight, | |||
int destX, | |||
int destY, | |||
int destWidth, | |||
int destHeight, | |||
const RectanglePlacement& placement, | |||
const float opacity) const; | |||
float opacity) const; | |||
//============================================================================== | |||
@@ -110,7 +109,7 @@ public: | |||
class RenderingContext | |||
{ | |||
public: | |||
RenderingContext (Graphics& g, const AffineTransform& transform, const float opacity) throw(); | |||
RenderingContext (Graphics& g, const AffineTransform& transform, float opacity) throw(); | |||
Graphics& g; | |||
AffineTransform transform; | |||
@@ -153,7 +152,7 @@ public: | |||
The data could be an image that the ImageFileFormat class understands, or it | |||
could be SVG. | |||
*/ | |||
static Drawable* createFromImageData (const void* data, const size_t numBytes); | |||
static Drawable* createFromImageData (const void* data, size_t numBytes); | |||
/** Tries to turn a stream containing some kind of image data into a drawable. | |||
@@ -64,7 +64,7 @@ public: | |||
*/ | |||
void insertDrawable (Drawable* drawable, | |||
const AffineTransform& transform = AffineTransform::identity, | |||
const int index = -1); | |||
int index = -1); | |||
/** Adds a new sub-drawable to this one. | |||
@@ -82,7 +82,7 @@ public: | |||
*/ | |||
void insertDrawable (const Drawable& drawable, | |||
const AffineTransform& transform = AffineTransform::identity, | |||
const int index = -1); | |||
int index = -1); | |||
/** Deletes one of the Drawable objects. | |||
@@ -92,13 +92,13 @@ public: | |||
be deleted. If false, it'll just be removed. | |||
@see insertDrawable, getNumDrawables | |||
*/ | |||
void removeDrawable (const int index, const bool deleteDrawable = true); | |||
void removeDrawable (int index, bool deleteDrawable = true); | |||
/** Returns the number of drawables contained inside this one. | |||
@see getDrawable | |||
*/ | |||
int getNumDrawables() const throw() { return drawables.size(); } | |||
int getNumDrawables() const throw() { return drawables.size(); } | |||
/** Returns one of the drawables that are contained in this one. | |||
@@ -110,7 +110,7 @@ public: | |||
@see getNumDrawables | |||
*/ | |||
Drawable* getDrawable (const int index) const throw() { return drawables [index]; } | |||
Drawable* getDrawable (int index) const throw() { return drawables [index]; } | |||
/** Returns the transform that applies to one of the drawables that are contained in this one. | |||
@@ -119,7 +119,7 @@ public: | |||
@see getNumDrawables | |||
*/ | |||
const AffineTransform* getDrawableTransform (const int index) const throw() { return transforms [index]; } | |||
const AffineTransform* getDrawableTransform (int index) const throw() { return transforms [index]; } | |||
/** Brings one of the Drawables to the front. | |||
@@ -127,7 +127,7 @@ public: | |||
and (getNumDrawables() - 1). | |||
@see insertDrawable, getNumDrawables | |||
*/ | |||
void bringToFront (const int index); | |||
void bringToFront (int index); | |||
//============================================================================== | |||
@@ -69,7 +69,7 @@ public: | |||
in which case it will be released with ImageCache::release(). | |||
*/ | |||
void setImage (Image* imageToUse, | |||
const bool releaseWhenNotNeeded); | |||
bool releaseWhenNotNeeded); | |||
/** Returns the current image. */ | |||
Image* getImage() const throw() { return image; } | |||
@@ -78,7 +78,7 @@ public: | |||
void clearImage(); | |||
/** Sets the opacity to use when drawing the image. */ | |||
void setOpacity (const float newOpacity); | |||
void setOpacity (float newOpacity); | |||
/** Returns the image's opacity. */ | |||
float getOpacity() const throw() { return opacity; } | |||
@@ -91,7 +91,7 @@ public: | |||
/** Changes the stroke thickness. | |||
This is a shortcut for calling setStrokeType. | |||
*/ | |||
void setStrokeThickness (const float newThickness) throw(); | |||
void setStrokeThickness (float newThickness) throw(); | |||
/** Returns the current outline style. */ | |||
const PathStrokeType& getStrokeType() const throw() { return strokeType; } | |||
@@ -67,8 +67,8 @@ public: | |||
just Font::plain for the normal style. | |||
@see FontStyleFlags, getDefaultSansSerifFontName | |||
*/ | |||
Font (const float fontHeight, | |||
const int styleFlags = plain) throw(); | |||
Font (float fontHeight, | |||
int styleFlags = plain) throw(); | |||
/** Creates a font with a given typeface and parameters. | |||
@@ -80,8 +80,8 @@ public: | |||
@see FontStyleFlags, getDefaultSansSerifFontName | |||
*/ | |||
Font (const String& typefaceName, | |||
const float fontHeight, | |||
const int styleFlags) throw(); | |||
float fontHeight, | |||
int styleFlags) throw(); | |||
/** Creates a copy of another Font object. */ | |||
Font (const Font& other) throw(); | |||
@@ -229,17 +229,17 @@ public: | |||
//============================================================================== | |||
/** Makes the font bold or non-bold. */ | |||
void setBold (const bool shouldBeBold) throw(); | |||
void setBold (bool shouldBeBold) throw(); | |||
/** Returns true if the font is bold. */ | |||
bool isBold() const throw(); | |||
/** Makes the font italic or non-italic. */ | |||
void setItalic (const bool shouldBeItalic) throw(); | |||
void setItalic (bool shouldBeItalic) throw(); | |||
/** Returns true if the font is italic. */ | |||
bool isItalic() const throw(); | |||
/** Makes the font underlined or non-underlined. */ | |||
void setUnderline (const bool shouldBeUnderlined) throw(); | |||
void setUnderline (bool shouldBeUnderlined) throw(); | |||
/** Returns true if the font is underlined. */ | |||
bool isUnderlined() const throw(); | |||
@@ -249,7 +249,7 @@ public: | |||
@param scaleFactor a value of 1.0 is the normal scale, less than this will be | |||
narrower, greater than 1.0 will be stretched out. | |||
*/ | |||
void setHorizontalScale (const float scaleFactor) throw(); | |||
void setHorizontalScale (float scaleFactor) throw(); | |||
/** Returns the font's horizontal scale. | |||
@@ -267,7 +267,7 @@ public: | |||
normal spacing, positive values spread the letters out, | |||
negative values make them closer together. | |||
*/ | |||
void setExtraKerningFactor (const float extraKerning) throw(); | |||
void setExtraKerningFactor (float extraKerning) throw(); | |||
/** Returns the font's kerning. | |||
@@ -283,9 +283,9 @@ public: | |||
//============================================================================== | |||
/** Changes all the font's characteristics with one call. */ | |||
void setSizeAndStyle (float newHeight, | |||
const int newStyleFlags, | |||
const float newHorizontalScale, | |||
const float newKerningAmount) throw(); | |||
int newStyleFlags, | |||
float newHorizontalScale, | |||
float newKerningAmount) throw(); | |||
//============================================================================== | |||
/** Returns the total width of a string as it would be drawn using this font. | |||
@@ -356,9 +356,9 @@ private: | |||
class SharedFontInternal : public ReferenceCountedObject | |||
{ | |||
public: | |||
SharedFontInternal (const String& typefaceName, const float height, const float horizontalScale, | |||
const float kerning, const float ascent, const int styleFlags, | |||
Typeface* const typeface) throw(); | |||
SharedFontInternal (const String& typefaceName, float height, float horizontalScale, | |||
float kerning, float ascent, int styleFlags, | |||
Typeface* typeface) throw(); | |||
SharedFontInternal (const SharedFontInternal& other) throw(); | |||
String typefaceName; | |||
@@ -103,7 +103,7 @@ public: | |||
*/ | |||
void layout (int maximumWidth, | |||
const Justification& justification, | |||
const bool attemptToBalanceLineLengths) throw(); | |||
bool attemptToBalanceLineLengths) throw(); | |||
//============================================================================== | |||
@@ -120,14 +120,12 @@ public: | |||
@param lineNumber the line, from 0 to (getNumLines() - 1) | |||
*/ | |||
int getLineWidth (const int lineNumber) const throw(); | |||
int getLineWidth (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 throw(); | |||
void draw (Graphics& g, int topLeftX, int topLeftY) const throw(); | |||
/** Renders the text within a specified rectangle using a graphics context. | |||
@@ -160,9 +160,9 @@ public: | |||
@param defaultCharacter the character to be used as a replacement if there's | |||
no glyph available for the character that's being drawn | |||
*/ | |||
void setCharacteristics (const String& name, const float ascent, | |||
const bool isBold, const bool isItalic, | |||
const juce_wchar defaultCharacter) throw(); | |||
void setCharacteristics (const String& name, float ascent, | |||
bool isBold, bool isItalic, | |||
juce_wchar defaultCharacter) throw(); | |||
/** Adds a glyph to the typeface. | |||
@@ -172,12 +172,12 @@ public: | |||
The width is the nominal width of the character, and any extra kerning values that | |||
are specified will be added to this width. | |||
*/ | |||
void addGlyph (const juce_wchar character, const Path& path, const float width) throw(); | |||
void addGlyph (juce_wchar character, const Path& path, float width) throw(); | |||
/** Specifies an extra kerning amount to be used between a pair of characters. | |||
The amount will be added to the nominal width of the first character when laying out a string. | |||
*/ | |||
void addKerningPair (const juce_wchar char1, const juce_wchar char2, const float extraAmount) throw(); | |||
void addKerningPair (juce_wchar char1, juce_wchar char2, float extraAmount) throw(); | |||
/** Adds a range of glyphs from another typeface. | |||
This will attempt to pull in the paths and kerning information from another typeface and | |||
@@ -215,7 +215,7 @@ protected: | |||
method so that a subclass can try to add that glyph, returning true if it | |||
manages to do so. | |||
*/ | |||
virtual bool loadGlyphIfPossible (const juce_wchar characterNeeded); | |||
virtual bool loadGlyphIfPossible (juce_wchar characterNeeded); | |||
private: | |||
//============================================================================== | |||
@@ -227,8 +227,8 @@ private: | |||
CustomTypeface (const CustomTypeface&); | |||
CustomTypeface& operator= (const CustomTypeface&); | |||
GlyphInfo* findGlyph (const juce_wchar character, const bool loadIfNeeded) throw(); | |||
GlyphInfo* findGlyphSubstituting (const juce_wchar character) throw(); | |||
GlyphInfo* findGlyph (const juce_wchar character, bool loadIfNeeded) throw(); | |||
GlyphInfo* findGlyphSubstituting (juce_wchar character) throw(); | |||
}; | |||
#endif // __JUCE_TYPEFACE_JUCEHEADER__ |
@@ -52,13 +52,13 @@ public: | |||
BorderSize (const BorderSize& other) throw(); | |||
/** Creates a border with the given gaps. */ | |||
BorderSize (const int topGap, | |||
const int leftGap, | |||
const int bottomGap, | |||
const int rightGap) throw(); | |||
BorderSize (int topGap, | |||
int leftGap, | |||
int bottomGap, | |||
int rightGap) throw(); | |||
/** Creates a border with the given gap on all sides. */ | |||
BorderSize (const int allGaps) throw(); | |||
BorderSize (int allGaps) throw(); | |||
/** Destructor. */ | |||
~BorderSize() throw(); | |||
@@ -84,16 +84,16 @@ public: | |||
//============================================================================== | |||
/** Changes the top gap. */ | |||
void setTop (const int newTopGap) throw(); | |||
void setTop (int newTopGap) throw(); | |||
/** Changes the left gap. */ | |||
void setLeft (const int newLeftGap) throw(); | |||
void setLeft (int newLeftGap) throw(); | |||
/** Changes the bottom gap. */ | |||
void setBottom (const int newBottomGap) throw(); | |||
void setBottom (int newBottomGap) throw(); | |||
/** Changes the right gap. */ | |||
void setRight (const int newRightGap) throw(); | |||
void setRight (int newRightGap) throw(); | |||
//============================================================================== | |||
/** Returns a rectangle with these borders removed from it. */ | |||
@@ -50,10 +50,10 @@ public: | |||
Line (const Line& other) throw(); | |||
/** Creates a line based on the co-ordinates of its start and end points. */ | |||
Line (const float startX, | |||
const float startY, | |||
const float endX, | |||
const float endY) throw(); | |||
Line (float startX, | |||
float startY, | |||
float endX, | |||
float endY) throw(); | |||
/** Creates a line from its start and end points. */ | |||
Line (const Point<float>& start, | |||
@@ -85,12 +85,12 @@ public: | |||
const Point<float> getEnd() const throw(); | |||
/** Changes this line's start point */ | |||
void setStart (const float newStartX, | |||
const float newStartY) throw(); | |||
void setStart (float newStartX, | |||
float newStartY) throw(); | |||
/** Changes this line's end point */ | |||
void setEnd (const float newEndX, | |||
const float newEndY) throw(); | |||
void setEnd (float newEndX, | |||
float newEndY) throw(); | |||
/** Changes this line's start point */ | |||
void setStart (const Point<float>& newStart) throw(); | |||
@@ -151,7 +151,7 @@ public: | |||
than the line itself | |||
@see getPointAlongLineProportionally | |||
*/ | |||
const Point<float> getPointAlongLine (const float distanceFromStart) const throw(); | |||
const Point<float> getPointAlongLine (float distanceFromStart) const throw(); | |||
/** Returns a point which is a certain distance along and to the side of this line. | |||
@@ -166,8 +166,8 @@ public: | |||
end, then a positive value here will move to the | |||
right, negative value move to the left. | |||
*/ | |||
const Point<float> getPointAlongLine (const float distanceFromStart, | |||
const float perpendicularDistance) const throw(); | |||
const Point<float> getPointAlongLine (float distanceFromStart, | |||
float perpendicularDistance) const throw(); | |||
/** Returns the location of the point which is a given distance along this line | |||
proportional to the line's length. | |||
@@ -179,7 +179,7 @@ public: | |||
can be negative or greater than 1.0). | |||
@see getPointAlongLine | |||
*/ | |||
const Point<float> getPointAlongLineProportionally (const float proportionOfLength) const throw(); | |||
const Point<float> getPointAlongLineProportionally (float proportionOfLength) const throw(); | |||
/** Returns the smallest distance between this line segment and a given point. | |||
@@ -192,8 +192,7 @@ public: | |||
@returns the point's distance from the line | |||
@see getPositionAlongLineOfNearestPoint | |||
*/ | |||
float getDistanceFromLine (const float x, | |||
const float y) const throw(); | |||
float getDistanceFromLine (float x, float y) const throw(); | |||
/** Finds the point on this line which is nearest to a given point, and | |||
returns its position as a proportional position along the line. | |||
@@ -205,8 +204,7 @@ public: | |||
turn this number into a position, use getPointAlongLineProportionally(). | |||
@see getDistanceFromLine, getPointAlongLineProportionally | |||
*/ | |||
float findNearestPointTo (const float x, | |||
const float y) const throw(); | |||
float findNearestPointTo (float x, float y) const throw(); | |||
/** Returns true if the given point lies above this line. | |||
@@ -214,7 +212,7 @@ public: | |||
coordinate of this line at the given x (assuming the line extends infinitely | |||
in both directions). | |||
*/ | |||
bool isPointAbove (const float x, const float y) const throw(); | |||
bool isPointAbove (float x, float y) const throw(); | |||
//============================================================================== | |||
/** Returns a shortened copy of this line. | |||
@@ -222,14 +220,14 @@ public: | |||
This will chop off part of the start of this line by a certain amount, (leaving the | |||
end-point the same), and return the new line. | |||
*/ | |||
const Line withShortenedStart (const float distanceToShortenBy) const throw(); | |||
const Line withShortenedStart (float distanceToShortenBy) const throw(); | |||
/** Returns a shortened copy of this line. | |||
This will chop off part of the end of this line by a certain amount, (leaving the | |||
start-point the same), and return the new line. | |||
*/ | |||
const Line withShortenedEnd (const float distanceToShortenBy) const throw(); | |||
const Line withShortenedEnd (float distanceToShortenBy) const throw(); | |||
/** Cuts off parts of this line to keep the parts that are either inside or | |||
outside a path. | |||
@@ -244,8 +242,7 @@ public: | |||
the path | |||
@returns true if the line was changed. | |||
*/ | |||
bool clipToPath (const Path& path, | |||
const bool keepSectionOutsidePath) throw(); | |||
bool clipToPath (const Path& path, bool keepSectionOutsidePath) throw(); | |||
//============================================================================== | |||
@@ -72,9 +72,9 @@ public: | |||
@param jointStyle the type of joints to use for corners | |||
@param endStyle the type of end-caps to use for the ends of open paths. | |||
*/ | |||
PathStrokeType (const float strokeThickness, | |||
const JointStyle jointStyle = mitered, | |||
const EndCapStyle endStyle = butt) throw(); | |||
PathStrokeType (float strokeThickness, | |||
JointStyle jointStyle = mitered, | |||
EndCapStyle endStyle = butt) throw(); | |||
/** Createes a copy of another stroke type. */ | |||
PathStrokeType (const PathStrokeType& other) throw(); | |||
@@ -104,7 +104,7 @@ public: | |||
void createStrokedPath (Path& destPath, | |||
const Path& sourcePath, | |||
const AffineTransform& transform = AffineTransform::identity, | |||
const float extraAccuracy = 1.0f) const; | |||
float extraAccuracy = 1.0f) const; | |||
//============================================================================== | |||
@@ -135,7 +135,7 @@ public: | |||
const float* dashLengths, | |||
int numDashLengths, | |||
const AffineTransform& transform = AffineTransform::identity, | |||
const float extraAccuracy = 1.0f) const; | |||
float extraAccuracy = 1.0f) const; | |||
//============================================================================== | |||
/** Returns the stroke thickness. */ | |||
@@ -168,8 +168,7 @@ public: | |||
/** Same functionality as updateFrom(), but taking doubles instead of ints. | |||
*/ | |||
void updateFromDouble (const double x, const double y, | |||
const double width, const double height, | |||
void updateFromDouble (double x, double y, double width, double height, | |||
const Rectangle<int>& targetSpaceToBeRelativeTo) throw(); | |||
/** Updates this object's co-ordinates to match the bounds of this component. | |||
@@ -330,16 +329,16 @@ private: | |||
double x, y, w, h; | |||
uint8 xMode, yMode, wMode, hMode; | |||
void addPosDescription (String& result, const uint8 mode, const double value) const throw(); | |||
void addSizeDescription (String& result, const uint8 mode, const double value) const throw(); | |||
void addPosDescription (String& result, uint8 mode, double value) const throw(); | |||
void addSizeDescription (String& result, uint8 mode, double value) const throw(); | |||
void decodePosString (const String& s, uint8& mode, double& value) throw(); | |||
void decodeSizeString (const String& s, uint8& mode, double& value) throw(); | |||
void applyPosAndSize (double& xOut, double& wOut, const double x, const double w, | |||
const uint8 xMode, const uint8 wMode, | |||
const int parentPos, const int parentSize) const throw(); | |||
void updatePosAndSize (double& xOut, double& wOut, double x, const double w, | |||
const uint8 xMode, const uint8 wMode, | |||
const int parentPos, const int parentSize) const throw(); | |||
void applyPosAndSize (double& xOut, double& wOut, double x, double w, | |||
uint8 xMode, uint8 wMode, | |||
int parentPos, int parentSize) const throw(); | |||
void updatePosAndSize (double& xOut, double& wOut, double x, double w, | |||
uint8 xMode, uint8 wMode, | |||
int parentPos, int parentSize) const throw(); | |||
}; | |||
@@ -83,8 +83,7 @@ public: | |||
The rectangle being added will first be clipped to remove any parts of it | |||
that overlap existing rectangles in the list. | |||
*/ | |||
void add (const int x, const int y, | |||
const int w, const int h) throw(); | |||
void add (int x, int y, int width, int height) throw(); | |||
/** Merges a new rectangle into the list. | |||
@@ -167,7 +166,7 @@ public: | |||
@returns true if the point lies within one of the rectangles in the list | |||
*/ | |||
bool containsPoint (const int x, const int y) const throw(); | |||
bool containsPoint (int x, int y) const throw(); | |||
/** Checks whether the region contains the whole of a given rectangle. | |||
@@ -204,7 +203,7 @@ public: | |||
void consolidate() throw(); | |||
/** Adds an x and y value to all the co-ordinates. */ | |||
void offsetAll (const int dx, const int dy) throw(); | |||
void offsetAll (int dx, int dy) throw(); | |||
//============================================================================== | |||
/** Creates a Path object to represent this region. */ | |||
@@ -71,7 +71,7 @@ public: | |||
DirectoryIterator (const File& directory, | |||
bool isRecursive, | |||
const String& wildCard = JUCE_T("*"), | |||
const int whatToLookFor = File::findFiles); | |||
int whatToLookFor = File::findFiles); | |||
/** Destructor. */ | |||
~DirectoryIterator(); | |||
@@ -57,7 +57,7 @@ public: | |||
@see TemporaryFile | |||
*/ | |||
FileOutputStream (const File& fileToWriteTo, | |||
const int bufferSizeToUse = 16384); | |||
int bufferSizeToUse = 16384); | |||
/** Destructor. */ | |||
~FileOutputStream(); | |||
@@ -78,7 +78,7 @@ public: | |||
@see getNumPaths | |||
*/ | |||
const File operator[] (const int index) const; | |||
const File operator[] (int index) const; | |||
/** Returns the search path as a semicolon-separated list of directories. */ | |||
const String toString() const; | |||
@@ -90,13 +90,13 @@ public: | |||
less than zero, otherwise it is inserted at the given index. | |||
*/ | |||
void add (const File& directoryToAdd, | |||
const int insertIndex = -1); | |||
int insertIndex = -1); | |||
/** Adds a new directory to the search path if it's not already in there. */ | |||
void addIfNotAlreadyThere (const File& directoryToAdd); | |||
/** Removes a directory from the search path. */ | |||
void remove (const int indexToRemove); | |||
void remove (int indexToRemove); | |||
/** Merges another search path into this one. | |||
@@ -131,8 +131,8 @@ public: | |||
@see File::findChildFiles | |||
*/ | |||
int findChildFiles (Array<File>& results, | |||
const int whatToLookFor, | |||
const bool searchRecursively, | |||
int whatToLookFor, | |||
bool searchRecursively, | |||
const String& wildCardPattern = JUCE_T("*")) const; | |||
//============================================================================== | |||
@@ -152,7 +152,7 @@ public: | |||
*/ | |||
bool isFileInPath (const File& fileToCheck, | |||
const bool checkRecursively) const; | |||
bool checkRecursively) const; | |||
//============================================================================== | |||
juce_UseDebuggingNewOperator | |||
@@ -90,7 +90,7 @@ public: | |||
this object is deleted, the file will also be deleted! | |||
*/ | |||
TemporaryFile (const String& suffix = String::empty, | |||
const int optionFlags = 0); | |||
int optionFlags = 0); | |||
/** Creates a temporary file in the same directory as a specified file. | |||
@@ -108,7 +108,7 @@ public: | |||
@param optionFlags a combination of the values listed in the OptionFlags enum | |||
*/ | |||
TemporaryFile (const File& targetFile, | |||
const int optionFlags = 0); | |||
int optionFlags = 0); | |||
/** Destructor. | |||
@@ -150,7 +150,7 @@ private: | |||
//============================================================================== | |||
File temporaryFile, targetFile; | |||
void createTempFile (const File& parentDirectory, String name, const String& suffix, const int optionFlags); | |||
void createTempFile (const File& parentDirectory, String name, const String& suffix, int optionFlags); | |||
TemporaryFile (const TemporaryFile&); | |||
TemporaryFile& operator= (const TemporaryFile&); | |||
@@ -50,8 +50,8 @@ public: | |||
@param deleteStreamWhenDestroyed if set to true, the object passed-in | |||
will be deleted when this ZipFile object is deleted | |||
*/ | |||
ZipFile (InputStream* const inputStream, | |||
const bool deleteStreamWhenDestroyed) throw(); | |||
ZipFile (InputStream* inputStream, | |||
bool deleteStreamWhenDestroyed) throw(); | |||
/** Creates a ZipFile based for a file. */ | |||
ZipFile (const File& file); | |||
@@ -61,7 +61,7 @@ public: | |||
The inputSource object will be owned by the zip file, which will delete | |||
it later when not needed. | |||
*/ | |||
ZipFile (InputSource* const inputSource); | |||
ZipFile (InputSource* inputSource); | |||
/** Destructor. */ | |||
~ZipFile() throw(); | |||
@@ -94,7 +94,7 @@ public: | |||
@see ZipFile::ZipEntry | |||
*/ | |||
const ZipEntry* getEntry (const int index) const throw(); | |||
const ZipEntry* getEntry (int index) const throw(); | |||
/** Returns the index of the first entry with a given filename. | |||
@@ -127,7 +127,7 @@ public: | |||
The stream must not be used after the ZipFile object that created | |||
has been deleted. | |||
*/ | |||
InputStream* createStreamForEntry (const int index); | |||
InputStream* createStreamForEntry (int index); | |||
//============================================================================== | |||
/** Uncompresses all of the files in the zip file. | |||
@@ -139,7 +139,7 @@ public: | |||
@param shouldOverwriteFiles whether to overwrite existing files with similarly-named ones | |||
*/ | |||
void uncompressTo (const File& targetDirectory, | |||
const bool shouldOverwriteFiles = true); | |||
bool shouldOverwriteFiles = true); | |||
//============================================================================== | |||
@@ -62,7 +62,7 @@ public: | |||
@returns true on success; false may indicate that another socket is already bound | |||
on the same port | |||
*/ | |||
bool bindToPort (const int localPortNumber); | |||
bool bindToPort (int localPortNumber); | |||
/** Tries to connect the socket to hostname:port. | |||
@@ -73,8 +73,8 @@ public: | |||
@see isConnected | |||
*/ | |||
bool connect (const String& remoteHostname, | |||
const int remotePortNumber, | |||
const int timeOutMillisecs = 3000); | |||
int remotePortNumber, | |||
int timeOutMillisecs = 3000); | |||
/** True if the socket is currently connected. */ | |||
bool isConnected() const throw() { return connected; } | |||
@@ -103,8 +103,8 @@ public: | |||
If the socket is ready on return, this returns 1. If it times-out before | |||
the socket becomes ready, it returns 0. If an error occurs, it returns -1. | |||
*/ | |||
int waitUntilReady (const bool readyForReading, | |||
const int timeoutMsecs) const; | |||
int waitUntilReady (bool readyForReading, | |||
int timeoutMsecs) const; | |||
/** Reads bytes from the socket. | |||
@@ -116,8 +116,8 @@ public: | |||
@returns the number of bytes read, or -1 if there was an error. | |||
@see waitUntilReady | |||
*/ | |||
int read (void* destBuffer, const int maxBytesToRead, | |||
const bool blockUntilSpecifiedAmountHasArrived); | |||
int read (void* destBuffer, int maxBytesToRead, | |||
bool blockUntilSpecifiedAmountHasArrived); | |||
/** Writes bytes to the socket from a buffer. | |||
@@ -126,7 +126,7 @@ public: | |||
@returns the number of bytes written, or -1 if there was an error. | |||
*/ | |||
int write (const void* sourceBuffer, const int numBytesToWrite); | |||
int write (const void* sourceBuffer, int numBytesToWrite); | |||
//============================================================================== | |||
/** Puts this socket into "listener" mode. | |||
@@ -142,7 +142,7 @@ public: | |||
@see waitForNextConnection | |||
*/ | |||
bool createListener (const int portNumber, const String& localHostName = String::empty); | |||
bool createListener (int portNumber, const String& localHostName = String::empty); | |||
/** When in "listener" mode, this waits for a connection and spawns it as a new | |||
socket. | |||
@@ -164,7 +164,7 @@ private: | |||
int volatile portNumber, handle; | |||
bool connected, isListener; | |||
StreamingSocket (const String& hostname, const int portNumber, const int handle); | |||
StreamingSocket (const String& hostname, int portNumber, int handle); | |||
StreamingSocket (const StreamingSocket&); | |||
StreamingSocket& operator= (const StreamingSocket&); | |||
}; | |||
@@ -198,8 +198,8 @@ public: | |||
To wait for other sockets to connect to this one, call waitForNextConnection(). | |||
*/ | |||
DatagramSocket (const int localPortNumber, | |||
const bool enableBroadcasting = false); | |||
DatagramSocket (int localPortNumber, | |||
bool enableBroadcasting = false); | |||
/** Destructor. */ | |||
~DatagramSocket(); | |||
@@ -210,7 +210,7 @@ public: | |||
@returns true on success; false may indicate that another socket is already bound | |||
on the same port | |||
*/ | |||
bool bindToPort (const int localPortNumber); | |||
bool bindToPort (int localPortNumber); | |||
/** Tries to connect the socket to hostname:port. | |||
@@ -221,8 +221,8 @@ public: | |||
@see isConnected | |||
*/ | |||
bool connect (const String& remoteHostname, | |||
const int remotePortNumber, | |||
const int timeOutMillisecs = 3000); | |||
int remotePortNumber, | |||
int timeOutMillisecs = 3000); | |||
/** True if the socket is currently connected. */ | |||
bool isConnected() const throw() { return connected; } | |||
@@ -251,8 +251,8 @@ public: | |||
If the socket is ready on return, this returns 1. If it times-out before | |||
the socket becomes ready, it returns 0. If an error occurs, it returns -1. | |||
*/ | |||
int waitUntilReady (const bool readyForReading, | |||
const int timeoutMsecs) const; | |||
int waitUntilReady (bool readyForReading, | |||
int timeoutMsecs) const; | |||
/** Reads bytes from the socket. | |||
@@ -264,8 +264,8 @@ public: | |||
@returns the number of bytes read, or -1 if there was an error. | |||
@see waitUntilReady | |||
*/ | |||
int read (void* destBuffer, const int maxBytesToRead, | |||
const bool blockUntilSpecifiedAmountHasArrived); | |||
int read (void* destBuffer, int maxBytesToRead, | |||
bool blockUntilSpecifiedAmountHasArrived); | |||
/** Writes bytes to the socket from a buffer. | |||
@@ -274,7 +274,7 @@ public: | |||
@returns the number of bytes written, or -1 if there was an error. | |||
*/ | |||
int write (const void* sourceBuffer, const int numBytesToWrite); | |||
int write (const void* sourceBuffer, int numBytesToWrite); | |||
//============================================================================== | |||
/** This waits for incoming data to be sent, and returns a socket that can be used | |||
@@ -295,7 +295,7 @@ private: | |||
bool connected, allowBroadcast; | |||
void* serverAddress; | |||
DatagramSocket (const String& hostname, const int portNumber, const int handle, const int localPortNumber); | |||
DatagramSocket (const String& hostname, int portNumber, int handle, int localPortNumber); | |||
DatagramSocket (const DatagramSocket&); | |||
DatagramSocket& operator= (const DatagramSocket&); | |||
}; | |||
@@ -64,7 +64,7 @@ public: | |||
withParameter() method, then the string will have these appended on the | |||
end and url-encoded. | |||
*/ | |||
const String toString (const bool includeGetParameters) const; | |||
const String toString (bool includeGetParameters) const; | |||
/** True if it seems to be valid. */ | |||
bool isWellFormed() const; | |||
@@ -204,11 +204,11 @@ public: | |||
a negative number, it will be infinite. Otherwise it specifies a | |||
time in milliseconds. | |||
*/ | |||
InputStream* createInputStream (const bool usePostCommand, | |||
OpenStreamProgressCallback* const progressCallback = 0, | |||
void* const progressCallbackContext = 0, | |||
InputStream* createInputStream (bool usePostCommand, | |||
OpenStreamProgressCallback* progressCallback = 0, | |||
void* progressCallbackContext = 0, | |||
const String& extraHeaders = String::empty, | |||
const int connectionTimeOutMs = 0) const; | |||
int connectionTimeOutMs = 0) const; | |||
//============================================================================== | |||
@@ -223,7 +223,7 @@ public: | |||
@see readEntireTextStream, readEntireXmlStream | |||
*/ | |||
bool readEntireBinaryStream (MemoryBlock& destData, | |||
const bool usePostCommand = false) const; | |||
bool usePostCommand = false) const; | |||
/** Tries to download the entire contents of this URL as a string. | |||
@@ -236,7 +236,7 @@ public: | |||
a GET command if this is false) | |||
@see readEntireBinaryStream, readEntireXmlStream | |||
*/ | |||
const String readEntireTextStream (const bool usePostCommand = false) const; | |||
const String readEntireTextStream (bool usePostCommand = false) const; | |||
/** Tries to download the entire contents of this URL and parse it as XML. | |||
@@ -251,7 +251,7 @@ public: | |||
@see readEntireBinaryStream, readEntireTextStream | |||
*/ | |||
XmlElement* readEntireXmlStream (const bool usePostCommand = false) const; | |||
XmlElement* readEntireXmlStream (bool usePostCommand = false) const; | |||
//============================================================================== | |||
/** Adds escape sequences to a string to encode any characters that aren't | |||
@@ -268,7 +268,7 @@ public: | |||
@see removeEscapeChars | |||
*/ | |||
static const String addEscapeChars (const String& stringToAddEscapeCharsTo, | |||
const bool isParameter); | |||
bool isParameter); | |||
/** Replaces any escape character sequences in a string with their original | |||
character codes. | |||
@@ -73,8 +73,7 @@ public: | |||
@returns the actual number of bytes that were read, which may be less than | |||
maxBytesToRead if the stream is exhausted before it gets that far | |||
*/ | |||
virtual int read (void* destBuffer, | |||
int maxBytesToRead) = 0; | |||
virtual int read (void* destBuffer, int maxBytesToRead) = 0; | |||
/** Reads a byte from the stream. | |||
@@ -189,8 +189,8 @@ public: | |||
The method also replaces '\\n' characters in the text with '\\r\\n'. | |||
*/ | |||
virtual void writeText (const String& text, | |||
const bool asUnicode, | |||
const bool writeUnicodeHeaderBytes); | |||
bool asUnicode, | |||
bool writeUnicodeHeaderBytes); | |||
/** Reads data from an input stream and writes it to this stream. | |||
@@ -207,16 +207,16 @@ public: | |||
//============================================================================== | |||
/** Writes a number to a stream as 8-bit characters in the default system encoding. */ | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const int number); | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, int number); | |||
/** Writes a number to a stream as 8-bit characters in the default system encoding. */ | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const double number); | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, double number); | |||
/** Writes a character to a stream. */ | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const char character); | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, char character); | |||
/** Writes a null-terminated text string to a stream. */ | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const char* const text); | |||
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const char* text); | |||
@@ -57,10 +57,10 @@ public: | |||
@param deleteSourceWhenDestroyed whether the sourceStream that is passed in should be | |||
deleted by this object when it is itself deleted. | |||
*/ | |||
SubregionStream (InputStream* const sourceStream, | |||
const int64 startPositionInSourceStream, | |||
const int64 lengthOfSourceStream, | |||
const bool deleteSourceWhenDestroyed) throw(); | |||
SubregionStream (InputStream* sourceStream, | |||
int64 startPositionInSourceStream, | |||
int64 lengthOfSourceStream, | |||
bool deleteSourceWhenDestroyed) throw(); | |||
/** Destructor. | |||
@@ -96,7 +96,7 @@ public: | |||
@see startThread, setPriority | |||
*/ | |||
void startThread (const int priority); | |||
void startThread (int priority); | |||
/** Attempts to stop the thread running. | |||
@@ -116,7 +116,7 @@ public: | |||
value in here will wait forever. | |||
@see signalThreadShouldExit, threadShouldExit, waitForThreadToExit, isThreadRunning | |||
*/ | |||
void stopThread (const int timeOutMilliseconds); | |||
void stopThread (int timeOutMilliseconds); | |||
//============================================================================== | |||
/** Returns true if the thread is currently active */ | |||
@@ -149,7 +149,7 @@ public: | |||
is less than zero, it will wait forever. | |||
@returns true if the thread exits, or false if the timeout expires first. | |||
*/ | |||
bool waitForThreadToExit (const int timeOutMilliseconds) const; | |||
bool waitForThreadToExit (int timeOutMilliseconds) const; | |||
//============================================================================== | |||
/** Changes the thread's priority. | |||
@@ -158,7 +158,7 @@ public: | |||
@param priority the new priority, in the range 0 (lowest) to 10 (highest). A priority | |||
of 5 is normal. | |||
*/ | |||
bool setPriority (const int priority); | |||
bool setPriority (int priority); | |||
/** Changes the priority of the caller thread. | |||
@@ -167,7 +167,7 @@ public: | |||
@see setPriority | |||
*/ | |||
static bool setCurrentThreadPriority (const int priority); | |||
static bool setCurrentThreadPriority (int priority); | |||
//============================================================================== | |||
/** Sets the affinity mask for the thread. | |||
@@ -177,7 +177,7 @@ public: | |||
@see setCurrentThreadAffinityMask | |||
*/ | |||
void setAffinityMask (const uint32 affinityMask); | |||
void setAffinityMask (uint32 affinityMask); | |||
/** Changes the affinity mask for the caller thread. | |||
@@ -185,7 +185,7 @@ public: | |||
@see setAffinityMask | |||
*/ | |||
static void setCurrentThreadAffinityMask (const uint32 affinityMask); | |||
static void setCurrentThreadAffinityMask (uint32 affinityMask); | |||
//============================================================================== | |||
// this can be called from any thread that needs to pause.. | |||
@@ -202,7 +202,7 @@ public: | |||
@returns true if the event has been signalled, false if the timeout expires. | |||
*/ | |||
bool wait (const int timeOutMilliseconds) const; | |||
bool wait (int timeOutMilliseconds) const; | |||
/** Wakes up the thread. | |||
@@ -243,7 +243,7 @@ public: | |||
@see getCurrentThreadId | |||
*/ | |||
ThreadID getThreadId() const { return threadId_; } | |||
ThreadID getThreadId() const throw() { return threadId_; } | |||
/** Returns the name of the thread. | |||
@@ -263,7 +263,7 @@ public: | |||
This will attempt to stop all the threads known to be running at the moment. | |||
*/ | |||
static void stopAllThreads (const int timeoutInMillisecs); | |||
static void stopAllThreads (int timeoutInMillisecs); | |||
//============================================================================== | |||
@@ -167,9 +167,9 @@ public: | |||
inactive for this length of time, they will automatically | |||
be stopped until more jobs come along and they're needed | |||
*/ | |||
ThreadPool (const int numberOfThreads, | |||
const bool startThreadsOnlyWhenNeeded = true, | |||
const int stopThreadsWhenNotUsedTimeoutMs = 5000); | |||
ThreadPool (int numberOfThreads, | |||
bool startThreadsOnlyWhenNeeded = true, | |||
int stopThreadsWhenNotUsedTimeoutMs = 5000); | |||
/** Destructor. | |||
@@ -205,7 +205,7 @@ public: | |||
runJob() method, the pool will either remove the job from the pool or add it to | |||
the back of the queue to be run again. | |||
*/ | |||
void addJob (ThreadPoolJob* const job); | |||
void addJob (ThreadPoolJob* job); | |||
/** Tries to remove a job from the pool. | |||
@@ -224,9 +224,9 @@ public: | |||
@param timeOutMilliseconds the length of time this method should wait for the job to finish | |||
before giving up and returning false | |||
*/ | |||
bool removeJob (ThreadPoolJob* const job, | |||
const bool interruptIfRunning, | |||
const int timeOutMilliseconds); | |||
bool removeJob (ThreadPoolJob* job, | |||
bool interruptIfRunning, | |||
int timeOutMilliseconds); | |||
/** Tries to remove all jobs from the pool. | |||
@@ -243,9 +243,9 @@ public: | |||
@returns true if all jobs are successfully stopped and removed; false if the timeout period | |||
expires while waiting for one or more jobs to stop | |||
*/ | |||
bool removeAllJobs (const bool interruptRunningJobs, | |||
const int timeOutMilliseconds, | |||
const bool deleteInactiveJobs = false, | |||
bool removeAllJobs (bool interruptRunningJobs, | |||
int timeOutMilliseconds, | |||
bool deleteInactiveJobs = false, | |||
JobSelector* selectedJobsToRemove = 0); | |||
/** Returns the number of jobs currently running or queued. | |||
@@ -257,17 +257,17 @@ public: | |||
Note that this can be a very volatile list as jobs might be continuously getting shifted | |||
around in the list, and this method may return 0 if the index is currently out-of-range. | |||
*/ | |||
ThreadPoolJob* getJob (const int index) const; | |||
ThreadPoolJob* getJob (int index) const; | |||
/** Returns true if the given job is currently queued or running. | |||
@see isJobRunning() | |||
*/ | |||
bool contains (const ThreadPoolJob* const job) const; | |||
bool contains (const ThreadPoolJob* job) const; | |||
/** Returns true if the given job is currently being run by a thread. | |||
*/ | |||
bool isJobRunning (const ThreadPoolJob* const job) const; | |||
bool isJobRunning (const ThreadPoolJob* job) const; | |||
/** Waits until a job has finished running and has been removed from the pool. | |||
@@ -277,21 +277,21 @@ public: | |||
If the timeout period expires before the job finishes, this will return false; | |||
it returns true if the job has finished successfully. | |||
*/ | |||
bool waitForJobToFinish (const ThreadPoolJob* const job, | |||
const int timeOutMilliseconds) const; | |||
bool waitForJobToFinish (const ThreadPoolJob* job, | |||
int timeOutMilliseconds) const; | |||
/** Returns a list of the names of all the jobs currently running or queued. | |||
If onlyReturnActiveJobs is true, only the ones currently running are returned. | |||
*/ | |||
const StringArray getNamesOfAllJobs (const bool onlyReturnActiveJobs) const; | |||
const StringArray getNamesOfAllJobs (bool onlyReturnActiveJobs) const; | |||
/** Changes the priority of all the threads. | |||
This will call Thread::setPriority() for each thread in the pool. | |||
May return false if for some reason the priority can't be changed. | |||
*/ | |||
bool setThreadPriorities (const int newPriority); | |||
bool setThreadPriorities (int newPriority); | |||
//============================================================================== | |||
@@ -100,20 +100,20 @@ public: | |||
The client's callbacks will start immediately (possibly before the method | |||
has returned). | |||
*/ | |||
void addTimeSliceClient (TimeSliceClient* const client); | |||
void addTimeSliceClient (TimeSliceClient* client); | |||
/** Removes a client from the list. | |||
This method will make sure that all callbacks to the client have completely | |||
finished before the method returns. | |||
*/ | |||
void removeTimeSliceClient (TimeSliceClient* const client); | |||
void removeTimeSliceClient (TimeSliceClient* client); | |||
/** Returns the number of registered clients. */ | |||
int getNumClients() const; | |||
/** Returns one of the registered clients. */ | |||
TimeSliceClient* getClient (const int index) const; | |||
TimeSliceClient* getClient (int index) const; | |||
//============================================================================== | |||
/** @internal */ | |||
@@ -66,7 +66,7 @@ public: | |||
@returns true if the object has been signalled, false if the timeout expires first. | |||
@see signal, reset | |||
*/ | |||
bool wait (const int timeOutMilliseconds = -1) const throw(); | |||
bool wait (int timeOutMilliseconds = -1) const throw(); | |||
//============================================================================== | |||
/** Wakes up any threads that are currently waiting on this object. | |||
@@ -95,7 +95,7 @@ public: | |||
@see changed, hasChangedSinceSaved | |||
*/ | |||
void setChangedFlag (const bool hasChanged); | |||
void setChangedFlag (bool hasChanged); | |||
//============================================================================== | |||
/** Tries to open a file. | |||
@@ -108,7 +108,7 @@ public: | |||
@see loadDocument, loadFromUserSpecifiedFile | |||
*/ | |||
bool loadFrom (const File& fileToLoadFrom, | |||
const bool showMessageOnFailure); | |||
bool showMessageOnFailure); | |||
/** Asks the user for a file and tries to load it. | |||
@@ -121,7 +121,7 @@ public: | |||
picked a file which failed to load correctly | |||
@see loadFrom | |||
*/ | |||
bool loadFromUserSpecifiedFile (const bool showMessageOnFailure); | |||
bool loadFromUserSpecifiedFile (bool showMessageOnFailure); | |||
//============================================================================== | |||
/** A set of possible outcomes of one of the save() methods | |||
@@ -145,8 +145,8 @@ public: | |||
save operation fails | |||
@see saveIfNeededAndUserAgrees, saveAs, saveAsInteractive | |||
*/ | |||
SaveResult save (const bool askUserForFileIfNotSpecified, | |||
const bool showMessageOnFailure); | |||
SaveResult save (bool askUserForFileIfNotSpecified, | |||
bool showMessageOnFailure); | |||
/** If the file needs saving, it'll ask the user if that's what they want to do, and save | |||
it if they say yes. | |||
@@ -186,9 +186,9 @@ public: | |||
@see saveIfNeededAndUserAgrees, save, saveAsInteractive | |||
*/ | |||
SaveResult saveAs (const File& newFile, | |||
const bool warnAboutOverwritingExistingFiles, | |||
const bool askUserForFileIfNotSpecified, | |||
const bool showMessageOnFailure); | |||
bool warnAboutOverwritingExistingFiles, | |||
bool askUserForFileIfNotSpecified, | |||
bool showMessageOnFailure); | |||
/** Prompts the user for a filename and tries to save to it. | |||
@@ -201,7 +201,7 @@ public: | |||
the user first if they want to overwrite it | |||
@see saveIfNeededAndUserAgrees, save, saveAs | |||
*/ | |||
SaveResult saveAsInteractive (const bool warnAboutOverwritingExistingFiles); | |||
SaveResult saveAsInteractive (bool warnAboutOverwritingExistingFiles); | |||
//============================================================================== | |||
/** Returns the file that this document was last successfully saved or loaded from. | |||
@@ -59,7 +59,7 @@ public: | |||
@see getMaxNumberOfItems | |||
*/ | |||
void setMaxNumberOfItems (const int newMaxNumber); | |||
void setMaxNumberOfItems (int newMaxNumber); | |||
/** Returns the number of items that this list will store. | |||
@see setMaxNumberOfItems | |||
@@ -76,7 +76,7 @@ public: | |||
The most recently added file is always at index 0. | |||
*/ | |||
const File getFile (const int index) const; | |||
const File getFile (int index) const; | |||
/** Returns an array of all the absolute pathnames in the list. | |||
*/ | |||
@@ -121,9 +121,9 @@ public: | |||
It returns the number of items that were added. | |||
*/ | |||
int createPopupMenuItems (PopupMenu& menuToAddItemsTo, | |||
const int baseItemId, | |||
const bool showFullPaths, | |||
const bool dontAddNonExistentFiles, | |||
int baseItemId, | |||
bool showFullPaths, | |||
bool dontAddNonExistentFiles, | |||
const File** filesToAvoid = 0); | |||
//============================================================================== | |||
@@ -71,8 +71,8 @@ public: | |||
that will be kept, even if this involves exceeding | |||
the amount of space specified in maxNumberOfUnitsToKeep | |||
*/ | |||
UndoManager (const int maxNumberOfUnitsToKeep = 30000, | |||
const int minimumTransactionsToKeep = 30); | |||
UndoManager (int maxNumberOfUnitsToKeep = 30000, | |||
int minimumTransactionsToKeep = 30); | |||
/** Destructor. */ | |||
~UndoManager(); | |||
@@ -101,8 +101,8 @@ public: | |||
the amount of space specified in maxNumberOfUnitsToKeep | |||
@see getNumberOfUnitsTakenUpByStoredCommands | |||
*/ | |||
void setMaxNumberOfStoredUnits (const int maxNumberOfUnitsToKeep, | |||
const int minimumTransactionsToKeep); | |||
void setMaxNumberOfStoredUnits (int maxNumberOfUnitsToKeep, | |||
int minimumTransactionsToKeep); | |||
//============================================================================== | |||
/** Performs an action and adds it to the undo history list. | |||
@@ -115,7 +115,7 @@ public: | |||
@returns true if the command succeeds - see UndoableAction::perform | |||
@see beginNewTransaction | |||
*/ | |||
bool perform (UndoableAction* const action, | |||
bool perform (UndoableAction* action, | |||
const String& actionName = String::empty); | |||
/** Starts a new group of actions that together will be treated as a single transaction. | |||