ContextMenuItem class reference
A widget that represents the single option displayed in the "ContextMenu" widget.
Functions
Functions documentation
ContextMenuItem(Window* window,Widget2DPropsprops,ContextMenu* cm,SimpleButtonThemebtnTheme);
Constructor.
void SetText(TextThemeprops, std::wstring text);
Sets the text to display.
void SetImage(ImageThemeprops,Texture* texture = nullptr);
Sets the image to display (on the left side of text).
void SetCallback(Callback cbFunc);Sets a Callback that is executed every time an event is processed (click action on Menu entry).
void ResetCallback();Resets the Callback function to nullptr.
Callback GetCallbackFunc();Returns binded Callback.
Variables documentation
Callback m_Callback;Stores Callback (action) which is executed when clicked on the Menu entry.