wavelength 1.0.0
Loading...
Searching...
No Matches
errorscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/freqscreen.h"
4#include "os/string.h"
5#include "script/dataarray.h"
6
17class ErrorScreen : public FreqScreen {
18public:
26 explicit ErrorScreen(DataArray *pData);
27
34 ~ErrorScreen() override;
35
46 static UIScreen *New(DataArray *pData) {
47 return new ErrorScreen(pData);
48 }
49
57 const char *Title() override {
58 return "";
59 }
60
68 virtual void SetDoneScreen(const char *pszScreen) {
69 mDoneScreen = pszScreen;
70 }
71
79 virtual void SetStartScreen(const char *pszScreen) {
80 mStartScreen = pszScreen;
81 }
82
83#ifdef VIDEO_STANDARD_PAL
85 enum Operation {
86 kOperationNone = 0,
87 kOperationLoad = 1,
88 kOperationSave = 2,
89 kOperationCopy = 3,
90 kOperationDelete = 4,
91 kOperationFormat = 5,
92 kOperationCheck = 6,
93 };
94
102 virtual void SetSlot(int nSlot, int nOperation = kOperationNone) {
103 mOperation = nOperation;
104 mSlot = nSlot;
105 }
106
115 const char *GetOperationText();
116#else
124 virtual void SetSlot(int nSlot) {
125 mSlot = nSlot;
126 }
127#endif
128
136 const char *GetSlotName();
137
138#ifdef VIDEO_STANDARD_PAL
149 void ShowCardError(int nStatus, const char *pszContinueScreen, int nOperation);
150#else
157 void ShowCardError(int nStatus);
158#endif
159
170 void ShowCardErrorTwoOption(int nStatus, int nOperation);
171
172#ifdef VIDEO_STANDARD_PAL
181 void ShowNoSpaceError(int nSpace, const char *pszContinueScreen, const char *pszSaveName);
182#else
190 void ShowNoSpaceError(int nSpace);
191#endif
192
193protected:
196 int mSlot;
197#ifdef VIDEO_STANDARD_PAL
198 int mOperation;
199#endif
200};
Reference-counted array of script data nodes.
Definition dataarray.h:20
void ShowCardError(int nStatus)
Show the dialog of a memory card failure with retry, continue, and cancel buttons.
String mDoneScreen
Definition errorscreen.h:194
virtual void SetStartScreen(const char *pszScreen)
Set the screen that opened the dialog.
Definition errorscreen.h:79
const char * Title() override
Report the empty title of the screen.
Definition errorscreen.h:57
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition errorscreen.h:46
const char * GetSlotName()
Report the localised name of the memory card slot the dialog is about.
int mSlot
Definition errorscreen.h:196
ErrorScreen(DataArray *pData)
Construct the screen from its script description.
void ShowCardErrorTwoOption(int nStatus, int nOperation)
Show the dialog of a memory card failure with retry and cancel buttons.
void ShowNoSpaceError(int nSpace)
Show the no_space_error dialog of a memory card without enough space.
virtual void SetDoneScreen(const char *pszScreen)
Set the screen the dialog leads to.
Definition errorscreen.h:68
String mStartScreen
Definition errorscreen.h:195
virtual void SetSlot(int nSlot)
Choose the memory card slot the dialog is about.
Definition errorscreen.h:124
~ErrorScreen() override
Destroy the screen.
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Growable text buffer that is also a PrnStream.
Definition string.h:19
UIScreen(DataArray *pData)
Construct a screen from its script description.