tcMenu
Toggle main menu visibility
Loading...
Searching...
No Matches
src
graphics
DialogRuntimeEditor.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 https://www.thecoderscorner.com (Dave Cherry).
3
* This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4
*/
5
6
#ifndef TCMENU_DIALOGRUNTIMEEDITOR_H
7
#define TCMENU_DIALOGRUNTIMEEDITOR_H
8
9
#include "
../MenuItems.h
"
10
#include "
../RuntimeMenuItem.h
"
11
#include "
../BaseDialog.h
"
12
17
18
19
void
onScrollingChanged(
int
id
);
20
21
class
DialogMultiPartEditor :
BaseDialogController
{
22
private
:
23
MenuBasedDialog
*dialog;
24
EditableMultiPartMenuItem
* menuItemBeingEdited;
25
AnalogMenuInfo
scrollingInfo = {
"Item Value"
,
nextRandomId
(), 0xffff, 1, onScrollingChanged, 0, 1,
""
};
26
AnalogMenuItem
scrollingEditor =
AnalogMenuItem
(&scrollingInfo, 0,
nullptr
, INFO_LOCATION_RAM);
27
28
public
:
29
static
DialogMultiPartEditor* theInstance;
30
31
DialogMultiPartEditor() {
32
theInstance =
this
;
33
menuItemBeingEdited =
nullptr
;
34
dialog =
nullptr
;
35
};
36
37
void
startEditing(
MenuBasedDialog
* dlg,
EditableMultiPartMenuItem
* item);
38
39
void
scrollChanged();
40
41
void
dialogDismissed
(
ButtonType
buttonType)
override
;
42
43
bool
dialogButtonPressed
(
int
buttonNum)
override
;
44
45
void
copyCustomButtonText
(
int
buttonNumber,
char
*buffer,
size_t
bufferSize)
override
;
46
47
void
initialiseAndGetHeader
(
BaseDialog
* dialog,
char
* buffer,
size_t
bufferSize)
override
;
48
};
49
50
#endif
//TCMENU_DIALOGRUNTIMEEDITOR_H
BaseDialog.h
The definition of the base dialog object, that can be used with any display type. These are designed ...
ButtonType
ButtonType
Definition
BaseDialog.h:22
MenuItems.h
In TcMenu, MenuItem storage is shared between program memory and RAM. Usually each MenuItem has assoc...
AnalogMenuInfo
Definition
MenuItems.h:71
RuntimeMenuItem.h
Contains definitions of menu items that can be fully defined at runtime with no need for prog mem str...
nextRandomId
menuid_t nextRandomId()
Definition
RuntimeMenuItem.cpp:15
AnalogMenuItem
Definition
MenuItems.h:485
BaseDialogController
Definition
BaseDialog.h:62
BaseDialog
Definition
BaseDialog.h:102
DialogMultiPartEditor::copyCustomButtonText
void copyCustomButtonText(int buttonNumber, char *buffer, size_t bufferSize) override
Definition
DialogRuntimeEditor.cpp:45
DialogMultiPartEditor::initialiseAndGetHeader
void initialiseAndGetHeader(BaseDialog *dialog, char *buffer, size_t bufferSize) override
Definition
DialogRuntimeEditor.cpp:51
DialogMultiPartEditor::dialogButtonPressed
bool dialogButtonPressed(int buttonNum) override
Definition
DialogRuntimeEditor.cpp:32
DialogMultiPartEditor::dialogDismissed
void dialogDismissed(ButtonType buttonType) override
Definition
DialogRuntimeEditor.cpp:25
EditableMultiPartMenuItem
Definition
RuntimeMenuItem.h:230
MenuBasedDialog
Definition
BaseDialog.h:295