API — ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab
The public contract of 18 header(s) under src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab — 19 class/struct definition(s), 324 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
ICoreTab.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/ICoreTab.h
Re-runs the "links drifted away from their ports" correction over whatever this tab currently shows. loadTreeNode() ends with the same pass, but a recipe replay repopulates the node UNDER a tab that is already loaded and never calls it again -- which is how the drift came back. ICoreStudioStateMachine::applyRecipeSnapshot() sweeps every tab through this once the replay is done.
ICoreTab#
ICoreTab.h:10 · class · pImpl · 22 declaration(s)
class ICoreTab {
public:
explicit ICoreTab(ICoreStudioSurface* parent);
void loadTreeNode(ICoreSubsystemTreeNode* nodeToLoad, bool resetCanvas = true);
// Re-runs the "links drifted away from their ports" correction over whatever this
// tab currently shows. loadTreeNode() ends with the same pass, but a recipe replay
// repopulates the node UNDER a tab that is already loaded and never calls it again --
// which is how the drift came back. ICoreStudioStateMachine::applyRecipeSnapshot()
// sweeps every tab through this once the replay is done.
void reapplyLinkDriftCorrection() const;
void navigateBack();
void navigateUp();
// False once the walk up would leave the part of the tree the user is allowed to see,
// so navigateUp() and the Up button's enabled state stay in agreement.
bool canNavigateUp() const;
void refreshLoadedTreeNode();
void refreshLoadedTreeNodeFromLoadedPath();
void deleteTabPermanently();
void ensureTabHeadersHaveTheCorrectName() const;
void handleNavigationHistory(ICoreSubsystemTreeNode* nodeToCache);
void setParent(ICoreStudioSurface* newParent);
ICoreTabHeader* getTabHeader() const;
ICoreStudioSurface* getParentStudioSurface() const;
ICoreCanvas* getAttachedCanvas() const;
std::string getLoadedTreenodePath() const;
std::deque<ICoreSubsystemTreeNode*> getBackNavigationHistoryList() const;
void resetToInitialState(ICoreStudioSurface* parent);
void kill();
void setAlive();
bool isAlive() const;
~ICoreTab();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreTabHeader.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/ICoreTabHeader.h
The close button's LEAVE, watched through watchPointerCrossingsOf. The parameter is ICoreAnyWidget (= QWidget) rather than ICoreWidget for exactly this site: closeButton is an ICoreButton, which derives QPushButton, so an ICoreWidget* parameter would not even accept it — the watch would have been silently unusable here. P5.1 widened it for this.
ICoreTabHeader#
ICoreTabHeader.h:19 · class · final · bases public ICoreWidget · pImpl · 21 declaration(s)
class ICoreTabHeader final : public ICoreWidget {
public:
explicit ICoreTabHeader(ICoreTab* associatedTab, ICoreWidget* parent = nullptr);
double backgroundOpacity() const;
void setBackgroundOpacity(double o);
double hoverProgress() const;
void setHoverProgress(double p);
void setLabelText(const ICoreString& newText) const;
void setFocusedStyle();
void removeFocusedStyle();
void loadTreeNodeInfo(ICoreSubsystemTreeNode* nodeToLoad) const;
void resetToInitialState(ICoreTab* associatedTab, ICoreNativeWidget* parent = nullptr);
void kill();
void setAlive();
bool isAlive() const;
~ICoreTabHeader() override;
protected:
void pointerEntered() override;
void pointerLeft() override;
void paintContent(ICorePainter& p) override;
// The close button's LEAVE, watched through watchPointerCrossingsOf. The
// parameter is ICoreAnyWidget (= QWidget) rather than ICoreWidget for
// exactly this site: closeButton is an ICoreButton, which derives
// QPushButton, so an ICoreWidget* parameter would not even accept it — the
// watch would have been silently unusable here. P5.1 widened it for this.
void watchedPointerLeft(ICoreNativeWidget* watched) override;
// The tab-drag gesture, in one piece: press arms it, move carries the
// floating snapshot and lights the bar under the cursor, release migrates
// the tab or spawns a window. Split across tasks it would have been three
// half-conversions of one gesture.
bool mousePressed(const ICoreMouseEvent& event) override;
bool mouseMoved(const ICoreMouseEvent& event) override;
bool mouseReleased(const ICoreMouseEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvas.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/ICoreCanvas.h
Q_OBJECT removed (P2.9d-3): this class declares no signal, slot, Q_PROPERTY or Q_INVOKABLE of its own, and nothing qobject_casts to it, holds a QPointer to it, animates it by name or reaches its metaObject(). It therefore had a meta-object nobody consulted -- and it could not keep one past P2.9d-5, when the base stops being a QObject.
ICoreCanvas#
ICoreCanvas.h:29 · class · bases public ICoreGraphicsObject · pImpl · 47 declaration(s)
class ICoreCanvas : public ICoreGraphicsObject {
public:
explicit ICoreCanvas(ICoreTab* parentTab);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void reconstructDescendents();
void freeAllCanvasChildren() const;
void setLoadedTreeNode(ICoreSubsystemTreeNode* nodeToLoad);
// Driven by ICoreCanvasParent's hooks, so these take the ICore event rather
// than the toolkit's -- the view no longer has a QMouseEvent to hand on
// once it is on ICoreGraphicsView's hook surface (P2.11b). Same shape
// ICoreLinkBranchSegmentMover's identically-named trio already used.
//
// Still void: the accept()/ignore() calls these used to make were already
// dead, because ICoreCanvasParent::mousePressEvent overwrote the flag on
// the very next line and then ran the base handler regardless.
void handleMousePress(const ICoreMouseEvent& event);
void handleMouseMove(const ICoreMouseEvent& event);
void handleMouseRelease(const ICoreMouseEvent& event);
ICoreRect getUsedCanvasArea() const;
void autoEnlargeCanvas();
void resetCanvasPanAndZoom_Core();
void assignChildrenZOrder();
void resetCanvasPanAndZoom();
void setLoadedCanvasParent(ICoreCanvasParent* newCanvasParent);
void selectObjectsInRectangle(const ICoreRect& rectangle, bool clearAllSelectionBefore = true) const;
void setWidth(double newWidth) override;
void setHeight(double newHeight);
void ensureAllChildrenAreLoadedToParentScene();
ICoreTab* getParentTab() const;
ICoreSubsystemTreeNode* getLoadedTreeNode() const;
ICoreCanvasParent* getLoadedToCanvasParent() const;
double getWidth() const;
double getHeight() const;
std::string getClassID() const;
ICoreCanvasSelectionRectangle* getSelectionRectangle() const;
ICoreCanvasObjectMover* getObjectMover() const;
ICoreCanvasSelectionModel* getObjectSelector() const;
ICoreCanvasObjectMover* getCanvasObjectMover() const;
ICoreCanvasAlignmentGuide* getAlignmentGuide() const;
ICoreCanvasAutoInserter* getAutoInserter() const;
ICoreMenu* getContextMenu() const;
ICoreCanvasFloatingObjectsParent* getFloatingObjectsParent() const;
ICorePoint getPosInCanvas(ICoreAnyGraphicsItem* grandChild);
void resetToInitialState(ICoreTab* parentTab);
void kill();
void setAlive();
bool isAlive() const;
~ICoreCanvas() override;
protected:
bool mousePressed(const ICoreMouseEvent& event) override;
bool mouseMoved(const ICoreMouseEvent& event) override;
bool mouseReleased(const ICoreMouseEvent& event) override;
bool mouseDoubleClicked(const ICoreMouseEvent& event) override;
bool contextMenuRequested(const ICoreMouseEvent& event) override;
bool dragEntered(const ICoreDragEvent& event) override;
bool dragMovedOver(const ICoreDragEvent& event) override;
bool payloadDropped(const ICoreDragEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasFloatingObjectsParent.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/ICoreCanvasFloatingObjectsParent.h
Q_OBJECT removed (P2.9d-3): this class declares no signal, slot, Q_PROPERTY or Q_INVOKABLE of its own, and nothing qobject_casts to it, holds a QPointer to it, animates it by name or reaches its metaObject(). It therefore had a meta-object nobody consulted -- and it could not keep one past P2.9d-5, when the base stops being a QObject.
ICoreCanvasFloatingObjectsParent#
ICoreCanvasFloatingObjectsParent.h:10 · class · bases public ICoreGraphicsObject · pImpl · 6 declaration(s)
class ICoreCanvasFloatingObjectsParent : public ICoreGraphicsObject {
public:
explicit ICoreCanvasFloatingObjectsParent(ICoreGraphicsObject* parent);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void setZValue_Public(const int& newZValue);
void reset();
~ICoreCanvasFloatingObjectsParent() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasObjectMover.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/ICoreCanvasObjectMover.h
ICoreCanvasObjectMover#
ICoreCanvasObjectMover.h:11 · class · pImpl · 4 declaration(s)
class ICoreCanvasObjectMover {
public:
explicit ICoreCanvasObjectMover(ICoreCanvas* parentCanvas, ICoreCanvasSelectionModel* objectSelector);
void translateSelectedObjects(const void* movingObject, ICorePoint offset) const;
void resetToInitialState(ICoreCanvas* parentCanvas, ICoreCanvasSelectionModel* objectSelector);
~ICoreCanvasObjectMover();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasSelectionModel.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/ICoreCanvasSelectionModel.h
"Is this an ADDITIVE click?" -- Ctrl on Windows/Linux, Meta on macOS.
Started file-local to ICoreCanvasSelectionModel.cpp, where it replaced twelve hand-written copies of the same test. It is declared here now because ICoreCanvasSelectionRectangle's five scan helpers ask the same question of the same event and had their own five copies -- so the platform rule lives in exactly one place for both halves of selection. Free function rather than a static member: it is about the EVENT, not about the model.
ICoreCanvasSelectionModel#
ICoreCanvasSelectionModel.h:30 · class · pImpl · 47 declaration(s)
class ICoreCanvasSelectionModel {
public:
explicit ICoreCanvasSelectionModel();
void clearAllSelections();
void selectAllTreeNodeChildren(ICoreSubsystemTreeNode* ICoreSubsystemTreeNode);
void handleVariablesSpaceSelection_Pressed(ICoreVariablesSpace* variablesSpace, const ICoreMouseEvent& event);
void handleBlockSelection_Pressed(ICoreBlock* block, const ICoreMouseEvent& event);
void handleLinkBranchSelection_Pressed(ICoreLinkBranch* linkBranch, const ICoreMouseEvent& event);
void handleCanvasAreaSelection_Pressed(ICoreCanvasArea* CanvasArea, const ICoreMouseEvent& event);
void handleTextBoxSelection_Pressed(ICoreCanvasTextBox* textbox, const ICoreMouseEvent& event);
void handleImageSelection_Pressed(ICoreImage* image, const ICoreMouseEvent& event);
void handleVariablesSpaceSelection_Released(ICoreVariablesSpace* variablesSpace, const ICoreMouseEvent& event);
void handleBlockSelection_Released(ICoreBlock* block, const ICoreMouseEvent& event);
void handleLinkBranchSelection_Released(ICoreLinkBranch* linkBranch, const ICoreMouseEvent& event);
void handleCanvasAreaSelection_Released(ICoreCanvasArea* CanvasArea, const ICoreMouseEvent& event);
void handleTextBoxSelection_Released(ICoreCanvasTextBox* textbox, const ICoreMouseEvent& event);
void handleImageSelection_Released(ICoreImage* image, const ICoreMouseEvent& event);
// Each returns false without selecting anything when `object`'s parent tree
// node isn't the current selection's parent (a selection may only ever hold
// siblings — see acceptsParent); true otherwise (including when the object
// was already selected).
bool selectionAPI_VariablesSpace(ICoreVariablesSpace* variablesSpace);
bool selectionAPI_Block(ICoreBlock* block);
bool selectionAPI_EntireLink(const ICoreLink* link);
bool selectionAPI_LinkBranch(ICoreLinkBranch* linkBranch);
bool selectionAPI_CanvasArea(ICoreCanvasArea* area);
bool selectionAPI_Note(ICoreCanvasTextBox* note);
bool selectionAPI_Image(ICoreImage* image);
void deSelectionAPI_VariablesSpace(ICoreVariablesSpace* variablesSpace);
void deSelectionAPI_Block(ICoreBlock* block);
void deSelectionAPI_LinkBranch(ICoreLinkBranch* linkBranch);
void deSelectionAPI_CanvasArea(ICoreCanvasArea* area);
void deSelectionAPI_Note(ICoreCanvasTextBox* note);
void deSelectionAPI_Image(ICoreImage* block);
ICoreVariablesSpace* getSelectedVariablesSpace() const;
std::vector<ICoreBlock*> getSelectedBlocks();
std::vector<ICoreLinkBranch*> getSelectedLinkBranches();
std::vector<ICoreCanvasArea*> getSelectedCanvasAreas();
std::vector<ICoreCanvasTextBox*> getSelectedTextBoxes();
std::vector<ICoreImage*> getSelectedImages();
bool containsBlock(const ICoreBlock* block);
bool containsLinkBranch(const ICoreLinkBranch* branch);
bool containsCanvasArea(const ICoreCanvasArea* area);
bool containsTextBox(const ICoreCanvasTextBox* note);
bool containsImage(const ICoreImage* image);
ICoreRect getSelectionBoundingRect() const;
bool isEmpty() const;
bool isEmptyExceptForLinks() const;
void resetToInitialState();
void kill();
void setAlive();
bool isAlive() const;
~ICoreCanvasSelectionModel();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasSelectionRectangle.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/ICoreCanvasSelectionRectangle.h
ICoreCanvasSelectionRectangle#
ICoreCanvasSelectionRectangle.h:16 · class · bases public ICoreGraphicsRect · pImpl · 6 declaration(s)
class ICoreCanvasSelectionRectangle : public ICoreGraphicsRect {
public:
explicit ICoreCanvasSelectionRectangle(ICoreCanvas* grandParentCanvas = nullptr, ICoreCanvasSelectionModel* parentSelector = nullptr);
void start(const ICorePoint& pos);
void updateRect(const ICorePoint& pos, const ICoreMouseEvent& event);
void stop();
void resetToInitialState(ICoreCanvas* grandParentCanvas = nullptr, ICoreCanvasSelectionModel* parentSelector = nullptr);
~ICoreCanvasSelectionRectangle() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasAlignmentGuide.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AlignmentGuides/ICoreCanvasAlignmentGuide.h
ICoreCanvasAlignmentGuide#
ICoreCanvasAlignmentGuide.h:16 · class · pImpl · 13 declaration(s)
class ICoreCanvasAlignmentGuide {
public:
explicit ICoreCanvasAlignmentGuide(ICoreCanvas* parentCanvas = nullptr);
// ==== Block move spacing alignments
ICoreCanvasSpacingGuide* spacingGuide_Horizontal_Left1 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Horizontal_Left2 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Horizontal_Right1 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Horizontal_Right2 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Vertical_Top1 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Vertical_Top2 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Vertical_Bottom1 = nullptr;
ICoreCanvasSpacingGuide* spacingGuide_Vertical_Bottom2 = nullptr;
ICoreBlock* neighbour_Left = nullptr;
ICoreBlock* neighbour_Right = nullptr;
ICoreBlock* neighbour_Top = nullptr;
ICoreBlock* neighbour_Bottom = nullptr;
// ==== Block move alignments
ICoreCanvasAlignmentLine* horizontalAlignmentGuide = nullptr;
ICoreCanvasAlignmentLine* verticalAlignmentGuide = nullptr;
bool caughtInMiddleSpacing_Horizontal = false;
bool caughtInMiddleSpacing_Vertical = false;
double areaToScanLength = 3000;
// Refreshed from ICoreUserPreferences at the top of every scan (Settings ->
// Canvas). The default here is only what a guide carries before its first
// scan; the preference is what it actually catches at.
double alignmentGuideThreshold = 40;
double resizingGuideThreshold = 10;
std::pair<std::pair<bool, double>, std::pair<bool, double>> scanForBlockAlignment(const std::vector<ICoreBlock*>& blockToExclude, const ICorePoint& pointToCheck);
std::pair<std::pair<std::optional<ICoreCanvasSpacingGuide*>, std::optional<ICoreCanvasSpacingGuide*>>,
std::pair<std::optional<ICoreCanvasSpacingGuide*>, std::optional<ICoreCanvasSpacingGuide*>>> scanForBlockSpacingAlignment(ICoreBlock* focusedBlock, std::vector<ICoreBlock*> blockToExclude);
std::pair<std::pair<bool, double>, std::pair<bool, double>> scanForResizeAnchorAlignment(
const std::vector<ICoreBlock*>& blockToExclude,
const ICorePoint& pointToCheck);
void setParentItem(ICoreCanvas* newGraphicsParent) const;
void resetAllGuides();
void resetHorizontalMovingGuides();
void resetVerticalMovingGuides();
void assignDefaultZOrder() const;
bool isCaughtInMiddle_Horizontal() const;
bool isCaughtInMiddle_Vertical() const;
// getAllAlignmentLinesAsGraphicsItems() stood here and was DELETED at
// P2.9d-5c: zero callers tree-wide (its declaration and definition were the
// only two mentions), and it was the header's only reason to name
// QGraphicsObject. Same test and same outcome as
// ICoreCanvas::printAllChildrenBlocks() at P2.9d-5b.
static double getSpacingDistance(ICoreBlock* first, ICoreBlock* second, bool isVertical);
void resetToInitialState(ICoreCanvas* parentCanvas = nullptr);
~ICoreCanvasAlignmentGuide();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasAlignmentLine.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AlignmentGuides/ICoreCanvasAlignmentLine.h
Q_OBJECT removed (P2.9d-3): this class declares no signal, slot, Q_PROPERTY or Q_INVOKABLE of its own, and nothing qobject_casts to it, holds a QPointer to it, animates it by name or reaches its metaObject(). It therefore had a meta-object nobody consulted -- and it could not keep one past P2.9d-5, when the base stops being a QObject.
ICoreCanvasAlignmentLine#
ICoreCanvasAlignmentLine.h:12 · class · bases public ICoreGraphicsObject · pImpl · 7 declaration(s)
class ICoreCanvasAlignmentLine : public ICoreGraphicsObject {
public:
explicit ICoreCanvasAlignmentLine(ICoreCanvas* parentCanvas = nullptr);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void setCoordinates(ICorePoint start, ICorePoint end);
void resetLine();
void resetToInitialState(ICoreCanvas* parentCanvas = nullptr);
~ICoreCanvasAlignmentLine() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasSpacingGuide.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AlignmentGuides/ICoreCanvasSpacingGuide.h
ICoreCanvasSpacingGuide#
ICoreCanvasSpacingGuide.h:9 · class · pImpl · 10 declaration(s)
class ICoreCanvasSpacingGuide {
public:
explicit ICoreCanvasSpacingGuide(ICoreCanvas* parentCanvas, bool isVertical);
void setParentItem(ICoreCanvas* newGraphicsParent) const;
void alignBetweenBlocks(ICoreBlock* first, ICoreBlock* second);
void resetGuide() const;
void setZValue(int newZValue) const;
double getSpacing_Absolute() const;
double getSpacing_Signed() const;
std::vector<ICoreCanvasSpacingLine *> getAllLines();
void resetToInitialState(ICoreCanvas* parentCanvas, bool isVertical);
~ICoreCanvasSpacingGuide();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasSpacingLine.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AlignmentGuides/ICoreCanvasSpacingLine.h
Q_OBJECT removed (P2.9d-3): this class declares no signal, slot, Q_PROPERTY or Q_INVOKABLE of its own, and nothing qobject_casts to it, holds a QPointer to it, animates it by name or reaches its metaObject(). It therefore had a meta-object nobody consulted -- and it could not keep one past P2.9d-5, when the base stops being a QObject.
ICoreCanvasSpacingLine#
ICoreCanvasSpacingLine.h:11 · class · final · bases public ICoreGraphicsObject · pImpl · 8 declaration(s)
class ICoreCanvasSpacingLine final : public ICoreGraphicsObject {
public:
explicit ICoreCanvasSpacingLine(ICoreCanvas* parentCanvas = nullptr);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void setCoordinates(ICorePoint start, ICorePoint end);
void resetLine();
ICorePoint getStartPoint() const;
ICorePoint getEndPoint() const;
~ICoreCanvasSpacingLine() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasAutoInserter.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AutoInserter/ICoreCanvasAutoInserter.h
ICoreCanvasAutoInserterList#
ICoreCanvasAutoInserter.h:24 · class · final · bases public ICoreGraphicsObject · pImpl · 4 declaration(s)
Lightweight, non-painting host for the scrollable button column.
class ICoreCanvasAutoInserterList final : public ICoreGraphicsObject {
public:
explicit ICoreCanvasAutoInserterList(ICoreGraphicsObject* parent = nullptr);
// Declared, defined in the .cpp: the residue below is a unique_ptr to an
// Impl this header cannot see.
~ICoreCanvasAutoInserterList() override;
ICoreRect contentBounds() const override;
// No paint override at all, and the empty paint() this replaced is NOT
// missing: ICoreGraphicsObject::paint() draws its rounded fill and border
// from m_fillColor/m_borderColor, both of which default to transparent and
// which this class never sets. So the base draws two invisible shapes where
// the old override drew nothing -- identical pixels, and the container gets
// its look from its children regardless.
void setSize(double width, double height);
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasAutoInserter#
ICoreCanvasAutoInserter.h:57 · class · final · bases public ICoreGraphicsObject · pImpl · 21 declaration(s)
The double-click popup that drops a block where the pointer is.
class ICoreCanvasAutoInserter final : public ICoreGraphicsObject {
public:
explicit ICoreCanvasAutoInserter(ICoreGraphicsObject *parent = nullptr, ICoreCanvas* parentCanvas = nullptr);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void reconstructDescendents();
// Filters the whole library by the given query and repopulates the panel with the
// matches, best first. An empty query restores the starter blocks.
void runSearch(const ICoreString& query);
// Forwards a wheel delta to the scrollable list (same units the canvas
// passes to the variables-space / config panels: angleDelta().y()).
void triggerScroll(double scrollDelta);
// True when the inserter is showing and the given scene point falls inside
// it, so the canvas can route wheel scrolling here instead of zooming.
bool isUnderCursor(const ICorePoint& scenePos) const;
void showAtPos(ICorePoint posToShowAt);
void hide();
void setPosX(double newPosX);
void setPosY(double newPosY);
void setPos(double newPosX, double newPosY);
void setWidth(double width) override;
void setHeight(double height);
double getPosX() const;
double getPosY() const;
ICorePoint getPos() const;
double getWidth() const;
double getHeight() const;
~ICoreCanvasAutoInserter() override;
protected:
// The search bar's field holds the keyboard for as long as the panel is open, so
// the keys that drive the result list (Up/Down/Enter/Escape) are caught on their
// way to it — the same arrangement ICoreGlobalSearchDialog has with its anchor.
// watchedKeyPressed, not an eventFilter override: that is a QObject service,
// and this class stopped being one at P2.9d-5e (the facade's Impl is the
// filter; watchKeyPressesOf in the constructor is the registration).
bool watchedKeyPressed(const ICoreKeyEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasAutoInserterBlockButton.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/AutoInserter/ICoreCanvasAutoInserterBlockButton.h
ICoreCanvasAutoInserterBlockButton#
ICoreCanvasAutoInserterBlockButton.h:17 · class · bases public ICoreGraphicsButton · pImpl · 9 declaration(s)
One row of the auto-inserter panel: the block's library icon on the left, its leaf name as the title, and the "Grand Family / Family" trail it lives under dimmed on the right — so two blocks with t...
class ICoreCanvasAutoInserterBlockButton : public ICoreGraphicsButton {
public:
explicit ICoreCanvasAutoInserterBlockButton(ICoreGraphicsObject* parent = nullptr,
ICoreCanvas* grandParentCanvas = nullptr,
const ICoreString& blockFullType = "");
// Dresses the row for a library type ("Grand_Family/Family/Block_Name"): title,
// trail and icon all come from the type itself.
void setBlockToInsertType(const std::string& type);
// The row width has to travel through here rather than through the base
// setWidth(), which is not virtual and knows nothing about the right-aligned trail.
void setRowWidth(double width);
// Creates the block on the parent canvas at the panel's position, then closes the
// panel. Shared by a click on the row and by the panel's Enter key.
void insertBlock();
// The row Enter would insert, dressed the way a selected row is dressed in the
// Search Everywhere panel: filled with the accent, text flipped to read on it.
void setSelected(bool selected);
// Re-parents what this row owns on top of the base button's own label. Hides the
// (non-virtual) base method deliberately: every call site holds a row pointer.
void reconstructDescendents();
[[nodiscard]] const std::string& getBlockTypeToInsert() const;
~ICoreCanvasAutoInserterBlockButton() override;
protected:
bool mousePressed(const ICoreMouseEvent& event) override;
bool mouseReleased(const ICoreMouseEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasScanner.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/CanvasListener/ICoreCanvasScanner.h
ICoreCanvasScanner#
ICoreCanvasScanner.h:17 · class · 13 declaration(s)
class ICoreCanvasScanner {
public:
static std::optional<ICoreBlock*> getBlockUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICorePort*> getPortUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreLinkBranchTailPane*> getLinkTailPaneUnderCursor(const ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreLinkBranchHeadPane*> getLinkHeadPaneUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreLinkBranchSegment*> getLinkSegmentUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreCanvasArea*> getCanvasAreaRigidComponentsUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreImage*> getImageUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static std::optional<ICoreCanvasTextBox*> getTextBoxUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static bool isVariablesSpaceUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static ICoreBlock* getBlockConfigUnderCursor(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static ICoreBlock* getBlockConfigUnderCursor_ConfigPanel(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static ICoreBlock* getBlockConfigUnderCursor_DescriptionPanel(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint);
static bool isUnderCursorEmpty(ICoreSubsystemTreeNode* loadedNodeOnCanvas, ICorePoint targetPoint) ;
};
};
ICoreCanvasObjectsRoot.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/CanvasObjectsRoot/ICoreCanvasObjectsRoot.h
The Q_PROPERTY(width)/Q_PROPERTY(height) pair that stood here is GONE (P2.9d-5d): the shrink/expand animations drive setWidth()/setHeight() through ICoreValueAnimation::onValueChanged now, so nothing resolves either name through the metaobject. The Q_OBJECT that outlived them left with the flip (P2.9d-5e): the base is not a QObject any more, so the macro stopped being removable-with-care and became a compile error.
ICoreCanvasObjectsRoot#
ICoreCanvasObjectsRoot.h:19 · class · bases public ICoreGraphicsObject · pImpl · 47 declaration(s)
class ICoreCanvasObjectsRoot : public ICoreGraphicsObject {
public:
// Which shadow a root carries, decided once at construction because the two
// answers follow different user preferences.
//
// CanvasItem -- canvas CONTENT (blocks, text boxes, images, areas).
// Follows Canvas Items Shadows, which is off by default:
// one effect per diagram item is the most expensive thing
// a large diagram can carry.
// FloatingPanel -- a panel that sits OVER the canvas: the block
// configuration overlay and its two dialogs. Follows the
// floating-panel preference and casts the same shadow the
// canvas context menu casts.
//
// A root gets ONE of the two. They both drive the item's single graphics
// effect, so a root that followed both would have each preference deleting
// the other's shadow.
enum class ShadowPolicy { CanvasItem, FloatingPanel };
explicit ICoreCanvasObjectsRoot(ICoreGraphicsObject *parent = nullptr, bool resizable = true,
ShadowPolicy shadowPolicy = ShadowPolicy::CanvasItem);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
void recenterTransformOrigin();
// Recenter the transform origin after a size change, compensating the position
// so a rotated object's visual center stays put (otherwise moving the rotation
// center makes the object jump). Shared by the resizer anchors and the recipe
// resize command.
void recenterTransformOriginKeepingCenter();
virtual void reconstructDescendents();
void setPosX(double newPosX);
void setPosY(double newPosY);
virtual void setPos(double newPosX, double newPosY);
virtual void setWidth(double width) override;
virtual void setHeight(double height);
void setFillColor(ICoreColor newColor);
void setBorderColor(ICoreColor newColor);
ICorePoint centerInParent() const;
ICoreRect boundsInParent() const;
double getWidth() const;
double getHeight() const;
double width() const;
double height() const;
void setMinResizerHeight(const double& newMinHeight);
void disableLeftTopResizing() const;
void disableRightTopResizing() const;
void disableLeftBottomResizing() const;
std::vector<ICoreCanvasObjectsRootResizerAnchor*> getResizerAnchors() const;
ICoreCanvasObjectsRootResizer *getResizer() const;
void cacheSize();
void removeSelectionStyle();
virtual void setSelectionStyle();
virtual void updateAllMouseListenersValues();
void setAllowMouseListenerUpdates(bool newAllowMouse);
virtual void updateAllChildrenPositions();
void animateContentShrinking(bool deleteAfterFinish = false);
void animateContentExpanding();
void setCachedHeight(double newHeight);
void setCachedWidth(double newWidth);
double getCachedHeight() const;
double getCachedWidth() const;
// [[nodiscard]] ICoreCanvasObjectsRootResizer* getResizer() const; Careful this could return nullptr. Not used so far!
ICoreRect getBoundsInCanvas() const;
void offsetPosition(ICorePoint offset);
bool isPinnedToCanvas() const;
void setIsPinnedToCanvas(const bool& newIsPinned);
bool areMouseListenerUpdatesAllowed() const;
virtual bool isMouseOverRigidElements();
bool getAllowMouseListenerUpdates() const;
void resetToInitialState_CanvasObjectsRoot(ICoreNativeItem* parent = nullptr, bool resizable = true);
~ICoreCanvasObjectsRoot() override;
protected:
void pointerEntered(const ICoreMouseEvent& event) override;
void pointerLeft() override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasObjectsRootResizer.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/CanvasObjectsRoot/ICoreCanvasObjectsRootResizer.h
ICoreCanvasObjectsRootResizer#
ICoreCanvasObjectsRootResizer.h:11 · class · pImpl · 15 declaration(s)
class ICoreCanvasObjectsRootResizer {
public:
explicit ICoreCanvasObjectsRootResizer(ICoreCanvasObjectsRoot* canvasObjectsRoot);
void showAnchors() const;
void hideAnchors() const;
void updateAllAnchorsPos() const;
void moveAnchor(ICoreCanvasObjectsRootResizerAnchor* anchor, ICorePoint newFocusedAnchorPos, ICorePoint oppositeAnchorNewPos) const;
ICorePoint getOppositeCornerCenter(ICoreCanvasObjectsRootResizerAnchor* focusedAnchor) const;
void setParentItem(ICoreCanvasObjectsRoot* newGraphicsParent) const;
void setMinimumWidth(const double& newMinWidth);
void setMinimumHeight(const double& newMinHeight);
ICoreCanvasObjectsRootResizerAnchor* getLeftTopAnchor() const;
ICoreCanvasObjectsRootResizerAnchor* getLeftBottomAnchor() const;
ICoreCanvasObjectsRootResizerAnchor* getRightTopAnchor() const;
ICoreCanvasObjectsRootResizerAnchor* getRightBottomAnchor() const;
void resetToInitialState(ICoreCanvasObjectsRoot* canvasObjectsRoot);
~ICoreCanvasObjectsRootResizer();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasObjectsRootResizerAnchor.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/CanvasObjectsRoot/ICoreCanvasObjectsRootResizerAnchor.h
Q_OBJECT removed (P2.9d-3): this class declares no signal, slot, Q_PROPERTY or Q_INVOKABLE of its own, and nothing qobject_casts to it, holds a QPointer to it, animates it by name or reaches its metaObject(). It therefore had a meta-object nobody consulted -- and it could not keep one past P2.9d-5, when the base stops being a QObject.
ICoreCanvasObjectsRootResizerAnchor#
ICoreCanvasObjectsRootResizerAnchor.h:18 · class · bases public ICoreGraphicsObject · pImpl · 19 declaration(s)
class ICoreCanvasObjectsRootResizerAnchor : public ICoreGraphicsObject {
public:
explicit ICoreCanvasObjectsRootResizerAnchor(ICoreCanvasObjectsRootResizer* parent, ICoreCanvasObjectsRoot *grandParentTextBoxUI = nullptr, int xDir = 1, int yDir = 1);
ICoreRect contentBounds() const override;
void paintContent(ICorePainter& painter) override;
ICorePoint getAnchorCenterRespectToBlockCenter() const;
void updatePosition();
ICorePoint alignmentGuideManager(const ICorePoint& refPoint) const;
void setEnabled(const bool newVal);
bool isEnabled() const;
// Fade this anchor's opacity, through an owned restarted animation
// (P2.9d-5d). The resizer used to drive all four anchors' `opacity`
// property by name through one Parallel group; the fade lives on the
// anchor now, and the resizer just calls each enabled one.
void animateOpacity(double startOpacity, double endOpacity);
ICorePoint getAnchorCenterRespectToAreaCenter() const;
ICorePoint getCenterInGrandParent() const;
int getXDir() const;
int getYDir() const;
~ICoreCanvasObjectsRootResizerAnchor() override;
protected:
// Hover events
void pointerEntered(const ICoreMouseEvent& event) override;
void pointerLeft() override;
// Mouse events
bool mousePressed(const ICoreMouseEvent& event) override;
bool mouseMoved(const ICoreMouseEvent& event) override;
bool mouseReleased(const ICoreMouseEvent& event) override;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreCanvasPrinter.h#
src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/Tab/Canvas/Printing/ICoreCanvasPrinter.h
ICoreCanvasPrinter#
ICoreCanvasPrinter.h:34 · class · 5 declaration(s)
Putting a canvas on paper.
class ICoreCanvasPrinter {
public:
// Which theme the page is drawn in, independent of the one on screen. Light
// is the default because paper is white and the Dark theme on paper is a
// sheet of toner -- but a page bound for a screen or a dark slide deck
// wants the diagram as the editor shows it, so it is the user's call.
//
// Session-lived, like the signal-type and block-name modes this toolbar
// already carries: it is a property of the print about to be made, not of
// the project.
enum class PageTheme { Light, Dark };
static void setPageTheme(const PageTheme& newPageTheme);
static PageTheme getPageTheme();
// Opens the platform print panel for `canvas` and prints what comes back.
// Cancelling is silent -- it is not a failure.
static void printCanvas(ICoreCanvas* canvas, ICoreNativeWidget* dialogParent);
// Asks for a path, then writes that same page there as a PDF.
static void exportCanvasAsPDF(ICoreCanvas* canvas, ICoreNativeWidget* dialogParent);
// The PDF write on its own, for callers that already have a path.
static bool writePDF(ICoreCanvas* canvas, const ICoreString& filePath);
};
};