tcMenu
Public Member Functions | List of all members
BaseDialogController Class Referenceabstract

#include <BaseDialog.h>

Inheritance diagram for BaseDialogController:
DialogMultiPartEditor

Public Member Functions

virtual void initialiseAndGetHeader (BaseDialog *dialog, char *buffer, size_t bufferSize)=0
 
virtual void dialogDismissed (ButtonType buttonType)=0
 
virtual bool dialogButtonPressed (int buttonNum)=0
 
virtual void copyCustomButtonText (int buttonNumber, char *buffer, size_t bufferSize)=0
 

Detailed Description

This class provides a means of controlling a dialog, in terms of what happens when a dialog is presented, when buttons are pressed, the text that should appear on custom buttons, and also when a dialog is dismissed. You can add extra menu items to the dialog during initialiseAndGetHeader(), the button grid positioning will make space for every additional element that you add.

Member Function Documentation

◆ initialiseAndGetHeader()

virtual void BaseDialogController::initialiseAndGetHeader ( BaseDialog dialog,
char *  buffer,
size_t  bufferSize 
)
pure virtual

Initialise the dialog and get the text for the header. It is called once during the dialog being shown. If you need to add extra menu items or buttons, this is the place to add them.

Parameters
dialogthe dialog object
bufferthe buffer to copy the title to
bufferSizethe size of the buffer

Implemented in DialogMultiPartEditor.

◆ dialogDismissed()

virtual void BaseDialogController::dialogDismissed ( ButtonType  buttonType)
pure virtual

Called when the dialog is dismissed, along with with the button type that was pressed

Parameters
buttonTypethe button type that was pressed

Implemented in DialogMultiPartEditor.

◆ dialogButtonPressed()

virtual bool BaseDialogController::dialogButtonPressed ( int  buttonNum)
pure virtual

Called when a dialog button is pressed, the button number from 0..N not the button type.

Parameters
buttonNumthe button number
Returns
true if the action results in the dialog being dismissed

Implemented in DialogMultiPartEditor.

◆ copyCustomButtonText()

virtual void BaseDialogController::copyCustomButtonText ( int  buttonNumber,
char *  buffer,
size_t  bufferSize 
)
pure virtual

Copy the button text for any custom buttons by their button number

Parameters
buttonNumberthe button number
bufferthe buffer to copy text into
bufferSizethe size of the buffer

Implemented in DialogMultiPartEditor.


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