Browse Source

Documentation improvement.

tags/2021-05-28
jules 11 years ago
parent
commit
d7d662bb38
2 changed files with 34 additions and 3 deletions
  1. +32
    -0
      modules/juce_core/memory/juce_SharedResourcePointer.h
  2. +2
    -3
      modules/juce_gui_extra/misc/juce_ColourSelector.h

+ 32
- 0
modules/juce_core/memory/juce_SharedResourcePointer.h View File

@@ -49,6 +49,38 @@
Note: the construction/deletion of the shared object must not involve any
code that makes recursive calls to a SharedResourcePointer, or you'll cause
a deadlock.
Example:
@code
// An example of a class that contains the shared data you want to use.
struct MySharedData
{
// There's no need to ever create an instance of this class directly yourself,
// but it does need a public constructor that does the initialisation.
MySharedData()
{
sharedStuff = generateHeavyweightStuff();
}
Array<SomeKindOfData> sharedStuff;
};
struct DataUserClass
{
DataUserClass()
{
// Multiple instances of the DataUserClass will all have the same
// shared common instance of MySharedData referenced by their sharedData
// member variables.
useSharedStuff (sharedData->sharedStuff);
}
// By keeping this pointer as a member variable, the shared resource
// is guaranteed to be available for as long as the DataUserClass object.
SharedResourcePointer<MySharedData> sharedData;
};
@endcode
*/
template <typename SharedObjectType>
class SharedResourcePointer


+ 2
- 3
modules/juce_gui_extra/misc/juce_ColourSelector.h View File

@@ -62,7 +62,7 @@ public:
gapAroundColourSpaceComponent indicates how much of a gap to put around the
colourspace and hue selector components.
*/
ColourSelector (int sectionsToShow = (showAlphaChannel | showColourAtTop | showSliders | showColourspace),
ColourSelector (int flags = (showAlphaChannel | showColourAtTop | showSliders | showColourspace),
int edgeGap = 4,
int gapAroundColourSpaceComponent = 7);
@@ -79,8 +79,7 @@ public:
*/
Colour getCurrentColour() const;
/** Changes the colour that is currently being shown.
*/
/** Changes the colour that is currently being shown. */
void setCurrentColour (Colour newColour);
//==============================================================================


Loading…
Cancel
Save