133 uint32_t
height)
override;
139 enum class HostKind { none, plugin, window };
144 void compute_geometry(
Rect& frame,
Rect&
visible,
bool& clipped)
const;
149 bool active_viewport_transform(
float& sx,
float& sy,
float& tx,
154 static void apply_viewport(
Rect&
r,
float sx,
float sy,
float tx,
float ty) {
155 r = {
r.x * sx + tx,
r.y * sy + ty,
r.width * sx,
r.height * sy};
162 void detach_from_host();
168 void on_host_destroyed();
170 void reconcile_host();
172 void push_geometry(
const Rect& frame,
const Rect&
visible,
bool clipped);
177 bool attached_ =
false;
178 HostKind attached_kind_ = HostKind::none;
185 Rect last_visible_{};
186 bool last_clipped_ =
false;
189 Rect last_frame_host_{};
193 Rect pushed_frame_{};
194 Rect pushed_visible_{};
195 bool pushed_clipped_ =
false;
196 bool have_pushed_ =
false;
Definition canvas.hpp:240
Rect computed_visible_rect() const
The last visible sub-rectangle in root/host coordinates after intersecting with clipping ancestors.
Definition native_view_host.hpp:122
bool is_clipped() const
True when the native child is trimmed by a clipping ancestor (the visible rect is a strict subset of ...
Definition native_view_host.hpp:125
void clear_native_child()
Detach and forget the native child (does not destroy the underlying OS view — ownership stays with th...
void update_native_layout()
Recompute geometry and push it to the host now (also attaches lazily when a host + handle are present...
~NativeViewHost() override
friend class PluginViewHost
Definition native_view_host.hpp:73
void set_window_host(WindowHost *host) override
Back-reference to the WindowHost that owns this view tree.
NativeViewHandle native_child() const
The currently-set native handle (null if none).
Definition native_view_host.hpp:99
std::vector< uint8_t > capture_native_overlay_png(uint32_t width, uint32_t height) override
When this view owns a native overlay (a WebView pane), it overrides this to return an in-process PNG ...
Rect computed_child_frame_host() const
The native child's absolute frame in HOST (window) coordinates — the design-space frame after the act...
Definition native_view_host.hpp:118
void set_plugin_view_host(PluginViewHost *host) override
Back-reference to the PluginViewHost that owns this editor tree.
Rect computed_child_frame() const
The native child's absolute frame in ROOT (design-space) coordinates as last computed from Yoga layou...
Definition native_view_host.hpp:111
void paint_all(canvas::Canvas &canvas) override
friend class WindowHost
Definition native_view_host.hpp:74
bool is_native_attached() const
True while the native child is embedded in a host.
Definition native_view_host.hpp:104
std::function< std::vector< uint8_t >(uint32_t width, uint32_t height)> SnapshotFn
Returns a PNG-encoded snapshot of the native child at the requested pixel size, or empty bytes when u...
Definition native_view_host.hpp:80
void set_native_child(NativeViewHandle handle, SnapshotFn snapshot={})
Supply the native child view to embed.
Definition plugin_view_host.hpp:64
bool visible() const
Definition view.hpp:333
Definition window_host.hpp:113
Definition affine_transform.hpp:24
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ r
Definition input_events.hpp:41
@ height
Definition css_animation.hpp:128
@ width
Definition css_animation.hpp:127
void * NativeViewHandle
Definition native_view_host.hpp:19
Axis-aligned rectangle in continuous (float) coordinates.
Definition geometry.hpp:52