mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Added ListenerList class and changed some components to use it for their listener dispatching. Sorted out bug in popup menus and win32 mouse wheel.
This commit is contained in:
parent
b974203d0f
commit
2676bb02f2
42 changed files with 1815 additions and 1867 deletions
|
|
@ -351,6 +351,7 @@ public:
|
|||
mw->menuBarComponent = menuBarComponent;
|
||||
mw->managerOfChosenCommand = managerOfChosenCommand;
|
||||
mw->componentAttachedTo = componentAttachedTo;
|
||||
mw->componentAttachedToOriginal = componentAttachedTo;
|
||||
|
||||
mw->calculateWindowPos (minX, maxX, minY, maxY, alignToRectangle);
|
||||
mw->setTopLeftPosition (mw->windowPos.getX(),
|
||||
|
|
@ -502,16 +503,14 @@ public:
|
|||
}
|
||||
else if (key.isKeyCode (KeyPress::leftKey))
|
||||
{
|
||||
Window* parentWindow = owner;
|
||||
|
||||
if (parentWindow != 0)
|
||||
if (owner != 0)
|
||||
{
|
||||
PopupMenu::ItemComponent* currentChildOfParent
|
||||
= (parentWindow != 0) ? parentWindow->currentChild : 0;
|
||||
Component::SafePointer<Window> parentWindow (owner);
|
||||
PopupMenu::ItemComponent* currentChildOfParent = parentWindow->currentChild;
|
||||
|
||||
hide (0);
|
||||
|
||||
if (parentWindow->isValidComponent())
|
||||
if (parentWindow != 0)
|
||||
parentWindow->setCurrentlyHighlightedChild (currentChildOfParent);
|
||||
|
||||
disableTimerUntilMouseMoves();
|
||||
|
|
@ -594,7 +593,7 @@ public:
|
|||
if (! isVisible())
|
||||
return;
|
||||
|
||||
if (componentAttachedTo == 0)
|
||||
if (componentAttachedTo != componentAttachedToOriginal)
|
||||
{
|
||||
dismissMenu (0);
|
||||
return;
|
||||
|
|
@ -748,6 +747,7 @@ private:
|
|||
Component* menuBarComponent;
|
||||
ApplicationCommandManager** managerOfChosenCommand;
|
||||
Component::SafePointer<Component> componentAttachedTo;
|
||||
Component* componentAttachedToOriginal;
|
||||
Rectangle<int> windowPos;
|
||||
Point<int> lastMouse;
|
||||
int minimumWidth, maximumNumColumns, standardItemHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue