tcMenu
Public Member Functions | List of all members
CommitCallbackObserver Class Reference

#include <tcMenu.h>

Inheritance diagram for CommitCallbackObserver:
MenuManagerObserver

Public Member Functions

 CommitCallbackObserver (MenuCallbackFn callbackFn)
 
void structureHasChanged () override
 
bool menuEditStarting (MenuItem *) override
 
void menuEditEnded (MenuItem *item) override
 
- Public Member Functions inherited from MenuManagerObserver
virtual void activeItemHasChanged (MenuItem *)
 

Detailed Description

This is used to simulate the old commit hook callback.

Member Function Documentation

◆ structureHasChanged()

void CommitCallbackObserver::structureHasChanged ( )
inlineoverridevirtual

Indicates that the menu structure has changed in a way that requires a new bootstrap and complete redraw. For example when a new menu item is added, or when static values such as the name or info block data change.

Implements MenuManagerObserver.

◆ menuEditStarting()

bool CommitCallbackObserver::menuEditStarting ( MenuItem item)
inlineoverridevirtual

This method is called when editing is started with the menu manager, you can prevent editing by returning false.

Parameters
itemthe item that is about to start editing
Returns
true to allow editing, otherwise false

Implements MenuManagerObserver.

◆ menuEditEnded()

void CommitCallbackObserver::menuEditEnded ( MenuItem item)
inlineoverridevirtual

This method indicates that editing has completed editing, it is different to the menu item callback in that it is only called when the menu is edited. You cannot prevent completion, but you could present a dialog if the value was incorrectly adjusted.

Parameters
itemthe item that has finished editing.

Implements MenuManagerObserver.


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