From a595f19d0fe220cdc60173df68a258c6c1e3ac03 Mon Sep 17 00:00:00 2001 From: hogliux Date: Mon, 20 Jul 2015 09:57:02 +0100 Subject: [PATCH] Add a comment to tooltip window to clarify it's use in plug-ins --- modules/juce_gui_basics/windows/juce_TooltipWindow.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.h b/modules/juce_gui_basics/windows/juce_TooltipWindow.h index 0445a59b81..7ab5fa94fa 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.h +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.h @@ -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