mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
fixed a bug with popup menus in browser plugins in IE8; added an option to change the time delay of a TooltipWindow; added a missing function to MagnifierComponent
This commit is contained in:
parent
1e53260e0a
commit
f8e2eaccc3
6 changed files with 69 additions and 8 deletions
|
|
@ -872,6 +872,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool isInside (HWND h) const
|
||||
{
|
||||
return GetAncestor (hwnd, GA_ROOT) == h;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
juce_UseDebuggingNewOperator
|
||||
|
||||
|
|
@ -2296,10 +2301,20 @@ bool Process::isForegroundProcess() throw()
|
|||
if (fg == 0)
|
||||
return true;
|
||||
|
||||
DWORD processId = 0;
|
||||
GetWindowThreadProcessId (fg, &processId);
|
||||
// when running as a plugin in IE8, the browser UI runs in a different process to the plugin, so
|
||||
// process ID isn't a reliable way to check if the foreground window belongs to us - instead, we
|
||||
// have to see if any of our windows are children of the foreground window
|
||||
fg = GetAncestor (fg, GA_ROOT);
|
||||
|
||||
return processId == GetCurrentProcessId();
|
||||
for (int i = ComponentPeer::getNumPeers(); --i >= 0;)
|
||||
{
|
||||
Win32ComponentPeer* const wp = dynamic_cast <Win32ComponentPeer*> (ComponentPeer::getPeer (i));
|
||||
|
||||
if (wp != 0 && wp->isInside (fg))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -70898,6 +70898,11 @@ void MagnifierComponent::setScaleFactor (double newScaleFactor)
|
|||
}
|
||||
}
|
||||
|
||||
void MagnifierComponent::setResamplingQuality (Graphics::ResamplingQuality newQuality)
|
||||
{
|
||||
quality = newQuality;
|
||||
}
|
||||
|
||||
void MagnifierComponent::paint (Graphics& g)
|
||||
{
|
||||
const int w = holderComp->getWidth();
|
||||
|
|
@ -74812,6 +74817,11 @@ TooltipWindow::~TooltipWindow()
|
|||
hide();
|
||||
}
|
||||
|
||||
void TooltipWindow::setMillisecondsBeforeTipAppears (const int newTimeMs) throw()
|
||||
{
|
||||
millisecondsBeforeTipAppears = newTimeMs;
|
||||
}
|
||||
|
||||
void TooltipWindow::paint (Graphics& g)
|
||||
{
|
||||
getLookAndFeel().drawTooltip (g, tipShowing, getWidth(), getHeight());
|
||||
|
|
@ -244507,6 +244517,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool isInside (HWND h) const
|
||||
{
|
||||
return GetAncestor (hwnd, GA_ROOT) == h;
|
||||
}
|
||||
|
||||
juce_UseDebuggingNewOperator
|
||||
|
||||
bool dontRepaint;
|
||||
|
|
@ -245908,10 +245923,20 @@ bool Process::isForegroundProcess() throw()
|
|||
if (fg == 0)
|
||||
return true;
|
||||
|
||||
DWORD processId = 0;
|
||||
GetWindowThreadProcessId (fg, &processId);
|
||||
// when running as a plugin in IE8, the browser UI runs in a different process to the plugin, so
|
||||
// process ID isn't a reliable way to check if the foreground window belongs to us - instead, we
|
||||
// have to see if any of our windows are children of the foreground window
|
||||
fg = GetAncestor (fg, GA_ROOT);
|
||||
|
||||
return processId == GetCurrentProcessId();
|
||||
for (int i = ComponentPeer::getNumPeers(); --i >= 0;)
|
||||
{
|
||||
Win32ComponentPeer* const wp = dynamic_cast <Win32ComponentPeer*> (ComponentPeer::getPeer (i));
|
||||
|
||||
if (wp != 0 && wp->isInside (fg))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AlertWindow::showNativeDialogBox (const String& title,
|
||||
|
|
|
|||
|
|
@ -30241,6 +30241,11 @@ public:
|
|||
/** Destructor. */
|
||||
~TooltipWindow();
|
||||
|
||||
/** Changes the time before the tip appears.
|
||||
This lets you change the value that was set in the constructor.
|
||||
*/
|
||||
void setMillisecondsBeforeTipAppears (const int newTimeMs = 700) throw();
|
||||
|
||||
/** A set of colour IDs to use to change the colour of various aspects of the tooltip.
|
||||
|
||||
These constants can be used either via the Component::setColour(), or LookAndFeel::setColour()
|
||||
|
|
@ -30259,7 +30264,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
const int millisecondsBeforeTipAppears;
|
||||
int millisecondsBeforeTipAppears;
|
||||
int mouseX, mouseY, mouseClicks;
|
||||
unsigned int lastCompChangeTime, lastHideTime;
|
||||
Component* lastComponentUnderMouse;
|
||||
|
|
|
|||
|
|
@ -245,6 +245,11 @@ void MagnifierComponent::setScaleFactor (double newScaleFactor)
|
|||
}
|
||||
}
|
||||
|
||||
void MagnifierComponent::setResamplingQuality (Graphics::ResamplingQuality newQuality)
|
||||
{
|
||||
quality = newQuality;
|
||||
}
|
||||
|
||||
void MagnifierComponent::paint (Graphics& g)
|
||||
{
|
||||
const int w = holderComp->getWidth();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,11 @@ TooltipWindow::~TooltipWindow()
|
|||
hide();
|
||||
}
|
||||
|
||||
void TooltipWindow::setMillisecondsBeforeTipAppears (const int newTimeMs) throw()
|
||||
{
|
||||
millisecondsBeforeTipAppears = newTimeMs;
|
||||
}
|
||||
|
||||
void TooltipWindow::paint (Graphics& g)
|
||||
{
|
||||
getLookAndFeel().drawTooltip (g, tipShowing, getWidth(), getHeight());
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ public:
|
|||
/** Destructor. */
|
||||
~TooltipWindow();
|
||||
|
||||
//==============================================================================
|
||||
/** Changes the time before the tip appears.
|
||||
This lets you change the value that was set in the constructor.
|
||||
*/
|
||||
void setMillisecondsBeforeTipAppears (const int newTimeMs = 700) throw();
|
||||
|
||||
//==============================================================================
|
||||
/** A set of colour IDs to use to change the colour of various aspects of the tooltip.
|
||||
|
||||
|
|
@ -99,7 +105,7 @@ public:
|
|||
|
||||
private:
|
||||
//==============================================================================
|
||||
const int millisecondsBeforeTipAppears;
|
||||
int millisecondsBeforeTipAppears;
|
||||
int mouseX, mouseY, mouseClicks;
|
||||
unsigned int lastCompChangeTime, lastHideTime;
|
||||
Component* lastComponentUnderMouse;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue