JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::PopupMenu::CustomCallback Class Referenceabstract

A user-defined callback that can be used for specific items in a popup menu. More...

#include <juce_PopupMenu.h>

Inheritance diagram for juce::PopupMenu::CustomCallback:
Collaboration diagram for juce::PopupMenu::CustomCallback:

Public Member Functions

 CustomCallback ()
 
 ~CustomCallback () override
 
void decReferenceCount () noexcept
 Decreases the object's reference count. More...
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count. More...
 
int getReferenceCount () const noexcept
 Returns the object's current reference count. More...
 
void incReferenceCount () noexcept
 Increments the object's reference count. More...
 
virtual bool menuItemTriggered ()=0
 Callback to indicate this item has been triggered. More...
 

Private Attributes

int refCount = 0
 

Detailed Description

A user-defined callback that can be used for specific items in a popup menu.

See also
PopupMenu::Item::customCallback

Constructor & Destructor Documentation

◆ CustomCallback()

juce::PopupMenu::CustomCallback::CustomCallback ( )

◆ ~CustomCallback()

juce::PopupMenu::CustomCallback::~CustomCallback ( )
override

Member Function Documentation

◆ decReferenceCount()

void juce::SingleThreadedReferenceCountedObject::decReferenceCount ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will be deleted.

References jassert.

◆ decReferenceCountWithoutDeleting()

bool juce::SingleThreadedReferenceCountedObject::decReferenceCountWithoutDeleting ( )
inlinenoexceptinherited

Decreases the object's reference count.

If the count gets to zero, the object will not be deleted, but this method will return true, allowing the caller to take care of deletion.

References jassert.

◆ getReferenceCount()

int juce::SingleThreadedReferenceCountedObject::getReferenceCount ( ) const
inlinenoexceptinherited

Returns the object's current reference count.

◆ incReferenceCount()

void juce::SingleThreadedReferenceCountedObject::incReferenceCount ( )
inlinenoexceptinherited

Increments the object's reference count.

This is done automatically by the smart pointer, but is public just in case it's needed for nefarious purposes.

◆ menuItemTriggered()

virtual bool juce::PopupMenu::CustomCallback::menuItemTriggered ( )
pure virtual

Callback to indicate this item has been triggered.

Returns
true if the itemID should be sent to the exitModalState method, or false if it should send 0, indicating no further action should be taken

Member Data Documentation

◆ refCount

int juce::SingleThreadedReferenceCountedObject::refCount = 0
privateinherited

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