UI.9: share docking transactions and preserve viewer lifecycle
Preserve legacy selection repair, modifier routing, viewer lifecycle and workspace persistence through the shared docking integration. Qualify the complete workspace gate by refreshing the 18 stale Audio Spectrum hashes for the existing linear renderer, with an independent synthetic-tone regression.
This commit is contained in:
@@ -10,6 +10,8 @@ pub struct Element {
|
||||
pub id: String,
|
||||
pub label: String,
|
||||
pub rect: [f32; 4],
|
||||
#[serde(skip)]
|
||||
pub(crate) response_id: Option<egui::Id>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -21,7 +23,19 @@ pub struct Registry {
|
||||
|
||||
impl Registry {
|
||||
pub fn add(&mut self, id: &str, rect: Rect, label: &str) {
|
||||
self.elements.push(Element { id: id.to_string(), label: label.to_string(), rect: [rect.min.x, rect.min.y, rect.width(), rect.height()] });
|
||||
self.elements.push(Element {
|
||||
id: id.to_string(),
|
||||
label: label.to_string(),
|
||||
rect: [rect.min.x, rect.min.y, rect.width(), rect.height()],
|
||||
response_id: None,
|
||||
});
|
||||
}
|
||||
/// Bind an automation name to the widget that actually receives keyboard input.
|
||||
pub fn add_response(&mut self, id: &str, response: &egui::Response, label: &str) {
|
||||
self.add(id, response.rect, label);
|
||||
if let Some(element) = self.elements.last_mut() {
|
||||
element.response_id = Some(response.id);
|
||||
}
|
||||
}
|
||||
pub fn begin_frame(&mut self) {
|
||||
self.previous = std::mem::take(&mut self.elements);
|
||||
|
||||
Reference in New Issue
Block a user