LMMS
Loading...
Searching...
No Matches
juce::PopupMenu::HelperClasses::MenuWindow Struct Reference
Inheritance diagram for juce::PopupMenu::HelperClasses::MenuWindow:
juce::Component juce::MouseListener

Public Types

enum class  MenuSelectionDirection { forwards , backwards , current }
Public Types inherited from juce::Component
enum class  FocusContainerType { none , focusContainer , keyboardFocusContainer }
enum  FocusChangeType { focusChangedByMouseClick , focusChangedByTabKey , focusChangedDirectly }

Public Member Functions

 MenuWindow (const PopupMenu &menu, MenuWindow *parentWindow, Options opts, bool alignToRectangle, bool shouldDismissOnMouseUp, ApplicationCommandManager **manager, float parentScaleFactor=1.0f)
 ~MenuWindow () override
void paint (Graphics &g) override
void paintOverChildren (Graphics &g) override
void hide (const PopupMenu::Item *item, bool makeInvisible)
void dismissMenu (const PopupMenu::Item *item)
float getDesktopScaleFactor () const override
void visibilityChanged () override
bool keyPressed (const KeyPress &key) override
void inputAttemptWhenModal () override
void handleCommandMessage (int commandId) override
void mouseMove (const MouseEvent &e) override
void mouseDown (const MouseEvent &e) override
void mouseDrag (const MouseEvent &e) override
void mouseUp (const MouseEvent &e) override
void mouseWheelMove (const MouseEvent &, const MouseWheelDetails &wheel) override
void handleMouseEvent (const MouseEvent &e)
bool windowIsStillValid ()
MouseSourceStategetMouseState (MouseInputSource source)
bool isOverAnyMenu () const
bool isOverChildren () const
bool isAnyMouseOver () const
bool treeContains (const MenuWindow *const window) const noexcept
bool doesAnyJuceCompHaveFocus ()
Rectangle< intgetParentArea (Point< int > targetPoint, Component *relativeTo=nullptr)
void calculateWindowPos (Rectangle< int > target, const bool alignToRectangle)
void layoutMenuItems (const int maxMenuW, const int maxMenuH, int &width, int &height)
void insertColumnBreaks (const int maxMenuW, const int maxMenuH)
int correctColumnWidths (const int maxMenuW)
void workOutManualSize (const int maxMenuW)
int workOutBestSize (const int maxMenuW)
void ensureItemComponentIsVisible (const ItemComponent &itemComp, int wantedY)
void resizeToBestWindowPos ()
void alterChildYPos (int delta)
int updateYPositions ()
void setCurrentlyHighlightedChild (ItemComponent *child)
bool isSubMenuVisible () const noexcept
bool showSubMenuFor (ItemComponent *childComp)
void triggerCurrentlyHighlightedItem ()
void selectNextItem (MenuSelectionDirection direction)
void disableTimerUntilMouseMoves ()
bool canScroll () const noexcept
bool isTopScrollZoneActive () const noexcept
bool isBottomScrollZoneActive () const noexcept
std::unique_ptr< AccessibilityHandlercreateAccessibilityHandler () override
Public Member Functions inherited from juce::Component
 Component () noexcept
 ~Component () override
 Component (const String &componentName) noexcept
String getName () const noexcept
virtual void setName (const String &newName)
String getComponentID () const noexcept
void setComponentID (const String &newID)
virtual void setVisible (bool shouldBeVisible)
bool isVisible () const noexcept
bool isShowing () const
virtual void addToDesktop (int windowStyleFlags, void *nativeWindowToAttachTo=nullptr)
void removeFromDesktop ()
bool isOnDesktop () const noexcept
ComponentPeergetPeer () const
virtual void userTriedToCloseWindow ()
virtual void minimisationStateChanged (bool isNowMinimised)
void toFront (bool shouldAlsoGainKeyboardFocus)
void toBack ()
void toBehind (Component *other)
void setAlwaysOnTop (bool shouldStayOnTop)
bool isAlwaysOnTop () const noexcept
int getX () const noexcept
int getY () const noexcept
int getWidth () const noexcept
int getHeight () const noexcept
int getRight () const noexcept
Point< intgetPosition () const noexcept
int getBottom () const noexcept
Rectangle< intgetBounds () const noexcept
Rectangle< intgetLocalBounds () const noexcept
Rectangle< intgetBoundsInParent () const noexcept
int getScreenX () const
int getScreenY () const
Point< intgetScreenPosition () const
Rectangle< intgetScreenBounds () const
Point< intgetLocalPoint (const Component *sourceComponent, Point< int > pointRelativeToSourceComponent) const
Point< float > getLocalPoint (const Component *sourceComponent, Point< float > pointRelativeToSourceComponent) const
Rectangle< intgetLocalArea (const Component *sourceComponent, Rectangle< int > areaRelativeToSourceComponent) const
Rectangle< float > getLocalArea (const Component *sourceComponent, Rectangle< float > areaRelativeToSourceComponent) const
Point< intlocalPointToGlobal (Point< int > localPoint) const
Point< float > localPointToGlobal (Point< float > localPoint) const
Rectangle< intlocalAreaToGlobal (Rectangle< int > localArea) const
Rectangle< float > localAreaToGlobal (Rectangle< float > localArea) const
void setTopLeftPosition (int x, int y)
void setTopLeftPosition (Point< int > newTopLeftPosition)
void setTopRightPosition (int x, int y)
void setSize (int newWidth, int newHeight)
void setBounds (int x, int y, int width, int height)
void setBounds (Rectangle< int > newBounds)
void setBoundsRelative (float proportionalX, float proportionalY, float proportionalWidth, float proportionalHeight)
void setBoundsRelative (Rectangle< float > proportionalArea)
void setBoundsInset (BorderSize< int > borders)
void setBoundsToFit (Rectangle< int > targetArea, Justification justification, bool onlyReduceInSize)
void setCentrePosition (int x, int y)
void setCentrePosition (Point< int > newCentrePosition)
void setCentreRelative (float x, float y)
void centreWithSize (int width, int height)
void setTransform (const AffineTransform &transform)
AffineTransform getTransform () const
bool isTransformed () const noexcept
int proportionOfWidth (float proportion) const noexcept
int proportionOfHeight (float proportion) const noexcept
int getParentWidth () const noexcept
int getParentHeight () const noexcept
Rectangle< intgetParentMonitorArea () const
int getNumChildComponents () const noexcept
ComponentgetChildComponent (int index) const noexcept
int getIndexOfChildComponent (const Component *child) const noexcept
const Array< Component * > & getChildren () const noexcept
ComponentfindChildWithID (StringRef componentID) const noexcept
void addChildComponent (Component *child, int zOrder=-1)
void addChildComponent (Component &child, int zOrder=-1)
void addAndMakeVisible (Component *child, int zOrder=-1)
void addAndMakeVisible (Component &child, int zOrder=-1)
void addChildAndSetID (Component *child, const String &componentID)
void removeChildComponent (Component *childToRemove)
ComponentremoveChildComponent (int childIndexToRemove)
void removeAllChildren ()
void deleteAllChildren ()
ComponentgetParentComponent () const noexcept
template<class TargetClass>
TargetClass * findParentComponentOfClass () const
ComponentgetTopLevelComponent () const noexcept
bool isParentOf (const Component *possibleChild) const noexcept
virtual void parentHierarchyChanged ()
virtual void childrenChanged ()
virtual bool hitTest (int x, int y)
void setInterceptsMouseClicks (bool allowClicksOnThisComponent, bool allowClicksOnChildComponents) noexcept
void getInterceptsMouseClicks (bool &allowsClicksOnThisComponent, bool &allowsClicksOnChildComponents) const noexcept
bool contains (Point< int > localPoint)
bool contains (Point< float > localPoint)
bool reallyContains (Point< int > localPoint, bool returnTrueIfWithinAChild)
bool reallyContains (Point< float > localPoint, bool returnTrueIfWithinAChild)
ComponentgetComponentAt (int x, int y)
ComponentgetComponentAt (Point< int > position)
ComponentgetComponentAt (Point< float > position)
void repaint ()
void repaint (int x, int y, int width, int height)
void repaint (Rectangle< int > area)
void setBufferedToImage (bool shouldBeBuffered)
Image createComponentSnapshot (Rectangle< int > areaToGrab, bool clipImageToComponentBounds=true, float scaleFactor=1.0f)
void paintEntireComponent (Graphics &context, bool ignoreAlphaLevel)
void setPaintingIsUnclipped (bool shouldPaintWithoutClipping) noexcept
bool isPaintingUnclipped () const noexcept
void setComponentEffect (ImageEffectFilter *newEffect)
ImageEffectFiltergetComponentEffect () const noexcept
LookAndFeelgetLookAndFeel () const noexcept
void setLookAndFeel (LookAndFeel *newLookAndFeel)
virtual void lookAndFeelChanged ()
void sendLookAndFeelChange ()
void setOpaque (bool shouldBeOpaque)
bool isOpaque () const noexcept
void setBroughtToFrontOnMouseClick (bool shouldBeBroughtToFront) noexcept
bool isBroughtToFrontOnMouseClick () const noexcept
void setExplicitFocusOrder (int newFocusOrderIndex)
int getExplicitFocusOrder () const
void setFocusContainerType (FocusContainerType containerType) noexcept
bool isFocusContainer () const noexcept
bool isKeyboardFocusContainer () const noexcept
ComponentfindFocusContainer () const
ComponentfindKeyboardFocusContainer () const
void setWantsKeyboardFocus (bool wantsFocus) noexcept
bool getWantsKeyboardFocus () const noexcept
void setMouseClickGrabsKeyboardFocus (bool shouldGrabFocus)
bool getMouseClickGrabsKeyboardFocus () const noexcept
void grabKeyboardFocus ()
void giveAwayKeyboardFocus ()
bool hasKeyboardFocus (bool trueIfChildIsFocused) const
void moveKeyboardFocusToSibling (bool moveToNext)
virtual std::unique_ptr< ComponentTraversercreateFocusTraverser ()
virtual std::unique_ptr< ComponentTraversercreateKeyboardFocusTraverser ()
void setHasFocusOutline (bool hasFocusOutline) noexcept
bool hasFocusOutline () const noexcept
bool isEnabled () const noexcept
void setEnabled (bool shouldBeEnabled)
virtual void enablementChanged ()
float getAlpha () const noexcept
void setAlpha (float newAlpha)
virtual void alphaChanged ()
void setMouseCursor (const MouseCursor &cursorType)
virtual MouseCursor getMouseCursor ()
void updateMouseCursor () const
void mouseEnter (const MouseEvent &event) override
void mouseExit (const MouseEvent &event) override
void mouseDoubleClick (const MouseEvent &event) override
void mouseMagnify (const MouseEvent &event, float scaleFactor) override
void setRepaintsOnMouseActivity (bool shouldRepaint) noexcept
void addMouseListener (MouseListener *newListener, bool wantsEventsForAllNestedChildComponents)
void removeMouseListener (MouseListener *listenerToRemove)
void addKeyListener (KeyListener *newListener)
void removeKeyListener (KeyListener *listenerToRemove)
virtual bool keyStateChanged (bool isKeyDown)
virtual void modifierKeysChanged (const ModifierKeys &modifiers)
virtual void focusGained (FocusChangeType cause)
virtual void focusLost (FocusChangeType cause)
virtual void focusOfChildComponentChanged (FocusChangeType cause)
bool isMouseOver (bool includeChildren=false) const
bool isMouseButtonDown (bool includeChildren=false) const
bool isMouseOverOrDragging (bool includeChildren=false) const
Point< intgetMouseXYRelative () const
virtual void resized ()
virtual void moved ()
virtual void childBoundsChanged (Component *child)
virtual void parentSizeChanged ()
virtual void broughtToFront ()
void addComponentListener (ComponentListener *newListener)
void removeComponentListener (ComponentListener *listenerToRemove)
void postCommandMessage (int commandId)
void enterModalState (bool takeKeyboardFocus=true, ModalComponentManager::Callback *callback=nullptr, bool deleteWhenDismissed=false)
void exitModalState (int returnValue)
bool isCurrentlyModal (bool onlyConsiderForemostModalComponent=true) const noexcept
bool isCurrentlyBlockedByAnotherModalComponent () const
virtual bool canModalEventBeSentToComponent (const Component *targetComponent)
NamedValueSetgetProperties () noexcept
const NamedValueSetgetProperties () const noexcept
Colour findColour (int colourID, bool inheritFromParent=false) const
void setColour (int colourID, Colour newColour)
void removeColour (int colourID)
bool isColourSpecified (int colourID) const
void copyAllExplicitColoursTo (Component &target) const
virtual void colourChanged ()
voidgetWindowHandle () const
PositionergetPositioner () const noexcept
void setPositioner (Positioner *newPositioner)
void setCachedComponentImage (CachedComponentImage *newCachedImage)
CachedComponentImagegetCachedComponentImage () const noexcept
void setViewportIgnoreDragFlag (bool ignoreDrag) noexcept
bool getViewportIgnoreDragFlag () const noexcept
String getTitle () const noexcept
void setTitle (const String &newTitle)
String getDescription () const noexcept
void setDescription (const String &newDescription)
String getHelpText () const noexcept
void setHelpText (const String &newHelpText)
void setAccessible (bool shouldBeAccessible)
bool isAccessible () const noexcept
AccessibilityHandlergetAccessibilityHandler ()
void invalidateAccessibilityHandler ()
void setFocusContainer (bool shouldBeFocusContainer) noexcept
void contains (int, int)=delete
Public Member Functions inherited from juce::MouseListener
virtual ~MouseListener ()=default

Static Public Member Functions

static int getResultItemID (const PopupMenu::Item *item)
static Array< MenuWindow * > & getActiveWindows ()
Static Public Member Functions inherited from juce::Component
static float JUCE_CALLTYPE getApproximateScaleFactorForComponent (const Component *targetComponent)
static Component *JUCE_CALLTYPE getCurrentlyFocusedComponent () noexcept
static void JUCE_CALLTYPE unfocusAllComponents ()
static void JUCE_CALLTYPE beginDragAutoRepeat (int millisecondsBetweenCallbacks)
static bool JUCE_CALLTYPE isMouseButtonDownAnywhere () noexcept
static int JUCE_CALLTYPE getNumCurrentlyModalComponents () noexcept
static Component *JUCE_CALLTYPE getCurrentlyModalComponent (int index=0) noexcept

Public Attributes

MenuWindowparent
const Options options
OwnedArray< ItemComponentitems
ApplicationCommandManager ** managerOfChosenCommand
WeakReference< ComponentcomponentAttachedTo
Rectangle< intwindowPos
bool hasBeenOver = false
bool needsToScroll = false
bool dismissOnMouseUp
bool hideOnExit = false
bool disableMouseMoves = false
bool hasAnyJuceCompHadFocus = false
int numColumns = 0
int contentHeight = 0
int childYOffset = 0
Component::SafePointer< ItemComponentcurrentChild
std::unique_ptr< MenuWindowactiveSubMenu
Array< intcolumnWidths
uint32 windowCreationTime
uint32 lastFocusedTime
uint32 timeEnteredCurrentChildComp
OwnedArray< MouseSourceStatemouseSourceStates
float scaleFactor
bool exitingModalState = false

Additional Inherited Members

Protected Member Functions inherited from juce::Component
virtual ComponentPeercreateNewPeer (int styleFlags, void *nativeWindowToAttachTo)
Static Protected Member Functions inherited from juce::Component
static std::unique_ptr< AccessibilityHandlercreateIgnoredAccessibilityHandler (Component &)

Member Enumeration Documentation

◆ MenuSelectionDirection

enum class juce::PopupMenu::HelperClasses::MenuWindow::MenuSelectionDirection
strong
Enumerator
forwards 
backwards 
current 

Constructor & Destructor Documentation

◆ MenuWindow()

juce::PopupMenu::HelperClasses::MenuWindow::MenuWindow ( const PopupMenu & menu,
MenuWindow * parentWindow,
Options opts,
bool alignToRectangle,
bool shouldDismissOnMouseUp,
ApplicationCommandManager ** manager,
float parentScaleFactor = 1.0f )
inline

◆ ~MenuWindow()

juce::PopupMenu::HelperClasses::MenuWindow::~MenuWindow ( )
inlineoverride

Member Function Documentation

◆ alterChildYPos()

void juce::PopupMenu::HelperClasses::MenuWindow::alterChildYPos ( int delta)
inline

◆ calculateWindowPos()

void juce::PopupMenu::HelperClasses::MenuWindow::calculateWindowPos ( Rectangle< int > target,
const bool alignToRectangle )
inline

◆ canScroll()

bool juce::PopupMenu::HelperClasses::MenuWindow::canScroll ( ) const
inlinenoexcept

◆ correctColumnWidths()

int juce::PopupMenu::HelperClasses::MenuWindow::correctColumnWidths ( const int maxMenuW)
inline

◆ createAccessibilityHandler()

std::unique_ptr< AccessibilityHandler > juce::PopupMenu::HelperClasses::MenuWindow::createAccessibilityHandler ( )
inlineoverridevirtual

Override this method to return a custom AccessibilityHandler for this component.

The default implementation creates and returns a AccessibilityHandler object with an unspecified role, meaning that it will be visible to accessibility clients but without a specific role, action callbacks or interfaces. To control how accessibility clients see and interact with your component subclass AccessibilityHandler, implement the desired behaviours, and return an instance of it from this method in your component subclass.

The accessibility handler you return here is guaranteed to be destroyed before its Component, so it's safe to store and use a reference back to the Component inside the AccessibilityHandler if necessary.

See also
getAccessibilityHandler

Reimplemented from juce::Component.

◆ disableTimerUntilMouseMoves()

void juce::PopupMenu::HelperClasses::MenuWindow::disableTimerUntilMouseMoves ( )
inline

◆ dismissMenu()

void juce::PopupMenu::HelperClasses::MenuWindow::dismissMenu ( const PopupMenu::Item * item)
inline

◆ doesAnyJuceCompHaveFocus()

bool juce::PopupMenu::HelperClasses::MenuWindow::doesAnyJuceCompHaveFocus ( )
inline

◆ ensureItemComponentIsVisible()

void juce::PopupMenu::HelperClasses::MenuWindow::ensureItemComponentIsVisible ( const ItemComponent & itemComp,
int wantedY )
inline

◆ getActiveWindows()

Array< MenuWindow * > & juce::PopupMenu::HelperClasses::MenuWindow::getActiveWindows ( )
inlinestatic

◆ getDesktopScaleFactor()

float juce::PopupMenu::HelperClasses::MenuWindow::getDesktopScaleFactor ( ) const
inlineoverridevirtual

Returns the default scale factor to use for this component when it is placed on the desktop. The default implementation of this method just returns the value from Desktop::getGlobalScaleFactor(), but it can be overridden if a particular component has different requirements. The method only used if this component is added to the desktop - it has no effect for child components.

Reimplemented from juce::Component.

◆ getMouseState()

MouseSourceState & juce::PopupMenu::HelperClasses::MenuWindow::getMouseState ( MouseInputSource source)
inline

◆ getParentArea()

Rectangle< int > juce::PopupMenu::HelperClasses::MenuWindow::getParentArea ( Point< int > targetPoint,
Component * relativeTo = nullptr )
inline

◆ getResultItemID()

int juce::PopupMenu::HelperClasses::MenuWindow::getResultItemID ( const PopupMenu::Item * item)
inlinestatic

◆ handleCommandMessage()

void juce::PopupMenu::HelperClasses::MenuWindow::handleCommandMessage ( int commandId)
inlineoverridevirtual

Called to handle a command that was sent by postCommandMessage().

This is called by the message thread when a command message arrives, and the component can override this method to process it in any way it needs to.

See also
postCommandMessage

Reimplemented from juce::Component.

◆ handleMouseEvent()

void juce::PopupMenu::HelperClasses::MenuWindow::handleMouseEvent ( const MouseEvent & e)
inline

◆ hide()

void juce::PopupMenu::HelperClasses::MenuWindow::hide ( const PopupMenu::Item * item,
bool makeInvisible )
inline

◆ inputAttemptWhenModal()

void juce::PopupMenu::HelperClasses::MenuWindow::inputAttemptWhenModal ( )
inlineoverridevirtual

Called when the user tries to click on a component that is blocked by another modal component.

When a component is modal and the user clicks on one of the other components, the modal component will receive this callback.

The default implementation of this method will play a beep, and bring the currently modal component to the front, but it can be overridden to do other tasks.

See also
isCurrentlyBlockedByAnotherModalComponent, canModalEventBeSentToComponent

Reimplemented from juce::Component.

◆ insertColumnBreaks()

void juce::PopupMenu::HelperClasses::MenuWindow::insertColumnBreaks ( const int maxMenuW,
const int maxMenuH )
inline

◆ isAnyMouseOver()

bool juce::PopupMenu::HelperClasses::MenuWindow::isAnyMouseOver ( ) const
inline

◆ isBottomScrollZoneActive()

bool juce::PopupMenu::HelperClasses::MenuWindow::isBottomScrollZoneActive ( ) const
inlinenoexcept

◆ isOverAnyMenu()

bool juce::PopupMenu::HelperClasses::MenuWindow::isOverAnyMenu ( ) const
inline

◆ isOverChildren()

bool juce::PopupMenu::HelperClasses::MenuWindow::isOverChildren ( ) const
inline

◆ isSubMenuVisible()

bool juce::PopupMenu::HelperClasses::MenuWindow::isSubMenuVisible ( ) const
inlinenoexcept

◆ isTopScrollZoneActive()

bool juce::PopupMenu::HelperClasses::MenuWindow::isTopScrollZoneActive ( ) const
inlinenoexcept

◆ keyPressed()

bool juce::PopupMenu::HelperClasses::MenuWindow::keyPressed ( const KeyPress & key)
inlineoverridevirtual

Called when a key is pressed.

When a key is pressed, the component that has the keyboard focus will have this method called. Remember that a component will only be given the focus if its setWantsKeyboardFocus() method has been used to enable this.

If your implementation returns true, the event will be consumed and not passed on to any other listeners. If it returns false, the key will be passed to any KeyListeners that have been registered with this component. As soon as one of these returns true, the process will stop, but if they all return false, the event will be passed upwards to this component's parent, and so on.

The default implementation of this method does nothing and returns false.

See also
keyStateChanged, getCurrentlyFocusedComponent, addKeyListener

Reimplemented from juce::Component.

◆ layoutMenuItems()

void juce::PopupMenu::HelperClasses::MenuWindow::layoutMenuItems ( const int maxMenuW,
const int maxMenuH,
int & width,
int & height )
inline

◆ mouseDown()

void juce::PopupMenu::HelperClasses::MenuWindow::mouseDown ( const MouseEvent & event)
inlineoverridevirtual

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 from juce::Component.

◆ mouseDrag()

void juce::PopupMenu::HelperClasses::MenuWindow::mouseDrag ( const MouseEvent & event)
inlineoverridevirtual

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 from juce::Component.

◆ mouseMove()

void juce::PopupMenu::HelperClasses::MenuWindow::mouseMove ( const MouseEvent & event)
inlineoverridevirtual

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 from juce::Component.

◆ mouseUp()

void juce::PopupMenu::HelperClasses::MenuWindow::mouseUp ( const MouseEvent & event)
inlineoverridevirtual

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 from juce::Component.

◆ mouseWheelMove()

void juce::PopupMenu::HelperClasses::MenuWindow::mouseWheelMove ( const MouseEvent & event,
const MouseWheelDetails & wheel )
inlineoverridevirtual

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. (Bear in mind that if you attach a component as a mouse-listener to other components, then those wheel moves will also end up calling this method and being passed up to the parents, which may not be what you intended to happen).

Parameters
Eventdetails about the mouse event
wheeldetails about the mouse wheel movement

Reimplemented from juce::Component.

◆ paint()

void juce::PopupMenu::HelperClasses::MenuWindow::paint ( Graphics & g)
inlineoverridevirtual

Components can override this method to draw their content.

The paint() method gets called when a region of a component needs redrawing, either because the component's repaint() method has been called, or because something has happened on the screen that means a section of a window needs to be redrawn.

Any child components will draw themselves over whatever this method draws. If you need to paint over the top of your child components, you can also implement the paintOverChildren() method to do this.

If you want to cause a component to redraw itself, this is done asynchronously - calling the repaint() method marks a region of the component as "dirty", and the paint() method will automatically be called sometime later, by the message thread, to paint any bits that need refreshing. In JUCE (and almost all modern UI frameworks), you never redraw something synchronously.

You should never need to call this method directly - to take a snapshot of the component you could use createComponentSnapshot() or paintEntireComponent().

Parameters
gthe graphics context that must be used to do the drawing operations.
See also
repaint, paintOverChildren, Graphics

Reimplemented from juce::Component.

◆ paintOverChildren()

void juce::PopupMenu::HelperClasses::MenuWindow::paintOverChildren ( Graphics & g)
inlineoverridevirtual

Components can override this method to draw over the top of their children.

For most drawing operations, it's better to use the normal paint() method, but if you need to overlay something on top of the children, this can be used.

See also
paint, Graphics

Reimplemented from juce::Component.

◆ resizeToBestWindowPos()

void juce::PopupMenu::HelperClasses::MenuWindow::resizeToBestWindowPos ( )
inline

◆ selectNextItem()

void juce::PopupMenu::HelperClasses::MenuWindow::selectNextItem ( MenuSelectionDirection direction)
inline

◆ setCurrentlyHighlightedChild()

