Injected UI clipboard boundary; called only from input handling, never from a frame. The binding shares ownership. Implementations must return promptly and may reenter UI code. Bytes remain data; no terminal escapes are interpreted. Exceptions become FAILED results.
More...
#include <line_edit.hpp>
|
|
virtual | ~Clipboard ()=default |
| | Release the service on the UI owner after admitted calls finish.
|
| virtual std::expected< std::string, TreeError > | read (std::size_t maxBytes)=0 |
| | Obtain an owning bounded payload.
|
| virtual std::expected< void, TreeError > | write (std::string_view bytes)=0 |
| | Copy selected bytes into the service.
|
Injected UI clipboard boundary; called only from input handling, never from a frame. The binding shares ownership. Implementations must return promptly and may reenter UI code. Bytes remain data; no terminal escapes are interpreted. Exceptions become FAILED results.
◆ read()
| virtual std::expected< std::string, TreeError > portals::Clipboard::read |
( |
std::size_t | maxBytes | ) |
|
|
pure virtual |
Obtain an owning bounded payload.
- Parameters
-
| maxBytes | Maximum accepted payload bytes; the caller also checks this bound. |
- Returns
- Owning bytes, or a service-specific TreeError; no partial success is inferred.
◆ write()
| virtual std::expected< void, TreeError > portals::Clipboard::write |
( |
std::string_view | bytes | ) |
|
|
pure virtual |
Copy selected bytes into the service.
- Parameters
-
| bytes | UTF-8 selection borrowed only until this call returns. |
- Returns
- Success after accepting the whole selection, or a service-specific TreeError.
The documentation for this class was generated from the following file: