MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / ExportDialogState

Class ExportDialogState

src/host/ui/export_dialog.h:42–52  ·  view source on GitHub ↗

State for the "Export buffer" modal opened from the buffer list's right-click context menu: which buffer to export, the destination path (backing an ImGui InputText, hence the fixed-size buffer), and which BufferExporter::OutputType to write. Owned once by main.cpp and reused across every open/close cycle.

Source from the content-addressed store, hash-verified

40// buffer), and which BufferExporter::OutputType to write. Owned once by
41// main.cpp and reused across every open/close cycle.
42struct ExportDialogState {
43 bool open{false};
44 std::string buffer_name; // target buffer's variable_name
45 std::array<char, 1024> path_buf{}; // ImGui InputText storage
46 oid::BufferExporter::OutputType format{
47 oid::BufferExporter::OutputType::Bitmap};
48 // True once the user has typed into path_buf directly; gates
49 // apply_format_extension() so switching the format radio button never
50 // clobbers a path the user has customized themselves.
51 bool user_edited_path{false};
52};
53
54// Composes a default export path with no filesystem checks -- pure string
55// composition, safe to unit test without touching disk: `last_export_dir`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected