API — ICoreSDK/ICoreStudio/StudioManager
The public contract of 8 header(s) under src/ICoreSDK/ICoreStudio/StudioManager — 8 class/struct definition(s), 194 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
ICoreStudioGarbageCollection.h#
src/ICoreSDK/ICoreStudio/StudioManager/GarbageManager/ICoreStudioGarbageCollection.h
ICoreStudioGarbageCollection#
ICoreStudioGarbageCollection.h:45 · class · 39 declaration(s)
class ICoreStudioGarbageCollection {
public:
// =========================================================
// Garbage Collection
// =========================================================
static void collectGarbage_TreeNode(ICoreSubsystemTreeNode *nodeToCollect);
static void collectGarbage_Block(ICoreBlock *blockToCollect);
static void collectGarbage_Port(ICorePort *portToCollect);
static void collectGarbage_PortUI(ICorePortView *portUIToCollect);
static void collectGarbage_BlockUI(ICoreBlockView *blockUI);
static void collectGarbage_BlockConfigurator(ICoreBlockConfigurator *configuratorToCollect);
static void collectGarbage_BlockConfigVariable(ICoreBlockConfigVariable *configVariable);
static void collectGarbage_BlockConfigUI(ICoreBlockConfigView* configUIToCollect);
static void collectGarbage_BlockConfigUI_AddInputPortButton(ICoreBlockConfigViewAddInputPortButton* buttonToCollect);
static void collectGarbage_BlockConfigUI_AddOutputPortButton(ICoreBlockConfigViewAddOutputPortButton* buttonToCollect);
static void collectGarbage_BlockConfigUI_DeleteInputPortButton(ICoreBlockConfigViewDeleteInputPortButton* buttonToCollect);
static void collectGarbage_BlockConfigUI_DeleteOutputPortButton(ICoreBlockConfigViewDeleteOutputPortButton* buttonToCollect);
static void collectGarbage_BlockConfigDialog(ICoreBlockConfigView_ConfigDialog *configDialogToCollect);
static void collectGarbage_BlockConfigDialogContentPaneEntry(ICoreBlockConfigDialogContentPaneEntry *entryToCollect);
static void collectGarbage_BlockDescDialog(ICoreBlockConfigView_DescriptionDialog *descDialogToCollect);
static void collectGarbage_BlockSubsystemGate(ICoreBlockSubsystemGate *gateToCollect);
static void collectGarbage_Link(ICoreLink *linkToCollect);
static void collectGarbage_LinkBranch(ICoreLinkBranch *branchToCollect);
static void collectGarbage_LinkBranchSegment(ICoreLinkBranchSegment *segToCollect);
static void collectGarbage_CanvasArea(ICoreCanvasArea *areaToCollect);
static void collectGarbage_CanvasAreaUI(ICoreCanvasAreaView *areaUIToCollect);
static void collectGarbage_TextBox(ICoreCanvasTextBox *textBoxToCollect);
static void collectGarbage_TextBoxUI(ICoreCanvasTextBoxView *boxUIToCollect);
static void collectGarbage_Image(ICoreImage *imageToCollect);
static void collectGarbage_ImageUI(ICoreImageView *imageToCollect);
static void collectGarbage_CanvasOriginAnchor(ICoreCanvasOriginAnchor *anchorToCollect);
static void collectGarbage_Chart(ICoreChart* chart);
static void collectGarbage_Tab(ICoreTab *tabToCollect);
static void collectGarbage_TabHeader(ICoreTabHeader *tabHeaderToCollect);
static void collectGarbage_Canvas(ICoreCanvas *canvasToCollect);
static void collectGarbage_CanvasSelectionModel(ICoreCanvasSelectionModel* selectionModelToCollect);
static void collectGarbage_StudioSurfaceNavBarQuickReachButton(ICoreNavBarQuickReachButton *buttonToCollect);
// The four Essentials graphics collectors moved down to
// ICoreEssentials/UI/Graphics/ICoreGraphicsRecycler (ESSENTIALS_INDEPENDENCE D5).
static void collectGarbage_MessageBox(ICoreNotificationCenterMessageBox* boxToCollect);
static void collectGarbage_TreeViewModel(ICoreTreeViewModel *modelToCollect);
static void collectGarbage_EditorState(ICoreProjectState *stateToCollect);
static void collectGarbage_ObjectState(ICoreCanvasObjectState *stateToCollect);
static void collectGarbage_PortImage(ICorePortImage *imageToCollect);
static void collectGarbage_LinkBranchImage(ICoreLinkBranchImage *imageToCollect);
static void collectGarbage_LinkImage(ICoreLinkImage *imageToCollect);
};
};
ICoreStudioGarbageRecycling.h#
src/ICoreSDK/ICoreStudio/StudioManager/GarbageManager/ICoreStudioGarbageRecycling.h
ICoreStudioGarbageRecycling#
ICoreStudioGarbageRecycling.h:65 · class · 76 declaration(s)
class ICoreStudioGarbageRecycling {
public:
// -------------- ICoreSubsystemTreeNode ------------------
static void recycle_TreeNode(ICoreSubsystemTreeNode* treeNode);
static ICoreSubsystemTreeNode* requestRecycled_TreeNode(ICoreSubsystemTreeNode* parent = nullptr, const std::string& initName = "~auto");
// -------------- Block ------------------
// ---- Block ----
static void recycle_Block(ICoreBlock* block);
static ICoreBlock* requestRecycled_Block(ICoreSubsystemTreeNode* parent, std::string type);
// ---- BlockUI ----
static void recycle_BlockUI(ICoreBlockView* blockUI);
static ICoreBlockView* requestRecycled_BlockUI(ICoreGraphicsObject *parent = nullptr, ICoreBlock* parentBlock = nullptr);
// ---- Config ----
static void recycle_BlockConfigurator(ICoreBlockConfigurator* configurator);
static void recycle_BlockConfigVariable(ICoreBlockConfigVariable* configVariable);
static void recycle_BlockConfigUI(ICoreBlockConfigView* configUI);
static void recycle_BlockConfigUI_AddInputPortButton(ICoreBlockConfigViewAddInputPortButton* buttonToCollect);
static void recycle_BlockConfigUI_AddOutputPortButton(ICoreBlockConfigViewAddOutputPortButton* buttonToCollect);
static void recycle_BlockConfigUI_DeleteInputPortButton(ICoreBlockConfigViewDeleteInputPortButton* buttonToCollect);
static void recycle_BlockConfigUI_DeleteOutputPortButton(ICoreBlockConfigViewDeleteOutputPortButton* buttonToCollect);
static void recycle_BlockConfigDialog(ICoreBlockConfigView_ConfigDialog* configDialog);
static void recycle_BlockConfigDialogContentPaneEntry(ICoreBlockConfigDialogContentPaneEntry* entryToCollect);
static void recycle_BlockDescDialog(ICoreBlockConfigView_DescriptionDialog* descDialog);
static ICoreBlockConfigurator* requestRecycled_BlockConfigurator(ICoreBlock* parentBlock);
static ICoreBlockConfigVariable* requestRecycled_BlockConfigVariable(const std::string& name, const std::string& value, const bool& isPrivate = false);
static ICoreBlockConfigView* requestRecycled_BlockConfigUI(ICoreCanvas* parent, ICoreBlockConfigurator* parentBlockConfigurator);
static ICoreBlockConfigViewAddInputPortButton* requestRecycled_AddInputPortButton(ICoreBlockConfigView* graphicsParent, ICoreBlockConfigurator* parentBlockConfigurator);
static ICoreBlockConfigViewAddOutputPortButton* requestRecycled_AddOutputPortButton(ICoreBlockConfigView* graphicsParent, ICoreBlockConfigurator* parentBlockConfigurator);
static ICoreBlockConfigViewDeleteInputPortButton* requestRecycled_DeleteInputPortButton(ICoreBlockConfigView* graphicsParent, ICoreBlockConfigurator* parentBlockConfigurator);
static ICoreBlockConfigViewDeleteOutputPortButton* requestRecycled_DeleteOutputPortButton(ICoreBlockConfigView* graphicsParent, ICoreBlockConfigurator* parentBlockConfigurator);
static ICoreBlockConfigView_ConfigDialog* requestRecycled_BlockConfigDialog(ICoreCanvas* parentCanvas, ICoreBlockConfigurator* parentBlockConfigurator, ICoreBlockConfigView* grandParentConfigUI);
static ICoreBlockConfigDialogContentPaneEntry* requestRecycled_BlockConfigDialogContentPaneEntry(ICoreBlockConfigDialogContentPane* parentDialogContentPane, ICoreBlockConfigVariable* variable);
static ICoreBlockConfigView_DescriptionDialog* requestRecycled_BlockDescDialog(ICoreCanvas* parentCanvas, ICoreBlockConfigurator* parentBlockConfigurator);
// ---- Block subsystem gate ----
static void recycle_BlockSubsystemGate(ICoreBlockSubsystemGate* gate);
static ICoreBlockSubsystemGate* requestRecycled_BlockSubsystemGate(ICoreBlock* parentBlock);
// ---- Port ----
static void recycle_Port(ICorePort* port);
static void recycle_PortUI(ICorePortView* portUI);
static ICorePort* requestRecycled_Port(ICoreBlock* parentBlock, const std::string &type, const std::string &initialPortDescription,
const bool isOutputPort, const std::string& preferredFacing);
static ICorePortView* requestRecycled_PortUI(ICoreBlockViewFrame* parent = nullptr, ICorePort* parentPort = nullptr, ICoreBlockView* grandParentBlockUI = nullptr);
// -------------- Link ------------------
static void recycle_Link(ICoreLink* link);
static void recycle_LinkBranch(ICoreLinkBranch* branch);
static void recycle_LinkBranchSegment(ICoreLinkBranchSegment* branchSeg);
// static void recycle_LinkBranchHeadPane(ICoreLinkBranchHeadPane* headPane);
// static void recycle_LinkBranchHead(ICoreLinkBranchHead* head);
// static void recycle_LinkBranchTailPane(ICoreLinkBranchTailPane* tailPane);
// static void recycle_LinkBranchTailCircle(ICoreLinkBranchTailCircle* tailCircle);
// static void recycle_LinkBranchTail(ICoreLinkBranchTail* tail);
// static void recycle_LinkBranchSegmentMover(ICoreLinkBranchSegmentMover* mover);
static ICoreLink* requestRecycled_Link(ICoreSubsystemTreeNode* parent, std::string type);
static ICoreLinkBranch* requestRecycled_LinkBranch(ICoreLink* parentLink = nullptr);
static ICoreLinkBranchSegment* requestRecycled_LinkBranchSegment(ICoreGraphicsObject *parent = nullptr, ICoreLinkBranch* parentLinkBranch = nullptr, ICoreLinkBranchSegmentMover* linkSegmentMover = nullptr);
// static ICoreLinkBranchHeadPane* requestRecycled_LinkBranchHeadPane(ICoreGraphicsObject *parent = nullptr, ICoreLinkBranch *parentLinkBranch = nullptr);
// static ICoreLinkBranchHead* requestRecycled_LinkBranchHead(ICoreLinkBranch* parentLinkBranch = nullptr);
// static ICoreLinkBranchTailPane* requestRecycled_LinkBranchTailPane(ICoreGraphicsObject *parent, ICoreLinkBranch *parentLinkBranch);
// static ICoreLinkBranchTailCircle* requestRecycled_LinkBranchTailCircle(ICoreGraphicsObject *parent = nullptr, ICoreLinkBranch* parentLinkBranch = nullptr);
// static ICoreLinkBranchTail* requestRecycled_LinkBranchTail(ICoreLinkBranch* parentLinkBranch = nullptr);
// static ICoreLinkBranchSegmentMover* requestRecycled_LinkBranchSegmentMover(ICoreLinkBranch* parent);
// -------------- Canvas Area ------------------
static void recycle_CanvasAreaUI(ICoreCanvasAreaView* areaUI);
static void recycle_CanvasArea(ICoreCanvasArea* area);
static ICoreCanvasAreaView* requestRecycled_CanvasAreaUI(ICoreGraphicsObject* parent, ICoreCanvasArea* parentCanvasArea);
static ICoreCanvasArea* requestRecycled_CanvasArea(ICoreSubsystemTreeNode* parent);
// -------------- TextBox ------------------
static void recycle_TextBoxUI(ICoreCanvasTextBoxView* noteUI);
static void recycle_TextBox(ICoreCanvasTextBox* note);
static ICoreCanvasTextBoxView* requestRecycled_TextBoxUI(ICoreGraphicsObject* parent = nullptr, ICoreCanvasTextBox* parentTextBox = nullptr);
static ICoreCanvasTextBox* requestRecycled_TextBox(ICoreSubsystemTreeNode* parentTreeNode);
// -------------- Image ------------------
static void recycle_ImageUI(ICoreImageView* imageUI);
static void recycle_Image(ICoreImage* image);
static ICoreImageView* requestRecycled_ImageUI(ICoreGraphicsObject* parent = nullptr, ICoreImage* parentImage = nullptr);
static ICoreImage* requestRecycled_Image(ICoreSubsystemTreeNode* parent);
// -------------- Origin Anchor ------------------
static void recycle_OriginAnchor(ICoreCanvasOriginAnchor* anchor);
static ICoreCanvasOriginAnchor* requestRecycled_OriginAnchor(ICoreSubsystemTreeNode* parentTreeNode);
// -------------- Charts ------------------
static void recycle_Chart(ICoreChart* chart);
static ICoreChart* requestRecycled_Chart(ICoreBlock *parentBlock);
// -------------- Tab -----------------
static void recycle_Tab(ICoreTab* tab);
static void recycle_TabHeader(ICoreTabHeader* tabHeader);
static ICoreTab* requestRecycled_Tab(ICoreStudioSurface* parent);
static ICoreTabHeader* requestRecycled_TabHeader(ICoreTab* associatedTab, ICoreWidget* parent = nullptr);
// -------------- Canvas ------------------
static void recycle_Canvas(ICoreCanvas* canvas);
static void recycle_CanvasSelectionModel(ICoreCanvasSelectionModel* model);
static ICoreCanvas* requestRecycled_Canvas(ICoreTab* parentTab);
static ICoreCanvasSelectionModel* requestRecycled_CanvasSelectionModel();
// -------------- ICoreNavBarQuickReachButton -----------------
static void recycle_StudioSurfaceNavBarQuickReachButton(ICoreNavBarQuickReachButton* buttonToCollect);
static ICoreNavBarQuickReachButton* requestRecycled_StudioSurfaceNavBarQuickReachButton(ICoreWidget *parent, ICoreStudioSurface* parentStudioSurface, const std::string& path);
// The four Essentials graphics pools that sat here -- TableEntryRow,
// ComboBox_ComboOption, BoxedText (with its P2.10b-3b narrowing note) and
// TableTitleRowSplitter -- moved down whole to
// ICoreEssentials/UI/Graphics/ICoreGraphicsRecycler
// (ESSENTIALS_INDEPENDENCE D5): every caller was an Essentials file, and
// the pools were the table widgets' own allocation strategy. The MessageBox
// request below keeps its historical (copy-pasted) name; it is unrelated
// to the splitter pool that left.
// -------------- MessageBox -----------------
static void recycle_MessageBox(ICoreNotificationCenterMessageBox* box);
static ICoreNotificationCenterMessageBox* requestRecycled_GraphicsTableTitleRowSplitter(ICoreNativeWidget* parent = nullptr,
const std::string& title = "Message", const std::string& message = "");
// -------------- ICoreTreeViewModel -----------------
static void recycle_TreeViewModel(ICoreTreeViewModel* model);
// Narrowed from ICoreAnyWidget* with the model's conversion: the parent is
// used purely as an object parent, and ICoreTreeViewModel resolves it
// through icoreNativeObjectOfWidget() internally.
static ICoreTreeViewModel* requestRecycled_TreeViewModel(ICoreNativeWidget* parent = nullptr);
// -------------- State Machine -----------------
static void recycle_EditorState(ICoreProjectState* state);
static void recycle_ObjectState(ICoreCanvasObjectState* state);
static ICoreProjectState* requestRecycled_EditorState();
static ICoreCanvasObjectState* requestRecycled_ObjectState(const std::string& classID, const std::string& objectType, const std::string& path);
// -------------- ICorePortImage -----------------
static void recycle_PortImage(ICorePortImage* imageToCollect);
static void recycle_LinkBranchImage(ICoreLinkBranchImage* imageToCollect);
static void recycle_LinkImage(ICoreLinkImage* imageToCollect);
static ICorePortImage* requestRecycled_PortImage(ICorePort* originalPort);
static ICoreLinkBranchImage* requestRecycled_LinkBranchImage(ICoreLinkBranch *originalBranch);
static ICoreLinkImage* requestRecycled_LinkImage(ICoreLink* originalLink);
// The 42 recycling pools that used to be declared here are private static data,
// so they live in the .cpp's anonymous namespace instead -- this class is
// all-static and has no Impl to hold them. See there for the per-type sections.
};
};
ICoreStudioEditorHost.h#
src/ICoreSDK/ICoreStudio/StudioManager/Host/ICoreStudioEditorHost.h
ICoreStudioEditorHost#
ICoreStudioEditorHost.h:24 · class · 1 declaration(s)
ICoreStudioEditorHost -- the studio side of ICoreEditorHost.
class ICoreStudioEditorHost {
public:
static void installEditorHostServices();
};
};
ICoreRecipeStudioBridge.h#
src/ICoreSDK/ICoreStudio/StudioManager/Recipe/ICoreRecipeStudioBridge.h
ICoreRecipeStudioBridge#
ICoreRecipeStudioBridge.h:43 · class · nested Colour, CanvasPos · 9 declaration(s)
The studio-side half of the recipe machinery.
class ICoreRecipeStudioBridge {
public:
// ---- colour ------------------------------------------------------------
// An RGBA colour in the 0-255 channel form the recipe language speaks.
// Defaults to opaque black, matching ICoreCanvasAreaView's own default.
struct Colour {
int red = 0;
int green = 0;
int blue = 0;
int alpha = 255;
};
// Parse a colour name ("red") or hex string ("#rrggbb", "#aarrggbb") into
// `out`. Returns false and leaves `out` untouched if the text names no
// known colour. Quotes must already be stripped by the caller.
static bool parseColour(const ICoreString& text, Colour& out);
// "#rrggbb" -- alpha is dropped. The short form the info sheets print.
static ICoreString formatColourRgb(const Colour& colour);
// "#rrggbb" when fully opaque, "#aarrggbb" otherwise, so a colour with
// transparency round-trips through the printed form.
static ICoreString formatColourPreservingAlpha(const Colour& colour);
// Null-safe: an area with no UI reads back as the default Colour.
static Colour areaColour(const ICoreCanvasAreaView* ui);
static void setAreaColour(ICoreCanvasAreaView* ui, const Colour& colour);
// ---- geometry ----------------------------------------------------------
// Integer canvas coordinates relative to the subsystem's origin anchor,
// +y DOWN (the screen's sense -- callers that print in the recipe
// language's +y-up convention flip the sign themselves, as they did before
// this existed).
// Null UI reads back as (0, 0), which is what the call sites relied on.
struct CanvasPos {
int x = 0;
int y = 0;
};
static CanvasPos posRelativeToCanvasOrigin(const ICoreCanvasAreaView* ui);
static CanvasPos posRelativeToCanvasOrigin(const ICoreImageView* ui);
static CanvasPos posRelativeToCanvasOrigin(const ICoreCanvasTextBoxView* ui);
// Replace a branch's corner path. Coordinates are relative to the canvas
// origin anchor and already in the screen's +y-down sense. No-op on a null branch
// or a path shorter than two corners -- the caller is expected to have
// rejected those loudly, since the sink below ignores them silently.
static void setBranchCornersRelativeToCanvasOrigin(ICoreLinkBranch* branch,
const std::vector<ICorePoint>& corners);
// ---- chart -------------------------------------------------------------
// Decode a serialized-font blob (ICoreStudioStaticCommands::serializeFont's
// key=value map) and apply it to the chart's x or y axis. No-op on a null
// chart.
static void setChartAxisFont(ICoreChart* chart, bool isX,
const std::unordered_map<std::string, std::string>& serializedFont);
// ---- image -------------------------------------------------------------
// True when the file at `path` is an image this build can actually decode.
// The real loader ignores unreadable files silently, so callers probe with
// this first in order to report a real error.
static bool isDecodableImage(const ICoreString& path);
};
};
ICoreStudioSerialization.h#
src/ICoreSDK/ICoreStudio/StudioManager/Serialization/ICoreStudioSerialization.h
Writes out a debounced autosave that has not fired yet. Called when the app is closing: the pending write is the user's last edits, and letting the timer die with the process would drop them. A no-op when autosave is synchronous (the default) or nothing is pending.
ICoreStudioSerialization#
ICoreStudioSerialization.h:6 · class · 10 declaration(s)
class ICoreStudioSerialization {
public:
static void triggerAutoSave();
// Writes out a debounced autosave that has not fired yet. Called when the
// app is closing: the pending write is the user's last edits, and letting
// the timer die with the process would drop them. A no-op when autosave is
// synchronous (the default) or nothing is pending.
static void flushPendingAutoSave();
// ------------- Project Save/Load --------------
// The .iproj file is now plain recipe text (see ICoreRecipeSerializer /
// ICoreRecipeInterpreter), one statement per line - ICoreActiveProjectFolder's
// save/load plumbing (temp file, atomic rename) is unchanged; only what
// text goes through it changed.
static void saveSerializedProjectToDisk();
static void loadProjectFromDisk();
// Writes only the project's sidecars (solver.ini, exportTargets.ini,
// projectPreferences.ini), leaving the .iproj alone.
//
// For the settings that are project data but are NOT diagram edits: changing
// one logs no action, so it never starts the autosave timer, and without this
// it would sit unwritten until the app closed and flushPendingAutoSave()
// caught it. A no-op when no project is open, and it does NOT clear the
// failed-load guard -- it has written nothing over the .iproj to justify that.
static void saveProjectSidecarsToDisk();
// Brings the editor to an empty project and writes it out, so the folder the
// two project statics currently point at ends up holding a real <name>.iproj.
//
// This is deliberately NOT loadProjectFromDisk() on a folder that has no
// .iproj yet: that path reports a failed read and a missing Images folder as
// errors, which is exactly what a brand-new project legitimately looks like.
// Same wipe-and-replay primitive, no disk read, no error noise.
//
// Callers must have pointed ICoreDocumentsFolder / ICoreActiveProjectFolder
// at the new project first -- that is what says where this writes.
static void startNewEmptyProject();
// True between a load that could not be replayed and the next successful
// load / new project / explicit save. See the flag below.
static bool didLastProjectLoadFail();
// The internal autosave kill switch, for code that must not let a write
// happen underneath it while it moves something autosave depends on. The
// regression sandbox holds it across repointing the documents folder, and
// puts it back to whatever it found. Separate from the user's Settings
// preference (ICoreUserPreferences::isAutosaveEnabled), which this does not
// touch: both have to be on for a write to happen.
static void setAutosaveSuspended(bool suspended);
static bool isAutosaveSuspended();
// TEST SUPPORT ONLY -- ICoreRegressionSandbox. The regression suite has
// cases that deliberately fail a load, which sets the guard; the sandbox has
// to hand the session back the value it started with rather than whatever
// the last case left. Nothing in the app should call this: every real way
// the flag changes is a load, a save or a new project, and short-circuiting
// that is how autosave would come back on over a project it must stay off.
static void restoreProjectLoadFailedState(bool failed);
// This class is all-static and holds no instance, so it has no Impl: the
// header surface rule is satisfied by the private statics and helpers
// living in the .cpp's anonymous namespace instead. See there for the
// project-sidecar contract, the autosave kill switch and the failed-load
// guard that used to be declared here.
};
};
ICoreStudioStateMachine.h#
src/ICoreSDK/ICoreStudio/StudioManager/StateMachine/ICoreStudioStateMachine.h
ICoreStudioStateMachine#
ICoreStudioStateMachine.h:19 · class · 27 declaration(s)
class ICoreStudioStateMachine {
public:
static long initializeStateMachine();
// =========================================================
// ClassID Manager
// =========================================================
static std::string requestClassID_Block(ICoreBlock* newlyCreatedBlock);
static std::string requestClassID_VariablesSpace(ICoreVariablesSpace* newlyCreatedVariablesSpace);
static std::string requestClassID_Link(ICoreLink* newlyCreatedLink);
static std::string requestClassID_CanvasArea(ICoreCanvasArea* newlyCreatedCanvasAreas);
static std::string requestClassID_TextBox(ICoreCanvasTextBox* newlyCreatedTextBox);
static std::string requestClassID_Image(ICoreImage* newlyCreatedImage);
static ICoreBlock* getBlockFromClassID(const std::string& classID);
static ICoreVariablesSpace* getVariableSpaceFromClassID(const std::string& classID);
static ICoreLink* getLinkFromClassID(const std::string& classID);
static ICoreCanvasArea* getCanvasAreaFromClassID(const std::string& classID);
static ICoreCanvasTextBox* getTextBoxFromClassID(const std::string& classID);
static ICoreImage* getImageFromClassID(const std::string& classID);
// ========
// Other objects Cached memory
// ===============================
static std::string cacheNewPixmap(const ICorePixmap& pixmap);
static ICorePixmap getCachedNewPixmap(const std::string &pixmapId);
static void overwriteAllCachedPixmap(const std::unordered_map<std::string, ICorePixmap>& newPixmaps);
// =========================================================
// States Manager — recipe capture/replay (see ICoreRecipeSerializer /
// ICoreRecipeInterpreter). Undo/redo and project save/load all collapse
// onto one primitive: capture Home (+ global variables + chart config) as
// a recipe string, and apply a recipe string by wiping Home to empty and
// replaying it. There is no incremental in-place patching any more — every
// undo/redo/load rebuilds the whole diagram from scratch.
// =========================================================
static void logNewAction(const std::string& action);
static void undo();
static void redo();
// Wipes Home to empty and replays `recipe` onto it (used by undo/redo and
// by ICoreStudioSerialization::loadProjectFromDisk). Public so ICoreStudioSerialization
// can drive a project load through the same path as undo/redo.
// `skipChartState`: when true, every line that configures a Scope block's
// attached ICoreChart (chart(), xlabel/ylabel, setAxisFont, path(i),
// applyStyle, ...) is left unevaluated - the chart keeps whatever default
// state it gets from being recreated with its block. undo()/redo() pass
// true: chart appearance (axis labels, per-path colors, buffer width) is
// not part of the undo/redo history. Project load passes false (the
// default) so a saved project's charts still restore in full.
// `isUndoRedo`: when true (only from undo()/redo()), ICoreStudioSurfaceRegistry's
// tab cleanup (deleteAllTabsWithoutLoadedTreeNode / deleteAllTabsOutsideHomeTreeNode)
// is paused for the duration of the wipe+replay, so neither runs. Project load passes
// false (the default) so tabs are still cleaned up normally there.
//
// Returns false when replay gave up part-way -- a line this build's grammar
// does not recognise, i.e. an older project format or a corrupted file. Home
// is then whatever had been rebuilt before that line, which is usually
// nothing. Callers that are about to write the result back to disk have to
// check this: ICoreStudioSerialization::loadProjectFromDisk does.
static bool applyRecipeSnapshot(const std::string& recipe, bool skipChartState = false, bool isUndoRedo = false);
static void clearStateMachineStates();
static void pauseLoggingNewActions();
static void resumeLoggingNewActions();
static void ungrabMouseFromAllObjects();
static const std::string& getCurrentRecipe();
// Read-only inventory of the live pointers the project currently holds, for the
// pointer-inspector UI. Returned by value (snapshots); callers should filter on
// isAlive() as these vectors can retain entries pending garbage collection.
static std::vector<ICoreBlock*> getAllProjectBlocks();
static std::vector<ICoreLink*> getAllProjectLinks();
// The static storage, the three recipe helpers and the logging switch that used
// to be declared here are private, and this class is all-static, so there is no
// Impl to hold them -- they live in the .cpp's anonymous namespace. The long
// notes on captureCurrentRecipe / replayRecipeText / trimHistoryToConfiguredDepth
// moved with them.
};
};
ICoreCanvasObjectState.h#
src/ICoreSDK/ICoreStudio/StudioManager/StateMachine/Objects/ICoreCanvasObjectState.h
ICoreCanvasObjectState#
ICoreCanvasObjectState.h:6 · class · pImpl · 17 declaration(s)
class ICoreCanvasObjectState {
public:
explicit ICoreCanvasObjectState(const std::string& classID, const std::string& objectType, const std::string& path);
// Property management
void addProperty(const std::string& key, const std::string& value);
void addMapProperties(const std::unordered_map<std::string, std::string> &map);
std::string getProperty(const std::string& key) const;
void clearProperty(const std::string& key);
void clearAllProperties();
// Getters
std::string getClassID() const;
std::string getObjectType() const;
std::string getPath() const;
int getTreeNodeOrder() const;
const std::unordered_map<std::string, std::string>& getState() const;
// Print details
void printDetails() const;
void resetToInitialState(const std::string& classID, const std::string& objectType, const std::string& path);
void kill();
void setAlive();
bool isAlive() const;
~ICoreCanvasObjectState();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreProjectState.h#
src/ICoreSDK/ICoreStudio/StudioManager/StateMachine/Objects/ICoreProjectState.h
ICoreProjectState#
ICoreProjectState.h:7 · class · pImpl · 15 declaration(s)
class ICoreProjectState {
public:
explicit ICoreProjectState();
// Order manipulation
void setOrder(int o);
void increaseOrder();
void decreaseOrder();
int getOrder() const;
// StateSpace manipulation
void addObjectState(ICoreCanvasObjectState* state);
void deleteAllObjectStates();
ICoreCanvasObjectState* getObjectStateByClassID(const std::string& classID) const;
const std::vector<ICoreCanvasObjectState*>& getStateSpace() const;
void printState() const;
void resetToInitialState();
void kill();
void setAlive();
bool isAlive() const;
~ICoreProjectState();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};