mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-05-20 14:25:07 +00:00
ac6ceca9f8
Split T-Deck firmware from microReticulum examples/lxmf_tdeck/ into its own repo. microReticulum is consumed as a git submodule dependency pinned to feat/t-deck. All include paths updated from relative symlinks to bare includes resolved via library build flags. Both tdeck (NimBLE) and tdeck-bluedroid environments compile successfully. Licensed under AGPLv3. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
|
|
namespace UI {
|
|
|
|
/**
|
|
* @brief Simple in-app clipboard for copy/paste functionality
|
|
*
|
|
* Since ESP32 doesn't have a system clipboard, this provides
|
|
* a simple static clipboard for the application.
|
|
*/
|
|
class Clipboard {
|
|
public:
|
|
/**
|
|
* @brief Copy text to clipboard
|
|
* @param text Text to copy
|
|
*/
|
|
static void copy(const String& text) {
|
|
_content = text;
|
|
_has_content = true;
|
|
}
|
|
|
|
/**
|
|
* @brief Get clipboard content
|
|
* @return Reference to clipboard text (empty if nothing copied)
|
|
*/
|
|
static const String& paste() {
|
|
return _content;
|
|
}
|
|
|
|
/**
|
|
* @brief Check if clipboard has content
|
|
* @return true if clipboard is not empty
|
|
*/
|
|
static bool has_content() {
|
|
return _has_content && _content.length() > 0;
|
|
}
|
|
|
|
/**
|
|
* @brief Clear clipboard
|
|
*/
|
|
static void clear() {
|
|
_content = "";
|
|
_has_content = false;
|
|
}
|
|
|
|
private:
|
|
static String _content;
|
|
static bool _has_content;
|
|
};
|
|
|
|
} // namespace UI
|