void juce::PopupMenu::HelperClasses::MenuWindow::setCurrentlyHighlightedChild ( ItemComponent * child)
inline

◆ showSubMenuFor()

bool juce::PopupMenu::HelperClasses::MenuWindow::showSubMenuFor ( ItemComponent * childComp)
inline

◆ treeContains()

bool juce::PopupMenu::HelperClasses::MenuWindow::treeContains ( const MenuWindow *const window) const
inlinenoexcept

◆ triggerCurrentlyHighlightedItem()

void juce::PopupMenu::HelperClasses::MenuWindow::triggerCurrentlyHighlightedItem ( )
inline

◆ updateYPositions()

int juce::PopupMenu::HelperClasses::MenuWindow::updateYPositions ( )
inline

◆ visibilityChanged()

void juce::PopupMenu::HelperClasses::MenuWindow::visibilityChanged ( )
inlineoverridevirtual

Called when this component's visibility changes.

See also
setVisible, isVisible

Reimplemented from juce::Component.

◆ windowIsStillValid()

bool juce::PopupMenu::HelperClasses::MenuWindow::windowIsStillValid ( )
inline

◆ workOutBestSize()

int juce::PopupMenu::HelperClasses::MenuWindow::workOutBestSize ( const int maxMenuW)
inline

◆ workOutManualSize()

void juce::PopupMenu::HelperClasses::MenuWindow::workOutManualSize ( const int maxMenuW)
inline

Member Data Documentation

◆ activeSubMenu

std::unique_ptr<MenuWindow> juce::PopupMenu::HelperClasses::MenuWindow::activeSubMenu

◆ childYOffset

int juce::PopupMenu::HelperClasses::MenuWindow::childYOffset = 0

◆ columnWidths

Array<int> juce::PopupMenu::HelperClasses::MenuWindow::columnWidths

◆ componentAttachedTo

WeakReference<Component> juce::PopupMenu::HelperClasses::MenuWindow::componentAttachedTo

◆ contentHeight

int juce::PopupMenu::HelperClasses::MenuWindow::contentHeight = 0

◆ currentChild

Component::SafePointer<ItemComponent> juce::PopupMenu::HelperClasses::MenuWindow::currentChild

◆ disableMouseMoves

bool juce::PopupMenu::HelperClasses::MenuWindow::disableMouseMoves = false

◆ dismissOnMouseUp

bool juce::PopupMenu::HelperClasses::MenuWindow::dismissOnMouseUp

◆ exitingModalState

bool juce::PopupMenu::HelperClasses::MenuWindow::exitingModalState = false

◆ hasAnyJuceCompHadFocus

bool juce::PopupMenu::HelperClasses::MenuWindow::hasAnyJuceCompHadFocus = false

◆ hasBeenOver

bool juce::PopupMenu::HelperClasses::MenuWindow::hasBeenOver = false

◆ hideOnExit

bool juce::PopupMenu::HelperClasses::MenuWindow::hideOnExit = false

◆ items

OwnedArray<ItemComponent> juce::PopupMenu::HelperClasses::MenuWindow::items

◆ lastFocusedTime

uint32 juce::PopupMenu::HelperClasses::MenuWindow::lastFocusedTime

◆ managerOfChosenCommand

ApplicationCommandManager** juce::PopupMenu::HelperClasses::MenuWindow::managerOfChosenCommand

◆ mouseSourceStates

OwnedArray<MouseSourceState> juce::PopupMenu::HelperClasses::MenuWindow::mouseSourceStates

◆ needsToScroll

bool juce::PopupMenu::HelperClasses::MenuWindow::needsToScroll = false

◆ numColumns

int juce::PopupMenu::HelperClasses::MenuWindow::numColumns = 0

◆ options

const Options juce::PopupMenu::HelperClasses::MenuWindow::options

◆ parent

MenuWindow* juce::PopupMenu::HelperClasses::MenuWindow::parent

◆ scaleFactor

float juce::PopupMenu::HelperClasses::MenuWindow::scaleFactor

◆ timeEnteredCurrentChildComp

uint32 juce::PopupMenu::HelperClasses::MenuWindow::timeEnteredCurrentChildComp

◆ windowCreationTime

uint32 juce::PopupMenu::HelperClasses::MenuWindow::windowCreationTime

◆ windowPos

Rectangle<int> juce::PopupMenu::HelperClasses::MenuWindow::windowPos

The documentation for this struct was generated from the following file: