Generated reference › API — ICoreSDK/ICoreStudio/Registry
kind: generated#api#icoresdk-icorestudio-registry

API — ICoreSDK/ICoreStudio/Registry

The public contract of 3 header(s) under src/ICoreSDK/ICoreStudio/Registry — 3 class/struct definition(s), 60 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.

ICoreStudioRegistry.h#

src/ICoreSDK/ICoreStudio/Registry/ICoreStudioRegistry.h

The app's one hover info label, parented to nothing so it can float over whichever window the cursor is on. Null until the registry is initialized.

ICoreStudioRegistry#

ICoreStudioRegistry.h:19 · class · 34 declaration(s)

class ICoreStudioRegistry {
public:
    static long initializeStudioRegistry();

    static void forceCloseSoftware();

    // The app's one hover info label, parented to nothing so it can float over
    // whichever window the cursor is on. Null until the registry is initialized.
    static ICoreInfoLabel* getInfoLabel();

    // ====================[Windows and dialogs]======================
    // Every top level the studio puts on screen is tracked here so shutdown can
    // walk them.
    //
    // ICoreWindow and ICoreDialog know NOTHING about this registry. They used
    // to register themselves from their own constructors and destructors, which
    // made two general-purpose UI classes depend on a studio-level singleton
    // and gave callers no say in it. The traffic runs one way now: ask here for
    // a window or a dialog, and what comes back is already tracked.
    //
    //     auto* navigator = ICoreStudioRegistry::requestNewWindow<ICoreProjectNavigator>();
    //     auto* dialog    = ICoreStudioRegistry::requestNewDialog<ICoreDialog>(parent);
    //
    // Subclasses go through the same door -- the template constructs whatever
    // type is named, forwarding its constructor arguments, so there is no
    // separate path for ICoreProjectNavigator or ICoreSubsystemPickerDialog to
    // slip through untracked.
    //
    // Deregistration is NOT the delete function's job. It is driven off the
    // object's destructor (via the lifetime hook installed below), because most
    // of these windows are never deleted through requestDeleteWindow: the
    // project navigator carries WA_DeleteOnClose, and a parented dialog is
    // destroyed by its parent. Hooking only the deliberate path would leave
    // dangling pointers here for every other one.
    template <typename WindowT, typename... Args>
    static WindowT* requestNewWindow(Args&&... args) {
        static_assert(std::is_base_of_v<ICoreWindow, WindowT>,
                      "requestNewWindow only builds ICoreWindow and its subclasses");
        WindowT* window = new WindowT(std::forward<Args>(args)...);
        adoptWindow(window);
        return window;
    }
    static void requestDeleteWindow(ICoreWindow* window);

    template <typename DialogT, typename... Args>
    static DialogT* requestNewDialog(Args&&... args) {
        static_assert(std::is_base_of_v<ICoreDialog, DialogT>,
                      "requestNewDialog only builds ICoreDialog and its subclasses");
        DialogT* dialog = new DialogT(std::forward<Args>(args)...);
        adoptDialog(dialog);
        return dialog;
    }
    static void requestDeleteDialog(ICoreDialog* dialog);

    // The plain QWidget top levels -- detached menu panels, block code editors,
    // decorated windows -- are tracked through this pair instead. Still
    // self-registering from ICoreWidget; untouched by the change above.
    static void registerWidgetAsWindow(ICoreWidget* widget);
    static void unregisterWidgetAsWindow(ICoreWidget* widget);

    static std::pair<ICoreWindow*, ICoreStudioSurface*> requestNewEditorWindow();

    static void closeAllWindows();

    static ICoreFloatingElementsWindow* getFloatingElementsWindow();

    // The app's one menu strip, owned by the primary window. Registered there
    // so anything that has to reach it -- the toggle on the editor's top panel
    // -- does not have to know about ICorePrimaryWindow. Null until the primary
    // window has built it.
    static void registerMainMenuBar(ICoreMenuBar* menuBar);
    static ICoreMenuBar* getMainMenuBar();

    static void registerRunToolBar(ICoreRunToolBar *toolBar);
    static void setSolverStartedRunToolBar();
    static void setDebugModeStartedRunToolBar();
    static void setSolverPausedRunToolBar();
    static void setSolverStoppedRunToolBar();
    static void setModelBuildingRunToolBar();

    static ICoreTimeLine* requestTimeLine(ICorePrimaryWindow* parent);
    static void refreshStartTimeUIs();
    static void refreshStopTimeUIs();
    static void resetProgressBarUpdates();
    static void enableAutoProgressBarUpdates();
    static void disableAutoProgressBarUpdates();

    // ====================[Solver UIs]======================
    // Called from the solver thread: each one hops onto the GUI thread before
    // touching the tool bars and time lines above.
    static void resetProgressUIs();
    static void setModelBuildStartedUIs();
    static void setModelBuildFinishedUIs(const bool& succeeded);
    static void setSolverStartedUIs();
    static void setDebugModeStartedUIs();
    static void setSolverPausedUIs();
    static void setSolverStoppedUIs(const bool& wasAborted);
    static void setSolverStartupAbortedUIs();

};

ICoreStudioStaticCommands.h#

src/ICoreSDK/ICoreStudio/Registry/ICoreStudioStaticCommands.h

ICoreStudioStaticCommands#

ICoreStudioStaticCommands.h:21 · class · 4 declaration(s)

The UI half of the static-helper pair.

class ICoreStudioStaticCommands {
public:
    static std::unordered_map<std::string, std::string> serializeFont(const ICoreFont& font, const std::string& prefix = "");
    static ICoreFont loadSerializedFont(const std::unordered_map<std::string, std::string>& serializedState);

    static std::unordered_map<std::string, std::string> serializeColor(const ICoreColor& color, const std::string& prefix = "");
    static ICoreColor loadSerializedColor(const std::unordered_map<std::string, std::string>& serializedState);
};
};

ICoreStudioSurfaceRegistry.h#

src/ICoreSDK/ICoreStudio/Registry/ICoreStudioSurfaceRegistry.h

ICoreStudioSurfaceRegistry#

ICoreStudioSurfaceRegistry.h:13 · class · 22 declaration(s)

class ICoreStudioSurfaceRegistry {
public:

    static long initializeStudioSurfaceRegistry();

    static ICoreStudioSurface* requestNewStudioSurface_WithoutWindow(ICoreWidget* parent);
    // static std::pair<ICoreWindow*, ICoreStudioSurface*> requestNewStudioSurface_WithWindow();    // Moved to Main Registry
    static void requestDeleteStudioSurface(const ICoreStudioSurface* paneToDelete);

    static void setFocusedStudioSurface(ICoreStudioSurface* newFocusedStudioSurface);
    static ICoreStudioSurface* getFocusedStudioSurface();

    static void checkOutCanvasPointers(ICoreCanvas *canvasToCheckOut);

    static bool checkIfTreeNodeLoadedToAnyTab(const ICoreSubsystemTreeNode* nodeToCheck);

    static void ensureAllStudioSurfacesShowingTheLoadedDirectories();
    static void deleteAllTabsWithoutLoadedTreeNode();

    // Deletes every tab showing a node the user is not allowed to see under the registry's
    // current navigation-root access setting (and every tab with no node at all). With access
    // switched on nothing outside Home is off-limits, so only the node-less tabs go.
    static void deleteAllTabsOutsideHomeTreeNode();

    // Re-applies the navigation-root access setting to what is already on screen: sweeps the
    // tabs that may no longer be shown, then redraws each window's breadcrumb, tab-header
    // names and nav buttons. The navigators rebuild on every open, so they need no refresh.
    static void applyNavigationAccessToOpenWindows();

    // While paused, deleteAllTabsWithoutLoadedTreeNode() and deleteAllTabsOutsideHomeTreeNode()
    // no-op. Used by ICoreStudioStateMachine::undo()/redo() to skip tab cleanup during recipe replay.
    static void pauseTabCleanup();
    static void resumeTabCleanup();

    static void refreshAllTabsLoadedTreeNodePointers();

    // Re-runs each tab's link-drift correction over the node it is already showing.
    // ICoreStudioStateMachine::applyRecipeSnapshot() calls this after a replay: the
    // replay repopulates a node UNDER a loaded tab, so ICoreTab::loadTreeNode() --
    // which is where that correction otherwise runs -- is never reached.
    static void reapplyLinkDriftCorrectionOnAllTabs();

    static ICoreTabHeadersBar* getTabHeadersBarUnderCursor(const ICorePoint& posToCheck);

    static void resetTabHeadersReceivingStyle(const ICoreTabHeadersBar* barToExclude);

    static void clearAllCanvasesSelections();

    // Used by ICoreCanvasObjectCreationMode to show/clear the crosshair on every canvas
    // Narrowed to the shape enum at P2.9d-5c -- see the retraction note on the
    // body before widening it again.
    static void setAllCanvasesCursor(ICoreCursorShape shape);
    static void unsetAllCanvasesCursors();

    static void ungrabMouseFromAllScenes();

    static void refreshAllCanvasesUIs();
};
};