Browse Source

Minor documentation cleanups.

tags/2021-05-28
jules 10 years ago
parent
commit
f6139cee55
11 changed files with 25 additions and 28 deletions
  1. +1
    -1
      modules/juce_audio_formats/format/juce_AudioFormat.h
  2. +1
    -1
      modules/juce_core/memory/juce_Singleton.h
  3. +1
    -1
      modules/juce_core/threads/juce_Thread.h
  4. +1
    -1
      modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h
  5. +1
    -1
      modules/juce_gui_basics/components/juce_Component.h
  6. +3
    -4
      modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h
  7. +8
    -8
      modules/juce_gui_basics/widgets/juce_Toolbar.cpp
  8. +3
    -3
      modules/juce_gui_basics/widgets/juce_Toolbar.h
  9. +1
    -1
      modules/juce_gui_basics/widgets/juce_TreeView.h
  10. +4
    -6
      modules/juce_gui_basics/windows/juce_AlertWindow.h
  11. +1
    -1
      modules/juce_gui_basics/windows/juce_TopLevelWindow.h

+ 1
- 1
modules/juce_audio_formats/format/juce_AudioFormat.h View File

@@ -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


+ 1
- 1
modules/juce_core/memory/juce_Singleton.h View File

@@ -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


+ 1
- 1
modules/juce_core/threads/juce_Thread.h View File

@@ -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();


+ 1
- 1
modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h View File

@@ -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;


+ 1
- 1
modules/juce_gui_basics/components/juce_Component.h View File

@@ -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>


+ 3
- 4
modules/juce_gui_basics/widgets/juce_TableHeaderComponent.h View File

@@ -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;


+ 8
- 8
modules/juce_gui_basics/widgets/juce_Toolbar.cpp View File

@@ -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()


+ 3
- 3
modules/juce_gui_basics/widgets/juce_Toolbar.h View File

@@ -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;


+ 1
- 1
modules/juce_gui_basics/widgets/juce_TreeView.h View File

@@ -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;


+ 4
- 6
modules/juce_gui_basics/windows/juce_AlertWindow.h View File

@@ -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
*/


+ 1
- 1
modules/juce_gui_basics/windows/juce_TopLevelWindow.h View File

@@ -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…
Cancel
Save