1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Updated some documentation.

This commit is contained in:
jules 2013-07-06 09:49:22 +01:00
parent 9610a27cb9
commit 4e3024bd63

View file

@ -37,16 +37,19 @@
other component - but it looks fancier, and has an arrow that can indicate the
object that it applies to.
Normally, you'd create one of these on the stack and run it modally, e.g.
The class works best when shown modally, but obviously running modal loops is
evil and must never be done, so the launchAsynchronously method is provided as
a handy way of launching an instance of a CallOutBox and automatically managing
its lifetime, e.g.
@code
void mouseUp (const MouseEvent& e)
void mouseUp (const MouseEvent&)
{
MyContentComponent content;
content.setSize (300, 300);
FoobarContentComp* content = new FoobarContentComp();
content->setSize (300, 300);
CallOutBox callOut (content, *this, nullptr);
callOut.runModalLoop();
CallOutBox& myBox
= CallOutBox::launchAsynchronously (content, getScreenBounds(), nullptr);
}
@endcode
@ -97,7 +100,10 @@ public:
This method will create and display a callout, returning immediately, after which
the box will continue to run modally until the user clicks on some other component, at
which point it will be dismissed automatically.
which point it will be dismissed and deleted automatically.
It returns a reference to the newly-created box so that you can customise it, but don't
keep a pointer to it, as it'll be deleted at some point when it gets closed.
@param contentComponent the component to display inside the call-out. This should
already have a size set (although the call-out will also
@ -130,7 +136,7 @@ public:
/** @internal */
bool keyPressed (const KeyPress&) override;
/** @internal */
void handleCommandMessage (int commandId) override;
void handleCommandMessage (int) override;
private:
//==============================================================================