mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Documentation improvement.
This commit is contained in:
parent
29f36905c5
commit
d7d662bb38
2 changed files with 34 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue