LMMS
Loading...
Searching...
No Matches
juce::MouseListener Class Reference

#include <juce_MouseListener.h>

Inheritance diagram for juce::MouseListener:
juce::Component juce::ListBoxMouseMoveSelector juce::MouseInactivityDetector juce::Viewport::DragToScrollListener juce::AnimatedAppComponent juce::AudioProcessorEditor juce::BubbleComponent juce::BurgerMenuComponent juce::Button juce::CallOutBox juce::CaretComponent juce::CodeEditorComponent juce::CodeEditorComponent::GutterComponent juce::ColourSelector juce::ColourSelector::ColourPreviewComp juce::ColourSelector::ColourSpaceView juce::ColourSelector::ColourSpaceView::ColourSpaceMarker juce::ColourSelector::HueSelectorComp juce::ColourSelector::HueSelectorComp::HueSelectorMarker juce::ColourSelector::SwatchComponent juce::ComboBox juce::ComponentAnimator::AnimationTask::ProxyComponent juce::ConcertinaPanel juce::ConcertinaPanel::PanelHolder juce::CustomMenuBarItemHolder juce::DragAndDropContainer::DragImageComponent juce::Drawable juce::DropShadower::ShadowWindow juce::FileBrowserComponent juce::FileChooser::Native juce::FileChooserDialogBox::ContentComponent juce::FileListComponent::ItemComponent juce::FilePreviewComponent juce::FileSearchPathListComponent juce::FilenameComponent juce::GroupComponent juce::ImageComponent juce::JUCESplashScreen juce::KeyMappingEditorComponent juce::KeyMappingEditorComponent::ItemComponent juce::Label juce::LassoComponent< SelectableItemType > juce::ListBox juce::ListBox::RowComponent juce::MenuBarComponent juce::MenuBarComponent::AccessibleItemComponent juce::MultiDocumentPanel juce::OutlineWindowComponent juce::ParameterComponent juce::ParameterDisplayComponent juce::PluginListComponent juce::PopupMenu::CustomComponent juce::PopupMenu::HelperClasses::ItemComponent juce::PopupMenu::HelperClasses::MenuWindow juce::PreferencesPanel juce::ProgressBar juce::PropertyComponent juce::PropertyPanel juce::PropertyPanel::PropertyHolderComponent juce::PropertyPanel::SectionComponent juce::ResizableBorderComponent juce::ResizableCornerComponent juce::ResizableEdgeComponent juce::ScrollBar juce::SidePanel juce::Slider juce::SplashScreen juce::StretchableLayoutResizerBar juce::TabbedButtonBar juce::TabbedButtonBar::BehindFrontTabComp juce::TabbedComponent juce::TableHeaderComponent juce::TableHeaderComponent::DragOverlayComp juce::TableListBox::RowComp juce::TextEditor juce::TextEditor::TextHolderComponent juce::Toolbar juce::Toolbar::CustomisationDialog::CustomiserPanel juce::ToolbarItemComponent::ItemDragAndDropOverlayComponent juce::ToolbarItemPalette juce::TooltipWindow juce::TopLevelWindow juce::TreeView juce::TreeView::ContentComponent juce::TreeView::InsertPointHighlight juce::TreeView::ItemComponent juce::TreeView::TargetGroupHighlight juce::Viewport juce::Viewport::AccessibilityIgnoredComponent juce::Win32NativeFileChooser::CustomComponentHolder

Public Member Functions

virtual ~MouseListener ()=default
virtual void mouseMove (const MouseEvent &event)
virtual void mouseEnter (const MouseEvent &event)
virtual void mouseExit (const MouseEvent &event)
virtual void mouseDown (const MouseEvent &event)
virtual void mouseDrag (const MouseEvent &event)
virtual void mouseUp (const MouseEvent &event)
virtual void mouseDoubleClick (const MouseEvent &event)
virtual void mouseWheelMove (const MouseEvent &event, const MouseWheelDetails &wheel)
virtual void mouseMagnify (const MouseEvent &event, float scaleFactor)

Detailed Description

A MouseListener can be registered with a component to receive callbacks about mouse events that happen to that component.

See also
Component::addMouseListener, Component::removeMouseListener

@tags{GUI}

Constructor & Destructor Documentation

◆ ~MouseListener()

virtual juce::MouseListener::~MouseListener ( )
virtualdefault

Destructor.

Member Function Documentation

◆ mouseDoubleClick()

void juce::MouseListener::mouseDoubleClick ( const MouseEvent & event)
virtual

Called when a mouse button has been double-clicked on a component.

The MouseEvent object passed in contains lots of methods for finding out which button was pressed, as well as which modifier keys (e.g. shift, ctrl) were held down at the time.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseDown, mouseUp

Reimplemented in juce::CodeEditorComponent, juce::Component, juce::ConcertinaPanel::PanelHolder, juce::DocumentWindow, juce::FileListComponent::ItemComponent, juce::Label, juce::ListBox::RowComponent, juce::PropertyPanel::SectionComponent, juce::Slider, juce::TableListBox::RowComp, juce::TextEditor, and juce::TreeView::ContentComponent.

◆ mouseDown()

void juce::MouseListener::mouseDown ( const MouseEvent & event)
virtual

Called when a mouse button is pressed.

The MouseEvent object passed in contains lots of methods for finding out which button was pressed, as well as which modifier keys (e.g. shift, ctrl) were held down at the time.

Once a button is held down, the mouseDrag method will be called when the mouse moves, until the button is released.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseUp, mouseDrag, mouseDoubleClick, contains

Reimplemented in juce::AlertWindow, juce::Button, juce::CodeEditorComponent, juce::ColourSelector::ColourSpaceView, juce::ColourSelector::HueSelectorComp, juce::ColourSelector::SwatchComponent, juce::ComboBox, juce::Component, juce::ConcertinaPanel::PanelHolder, juce::FileListComponent::ItemComponent, juce::ListBox::RowComponent, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::ParameterDisplayComponent, juce::PopupMenu::HelperClasses::MenuWindow, juce::ResizableBorderComponent, juce::ResizableCornerComponent, juce::ResizableEdgeComponent, juce::ResizableWindow, juce::ScrollBar, juce::Slider, juce::StretchableLayoutResizerBar, juce::TableHeaderComponent, juce::TableListBox::RowComp, juce::TextEditor, juce::Toolbar, juce::ToolbarItemComponent::ItemDragAndDropOverlayComponent, juce::TooltipWindow, juce::TreeView::ContentComponent, juce::Viewport::DragToScrollListener, and juce::Viewport.

◆ mouseDrag()

void juce::MouseListener::mouseDrag ( const MouseEvent & event)
virtual

Called when the mouse is moved while a button is held down.

When a mouse button is pressed inside a component, that component receives mouseDrag callbacks each time the mouse moves, even if the mouse strays outside the component's bounds.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseDown, mouseUp, mouseMove, contains, setDragRepeatInterval

Reimplemented in juce::AlertWindow, juce::Button, juce::CodeEditorComponent, juce::ColourSelector::ColourSpaceView, juce::ColourSelector::HueSelectorComp, juce::ComboBox, juce::Component, juce::ConcertinaPanel::PanelHolder, juce::DragAndDropContainer::DragImageComponent, juce::ListBox::RowComponent, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::PopupMenu::HelperClasses::MenuWindow, juce::ResizableBorderComponent, juce::ResizableCornerComponent, juce::ResizableEdgeComponent, juce::ResizableWindow, juce::ScrollBar, juce::SidePanel, juce::Slider, juce::StretchableLayoutResizerBar, juce::TableHeaderComponent, juce::TableListBox::RowComp, juce::TextEditor, juce::ToolbarItemComponent::ItemDragAndDropOverlayComponent, juce::TreeView::ContentComponent, and juce::Viewport::DragToScrollListener.

◆ mouseEnter()

void juce::MouseListener::mouseEnter ( const MouseEvent & event)
virtual

Called when the mouse first enters a component.

If the mouse button isn't pressed and the mouse moves into a component, this will be called to let the component react to this.

When the mouse button is pressed and held down while being moved in or out of a component, no mouseEnter or mouseExit callbacks are made - only mouseDrag messages are sent to the component that the mouse was originally clicked on, until the button is released.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseExit, mouseDrag, mouseMove, contains

