Replace Actions/ActionManager with unified ControlManager + custom ac…#17
Merged
Conversation
…tion API - Delete Actions.h, Actions.cpp, ActionManager.h (typed event system) - Add ControlManager.h/.cpp: generic ActionRegistry + ControlAction base, all built-in actions (stop/pause/move/delete/speak/copy), CContNode tree, pugixml-based control.xml parser - Add Data/control/control.xml + control.dtd (from Dasher v5) - Add dasher_register_action() C API for frontend-registered custom actions with name+attributes callback, wired via GetPendingCustomActions() hook - Add BP_CONTROL_MODE / BP_SLOW_CONTROL_BOX parameters - Wire ControlManager into NodeCreationManager (CreateControlBox, AddExtras) - Update AlphabetManager, AlphIO, AlphInfo to use ControlAction - Add model rebuild on BP_CONTROL_MODE toggle in HandleParameterChange - Add docs/CUSTOM_ACTIONS.md developer guide - Add tests/test_control_actions.cpp (ActionRegistry unit + C API integration) - Register test in CMakeLists.txt
Parameter notification order is non-deterministic (unordered_map in Event::Broadcast). When DasherInterfaceBase fires before NCManager, AddExtras() uses the old CControlManager to graft nodes, then NCManager deletes the manager+templates, leaving dangling pointers in the new tree. Fix: DasherInterfaceBase now explicitly calls NCManager::CreateControlBox() before SetOffset(). NCManager no longer subscribes to BP_CONTROL_MODE.
CContNode::getLabelColor/getOutlineColor returned ColorPalette::noColor
({0,0,0,0} = fully transparent), making all control node labels invisible.
Now uses palette defaultLabelColor/defaultOutlineColor.
ScanFiles treated relative filenames as direct paths, finding corrupted user-adapted training files in the CWD instead of searching the data directory. This caused the PPM model to train on garbage data, making all letter boxes uniform size. - ScanFiles: only treat absolute paths as direct file references - WriteUserDataFile: prepend s_dataDirectory to relative filenames
CommandScreen::Polyline was silently dropping the iWidth parameter. Added opcode 6 (set line width) before line segments so the renderer can draw polylines at the correct width.
Polyline now emits opcode 6 before line segments. Updated test bounds from <=5 to <=6 and added case 6 to coordinates_in_bounds switch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue / RFC: #
Replaces the old typed event system (Actions.h / ActionManager.h with 14 hardcoded Event<> channels) with a single, generic, extensible action framework. Both alphabet symbol nodes and control nodes now use the same ControlAction base class and ActionRegistry. Frontends can register arbitrary custom actions via dasher_register_action() — anything from API calls to opening apps — without touching C++.
Type of change
Cross-platform impact
A core goal of Dasher v6 is feature parity across frontends. Help reviewers
see the blast radius:
This adds the control mode (editing commands: delete, move, speak, copy) to all frontends via the C API. Previously this was platform-specific C++ code. The custom action API enables all frontends to extend Dasher with arbitrary actions.
Definition of Done