mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor documentation cleanups.
This commit is contained in:
parent
7e51302069
commit
f6139cee55
11 changed files with 25 additions and 28 deletions
|
|
@ -119,7 +119,7 @@ public:
|
|||
should then be deleted by the caller.
|
||||
|
||||
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
|
||||
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()
|
||||
|
||||
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.
|
||||
|
||||
e.g. @code
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ public:
|
|||
/** Finds the thread object that is currently running.
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ public:
|
|||
|
||||
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
|
||||
will return 0.
|
||||
will return nullptr.
|
||||
*/
|
||||
const ApplicationCommandInfo* getCommandForID (CommandID commandID) const noexcept;
|
||||
|
||||
|
|
|
|||
|
|
@ -796,7 +796,7 @@ public:
|
|||
/** Searches the parent components for a component of a specified class.
|
||||
|
||||
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.
|
||||
*/
|
||||
template <class TargetClass>
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ public:
|
|||
Rectangle<int> getColumnPosition (int index) const;
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
int getColumnIdAtX (int xToFind) const;
|
||||
|
|
@ -412,9 +411,9 @@ private:
|
|||
bool isVisible() const;
|
||||
};
|
||||
|
||||
OwnedArray <ColumnInfo> columns;
|
||||
Array <Listener*> listeners;
|
||||
ScopedPointer <Component> dragOverlayComp;
|
||||
OwnedArray<ColumnInfo> columns;
|
||||
Array<Listener*> listeners;
|
||||
ScopedPointer<Component> dragOverlayComp;
|
||||
class DragOverlayComp;
|
||||
|
||||
bool columnsChanged, columnsResized, sortChanged, menuActive, stretchToFit;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public:
|
|||
{
|
||||
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);
|
||||
addAndMakeVisible (tc, 0);
|
||||
|
|
@ -174,7 +174,7 @@ public:
|
|||
{
|
||||
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);
|
||||
const int index = oldIndexes.remove (i);
|
||||
|
|
@ -196,7 +196,7 @@ public:
|
|||
|
||||
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;
|
||||
|
||||
|
|
@ -455,7 +455,7 @@ void Toolbar::updateAllItemPositions (const bool animate)
|
|||
|
||||
tc->setStyle (toolbarStyle);
|
||||
|
||||
Spacer* const spacer = dynamic_cast <Spacer*> (tc);
|
||||
Spacer* const spacer = dynamic_cast<Spacer*> (tc);
|
||||
|
||||
int preferredSize = 1, minSize = 1, maxSize = 1;
|
||||
|
||||
|
|
@ -555,7 +555,7 @@ bool Toolbar::isInterestedInDragSource (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))
|
||||
{
|
||||
|
|
@ -623,7 +623,7 @@ void Toolbar::itemDragMove (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))
|
||||
{
|
||||
|
|
@ -636,7 +636,7 @@ void Toolbar::itemDragExit (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);
|
||||
}
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ public:
|
|||
bool canModalEventBeSentToComponent (const Component* comp) override
|
||||
{
|
||||
return toolbar.isParentOf (comp)
|
||||
|| dynamic_cast <const ToolbarItemComponent::ItemDragAndDropOverlayComponent*> (comp) != nullptr;
|
||||
|| dynamic_cast<const ToolbarItemComponent::ItemDragAndDropOverlayComponent*> (comp) != nullptr;
|
||||
}
|
||||
|
||||
void positionNearBar()
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public:
|
|||
/** Returns the ID of the item with the given index.
|
||||
|
||||
If the index is less than zero or greater than the number of items,
|
||||
this will return 0.
|
||||
this will return nullptr.
|
||||
|
||||
@see getNumItems
|
||||
*/
|
||||
|
|
@ -145,7 +145,7 @@ public:
|
|||
/** 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,
|
||||
this will return 0.
|
||||
this will return nullptr.
|
||||
|
||||
@see getNumItems
|
||||
*/
|
||||
|
|
@ -314,7 +314,7 @@ private:
|
|||
ToolbarItemStyle toolbarStyle;
|
||||
class MissingItemsComponent;
|
||||
friend class MissingItemsComponent;
|
||||
OwnedArray <ToolbarItemComponent> items;
|
||||
OwnedArray<ToolbarItemComponent> items;
|
||||
class Spacer;
|
||||
class CustomisationDialog;
|
||||
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ public:
|
|||
int getNumRowsInTree() const;
|
||||
|
||||
/** 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()
|
||||
*/
|
||||
TreeViewItem* getItemOnRow (int index) const;
|
||||
|
|
|
|||
|
|
@ -198,25 +198,23 @@ public:
|
|||
void addCustomComponent (Component* component);
|
||||
|
||||
/** Returns the number of custom components in the dialog box.
|
||||
|
||||
@see getCustomComponent, addCustomComponent
|
||||
*/
|
||||
int getNumCustomComponents() const;
|
||||
|
||||
/** 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
|
||||
*/
|
||||
Component* getCustomComponent (int index) const;
|
||||
|
||||
/** 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
|
||||
|
||||
@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)
|
||||
@see getNumCustomComponents, addCustomComponent
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
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.
|
||||
|
||||
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
|
||||
screen.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue