API — ICoreEssentials/UI/Geometry
The public contract of 5 header(s) under ICoreEssentials/UI/Geometry — 4 class/struct definition(s), 46 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
| Header | Defines | Declarations | Bases |
|---|---|---|---|
ICoreGeometryOps.h | — | 0 | — |
ICoreLine.h | ICoreLine | 15 | — |
ICoreMargins.h | ICoreMargins | 7 | — |
ICoreSizeF.h | ICoreSizeF | 11 | — |
ICoreVector2.h | ICoreVector2 | 13 | — |
ICoreGeometryOps.h#
ICoreEssentials/UI/Geometry/ICoreGeometryOps.h
Rectangle operations ICoreRect does not carry.
Free functions rather than methods because ICoreEssentials is frozen: its geometry types are the non-UI wrapper axis and are not ours to extend. The arithmetic below is written against the same edge convention ICoreRect documents (right == x + width, no -1 anywhere), so these compose with it exactly as members would.
File-scope declarations#
// How two segments meet. Bounded means they cross WITHIN both segments;
// Unbounded means their infinite extensions cross but the segments do not.
enum class ICoreLineIntersection {
None,
Unbounded,
Bounded,
};
ICoreLine.h#
ICoreEssentials/UI/Geometry/ICoreLine.h
⚠ THE QT CONVERSIONS ARE NOT MEMBERS ANY MORE (A9.23, 2026-08-24). They are
icoreToQt()/icoreFromQt()free functions in UI/Backends/Qt/Geometry/ICoreGeometryQt.h, a directory an appkit build does not compile -- so this header, which 12 files reach, now names no Qt type at all. A member was the one shape of conversion that could not leave the header, which is why the declaration outlived A1.8's split of the bodies.
ICoreLine#
ICoreLine.h:29 · class · 15 declaration(s)
A segment between two model points.
class ICoreLine {
public:
ICoreLine();
ICoreLine(const ICorePoint& p1, const ICorePoint& p2);
ICoreLine(double x1, double y1, double x2, double y2);
[[nodiscard]] ICorePoint p1() const;
[[nodiscard]] ICorePoint p2() const;
[[nodiscard]] double x1() const;
[[nodiscard]] double y1() const;
[[nodiscard]] double x2() const;
[[nodiscard]] double y2() const;
[[nodiscard]] double dx() const;
[[nodiscard]] double dy() const;
[[nodiscard]] double length() const;
// The point `t` of the way from p1 to p2 (t in [0,1] stays on the segment,
// outside it extrapolates), matching QLineF::pointAt.
[[nodiscard]] ICorePoint pointAt(double t) const;
[[nodiscard]] ICorePoint center() const;
// Four doubles. Public so the .cpp's static_asserts can reach them -- see
// ICoreSizeF.h.
static constexpr std::size_t kStateSize = 4 * sizeof(double);
static constexpr std::size_t kStateAlign = alignof(double);
};
ICoreMargins.h#
ICoreEssentials/UI/Geometry/ICoreMargins.h
⚠ THE QT CONVERSIONS ARE NOT MEMBERS ANY MORE (A9.23, 2026-08-24). They are
icoreToQt()/icoreFromQt()free functions in UI/Backends/Qt/Geometry/ICoreGeometryQt.h, a directory an appkit build does not compile -- so this header, which 25 files reach, now names no Qt type at all. A member was the one shape of conversion that could not leave the header, which is why the declaration outlived A1.8's split of the bodies.
ICoreMargins#
ICoreMargins.h:19 · class · 7 declaration(s)
Content insets (left/top/right/bottom).
class ICoreMargins {
public:
ICoreMargins();
ICoreMargins(int left, int top, int right, int bottom);
[[nodiscard]] int left() const;
[[nodiscard]] int top() const;
[[nodiscard]] int right() const;
[[nodiscard]] int bottom() const;
// Four ints. Public so the .cpp's static_asserts can reach them -- see
// ICoreSizeF.h.
static constexpr std::size_t kStateSize = 4 * sizeof(int);
static constexpr std::size_t kStateAlign = alignof(int);
};
ICoreSizeF.h#
ICoreEssentials/UI/Geometry/ICoreSizeF.h
⚠ GUARDED
#include <QSize>/<QSizeF>STOOD HERE (2026-09-10 main merge) ANDLQ.14DELETED THEM ON 2026-09-17, with the three members below.
ICoreSizeF#
ICoreSizeF.h:42 · class · 11 declaration(s)
A width/height pair crossing the wrapper boundary.
class ICoreSizeF {
public:
ICoreSizeF();
ICoreSizeF(double width, double height);
// ⚠ THE SEAM'S THREE MEMBERS STOOD HERE -- `ICoreSizeF(const QSizeF&)`,
// `operator QSizeF()` and `toQSize()`, marked TEMPORARY when the 2026-09-10
// main merge added them and deleted by `LQ.14` on 2026-09-17, as their own
// comment said they would be. ⚠ THIS HEADER WAS NOT ONE OF THE THREE
// `LQ.14`'S ROW TEXT NAMED; there were five (§L158.2).
[[nodiscard]] double width() const;
[[nodiscard]] double height() const;
void setWidth(double width);
void setHeight(double height);
[[nodiscard]] bool isEmpty() const;
// "Nobody assigned this size", as distinct from isEmpty()'s "this size
// covers no pixels". The default constructor leaves QSizeF's own -1/-1
// invalid marker, so a default-constructed ICoreSizeF answers false here
// and a deliberate 0x0 answers TRUE -- which is the whole point of having
// both tests. ICoreWidget::preferredSize() is the first caller: it uses an
// invalid return as "I have no opinion, ask the toolkit", and a widget that
// genuinely wants to collapse to nothing has to be able to say 0x0 without
// that being read as silence. Same predicate as QSizeF::isValid().
[[nodiscard]] bool isValid() const;
// Both axes scaled by `factor` -- the toolkit's QSizeF * qreal, as a
// member since the one spelling call sites use is `size * 0.5`.
[[nodiscard]] ICoreSizeF operator*(double factor) const;
// The largest size with THIS aspect ratio that fits inside `box` --
// QSizeF::scaled(box, Qt::KeepAspectRatio), delegated rather than
// reimplemented so the edge cases (zero extents return `box`) stay
// pinned to the toolkit's. No mode parameter: this is the one shape a
// call site asks for (§9's rule against speculative modes).
[[nodiscard]] ICoreSizeF scaledToFit(const ICoreSizeF& box) const;
// Two doubles. Public so the .cpp's static_asserts can reach them, exactly
// as ICoreColor does -- a namespace-scope static_assert is not a member and
// cannot see a private constant.
static constexpr std::size_t kStateSize = 2 * sizeof(double);
static constexpr std::size_t kStateAlign = alignof(double);
};
ICoreVector2.h#
ICoreEssentials/UI/Geometry/ICoreVector2.h
ICoreVector2#
ICoreVector2.h:17 · class · 13 declaration(s)
A 2-D direction/displacement, distinct from ICorePoint the way QVector2D is distinct from QPointF: vectors are added, scaled and normalized; points are positions.
class ICoreVector2 {
public:
ICoreVector2();
ICoreVector2(double x, double y);
explicit ICoreVector2(const ICorePoint& point);
[[nodiscard]] double x() const;
[[nodiscard]] double y() const;
[[nodiscard]] double length() const;
[[nodiscard]] ICoreVector2 normalized() const;
[[nodiscard]] static double dotProduct(const ICoreVector2& a, const ICoreVector2& b);
[[nodiscard]] ICorePoint toPoint() const;
[[nodiscard]] ICoreVector2 operator+(const ICoreVector2& o) const;
[[nodiscard]] ICoreVector2 operator-(const ICoreVector2& o) const;
[[nodiscard]] ICoreVector2 operator*(double s) const;
// Two doubles. Public so the .cpp's static_asserts can reach them -- see
// ICoreSizeF.h.
static constexpr std::size_t kStateSize = 2 * sizeof(double);
static constexpr std::size_t kStateAlign = alignof(double);
};