mirror of
https://github.com/meshtastic/firmware.git
synced 2026-08-01 10:58:30 -04:00
Removed: - MessageStore::addFromPacket and addFromString, superseded by tryAddFromPacket - GeoCoord rangeRadiansToMeters, distanceTo, bearingTo - Router::rawSend, declared virtual with no override and no caller - ContentHandler handleHotspot, handleFs, handleAdminSettings, handleAdminSettingsApply, handleDeleteFsContent and their commented route registrations, plus the now unreachable htmlDeleteDir and the handleUpdateFs declaration that had no definition - ContentHelper replaceAll - OnScreenKeyboardModule popup chain: showPopup, clearPopup, drawPopup, drawPopupOverlay and their state, unreachable since the frame based UI was replaced by baseUI - DebugRenderer drawDebugInfoTrampoline, drawDebugInfoSettingsTrampoline and the orphaned drawFrameSettings - NodeListRenderer calculateMaxScroll, drawColumns and a stale extern haveGlyphs declaration with no definition - UIRenderer::haveGlyphs, Screen::blink, NotificationRenderer::showKeyboardMessagePopupWithTitle, VirtualKeyboard::getInputText - InkHUD touchNavLeft, touchNavRight, Applet::getActiveNodeCount, ThreadedMessageApplet::saveMessagesToFlash - TwoButton::setHandlerUp, TwoButtonExtended setHandlerUp, setJoystickDownHandlers, setJoystickUpHandlers - CannedMessageModule LaunchRepeatDestination, isCharInputAllowed, hasMessages - TrafficManagementModule resetStats, recordRouterHopPreserved, saturatingIncrement - UnitConversions::MetersPerSecondToMilesPerHour - EncryptedStorage getSessionRemainingSeconds - BMI270Sensor::writeRegisters, GPS::hasFlow, FSCommon copyFile, SerialConsole consolePrintf, buzz playLongPressLeadUp, memGet displayPercentHeapFree
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "configuration.h"
|
|
#if HAS_SCREEN
|
|
|
|
#include "graphics/Screen.h" // InputEvent
|
|
#include "graphics/VirtualKeyboard.h"
|
|
#include <OLEDDisplay.h>
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
namespace graphics
|
|
{
|
|
class OnScreenKeyboardModule
|
|
{
|
|
public:
|
|
static OnScreenKeyboardModule &instance();
|
|
|
|
void start(const char *header, const char *initialText, uint32_t durationMs,
|
|
std::function<void(const std::string &)> callback);
|
|
|
|
void stop(bool callEmptyCallback);
|
|
|
|
void handleInput(const InputEvent &event);
|
|
static bool processVirtualKeyboardInput(const InputEvent &event, VirtualKeyboard *keyboard);
|
|
bool draw(OLEDDisplay *display);
|
|
|
|
private:
|
|
OnScreenKeyboardModule() = default;
|
|
~OnScreenKeyboardModule();
|
|
OnScreenKeyboardModule(const OnScreenKeyboardModule &) = delete;
|
|
OnScreenKeyboardModule &operator=(const OnScreenKeyboardModule &) = delete;
|
|
|
|
void onSubmit(const std::string &text);
|
|
void onCancel();
|
|
|
|
VirtualKeyboard *keyboard = nullptr;
|
|
std::function<void(const std::string &)> callback;
|
|
};
|
|
|
|
} // namespace graphics
|
|
|
|
#endif // HAS_SCREEN
|