Generated reference › API — ICoreEssentials/UI/Effects
kind: generated#api#icoreessentials-ui-effects

API — ICoreEssentials/UI/Effects

The public contract of 2 header(s) under src/ICoreEssentials/UI/Effects — 1 class/struct definition(s), 10 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.

HeaderDefinesDeclarationsBases
ICoreDropShadow.hICoreDropShadow10public ICoreNativeObject
ICoreOpacityEffect.h0

ICoreDropShadow.h#

src/ICoreEssentials/UI/Effects/ICoreDropShadow.h

ICoreDropShadow#

ICoreDropShadow.h:37 · class · final · bases public ICoreNativeObject · pImpl · 10 declaration(s)

ICoreDropShadow -- the editor's drop shadow, with its tone on the theme hook.

class ICoreDropShadow final : public ICoreNativeObject {
public:
    ~ICoreDropShadow() override;

    ICoreDropShadow(const ICoreDropShadow&) = delete;
    ICoreDropShadow& operator=(const ICoreDropShadow&) = delete;

    // Installs the floating-surface preset on `target` and returns it. The
    // target owns it from here on, exactly as setGraphicsEffect() documents --
    // there is no parent to pass and no delete to remember. The returned
    // pointer is a borrowed observer and must never be deleted.
    //
    // A caller that wants a different geometry sets it on the returned handle;
    // neither the blur nor the offset is theme-derived, so nothing here will
    // stomp them.
    //
    // Two overloads because a widget and a scene item are different things at
    // this seam and each resolves through its own handle. They are NOT
    // R4-ambiguous: no wrapper in the tree implements both interfaces.
    static ICoreDropShadow* installOn(ICoreNativeWidget* target);
    static ICoreDropShadow* installOn(ICoreNativeItem* target);

    // The same, but only if the user's rendering preferences allow floating
    // panel shadows; returns nullptr when they do not. Three popup surfaces
    // asked that question by hand around an identical block.
    //
    // The preference is read ONCE, here, which is what the call sites did and
    // is deliberately kept: these surfaces are built per popup. It is NOT the
    // canvas contract -- ICoreThemeBinding::followCanvasShadowPreference keeps
    // following, because a scene item outlives the preference dialog.
    //
    // ⚠ No scene-item overload, deliberately: it had zero call sites and was
    // deleted with the conversion (§9). Every floating panel is a widget.
    static ICoreDropShadow* installOnFloatingPanel(ICoreNativeWidget* target);

    // A caller's colour is sticky: the theme hook stops asserting the token
    // from then on, so a call site with its own tone rule (the Copilot chip
    // weights the dark token heavier) keeps it across a switch.
    //
    // Before the conversion this had to be a non-virtual hide of
    // QGraphicsDropShadowEffect::setColor, which only intercepted calls made
    // through an ICoreDropShadow* -- a caller holding the effect as its Qt base
    // could set a colour the hook would then overwrite on the next switch.
    // There is no longer any other route to the toolkit setter, so the
    // "the theme coloured me" / "a caller coloured me" split is now airtight
    // rather than merely conventional (README S4).
    void setColor(const ICoreColor& color);

    void setBlurRadius(double radius);
    void setOffset(double dx, double dy);

    // The animation/subscription seam. The wrapper is not a QObject, so a call
    // site that needs to scope something to this effect's lifetime -- the
    // Copilot chip's per-theme tone rule is the only one -- resolves the
    // toolkit object through this handle.
    ICoreNativeHandle nativeObjectHandle() const override;

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

ICoreOpacityEffect.h#

src/ICoreEssentials/UI/Effects/ICoreOpacityEffect.h

ICoreOpacityEffect -- the fade handle every animated surface in the editor installs on itself.

Converted to the SDK shape, and like ICoreSvg it carries NO applyTheme() on purpose. Opacity is not a colour: there is no token that could describe it, and the two themes fade at the same rate. A theme hook here would be a hook with nothing to read, which README S9 says to state rather than leave the reader guessing at.

⚠ OWNERSHIP IS INVERTED HERE, AND IT IS NOT THE R3 SHAPE THE OTHER CLASSES USE. setGraphicsEffect() TAKES OWNERSHIP of the toolkit effect, so the target owns the Impl and nothing anywhere owns the wrapper. ~Impl therefore does two things instead of one: it empties the wrapper's unique_ptr AND deletes the wrapper, because otherwise every installed effect leaks its outer object with

Declares no class of its own — see the file.