iPlug2 - C++ Audio Plug-in Framework
Classes | Public Member Functions | Static Public Member Functions | List of all members
IPopupMenu Class Reference

A class for setting the contents of a pop up menu. More...

#include <IGraphicsPopupMenu.h>

Classes

class  Item
 A class to specify an item of a pop up menu. More...
 

Public Member Functions

 IPopupMenu (const char *rootTitle="", int prefix=0, bool multicheck=false, const std::initializer_list< const char * > &items={})
 
 IPopupMenu (const char *rootTitle, const std::initializer_list< const char * > &items, IPopupFunction func=nullptr)
 
 IPopupMenu (const IPopupMenu &)=delete
 
void operator= (const IPopupMenu &)=delete
 
ItemAddItem (Item *pItem, int index=-1)
 
ItemAddItem (const char *str, int index=-1, int itemFlags=Item::kNoFlags)
 
ItemAddItem (const char *str, int index, IPopupMenu *pSubmenu)
 
ItemAddItem (const char *str, IPopupMenu *pSubmenu, int index=-1)
 
ItemAddSeparator (int index=-1)
 
void RemoveEmptySubmenus ()
 
void SetChosenItemIdx (int index)
 
int GetChosenItemIdx () const
 
int NItems () const
 
int NItemsPerColumn () const
 
void SetNItemsPerColumn (int nItemsPerColumn)
 
int GetPrefix () const
 
bool GetCanMultiCheck () const
 
ItemGetItem (int index)
 
ItemGetChosenItem ()
 
const char * GetItemText (int index)
 
void SetPrefix (int count)
 
void SetMultiCheck (bool multicheck)
 
void Clear (bool resetEverything=true)
 
bool CheckItem (int index, bool state)
 
void CheckItemAlone (int index)
 
bool IsItemChecked (int index)
 
void SetFunction (IPopupFunction func)
 
IPopupFunction GetFunction ()
 
void ExecFunction ()
 
const char * GetRootTitle () const
 
void SetRootTitle (const char *rootTitle)
 

Static Public Member Functions

static int Sortfunc (const Item **a, const Item **b)
 

Detailed Description

A class for setting the contents of a pop up menu.

An IPopupMenu must not be declared as a temporary. In order for a receiving IControl or lambda function to be triggered when something is selected, the menu should persist across function calls, therefore it should almost always be a member variable. An IPopupMenu owns its sub items, including submenus This (and the platform implementations) are largely based on the VSTGUI COptionMenu

Definition at line 39 of file IGraphicsPopupMenu.h.


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