|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Portal::Forma::Context::on_resize | ( | uint32_t | id, |
| ResizeFn | fn | ||
| ) |
Called on every window resize.
Per-element like the other callbacks, so more than one bound id (e.g. several pixel-anchored TextFields on the same Context) can each react independently. Cleared by unbind(id) same as every other callback.
Hit-test-driven placement (to_ndc() at event time) already tracks resize for free; this is for callers anchored by a fixed pixel rect via to_ndc_rect(), which must be recomputed explicitly when the window's dimensions change.
| id | Element id to bind to. |
| fn | Callback receiving the new (width, height). |
Definition at line 136 of file Context.cpp.
References m_callbacks.
Referenced by MayaFlux::Portal::Forma::make_entry(), and MayaFlux::Portal::Forma::Plot::place_label().
Here is the caller graph for this function: