34 bool IsVisible()
const;
36 void Run(
void)
override;
64 ModernFieldLineEnding,
66 ModernFieldSerialBits,
67 ModernFieldSerialParity,
68 ModernFieldCursorType,
69 ModernFieldCursorBlinking,
72 ModernFieldFontSelection,
74 ModernFieldBackgroundColor,
75 ModernFieldBuzzerVolume,
77 ModernFieldKeyAutoRepeat,
78 ModernFieldRepeatDelay,
79 ModernFieldRepeatRate,
80 ModernFieldSwitchTxRx,
81 ModernFieldWlanHostAutoStart,
83 ModernFieldLogFileName,
87 struct TModernConfigState
89 unsigned int lineEnding;
90 unsigned int baudRate;
91 unsigned int serialBits;
92 unsigned int serialParity;
97 EFontSelection fontSelection;
98 EColorSelection textColor;
99 EColorSelection backgroundColor;
100 unsigned int buzzerVolume;
103 unsigned int repeatDelayMs;
104 unsigned int repeatRateCps;
106 unsigned int wlanModePolicy;
107 unsigned int logOutput;
108 char logFileName[64];
111 struct TModernLayoutState
120 unsigned dataStartRow;
122 unsigned availableRows;
129 void RenderHeader(
const char *pTitle,
unsigned topRow);
130 void InitializeSetupBFromConfig();
131 void ApplySetupBToConfig();
132 void MoveSetupBFieldLeft();
133 void MoveSetupBFieldRight();
134 void ToggleSetupBFieldBit(
bool setOne);
135 void ChangeSetupBSpeed(
bool increase);
136 void GetSetupBSpeedFieldPosition(TSetupBField field,
unsigned &row,
unsigned &col)
const;
137 void UpdateTabCursor();
138 void UpdateTabCell();
139 void InitializeModernFromConfig();
140 void ApplyModernToConfig();
141 void RenderModernDialog();
142 bool ComputeModernLayout(TModernLayoutState &layout)
const;
143 void RenderModernFieldRow(
const TModernLayoutState &layout,
unsigned fieldIndex,
bool selected,
const TRendererColor &fgColor,
const TRendererColor &bgColor);
144 void RenderModernFieldRows(
const TModernLayoutState &layout,
const TRendererColor &fgColor,
const TRendererColor &bgColor);
145 bool RenderModernSelectionDelta(TModernField previousSelected,
unsigned previousStartIndex);
146 bool RenderModernValueDelta();
147 void HandleModernKeyPress(
const char *pString);
148 void MoveModernSelection(
int delta);
149 void ChangeModernValue(
int delta);
150 void FormatModernValue(TModernField field,
char *pBuffer,
size_t bufferSize)
const;
152 static void KeyPressedHandler(
const char *pString);
153 static void KeyStatusHandlerRaw(
unsigned char ucModifiers,
const unsigned char RawKeys[6]);
155 void OnKeyPressed(
const char *pString);
156 void OnRawKeyStatus(
unsigned char ucModifiers,
const unsigned char RawKeys[6]);
162 CTKeyboard::TKeyPressedHandler m_pPrevKeyPressed;
163 CTKeyboard::TKeyStatusHandlerRaw m_pPrevKeyStatusRaw;
164 struct TSetupSnapshot
172 TSetupSnapshot m_Snapshot;
174 bool m_ExitRequested;
175 bool m_SaveRequested;
179 char m_KeyBuffer[32];
180 TDialogMode m_DialogMode;
182 unsigned m_SetupBToggle[4];
183 unsigned m_SetupBTxSpeed;
184 unsigned m_SetupBRxSpeed;
185 TSetupBField m_SetupBField;
186 unsigned m_SetupBBitIndex;
189 unsigned m_TabEditCol;
190 TModernField m_ModernSelected;
191 TModernConfigState m_ModernConfig;
192 bool m_ModernLayoutValid;
193 TModernLayoutState m_ModernLayout;
static CTSetup * Get(void)
Access the singleton setup dialog instance.
Definition TSetup.cpp:172