API — ICoreEssentials/UI/Backends/Native
The public contract of 3 header(s) under ICoreEssentials/UI/Backends/Native — 4 class/struct definition(s), 36 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 |
|---|---|---|---|
ICoreRichTextEditServices.h | ICoreRichTextEditServices | 8 | — |
ICoreTableFamilyAccess.h | ICoreTableEntryRow, ICoreTableTitlesRow | 20 | :Impl; :Impl |
ICoreTextToolTip.h | ICoreTextToolTip | 8 | — |
ICoreRichTextEditServices.h#
ICoreEssentials/UI/Backends/Native/Widgets/ICoreRichTextEditServices.h
ICoreRichTextEditServices#
ICoreRichTextEditServices.h:22 · class · pImpl · 8 declaration(s)
The half of ICoreRichTextEdit that is the same on every native backend (decorations and the tooltip): the decoration layers and the card.
class ICoreRichTextEditServices {
public:
// `owner` is the pane; `repaint` repaints its viewport after a change.
ICoreRichTextEditServices(ICoreRichTextEdit& owner, std::function<void()> repaint);
~ICoreRichTextEditServices();
ICoreRichTextEditServices(const ICoreRichTextEditServices&) = delete;
ICoreRichTextEditServices& operator=(const ICoreRichTextEditServices&) = delete;
[[nodiscard]] ICoreTextDecorationSet& decorations();
[[nodiscard]] ICoreTextToolTip& toolTip();
void repaint();
// One pass of the marks, in the pane's viewport coordinates.
void paintDecorations(ICorePainter& painter, const ICoreRect& bounds,
ICoreTextDecorationSet::Pass pass);
// A key, a scroll or the pointer leaving: the card is stale.
void dismissToolTip();
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};
ICoreTableFamilyAccess.h#
ICoreEssentials/UI/Backends/Native/Widgets/ICoreTableFamilyAccess.h
The two ROW halves of the table family, as an IMPL-SIDE header.
⚠ This is not part of the public surface and must not be included from one. It exists because TWO files need each row's Impl complete: the row's own .cpp, which defines its behaviour, and ICoreTable.cpp, which has to DRIVE it -- mark a row selected, hand it the column edges, re-pad its cells. Same precedent as ICoreWinUITreeModelAccess.h in the WinUI zone.
⚠⚠ WHY THE DRIVING METHODS LIVE ON
ImplAND NOT ON THE WIDGET. They used to be private member functions of ICoreTableEntryRow / ICoreTableTitlesRow with afriend class ICoreTableabove them. That is a header-surface violation: a header declares the public contract and nothing else, and a private helper is not part of it (DEVELOPER_GUIDELINES.md, "The header surface rule", measured by the header-surface check). Moving them here keeps the seam EXACTLY as
ICoreTableEntryRow#
ICoreTableFamilyAccess.h:76 · class · bases :Impl · nested Cell · 10 declaration(s)
One body row.
class ICoreTableEntryRow : :Impl {
public:
struct Cell {
// The widget the ROW places. Always an ICoreWidget, so it always has
// setGeometry(); it is the only thing here that does.
ICoreWidget* holder = nullptr;
ICoreVBoxLayout* layout = nullptr;
// What the caller handed to addRow().
ICoreNativeWidget* content = nullptr;
// ⚠⚠ ANSWERED AT CONSTRUCTION, NOT AT DESTRUCTION, AND THAT IS THE
// WHOLE OWNERSHIP RULE. `false` means the holder's own child list will
// reap this content (an ICoreWidget adopted by the cell's layout);
// `true` means nothing anywhere will, and the row must. Deciding it
// here means the destructor never dynamic_casts a pointer the holders
// above it may already have freed -- which is undefined, and is how
// this family previously produced a read of 0xdddd... on a row's own
// toggle.
bool ownsContent = false;
};
// The widget this Impl belongs to. The driving methods below ask it for a
// repaint and for its height, which is the only reason it is here.
ICoreTableEntryRow* owner = nullptr;
ICoreTable* table = nullptr;
std::vector<Cell> cells;
// The table's column boundaries, verbatim. Size N + 1 when set.
std::vector<int> edges;
ICoreString filterText;
bool selected = false;
bool hovered = false;
bool alternate = false;
bool gridVisible = true;
int cellPadding = kDefaultCellPadding;
// The table's half of a press. Installed by ICoreTable when it adopts the
// row and cleared by attachToTable(nullptr) -- see the banner.
std::function<void(ICoreTableEntryRow*)> onRowPressed;
std::function<void(ICoreTableEntryRow*)> onRowDoubleClicked;
// Every cell against the current edges. A cell with no column -- more cells
// than the table has columns, which is legal mid-reconfiguration -- is
// hidden rather than stacked at x = 0.
void placeCells(int rowHeight);
// -- everything below is the table talking to its own row ----------------
// Adopt or release. Passing nullptr also drops the two hooks above.
void attachToTable(ICoreTable* table);
void applyColumnEdges(const std::vector<int>& edges);
void setSelected(bool selected);
void setAlternate(bool alternate);
void setGridVisible(bool visible);
void setCellPadding(int padding);
// Every cell's readable text plus getFilterText(), lowered, for the filter.
[[nodiscard]] ICoreString collectSearchText() const;
};
};
ICoreTableTitlesRow#
ICoreTableFamilyAccess.h:145 · class · bases :Impl · 10 declaration(s)
The header row.
class ICoreTableTitlesRow : :Impl {
public:
// As above: the driving methods repaint through it.
ICoreTableTitlesRow* owner = nullptr;
ICoreTable* table = nullptr;
std::vector<std::string> titles;
std::vector<ICoreAlignment> alignments;
// The table's boundaries, verbatim. Size N + 1 when set.
std::vector<int> edges;
bool resizable = true;
bool gridVisible = true;
int minimumColumnWidth = kDefaultMinimumColumnWidth;
int cellPadding = kDefaultCellPadding;
// The boundary the pointer is on, or is dragging. -1 for neither.
std::ptrdiff_t hotSplitter = -1;
std::ptrdiff_t dragHandle = -1;
// The table's half of a splitter drag: the new widths, and whether the
// pointer has been released. Installed and cleared like the row's pair.
std::function<void(const std::vector<double>&, bool)> onColumnsDragged;
[[nodiscard]] std::size_t columnCount() const;
// The current widths, which is the form a drag and onColumnsResized both
// want. Derived from the edges rather than stored, so there is nothing that
// can go stale.
[[nodiscard]] std::vector<double> widths() const;
// -- everything below is the table talking to its own header row ---------
void setColumns(const std::vector<std::string>& titles);
void setColumnAlignment(std::size_t column, ICoreAlignment alignment);
void applyColumnEdges(const std::vector<int>& edges);
void setResizable(bool resizable);
void setMinimumColumnWidth(int width);
void setCellPadding(int padding);
void setGridVisible(bool visible);
};
};
ICoreTextToolTip.h#
ICoreEssentials/UI/Backends/Native/Widgets/ICoreTextToolTip.h
ICoreTextToolTip#
ICoreTextToolTip.h:22 · class · pImpl · 8 declaration(s)
ICoreTextToolTip -- the card behind ICoreRichTextEdit::showToolTip.
class ICoreTextToolTip {
public:
// `host` is the pane the anchor is measured in. Not owned.
explicit ICoreTextToolTip(ICoreNativeWidget* host);
~ICoreTextToolTip();
ICoreTextToolTip(const ICoreTextToolTip&) = delete;
ICoreTextToolTip& operator=(const ICoreTextToolTip&) = delete;
// Show `text` under `anchor` (host coordinates). Showing again moves and
// refills the same card. Empty text hides it.
void show(const ICoreRect& anchor, const ICoreString& text);
void hide();
[[nodiscard]] bool isVisible() const;
[[nodiscard]] ICoreString text() const;
// Lines longer than this are wrapped at a space, in pixels.
static constexpr int kMaxTextWidth = 460;
private:
class Impl; // the two-line residue; state lives here
std::unique_ptr<Impl> impl;
};