API — ICoreEssentials/UI/Backends/Gtk4/Layouts
The public contract of 2 header(s) under ICoreEssentials/UI/Backends/Gtk4/Layouts — 1 class/struct definition(s), 0 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 |
|---|---|---|---|
ICoreGtk4LayoutAccess.h | — | 0 | — |
ICoreGtk4LayoutFields.h | ICoreGtk4WidgetNumbers | 0 | — |
ICoreGtk4LayoutAccess.h#
ICoreEssentials/UI/Backends/Gtk4/Layouts/ICoreGtk4LayoutAccess.h
This backend's answer to the thirteen questions the layout tier asks the toolkit. (It read "the eleven questions" until W10.71 added the height-for-width pair -- and the count is read off ICoreLayoutNativeAccess, never off this line.)
⚠ THERE IS ONE OF THESE FOR THE WHOLE BACKEND, and it is deliberate. The access holds no per-layout state -- every one of its members is a question about a widget it was handed -- so a second instance would be a second copy of nothing. The six wrappers therefore all construct their core against the same reference.
The decisions are one layer down in ICoreLayoutSeatCore, which names no toolkit and is where a reader should be looking for WHY a layout does something, and one layer sideways in ICoreGtk4LayoutFields, which is the one
Declares no class of its own — see the file.
ICoreGtk4LayoutFields.h#
ICoreEssentials/UI/Backends/Gtk4/Layouts/ICoreGtk4LayoutFields.h
The one part of this backend's layout access that DECIDES something: how a child's several ways of stating a size become the one record the layout tier reads.
⚠⚠ IT NAMES NO TOOLKIT TYPE AND TAKES PLAIN NUMBERS, WHICH IS THE ENTIRE REASON IT IS A SEPARATE FILE. The rest of the access is forwarding -- setFrame, setVisible, adopt -- and forwarding is proved by compiling. This is not: it reads eight numbers off a child and three of them mean something different from what they look like. A rule that can be got wrong needs a test, and a test needs something that runs with no display, no GTK and no window.
Its peer on this backend is
Events/ICoreGtk4EventMap, split at the same seam and for the same reason: decisions here, toolkit names next door.
ICoreGtk4WidgetNumbers#
ICoreGtk4LayoutFields.h:39 · struct · 0 declaration(s)
Everything the access can read off a child, in the units it reads them in.
struct ICoreGtk4WidgetNumbers {
public:
// ⚠ FALSE MEANS "NO ICoreWidget UNDER THIS HANDLE", NOT "NO OPINION". A
// layout is handed ICoreNativeWidget*, and on this backend that can be a
// widget the toolkit owns outright -- a GtkText from L2.3, a
// GtkScrolledWindow from L2.5, anything a later row seats without an
// ICoreWidget in front of it. Such a child has no hints and no stored
// limits, and the six wrapper numbers below are all zero for it; what it
// has instead is GTK's own measurement, which is the pair at the bottom.
bool hasWrapper = true;
// ICoreWidget::sizeHint() -- preferredSize() where the widget has an
// opinion, and nativeSizeHint() where it does not.
double hintWidth = 0.0;
double hintHeight = 0.0;
// ICoreWidget::nativeSizeHint() -- the seat's measured natural size, and
// therefore the value sizeHint() falls back to.
double nativeWidth = 0.0;
double nativeHeight = 0.0;
// ICoreWidget::minimumSizeHint() -- minimumPreferredSize() where the widget
// overrides it, and the seat's measured minimum where it does not.
double minimumHintWidth = 0.0;
double minimumHintHeight = 0.0;
// What ICoreGtk4Widget::setSizeLimits stored, read back off the GtkWidget.
// ⚠ A MAXIMUM OF 0 IS UNBOUNDED, in these and in what comes back.
int limitMinimumWidth = 0;
int limitMinimumHeight = 0;
int limitMaximumWidth = 0;
int limitMaximumHeight = 0;
// The stretch ICoreWidget::setSizeBehavior pushed down to the seat.
int limitHorizontalStretch = 0;
int limitVerticalStretch = 0;
// gtk_widget_measure(), read for a child with no wrapper. Ignored when
// hasWrapper is true, because a wrapper's own hints are the better answer
// and the seat's measure is what they already fall back to.
int measuredMinimumWidth = 0;
int measuredMinimumHeight = 0;
int measuredNaturalWidth = 0;
int measuredNaturalHeight = 0;
};
};