Browse Source

Made the documentation of some classes clearer regarding when a notification will be sent

tags/2021-05-28
ed 7 years ago
parent
commit
9bb4e025ca
5 changed files with 44 additions and 7 deletions
  1. +2
    -1
      modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h
  2. +27
    -0
      modules/juce_gui_basics/layout/juce_ScrollBar.h
  3. +8
    -4
      modules/juce_gui_basics/widgets/juce_Slider.h
  4. +1
    -1
      modules/juce_gui_basics/widgets/juce_TreeView.h
  5. +6
    -1
      modules/juce_gui_extra/misc/juce_ColourSelector.h

+ 2
- 1
modules/juce_gui_basics/filebrowser/juce_FilenameComponent.h View File

@@ -112,7 +112,8 @@ public:
@param newFile the new filename to use
@param addToRecentlyUsedList if true, the filename will also be added to the
drop-down list of recent files.
@param notification whether to send a notification of the change to listeners
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the filename has changed.
*/
void setCurrentFile (File newFile,
bool addToRecentlyUsedList,


+ 27
- 0
modules/juce_gui_basics/layout/juce_ScrollBar.h View File

@@ -95,6 +95,10 @@ public:
The bar's thumb will always be constrained so that the entire thumb lies
within this range.
@param newRangeLimit the new range.
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the range has changed.
@see setCurrentRange
*/
void setRangeLimits (Range<double> newRangeLimit,
@@ -105,6 +109,11 @@ public:
The bar's thumb will always be constrained so that the entire thumb lies
within this range.
@param minimum the new range minimum.
@param maximum the new range maximum.
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the range has changed.
@see setCurrentRange
*/
void setRangeLimits (double minimum, double maximum,
@@ -208,6 +217,11 @@ public:
A positive value here will move the bar down or to the right, a negative
value moves it up or to the left.
@param howManySteps the number of steps to move the scrollbar
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the position has changed.
@returns true if the scrollbar's position actually changed.
*/
bool moveScrollbarInSteps (int howManySteps,
@@ -220,6 +234,11 @@ public:
A positive value here will move the bar down or to the right, a negative
value moves it up or to the left.
@param howManyPages the number of pages to move the scrollbar
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the position has changed.
@returns true if the scrollbar's position actually changed.
*/
bool moveScrollbarInPages (int howManyPages,
@@ -227,12 +246,20 @@ public:
/** Scrolls to the top (or left).
This is the same as calling setCurrentRangeStart (getMinimumRangeLimit());
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the position has changed.
@returns true if the scrollbar's position actually changed.
*/
bool scrollToTop (NotificationType notification = sendNotificationAsync);
/** Scrolls to the bottom (or right).
This is the same as calling setCurrentRangeStart (getMaximumRangeLimit() - getCurrentRangeSize());
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the position has changed.
@returns true if the scrollbar's position actually changed.
*/
bool scrollToBottom (NotificationType notification = sendNotificationAsync);


+ 8
- 4
modules/juce_gui_basics/widgets/juce_Slider.h View File

@@ -377,7 +377,8 @@ public:
nearest interval if one has been set
@param notification can be one of the NotificationType values, to request
a synchronous or asynchronous call to the valueChanged() method
of any Slider::Listeners that are registered.
of any Slider::Listeners that are registered. A notification will
only be sent if the Slider's value has changed.
*/
void setValue (double newValue, NotificationType notification = sendNotificationAsync);
@@ -460,7 +461,8 @@ public:
interval if one has been set.
@param notification can be one of the NotificationType values, to request
a synchronous or asynchronous call to the valueChanged() method
of any Slider::Listeners that are registered.
of any Slider::Listeners that are registered. A notification will
only be sent if this value has changed.
@param allowNudgingOfOtherValues if false, this value will be restricted to being below the
max value (in a two-value slider) or the mid value (in a three-value
slider). If true, then if this value goes beyond those values,
@@ -500,7 +502,8 @@ public:
interval if one has been set.
@param notification can be one of the NotificationType values, to request
a synchronous or asynchronous call to the valueChanged() method
of any Slider::Listeners that are registered.
of any Slider::Listeners that are registered. A notification will
only be sent if this value has changed.
@param allowNudgingOfOtherValues if false, this value will be restricted to being above the
min value (in a two-value slider) or the mid value (in a three-value
slider). If true, then if this value goes beyond those values,
@@ -523,7 +526,8 @@ public:
nearest interval if one has been set.
@param notification can be one of the NotificationType values, to request
a synchronous or asynchronous call to the valueChanged() method
of any Slider::Listeners that are registered.
of any Slider::Listeners that are registered. A notification will
only be sent if one or more of the values has changed.
@see setMaxValue, setMinValue, setValue
*/
void setMinAndMaxValues (double newMinValue, double newMaxValue,


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

@@ -182,7 +182,7 @@ public:
/** Selects or deselects the item.
If shouldNotify == sendNotification, then a callback will be made
to itemSelectionChanged()
to itemSelectionChanged() if the item's selection has changed.
*/
void setSelected (bool shouldBeSelected,
bool deselectOtherItemsFirst,


+ 6
- 1
modules/juce_gui_extra/misc/juce_ColourSelector.h View File

@@ -80,7 +80,12 @@ public:
*/
Colour getCurrentColour() const;
/** Changes the colour that is currently being shown. */
/** Changes the colour that is currently being shown.
@param newColour the new colour to show
@param notification whether to send a notification of the change to listeners.
A notification will only be sent if the colour has changed.
*/
void setCurrentColour (Colour newColour, NotificationType notificationType = sendNotification);
//==============================================================================


Loading…
Cancel
Save