Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
aa47911aac
3 changed files with 9 additions and 4 deletions
  1. +1
    -1
      src/juce_appframework/gui/components/buttons/juce_Button.cpp
  2. +2
    -2
      src/juce_appframework/gui/components/controls/juce_TextEditor.cpp
  3. +6
    -1
      src/juce_appframework/gui/components/controls/juce_TextEditor.h

+ 1
- 1
src/juce_appframework/gui/components/buttons/juce_Button.cpp 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;


+ 2
- 2
src/juce_appframework/gui/components/controls/juce_TextEditor.cpp 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();


+ 6
- 1
src/juce_appframework/gui/components/controls/juce_TextEditor.h 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.


Loading…
Cancel
Save