Browse Source

Add a comment to tooltip window to clarify it's use in plug-ins

tags/2021-05-28
hogliux 10 years ago
parent
commit
a595f19d0f
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      modules/juce_gui_basics/windows/juce_TooltipWindow.h

+ 5
- 2
modules/juce_gui_basics/windows/juce_TooltipWindow.h View File

@@ -32,14 +32,17 @@
To enable tooltips in your app, just create a single instance of a TooltipWindow
object. Note that if you instantiate more than one instance of this class, you'll
end up with multiple tooltips being shown!
end up with multiple tooltips being shown! This is a common problem when compiling
audio plug-ins with JUCE: depending on the way you instantiate TooltipWindow,
you may end up with a TooltipWindow for each plug-in instance. To avoid this use a
SharedResourcePointer to instantiate the TooltipWindow only once.
The TooltipWindow object will then stay invisible, waiting until the mouse
hovers for the specified length of time - it will then see if it's currently
over a component which implements the TooltipClient interface, and if so,
it will make itself visible to show the tooltip in the appropriate place.
@see TooltipClient, SettableTooltipClient
@see TooltipClient, SettableTooltipClient, SharedResourcePointer
*/
class JUCE_API TooltipWindow : public Component,
private Timer


Loading…
Cancel
Save