Reimplemented in juce::Button, juce::Component, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::ResizableBorderComponent, juce::Slider, juce::TableHeaderComponent, and juce::TooltipWindow.

◆ mouseExit()

void juce::MouseListener::mouseExit ( const MouseEvent & event)
virtual

Called when the mouse moves out of a component.

This will be called when the mouse moves off the edge of this component.

If the mouse button was pressed, and it was then dragged off the edge of the component and released, then this callback will happen when the button is released, after the mouseUp callback.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseEnter, mouseDrag, mouseMove, contains

Reimplemented in juce::Button, juce::Component, juce::ListBoxMouseMoveSelector, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::Slider, juce::TableHeaderComponent, and juce::TreeView::ContentComponent.

◆ mouseMagnify()

void juce::MouseListener::mouseMagnify ( const MouseEvent & event,
float scaleFactor )
virtual

Called when a pinch-to-zoom mouse-gesture is used.

If not overridden, a component will forward this message to its parent, so that parent components can collect gesture messages that are unused by child components.

Parameters
Eventdetails about the mouse event
scaleFactora multiplier to indicate by how much the size of the target should be changed. A value of 1.0 would indicate no change, values greater than 1.0 mean it should be enlarged.

Reimplemented in juce::Component.

◆ mouseMove()

void juce::MouseListener::mouseMove ( const MouseEvent & event)
virtual

Called when the mouse moves inside a component.

If the mouse button isn't pressed and the mouse moves over a component, this will be called to let the component react to this.

A component will always get a mouseEnter callback before a mouseMove.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseEnter, mouseExit, mouseDrag, contains

Reimplemented in juce::Component, juce::ListBoxMouseMoveSelector, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::PopupMenu::HelperClasses::MenuWindow, juce::ResizableBorderComponent, juce::Slider, juce::TableHeaderComponent, and juce::TreeView::ContentComponent.

◆ mouseUp()

void juce::MouseListener::mouseUp ( const MouseEvent & event)
virtual

Called when a mouse button is released.

A mouseUp callback is sent to the component in which a button was pressed even if the mouse is actually over a different component when the button is released.

The MouseEvent object passed in contains lots of methods for finding out which buttons were down just before they were released.

Parameters
Eventdetails about the position and status of the mouse event, including the source component in which it occurred
See also
mouseDown, mouseDrag, mouseDoubleClick, contains

Reimplemented in juce::BurgerMenuComponent, juce::Button, juce::CodeEditorComponent, juce::ComboBox, juce::Component, juce::DragAndDropContainer::DragImageComponent, juce::JUCESplashScreen, juce::Label, juce::ListBox, juce::ListBox::RowComponent, juce::MenuBarComponent, juce::MouseInactivityDetector, juce::PopupMenu::HelperClasses::MenuWindow, juce::PropertyPanel::SectionComponent, juce::ResizableBorderComponent, juce::ResizableCornerComponent, juce::ResizableEdgeComponent, juce::ResizableWindow, juce::ScrollBar, juce::SidePanel, juce::Slider, juce::TableHeaderComponent, juce::TableListBox::RowComp, juce::TextEditor, juce::ToolbarItemComponent::ItemDragAndDropOverlayComponent, juce::TreeView::ContentComponent, and juce::Viewport::DragToScrollListener.

◆ mouseWheelMove()

void juce::MouseListener::mouseWheelMove ( const MouseEvent & event,
const MouseWheelDetails & wheel )
virtual

Called when the mouse-wheel is moved.

This callback is sent to the component that the mouse is over when the wheel is moved.

If not overridden, a component will forward this message to its parent, so that parent components can collect mouse-wheel messages that happen to child components which aren't interested in them.

Parameters
Eventdetails about the mouse event
wheeldetails about the wheel movement

Reimplemented in juce::CodeEditorComponent, juce::ComboBox, juce::Component, juce::ListBox, juce::LookAndFeel_V2::SliderLabelComp, juce::MouseInactivityDetector, juce::PopupMenu::HelperClasses::MenuWindow, juce::ScrollBar, juce::Slider, juce::TextEditor, juce::TooltipWindow, and juce::Viewport.


The documentation for this class was generated from the following files: