(&self, target: &dyn Element, x: f32, y: f32)
| 151 | } |
| 152 | |
| 153 | fn get_markable(&self, target: &dyn Element, x: f32, y: f32) -> Option<&dyn Element> { |
| 154 | let highest = target.topmost_child_at_point(x, y); |
| 155 | if let Some(current) = highest { |
| 156 | if current.id() == target.id() { |
| 157 | return None; |
| 158 | } else { |
| 159 | // let canvas = target.canvas.as_ref(); |
| 160 | // // now if we have the highest possible control, |
| 161 | // // we have to walk backward up the tree, |
| 162 | // // looking for the highest one with mouse input |
| 163 | |
| 164 | // let canvas = target.canvas.as_ref(); |
| 165 | |
| 166 | // loop { |
| 167 | // if highest.is_none() || highest == canvas { |
| 168 | // return highest; |
| 169 | // } |
| 170 | |
| 171 | // if current.mouse_input { |
| 172 | // return current; |
| 173 | // } |
| 174 | |
| 175 | // if current.parent().is_none() { |
| 176 | // return highest; |
| 177 | // } |
| 178 | |
| 179 | // highest = current.parent(); |
| 180 | // } |
| 181 | todo!() |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | None |
| 186 | } |
| 187 | |
| 188 | fn mousemove(&self, e: &mut MouseEvent) { |
| 189 | let handled = match self.canvas.captured() { |
no test coverage detected