(&self, w: f32, h: f32)
| 1169 | } |
| 1170 | |
| 1171 | fn set_size(&self, w: f32, h: f32) { |
| 1172 | log::info!("Set Size Default Impl {}x{}", w, h); |
| 1173 | |
| 1174 | let (dw, dh) = { |
| 1175 | let mut comp = self.as_ref().borrow_mut(); |
| 1176 | |
| 1177 | assert!( |
| 1178 | !comp.destroyed, |
| 1179 | "Widget was already destroyed but is being interacted with" |
| 1180 | ); |
| 1181 | |
| 1182 | comp.updating = true; |
| 1183 | |
| 1184 | let dw = w - comp.w; |
| 1185 | let dh = h - comp.h; |
| 1186 | |
| 1187 | comp.w = w; |
| 1188 | comp.h = h; |
| 1189 | |
| 1190 | comp.updating = false; |
| 1191 | |
| 1192 | (dw, dh) |
| 1193 | }; |
| 1194 | |
| 1195 | self.bounds_changed(0.0, 0.0, dw, dh); |
| 1196 | } |
| 1197 | |
| 1198 | #[inline] |
| 1199 | fn destroyed(&self) -> bool { |
nothing calls this directly
no test coverage detected