1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-07-19 10:17:22 +00:00
parent a42cf919e9
commit aa47911aac
3 changed files with 9 additions and 4 deletions

View file

@ -228,7 +228,7 @@ Button::ButtonState Button::updateState (const MouseEvent* const e) throw()
}
const bool over = reallyContains (mx, my, true);
const bool down = isMouseButtonDownAnywhere();
const bool down = isMouseButtonDown();
if ((down && (over || (triggerOnMouseDown && buttonState == buttonDown))) || isKeyDown)
state = buttonDown;

View file

@ -1579,7 +1579,7 @@ void TextEditor::mouseDown (const MouseEvent& e)
else
{
PopupMenu m;
addPopupMenuItems (m);
addPopupMenuItems (m, &e);
menuActive = true;
const int result = m.show();
@ -1866,7 +1866,7 @@ bool TextEditor::keyStateChanged()
//==============================================================================
const int baseMenuItemID = 0x7fff0000;
void TextEditor::addPopupMenuItems (PopupMenu& m)
void TextEditor::addPopupMenuItems (PopupMenu& m, const MouseEvent*)
{
const bool writable = ! isReadOnly();

View file

@ -534,9 +534,14 @@ protected:
0x7fff0000 - 0x7fff1000, so you should avoid those values for your own
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
*/
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.