| @@ -119,7 +119,7 @@ public: | |||||
| should then be deleted by the caller. | should then be deleted by the caller. | ||||
| If the stream can't be created for some reason (e.g. the parameters passed in | If the stream can't be created for some reason (e.g. the parameters passed in | ||||
| here aren't suitable), this will return 0. | |||||
| here aren't suitable), this will return nullptr. | |||||
| @param streamToWriteTo the stream that the data will go to - this will be | @param streamToWriteTo the stream that the data will go to - this will be | ||||
| deleted by the AudioFormatWriter object when it's no longer | deleted by the AudioFormatWriter object when it's no longer | ||||
| @@ -44,7 +44,7 @@ | |||||
| destructor, in case it is deleted by other means than deleteInstance() | destructor, in case it is deleted by other means than deleteInstance() | ||||
| Clients can then call the static method MyClass::getInstance() to get a pointer | Clients can then call the static method MyClass::getInstance() to get a pointer | ||||
| to the singleton, or MyClass::getInstanceWithoutCreating() which will return 0 if | |||||
| to the singleton, or MyClass::getInstanceWithoutCreating() which will return nullptr if | |||||
| no instance currently exists. | no instance currently exists. | ||||
| e.g. @code | e.g. @code | ||||
| @@ -235,7 +235,7 @@ public: | |||||
| /** Finds the thread object that is currently running. | /** Finds the thread object that is currently running. | ||||
| Note that the main UI thread (or other non-Juce threads) don't have a Thread | Note that the main UI thread (or other non-Juce threads) don't have a Thread | ||||
| object associated with them, so this will return 0. | |||||
| object associated with them, so this will return nullptr. | |||||
| */ | */ | ||||
| static Thread* JUCE_CALLTYPE getCurrentThread(); | static Thread* JUCE_CALLTYPE getCurrentThread(); | ||||
| @@ -154,7 +154,7 @@ public: | |||||
| This will search the list of registered commands for one with the given command | This will search the list of registered commands for one with the given command | ||||
| ID number, and return its associated info. If no matching command is found, this | ID number, and return its associated info. If no matching command is found, this | ||||
| will return 0. | |||||
| will return nullptr. | |||||
| */ | */ | ||||
| const ApplicationCommandInfo* getCommandForID (CommandID commandID) const noexcept; | const ApplicationCommandInfo* getCommandForID (CommandID commandID) const noexcept; | ||||
| @@ -796,7 +796,7 @@ public: | |||||
| /** Searches the parent components for a component of a specified class. | /** Searches the parent components for a component of a specified class. | ||||
| For example findParentComponentOfClass \<MyComp\>() would return the first parent | For example findParentComponentOfClass \<MyComp\>() would return the first parent | ||||
| component that can be dynamically cast to a MyComp, or will return 0 if none | |||||
| component that can be dynamically cast to a MyComp, or will return nullptr if none | |||||
| of the parents are suitable. | of the parents are suitable. | ||||
| */ | */ | ||||
| template <class TargetClass> | template <class TargetClass> | ||||
| @@ -231,7 +231,6 @@ public: | |||||
| Rectangle<int> getColumnPosition (int index) const; | Rectangle<int> getColumnPosition (int index) const; | ||||
| /** Finds the column ID at a given x-position in the component. | /** Finds the column ID at a given x-position in the component. | ||||
| If there is a column at this point this returns its ID, or if not, it will return 0. | If there is a column at this point this returns its ID, or if not, it will return 0. | ||||
| */ | */ | ||||
| int getColumnIdAtX (int xToFind) const; | int getColumnIdAtX (int xToFind) const; | ||||
| @@ -412,9 +411,9 @@ private: | |||||
| bool isVisible() const; | bool isVisible() const; | ||||
| }; | }; | ||||
| OwnedArray <ColumnInfo> columns; | |||||
| Array <Listener*> listeners; | |||||
| ScopedPointer <Component> dragOverlayComp; | |||||
| OwnedArray<ColumnInfo> columns; | |||||
| Array<Listener*> listeners; | |||||
| ScopedPointer<Component> dragOverlayComp; | |||||
| class DragOverlayComp; | class DragOverlayComp; | ||||
| bool columnsChanged, columnsResized, sortChanged, menuActive, stretchToFit; | bool columnsChanged, columnsResized, sortChanged, menuActive, stretchToFit; | ||||
| @@ -158,7 +158,7 @@ public: | |||||
| { | { | ||||
| ToolbarItemComponent* const tc = bar.items.getUnchecked(i); | ToolbarItemComponent* const tc = bar.items.getUnchecked(i); | ||||
| if (dynamic_cast <Spacer*> (tc) == nullptr && ! tc->isVisible()) | |||||
| if (dynamic_cast<Spacer*> (tc) == nullptr && ! tc->isVisible()) | |||||
| { | { | ||||
| oldIndexes.insert (0, i); | oldIndexes.insert (0, i); | ||||
| addAndMakeVisible (tc, 0); | addAndMakeVisible (tc, 0); | ||||
| @@ -174,7 +174,7 @@ public: | |||||
| { | { | ||||
| for (int i = 0; i < getNumChildComponents(); ++i) | for (int i = 0; i < getNumChildComponents(); ++i) | ||||
| { | { | ||||
| if (ToolbarItemComponent* const tc = dynamic_cast <ToolbarItemComponent*> (getChildComponent (i))) | |||||
| if (ToolbarItemComponent* const tc = dynamic_cast<ToolbarItemComponent*> (getChildComponent (i))) | |||||
| { | { | ||||
| tc->setVisible (false); | tc->setVisible (false); | ||||
| const int index = oldIndexes.remove (i); | const int index = oldIndexes.remove (i); | ||||
| @@ -196,7 +196,7 @@ public: | |||||
| for (int i = 0; i < getNumChildComponents(); ++i) | for (int i = 0; i < getNumChildComponents(); ++i) | ||||
| { | { | ||||
| if (ToolbarItemComponent* const tc = dynamic_cast <ToolbarItemComponent*> (getChildComponent (i))) | |||||
| if (ToolbarItemComponent* const tc = dynamic_cast<ToolbarItemComponent*> (getChildComponent (i))) | |||||
| { | { | ||||
| int preferredSize = 1, minSize = 1, maxSize = 1; | int preferredSize = 1, minSize = 1, maxSize = 1; | ||||
| @@ -455,7 +455,7 @@ void Toolbar::updateAllItemPositions (const bool animate) | |||||
| tc->setStyle (toolbarStyle); | tc->setStyle (toolbarStyle); | ||||
| Spacer* const spacer = dynamic_cast <Spacer*> (tc); | |||||
| Spacer* const spacer = dynamic_cast<Spacer*> (tc); | |||||
| int preferredSize = 1, minSize = 1, maxSize = 1; | int preferredSize = 1, minSize = 1, maxSize = 1; | ||||
| @@ -555,7 +555,7 @@ bool Toolbar::isInterestedInDragSource (const SourceDetails& dragSourceDetails) | |||||
| void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails) | void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails) | ||||
| { | { | ||||
| if (ToolbarItemComponent* const tc = dynamic_cast <ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| if (ToolbarItemComponent* const tc = dynamic_cast<ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| { | { | ||||
| if (! items.contains (tc)) | if (! items.contains (tc)) | ||||
| { | { | ||||
| @@ -623,7 +623,7 @@ void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails) | |||||
| void Toolbar::itemDragExit (const SourceDetails& dragSourceDetails) | void Toolbar::itemDragExit (const SourceDetails& dragSourceDetails) | ||||
| { | { | ||||
| if (ToolbarItemComponent* const tc = dynamic_cast <ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| if (ToolbarItemComponent* const tc = dynamic_cast<ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| { | { | ||||
| if (isParentOf (tc)) | if (isParentOf (tc)) | ||||
| { | { | ||||
| @@ -636,7 +636,7 @@ void Toolbar::itemDragExit (const SourceDetails& dragSourceDetails) | |||||
| void Toolbar::itemDropped (const SourceDetails& dragSourceDetails) | void Toolbar::itemDropped (const SourceDetails& dragSourceDetails) | ||||
| { | { | ||||
| if (ToolbarItemComponent* const tc = dynamic_cast <ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| if (ToolbarItemComponent* const tc = dynamic_cast<ToolbarItemComponent*> (dragSourceDetails.sourceComponent.get())) | |||||
| tc->setState (Button::buttonNormal); | tc->setState (Button::buttonNormal); | ||||
| } | } | ||||
| @@ -669,7 +669,7 @@ public: | |||||
| bool canModalEventBeSentToComponent (const Component* comp) override | bool canModalEventBeSentToComponent (const Component* comp) override | ||||
| { | { | ||||
| return toolbar.isParentOf (comp) | return toolbar.isParentOf (comp) | ||||
| || dynamic_cast <const ToolbarItemComponent::ItemDragAndDropOverlayComponent*> (comp) != nullptr; | |||||
| || dynamic_cast<const ToolbarItemComponent::ItemDragAndDropOverlayComponent*> (comp) != nullptr; | |||||
| } | } | ||||
| void positionNearBar() | void positionNearBar() | ||||
| @@ -136,7 +136,7 @@ public: | |||||
| /** Returns the ID of the item with the given index. | /** Returns the ID of the item with the given index. | ||||
| If the index is less than zero or greater than the number of items, | If the index is less than zero or greater than the number of items, | ||||
| this will return 0. | |||||
| this will return nullptr. | |||||
| @see getNumItems | @see getNumItems | ||||
| */ | */ | ||||
| @@ -145,7 +145,7 @@ public: | |||||
| /** Returns the component being used for the item with the given index. | /** Returns the component being used for the item with the given index. | ||||
| If the index is less than zero or greater than the number of items, | If the index is less than zero or greater than the number of items, | ||||
| this will return 0. | |||||
| this will return nullptr. | |||||
| @see getNumItems | @see getNumItems | ||||
| */ | */ | ||||
| @@ -314,7 +314,7 @@ private: | |||||
| ToolbarItemStyle toolbarStyle; | ToolbarItemStyle toolbarStyle; | ||||
| class MissingItemsComponent; | class MissingItemsComponent; | ||||
| friend class MissingItemsComponent; | friend class MissingItemsComponent; | ||||
| OwnedArray <ToolbarItemComponent> items; | |||||
| OwnedArray<ToolbarItemComponent> items; | |||||
| class Spacer; | class Spacer; | ||||
| class CustomisationDialog; | class CustomisationDialog; | ||||
| @@ -717,7 +717,7 @@ public: | |||||
| int getNumRowsInTree() const; | int getNumRowsInTree() const; | ||||
| /** Returns the item on a particular row of the tree. | /** Returns the item on a particular row of the tree. | ||||
| If the index is out of range, this will return 0. | |||||
| If the index is out of range, this will return nullptr. | |||||
| @see getNumRowsInTree, TreeViewItem::getRowNumberInTree() | @see getNumRowsInTree, TreeViewItem::getRowNumberInTree() | ||||
| */ | */ | ||||
| TreeViewItem* getItemOnRow (int index) const; | TreeViewItem* getItemOnRow (int index) const; | ||||
| @@ -198,25 +198,23 @@ public: | |||||
| void addCustomComponent (Component* component); | void addCustomComponent (Component* component); | ||||
| /** Returns the number of custom components in the dialog box. | /** Returns the number of custom components in the dialog box. | ||||
| @see getCustomComponent, addCustomComponent | @see getCustomComponent, addCustomComponent | ||||
| */ | */ | ||||
| int getNumCustomComponents() const; | int getNumCustomComponents() const; | ||||
| /** Returns one of the custom components in the dialog box. | /** Returns one of the custom components in the dialog box. | ||||
| @param index a value 0 to (getNumCustomComponents() - 1). Out-of-range indexes | |||||
| will return 0 | |||||
| @param index a value 0 to (getNumCustomComponents() - 1). | |||||
| Out-of-range indexes will return nullptr | |||||
| @see getNumCustomComponents, addCustomComponent | @see getNumCustomComponents, addCustomComponent | ||||
| */ | */ | ||||
| Component* getCustomComponent (int index) const; | Component* getCustomComponent (int index) const; | ||||
| /** Removes one of the custom components in the dialog box. | /** Removes one of the custom components in the dialog box. | ||||
| Note that this won't delete it, it just removes the component from the window | Note that this won't delete it, it just removes the component from the window | ||||
| @param index a value 0 to (getNumCustomComponents() - 1). Out-of-range indexes | |||||
| will return 0 | |||||
| @param index a value 0 to (getNumCustomComponents() - 1). | |||||
| Out-of-range indexes will return nullptr | |||||
| @returns the component that was removed (or null) | @returns the component that was removed (or null) | ||||
| @see getNumCustomComponents, addCustomComponent | @see getNumCustomComponents, addCustomComponent | ||||
| */ | */ | ||||
| @@ -82,7 +82,7 @@ public: | |||||
| them, you can use this to show it in front of the relevent parent window, which | them, you can use this to show it in front of the relevent parent window, which | ||||
| is a bit neater than just having it appear in the middle of the screen. | is a bit neater than just having it appear in the middle of the screen. | ||||
| If componentToCentreAround is 0, then the currently active TopLevelWindow will | |||||
| If componentToCentreAround is nullptr, then the currently active TopLevelWindow will | |||||
| be used instead. If no window is focused, it'll just default to the middle of the | be used instead. If no window is focused, it'll just default to the middle of the | ||||
| screen. | screen. | ||||
| */ | */ | ||||