From 407297dc2e15f8bf503d90a1023f38ab1d7b2fdb Mon Sep 17 00:00:00 2001 From: omigamedev Date: Fri, 5 Jun 2026 10:10:31 +0200 Subject: [PATCH] Plan main toolbar message dialog --- docs/modernization/build-inventory.md | 4 +++- docs/modernization/debt.md | 8 +++++++- docs/modernization/roadmap.md | 23 +++++++++++++++++++---- src/app_core/main_toolbar.h | 9 +++++++++ src/legacy_app_shell_services.cpp | 8 ++++---- tests/CMakeLists.txt | 6 ++++++ tests/app_core/main_toolbar_tests.cpp | 12 ++++++++++++ tools/pano_cli/main.cpp | 13 +++++++++++-- 8 files changed, 71 insertions(+), 12 deletions(-) diff --git a/docs/modernization/build-inventory.md b/docs/modernization/build-inventory.md index 2c19d21..b37fa8d 100644 --- a/docs/modernization/build-inventory.md +++ b/docs/modernization/build-inventory.md @@ -226,7 +226,9 @@ Known local toolchain state: `pp_app_core` contracts while legacy dialogs, pickers, cloud/share/export, Tools, About, history, canvas-clear, settings, and platform SonarPen startup execution remain tracked by `DEBT-0029`, `DEBT-0030`, `DEBT-0031`, - `DEBT-0033`, `DEBT-0034`, and `DEBT-0035`. `src/legacy_canvas_view_services.*` + `DEBT-0033`, `DEBT-0034`, and `DEBT-0035`. The main-toolbar test message + dialog metadata now lives in `pp_app_core` and its retained creation routes + through `src/legacy_app_dialog_services.*`. `src/legacy_canvas_view_services.*` is the shared bridge for reset-camera, viewport-density, and cursor-mode execution; live Tools reset-camera, document open/new-document reset, cloud download reset, and options viewport/cursor callbacks consume the tested diff --git a/docs/modernization/debt.md b/docs/modernization/debt.md index 77de8a9..6236beb 100644 --- a/docs/modernization/debt.md +++ b/docs/modernization/debt.md @@ -188,6 +188,12 @@ agent or engineer to remove them without reconstructing context from chat. `App::message_box`/`App::show_progress`. Retained cloud prompt/progress lifetime, save-before-upload threading, CURL ownership, response/error handling, and downloaded-project execution remain open. +- 2026-06-05: DEBT-0035 was narrowed. Main-toolbar test-message dialog + metadata now lives in tested `pp_app_core` planning, is exposed by + `pano_cli plan-main-toolbar --command message-box`, and retained live + message-box creation now routes through `src/legacy_app_dialog_services.*`. + Open/save/settings routing, raw compatibility pointers, history/canvas + adapter dispatch, and settings dialog execution remain open. - 2026-06-05: DEBT-0058 was opened. App-level progress, message, and input dialog metadata now lives in tested `pp_app_core` planning consumed by `App::show_progress`, `App::message_box`, `App::input_box`, and @@ -253,7 +259,7 @@ agent or engineer to remove them without reconstructing context from chat. | DEBT-0032 | Open | Modernization | Layer menu command planning and execution dispatch now consume pure `pp_app_core` through `App::init_menu_layer`, `pano_cli plan-layer-menu`, and the `DocumentLayerMenuServices` boundary; Layer menu clear reuses the `DocumentCanvasClearServices` executor; and Layer menu rename/clear/merge now share `src/legacy_document_layer_services.*`, but the bridge still calls the legacy rename dialog path, `NodePanelLayer::merge`, and reads `Canvas::I` animation/layer state directly | Preserve existing Layer menu behavior while layer commands move toward document/app services | `pp_app_core_document_layer_tests`; `pano_cli plan-layer-menu --command clear --current-index 1 --current-name Paint`; `pano_cli plan-layer-menu --command merge --current-index 2 --lower-name Paint`; `pano_cli plan-layer-merge --layer-count 3 --from-index 2 --to-index 1`; `pano_cli plan-layer-merge --layer-count 3 --from-index 2 --to-index 1 --animation-duration 3`; `pano_cli plan-layer-menu --command rename --no-current-layer`; `ctest --preset desktop-fast --build-config Debug` | Layer rename, merge-down execution, animation gating, and selected-layer state are owned by injected document/app services with Layer-menu callbacks acting only as UI adapters and no legacy Layer menu adapter | | DEBT-0033 | Open | Modernization | Tools menu planning and direct command execution dispatch now consume pure `pp_app_core` through `App::init_menu_tools`, `pano_cli plan-tools-menu`, `pano_cli plan-tools-panel`, `pano_cli plan-canvas-camera-reset`, `pano_cli plan-canvas-view-density`, `pano_cli plan-canvas-view-cursor-mode`, and the `ToolsMenuServices` boundary, direct command execution is centralized in `src/legacy_app_shell_services.*`, SonarPen availability/startup now routes through `PlatformServices`, and reset-camera, viewport-density, and cursor-mode execution now share `src/legacy_canvas_view_services.*`, but live adapters still construct legacy `NodePanelFloating` panels, mutate legacy panel nodes, clear `CanvasModeGrid`, open legacy shortcuts UI, mutate retained `Canvas` camera/density/cursor state, write retained `Settings`, and rely on the legacy platform adapter for the retained iOS SonarPen bridge | Preserve current Tools menu and canvas-view behavior while UI shell actions move toward app/UI/platform/canvas services | `pp_app_core_tools_menu_tests`; `pp_app_core_canvas_view_tests`; `pp_platform_api_tests`; `pano_cli plan-tools-menu --command shortcuts`; `pano_cli plan-tools-panel --panel layers`; `pano_cli plan-tools-panel --panel animation --already-visible`; `pano_cli plan-canvas-camera-reset`; `pano_cli plan-canvas-view-density --density 1.5`; `pano_cli plan-canvas-view-cursor-mode --mode 3`; `ctest --preset desktop-fast --build-config Debug` | Tools panel creation, submenu routing, grid clear, camera reset, viewport density, cursor mode, shortcuts dialog, and SonarPen dispatch are owned by injected app/UI/platform/canvas services with `App::init_menu_tools` and options callbacks acting only as UI adapters and no legacy Tools/canvas-view adapter | | DEBT-0034 | Open | Modernization | About menu command planning and execution dispatch now consume pure `pp_app_core` through `App::init_menu_about`, `pano_cli plan-about-menu`, and the `AboutMenuServices` boundary, and live execution is centralized in `src/legacy_app_shell_services.*`, but the bridge still opens legacy About/manual/what's-new dialogs, invokes the injected crash hook, and runs the legacy Canvas stroke performance test directly | Preserve About menu behavior while dialogs and diagnostics move toward app/UI/platform services | `pp_app_core_about_menu_tests`; `pano_cli plan-about-menu --command news --version-major 2 --version-minor 5 --version-fix 7`; `pano_cli plan-about-menu --command performance --no-canvas`; `ctest --preset desktop-fast --build-config Debug` | About/manual/what's-new dialog dispatch, crash-test dispatch, and performance-test execution are owned by injected app/UI/platform services with `App::init_menu_about` acting only as a UI adapter and no legacy About adapter | -| DEBT-0035 | Open | Modernization | Main toolbar/status command planning and execution dispatch now consume pure `pp_app_core` through `App::init_toolbar_main`, `pano_cli plan-main-toolbar`, and the `MainToolbarServices` boundary, history/canvas commands now hand off through `HistoryUiServices` and `DocumentCanvasClearServices`, and live execution is centralized in `src/legacy_app_shell_services.*`, but the bridge still opens legacy open/save/settings/message-box dialogs and delegates to legacy history/canvas adapters | Preserve reachable toolbar/status behavior while app shell commands move toward app/document/UI services | `pp_app_core_main_toolbar_tests`; `pano_cli plan-main-toolbar --command undo --undo-count 2`; `pano_cli plan-main-toolbar --command clear-canvas --no-canvas`; `ctest --preset desktop-fast --build-config Debug` | Open/save/settings/message-box routing, undo/redo/clear-history execution, and canvas-clear execution are owned by injected app/document/UI services with `App::init_toolbar_main` acting only as a UI adapter and no legacy toolbar adapter | +| DEBT-0035 | Open | Modernization | Main toolbar/status command planning and execution dispatch now consume pure `pp_app_core` through `App::init_toolbar_main`, `pano_cli plan-main-toolbar`, and the `MainToolbarServices` boundary; toolbar test-message dialog metadata now lives in `pp_app_core` through `plan_main_toolbar_message_dialog`, retained message-box creation routes through `src/legacy_app_dialog_services.*`, history/canvas commands now hand off through `HistoryUiServices` and `DocumentCanvasClearServices`, and live execution is centralized in `src/legacy_app_shell_services.*`, but the bridge still opens legacy open/save/settings dialogs, stores raw compatibility pointers, and delegates to legacy history/canvas adapters | Preserve reachable toolbar/status behavior while app shell commands move toward app/document/UI services | `pp_app_core_main_toolbar_tests`; `pano_cli plan-main-toolbar --command undo --undo-count 2`; `pano_cli plan-main-toolbar --command message-box`; `pano_cli plan-main-toolbar --command clear-canvas --no-canvas`; `ctest --preset desktop-fast --build-config Debug` | Open/save/settings/message-box routing, undo/redo/clear-history execution, and canvas-clear execution are owned by injected app/document/UI services with `App::init_toolbar_main` acting only as a UI adapter and no legacy toolbar adapter | | DEBT-0036 | Open | Modernization | `pp_renderer_api`, `pp_paint_renderer`, `pano_cli plan-paint-feedback`, and `pano_cli plan-stroke-composite` can choose backend-neutral complex paint feedback strategies for fixed-function blending, framebuffer-fetch-capable renderers, or ping-pong render targets. OpenGL extension detection now stores `pp::renderer::RenderDeviceFeatures` through `ShaderManager`, using `pp_renderer_gl::query_opengl_capability_detection`, `detect_opengl_feature_state`, and `render_device_features` as the backend conversion point; that feature snapshot now includes float32-linear filtering, so canvas stroke texture format selection, renderer diagnostics, grid lightmap render planning, and grid bake target selection no longer read `ShaderManager::ext_*` flags directly. `pp_paint_renderer::plan_canvas_blend_gate` owns the compatibility mapping from persisted layer/brush blend indices to the extracted stroke-composite planner, and live `Canvas::draw_merge` plus `NodeCanvas` panorama rendering both call it with the stored renderer-neutral feature set for their existing shader-blend gates and destination-copy versus framebuffer-fetch decisions. `pp_paint_renderer::plan_canvas_stroke_feedback` also owns the current destination-feedback decision, and live `Canvas::stroke_draw`, thumbnail layer blending, and `NodeStrokePreview` brush-preview rendering use it for framebuffer-fetch versus destination-copy decisions. The retained `copy_framebuffer_to_texture_2d` utility bridge now routes 2D framebuffer-to-texture copies through tested `pp_renderer_gl` dispatch, retained `RTT::create`/`RTT::destroy` render-target texture parameter setup, optional depth renderbuffer allocation, framebuffer allocation/attachment/status checks, binding restore, and resource deletion now route through tested `pp_renderer_gl` dispatch, retained RTT clear, masked clear with color-write-mask restore, texture bind/unbind, and RGBA8 dirty-region texture writes now route through tested `pp_renderer_gl` dispatch, retained Canvas, NodeCanvas, and NodeStrokePreview texture-unit switches now route through tested active-texture dispatch, retained Canvas, NodeCanvas, NodeStrokePreview, and desktop HMD viewport/scissor/capability execution now route through tested `pp_renderer_gl` dispatch adapters, retained NodeCanvas, CanvasMode, and NodePanelGrid capability-state snapshots now route through tested `pp_renderer_gl` query dispatch, CanvasLayer cube/equirect generation plus frame clears now route blend state, active texture units, viewport execution, color clears, and cube-face framebuffer-to-texture copies through tested `pp_renderer_gl` dispatch adapters, `NodePanelGrid` live heightmap draw and bake setup now route depth/blend state, depth clears, color-write-mask toggles, active texture selection, bake viewport execution, sun-overlay viewport query, and desktop texture-resize readback through tested `pp_renderer_gl` dispatch adapters, retained CanvasMode overlay/mask/transform paths now route active texture, depth/blend state, transform/cut viewport execution, paint-mode blend/depth state snapshots, and canvas-tip pick framebuffer readback through tested `pp_renderer_gl` dispatch adapters, retained simple UI draw paths now share `legacy_ui_gl_dispatch` for blend-state execution, fallback 2D texture unbinds, `NodeViewport` viewport query/restore, color-buffer clears, and clear-color restore, retained `NodeCanvas` plus `NodeStrokePreview` draw-state paths now route viewport query, clear-color query, color-buffer clear, and clear-color restore through tested `pp_renderer_gl` dispatch helpers, and retained `Canvas` plus `CanvasLayer` stroke/object/thumbnail/frame-clear draw-state paths now route saved viewport or clear-color query and restore through the same tested helpers, but actual live stroke rasterization, dual-brush compositing, pattern feedback math, thumbnail layer compositing, brush-preview compositing, and the retained `ShaderManager::ext_*` compatibility fields still use legacy OpenGL canvas/UI execution | Preserve current painting behavior while the renderer boundary matures for OpenGL parity and later Vulkan/Metal experiments | `pp_renderer_api_tests`; `pp_renderer_gl_capabilities_tests`; `pp_paint_renderer_compositor_tests`; `pano_cli plan-paint-feedback --framebuffer-fetch --explicit-transitions --render-only`; `pano_cli plan-paint-feedback --texture-copy`; `pano_cli plan-stroke-composite --stroke-blend 10 --framebuffer-fetch --explicit-transitions --render-only`; `pano_cli plan-stroke-composite --layer-blend 4 --dual-blend --texture-copy`; `ctest --preset desktop-fast --build-config Debug`; `cmake --build --preset windows-msvc-default --config Debug --target PanoPainter` | Live stroke/layer compositing chooses its feedback path through `pp_paint_renderer` and renderer services, with OpenGL golden parity and Vulkan/Metal lab tests covering framebuffer-fetch and ping-pong behavior | | DEBT-0037 | Open | Modernization | Recording lifecycle/export planning and execution dispatch now consume pure `pp_app_core` through `App::rec_start`, `App::rec_stop`, `App::rec_clear`, `App::rec_export`, `pano_cli plan-recording-session`, and the `RecordingServices` boundary; live execution is centralized in `src/legacy_recording_services.*`, and retained `PBO` allocation/readback/map/unmap/delete operations now route through tested `pp_renderer_gl` dispatch, but the bridge still owns legacy recording thread startup/shutdown, platform recorded-file cleanup, progress UI, retained `App::rec_loop` readback call sites, and `MP4Encoder::write_mp4` execution | Preserve current timelapse/MP4 behavior while recording moves toward app/document/renderer/video services | `pp_app_core_document_recording_tests`; `pp_renderer_gl_capabilities_tests`; `pano_cli plan-recording-session --running --frame-count 12`; `pano_cli plan-recording-session --platform-clears-files`; `ctest --preset desktop-fast --build-config Debug` | Recording thread lifecycle, frame readback scheduling, platform cleanup, progress reporting, and MP4 writing are owned by injected app/renderer/video services with `App` methods acting only as adapters | | DEBT-0038 | Open | Modernization | Cloud upload/browse/bulk planning, cloud prompt/progress metadata, and execution dispatch now consume pure `pp_app_core` through `App::cloud_upload`, `App::cloud_upload_all`, `App::cloud_browse`, `pano_cli plan-cloud-upload`, `pano_cli plan-cloud-upload-all`, `pano_cli plan-cloud-browse`, `pano_cli plan-cloud-transfer`, and the `CloudServices` boundary; live execution is centralized in `src/legacy_cloud_services.*`, the app-owned `upload`/`download` CURL helpers now consume `pp_app_core` cloud transfer request/progress planning and the platform TLS-verification bypass policy before retained CURL setup, upload warning/publish/success prompts, upload/bulk progress dialog titles, download-progress prompt metadata, and formatted download progress text come from tested app-core plans, retained cloud prompt/progress creation routes through `src/legacy_app_dialog_services.*` via `App::message_box`/`App::show_progress` or direct bridge calls, and retained `Asset::open_url`, `LogRemote::net_init`, and `NodeDialogCloud::load_thumbs_thread` curl sites consume the `pp_platform_api` default TLS policy helper instead of spelling Android branches locally, but the bridge still uses legacy save-before-upload, app-owned curl helpers instead of an injected network service, upload form construction, response/error handling, retained prompt/progress lifetime, OpenGL context guarding, `NodeDialogCloud`, `Canvas` project open, layer refresh, and `ActionManager` reset | Preserve current cloud behavior while cloud/network/document import flows move toward app/document/platform services | `pp_app_core_document_cloud_tests`; `pp_platform_api_tests`; `pano_cli plan-cloud-upload --new-document --unsaved`; `pano_cli plan-cloud-browse --selected-file demo.ppi`; `pano_cli plan-cloud-upload-all --file-count 3`; `pano_cli plan-cloud-transfer --direction download --progress --disable-tls-verification`; `ctest --preset desktop-fast --build-config Debug` | Cloud upload/download, TLS policy, save-before-upload, progress reporting, cloud browse dialog, downloaded project opening, layer refresh, OpenGL context ownership, and action-history reset are owned by injected app/document/network/platform/renderer services with `App` methods acting only as adapters | diff --git a/docs/modernization/roadmap.md b/docs/modernization/roadmap.md index b61f196..2209753 100644 --- a/docs/modernization/roadmap.md +++ b/docs/modernization/roadmap.md @@ -687,10 +687,14 @@ plans never receive wrapped negative counts from oversized legacy stacks. `pano_cli plan-main-toolbar` exposes app-core planning for the live main toolbar/status-bar shell, including open/save dialogs, undo/redo availability, clear-history availability, clear-canvas no-canvas blocking, message-box -creation, and settings dialog routing. `pp_app_core` now also owns a -`MainToolbarServices` executor boundary, so `App::init_toolbar_main` dispatches -through `src/legacy_app_shell_services.*` before legacy dialogs, -history/canvas adapters, and settings UI execution continue. +creation, and settings dialog routing. The toolbar test-message dialog metadata +now lives in `pp_app_core` through `plan_main_toolbar_message_dialog`, and +`pano_cli plan-main-toolbar --command message-box` exposes it for automation. +`pp_app_core` now also owns a `MainToolbarServices` executor boundary, so +`App::init_toolbar_main` dispatches through `src/legacy_app_shell_services.*` +before legacy dialogs, history/canvas adapters, and settings UI execution +continue; retained toolbar message-box creation now uses +`src/legacy_app_dialog_services.*`. `pano_cli plan-quick-operation` exposes app-core planning for quick brush/color slot selection versus popup opening, plus quick mini-state restore/reset validation used by the live quick panel. Quick-panel execution now dispatches @@ -2114,6 +2118,17 @@ Results: `pano_cli_plan_main_toolbar_clear_canvas_no_canvas_smoke`, and `pano_cli_plan_main_toolbar_rejects_negative_count` passed and expose live toolbar/status planning as JSON automation. +- `PanoPainter`, `pp_app_core_main_toolbar_tests`, + `pp_app_core_app_dialog_tests`, and `pano_cli` built after toolbar + test-message dialog metadata moved into `pp_app_core` and live message-box + creation routed through `src/legacy_app_dialog_services.*`. +- Focused main-toolbar/app-dialog CTest coverage passed for + `pp_app_core_main_toolbar_tests`, `pp_app_core_app_dialog_tests`, + `pano_cli_plan_main_toolbar_*`, and `pano_cli_plan_app_dialog_*`, including + the toolbar message-box dialog metadata smoke. +- Android arm64 headless `pp_app_core`, `pano_cli`, + `pp_app_core_main_toolbar_tests`, and `pp_app_core_app_dialog_tests` built + after the toolbar message-box bridge split. - `pp_app_core_document_sharing_tests` passed, covering saved-path gating before platform share execution. - `pano_cli_plan_share_file_unsaved_smoke` and diff --git a/src/app_core/main_toolbar.h b/src/app_core/main_toolbar.h index 15d0124..6131d60 100644 --- a/src/app_core/main_toolbar.h +++ b/src/app_core/main_toolbar.h @@ -1,5 +1,6 @@ #pragma once +#include "app_core/app_dialog.h" #include "app_core/document_canvas.h" #include "app_core/history_ui.h" #include "foundation/result.h" @@ -59,6 +60,14 @@ public: virtual void show_settings_dialog() = 0; }; +[[nodiscard]] inline AppMessageDialogPlan plan_main_toolbar_message_dialog() +{ + return plan_app_message_dialog( + "Just a test message", + "Longer description for the error or the message.", + true); +} + [[nodiscard]] inline pp::foundation::Result plan_main_toolbar_command( MainToolbarCommand command, int undo_count = 0, diff --git a/src/legacy_app_shell_services.cpp b/src/legacy_app_shell_services.cpp index ac15d0a..9849bf0 100644 --- a/src/legacy_app_shell_services.cpp +++ b/src/legacy_app_shell_services.cpp @@ -4,6 +4,7 @@ #include "app.h" #include "app_core/document_import.h" +#include "legacy_app_dialog_services.h" #include "legacy_canvas_view_services.h" #include "legacy_document_canvas_services.h" #include "legacy_history_services.h" @@ -190,10 +191,9 @@ public: void show_message_box() override { - app_.msgbox = new NodeMessageBox(); - app_.msgbox->set_manager(&app_.layout); - app_.msgbox->init(); - app_.layout[app_.main_id]->add_child(app_.msgbox); + app_.msgbox = pp::panopainter::create_legacy_app_message_dialog( + app_, + pp::app::plan_main_toolbar_message_dialog()).get(); } void show_settings_dialog() override diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c25d698..fd1f210 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2150,6 +2150,12 @@ if(TARGET pano_cli) LABELS "app;document;ui;integration;desktop-fast;fuzz" PASS_REGULAR_EXPRESSION "\"command\":\"plan-main-toolbar\".*\"hasCanvas\":false.*\"action\":\"no-op-unavailable\".*\"label\":\"Clear Canvas \\(No canvas\\)\".*\"requiresCanvas\":true.*\"recordsUndo\":false.*\"marksUnsaved\":false.*\"noOp\":true") + add_test(NAME pano_cli_plan_main_toolbar_message_box_smoke + COMMAND pano_cli plan-main-toolbar --command message-box) + set_tests_properties(pano_cli_plan_main_toolbar_message_box_smoke PROPERTIES + LABELS "app;document;ui;integration;desktop-fast" + PASS_REGULAR_EXPRESSION "\"command\":\"plan-main-toolbar\".*\"action\":\"show-message-box\".*\"messageDialog\":\\{\"title\":\"Just a test message\",\"message\":\"Longer description for the error or the message\\.\",\"okCaption\":\"Ok\",\"cancelCaption\":\"Cancel\",\"showCancel\":true\\}") + add_test(NAME pano_cli_plan_main_toolbar_rejects_negative_count COMMAND pano_cli plan-main-toolbar --command undo --undo-count -1) set_tests_properties(pano_cli_plan_main_toolbar_rejects_negative_count PROPERTIES diff --git a/tests/app_core/main_toolbar_tests.cpp b/tests/app_core/main_toolbar_tests.cpp index 99589de..99c77be 100644 --- a/tests/app_core/main_toolbar_tests.cpp +++ b/tests/app_core/main_toolbar_tests.cpp @@ -82,6 +82,17 @@ void direct_dialog_commands_are_available(pp::tests::Harness& harness) } } +void message_box_dialog_preserves_legacy_defaults(pp::tests::Harness& harness) +{ + const auto plan = pp::app::plan_main_toolbar_message_dialog(); + + PP_EXPECT(harness, plan.title == "Just a test message"); + PP_EXPECT(harness, plan.message == "Longer description for the error or the message."); + PP_EXPECT(harness, plan.ok_caption == "Ok"); + PP_EXPECT(harness, plan.cancel_caption == "Cancel"); + PP_EXPECT(harness, plan.show_cancel); +} + void history_commands_reuse_history_breakpoints(pp::tests::Harness& harness) { const auto undo = pp::app::plan_main_toolbar_command(pp::app::MainToolbarCommand::undo, 2); @@ -217,6 +228,7 @@ int main() { pp::tests::Harness harness; harness.run("direct dialog commands are available", direct_dialog_commands_are_available); + harness.run("message box dialog preserves legacy defaults", message_box_dialog_preserves_legacy_defaults); harness.run("history commands reuse history breakpoints", history_commands_reuse_history_breakpoints); harness.run("canvas clear requires live canvas", canvas_clear_requires_live_canvas); harness.run("rejects negative history metrics", rejects_negative_history_metrics); diff --git a/tools/pano_cli/main.cpp b/tools/pano_cli/main.cpp index 6c4ec4a..4f03b88 100644 --- a/tools/pano_cli/main.cpp +++ b/tools/pano_cli/main.cpp @@ -8846,8 +8846,17 @@ int plan_main_toolbar(int argc, char** argv) << ",\"updatesTitle\":" << json_bool(value.updates_title) << ",\"recordsUndo\":" << json_bool(value.records_undo) << ",\"marksUnsaved\":" << json_bool(value.marks_unsaved) - << ",\"noOp\":" << json_bool(value.no_op) - << "}}\n"; + << ",\"noOp\":" << json_bool(value.no_op); + if (value.command == pp::app::MainToolbarCommand::show_message_box) { + const auto dialog = pp::app::plan_main_toolbar_message_dialog(); + std::cout << ",\"messageDialog\":{\"title\":\"" << json_escape(dialog.title) + << "\",\"message\":\"" << json_escape(dialog.message) + << "\",\"okCaption\":\"" << json_escape(dialog.ok_caption) + << "\",\"cancelCaption\":\"" << json_escape(dialog.cancel_caption) + << "\",\"showCancel\":" << json_bool(dialog.show_cancel) + << "}"; + } + std::cout << "}}\n"; return 0; }