| @@ -228,7 +228,7 @@ Button::ButtonState Button::updateState (const MouseEvent* const e) throw() | |||||
| } | } | ||||
| const bool over = reallyContains (mx, my, true); | const bool over = reallyContains (mx, my, true); | ||||
| const bool down = isMouseButtonDownAnywhere(); | |||||
| const bool down = isMouseButtonDown(); | |||||
| if ((down && (over || (triggerOnMouseDown && buttonState == buttonDown))) || isKeyDown) | if ((down && (over || (triggerOnMouseDown && buttonState == buttonDown))) || isKeyDown) | ||||
| state = buttonDown; | state = buttonDown; | ||||
| @@ -1579,7 +1579,7 @@ void TextEditor::mouseDown (const MouseEvent& e) | |||||
| else | else | ||||
| { | { | ||||
| PopupMenu m; | PopupMenu m; | ||||
| addPopupMenuItems (m); | |||||
| addPopupMenuItems (m, &e); | |||||
| menuActive = true; | menuActive = true; | ||||
| const int result = m.show(); | const int result = m.show(); | ||||
| @@ -1866,7 +1866,7 @@ bool TextEditor::keyStateChanged() | |||||
| //============================================================================== | //============================================================================== | ||||
| const int baseMenuItemID = 0x7fff0000; | const int baseMenuItemID = 0x7fff0000; | ||||
| void TextEditor::addPopupMenuItems (PopupMenu& m) | |||||
| void TextEditor::addPopupMenuItems (PopupMenu& m, const MouseEvent*) | |||||
| { | { | ||||
| const bool writable = ! isReadOnly(); | const bool writable = ! isReadOnly(); | ||||
| @@ -534,9 +534,14 @@ protected: | |||||
| 0x7fff0000 - 0x7fff1000, so you should avoid those values for your own | 0x7fff0000 - 0x7fff1000, so you should avoid those values for your own | ||||
| menu IDs. | menu IDs. | ||||
| If this was triggered by a mouse-click, the mouseClickEvent parameter will be | |||||
| a pointer to the info about it, or may be null if the menu is being triggered | |||||
| by some other means. | |||||
| @see performPopupMenuAction, setPopupMenuEnabled, isPopupMenuEnabled | @see performPopupMenuAction, setPopupMenuEnabled, isPopupMenuEnabled | ||||
| */ | */ | ||||
| virtual void addPopupMenuItems (PopupMenu& menuToAddTo); | |||||
| virtual void addPopupMenuItems (PopupMenu& menuToAddTo, | |||||
| const MouseEvent* mouseClickEvent); | |||||
| /** This is called to perform one of the items that was shown on the popup menu. | /** This is called to perform one of the items that was shown on the popup menu. | ||||