Generated reference › API — ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/CanvasArea
kind: generated#api#icoresdk-icorestudio-studioobjects-studiosurface-canvasarea

API — ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/CanvasArea

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

ICoreCanvasObjectCreationMode.h#

src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/CanvasArea/ICoreCanvasObjectCreationMode.h

ICoreCanvasObjectCreationMode#

ICoreCanvasObjectCreationMode.h:10 · class · 5 declaration(s)

Global "create by dragging" mode.

class ICoreCanvasObjectCreationMode {
public:
    enum class ObjectKind {
        None,
        Subsystem,
        Area,
        TextBox,
        Image
    };

    static void arm(ObjectKind kind);
    static void disarm();

    static bool isArmed();
    static ObjectKind getArmedKind();

    // Creates the armed object on the given canvas, positioned at areaOnCanvas'
    // top-left and resized to its size, then disarms the mode. Rects smaller than
    // minDragSize (a click rather than a drag) keep the object's default size.
    static void createArmedObject(ICoreCanvas* canvas, const ICoreRect& areaOnCanvas);
};
};

ICoreCanvasParent.h#

src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/CanvasArea/CanvasParent/ICoreCanvasParent.h

ICoreCanvasParent#

ICoreCanvasParent.h:26 · class · final · bases public ICoreGraphicsView · pImpl · 18 declaration(s)

No Q_OBJECT, and the Q_PROPERTY(zoomLevel) that sat beside it is gone too.

class ICoreCanvasParent final : public ICoreGraphicsView {
public:
    explicit ICoreCanvasParent(ICoreWidget* parent, ICoreStudioSurface* parentStudioSurface);

    void setZoomLevel(double zoom);
    double getZoomLevel() const;
    ICoreRect getVisibleSceneRect() const;
    double getCurrentZoom() const;
    void loadCanvas(ICoreCanvas* newCanvasToLoad);
    void checkoutCanvasIfLoaded(const ICoreCanvas* newCanvasToCheck);
    ICoreGraphicsScene* getScene() const;
    double getPanningLimitMargin() const;

    // The scroll/size facade (horizontalScroll, viewWidth, centerViewOn,
    // requestRepaint, ...) lives on ICoreGraphicsView -- it was never
    // canvas-specific and the chart view wants the same vocabulary.

    double zoomLevel() const;

    ~ICoreCanvasParent() override;

protected:
    // ICoreGraphicsView's hooks, not the toolkit's handlers (P2.11b).
    bool wheelScrolled(const ICoreWheelEvent& event) override;
    bool mousePressed(const ICoreMouseEvent& event) override;
    bool mouseMoved(const ICoreMouseEvent& event) override;
    bool mouseReleased(const ICoreMouseEvent& event) override;
    // These for receiving dragged blocks from library
    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;
};

ICoreNewTabPanel.h#

src/ICoreSDK/ICoreStudio/StudioObjects/StudioSurface/CanvasArea/NewTabPanel/ICoreNewTabPanel.h

Brings the tree view, and with it ICoreTreeRow -- the row handle the path lookup below is written in terms of. Same reason ICoreSubsystemPickerDialog includes it rather than forward-declaring: the handle is returned BY VALUE.

ICoreNewTabPanel#

ICoreNewTabPanel.h:52 · class · bases public ICoreWidget · pImpl · 6 declaration(s)

ICoreNewTabPanel What the canvas area shows when a tab is being started: either because the "+" was pressed, or because the last tab of the window was closed.

class ICoreNewTabPanel : public ICoreWidget {
public:
    explicit ICoreNewTabPanel(ICoreWidget *parent = nullptr, ICoreStudioSurface* parentStudioSurface = nullptr);

    // The Create action: a new empty subsystem under the selected path, opened in
    // a fresh tab. Public because it is the panel's original entry point.
    void handleCreatingNewTab();

    // Called every time the page is raised: rebuilds the tree, clears the form and
    // starts the selection on whatever the window was last looking at.
    void resetAppearance();

    ~ICoreNewTabPanel() override;

protected:
    // Escape backs out to the canvas -- but only when there is a canvas to back
    // out to, which is not the case when the last tab was just closed.
    bool keyPressed(const ICoreKeyEvent& event) override;

    // The left panel's sliding menu floats over this page as it does over the
    // canvas, so a click on the page folds it away exactly as a click on the
    // canvas does. A pinned menu stays: hideMenuPanel() decides that itself.
    //
    // Clicks on the page's passive parts arrive here by propagation -- the
    // labels, cards and containers do not take them. The ones that do (the tree,
    // the buttons, the name field) are interactions with this page rather than
    // with the menu, and leave it alone.
    bool mousePressed(const ICoreMouseEvent& event) override;

private:
    class Impl;                    // the two-line residue; state lives here
    std::unique_ptr<Impl> impl;
};