edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits
| 1 | //! What a pointer is doing: the drags, the ghosts, the trims and the key repeat. |
| 2 | |
| 3 | use crate::*; |
| 4 | use TrimWalls; |
| 5 | |
| 6 | /// A library row being dragged: the file and which of its audio streams that |
| 7 | /// row is, which is the whole of what a row names. Where it lands does not |
| 8 | /// change what is inserted. |
| 9 | pub PathBuf, pub usize); |
| 10 | |
| 11 | /// A clip already on the timeline being dragged: the lane it is on and its index |
| 12 | /// there, which is how every other edit names a clip. Unlike an [`AssetDrag`] |
| 13 | /// nothing is inserted -- the same clip changes lane and keeps the frames it |
| 14 | /// plays -- but where along the bed it is let go is exactly where it lands, less |
| 15 | /// the offset the hand grabbed it at ([`Player::grab`]). |
| 16 | |
| 17 | pub |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | /// A *palette* subtitle row being dragged onto a subtitle lane: which track of |
| 30 | /// [`PlaybackSession::subtitles`] it is, which is the whole of what a row names. |
| 31 | /// The window it lands with is the track's own, from its first microsecond to |
| 32 | /// its last cue -- a placement is trimmed after it is placed, like every clip |
| 33 | /// here. |
| 34 | pub usize); |
| 35 | |
| 36 | /// A subtitle already placed on a lane being dragged: [`ClipDrag`]'s twin, and |
| 37 | /// carrying the placement itself for that struct's reason -- an edit made during |
| 38 | /// the gesture moves the indices gpui froze into the payload, so the drop finds |
| 39 | /// its placement by value ([`Player::dragged_sub`]) rather than by an index that |
| 40 | /// may since have become another caption's. |
| 41 | |
| 42 | pub |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | /// A track *header* being dragged: which track the hand took hold of, to be |
| 49 | /// let go over the header of the one whose place it is to take |
| 50 | /// ([`Player::reorder_lane`]). The lane alone -- a track carries its own clips |
| 51 | /// wherever it goes, so unlike a [`ClipDrag`] there is nothing else to name. |
| 52 | |
| 53 | pub Lane); |
| 54 | |
| 55 | /// Where a header drag in flight would leave the track in the hand: the lane |
| 56 | /// whose slot it is about to take, and whether the line is drawn at that lane's |
| 57 | /// top edge (it is coming up from below) or its bottom one. The drop indicator |
| 58 | /// every editor draws between two tracks, and the header answer to the ghost a |
| 59 | /// clip drag lays on a lane ([`Ghost`]) -- stale between gestures, which costs |
| 60 | /// nothing because it is drawn only while one is live. |
| 61 | |
| 62 | pub |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | /// Where the drag in flight would leave what it is carrying: the lane the |
| 68 | /// pointer is over, the snapped head the release will commit ([`landing`]), and |
| 69 | /// how long the thing is. Drawn on that lane as a translucent box the size of |
| 70 | /// the take, so a landing is *seen* before the release rather than discovered |
| 71 | /// after it -- the line ([`Player::snap_cue`]) marks the frame, this shows the |
| 72 | /// body. `refused` is a drop the lane cannot take -- a picture over an audio |
| 73 | /// track, a sound over a video one -- tinted rather than silent, because the |
| 74 | /// refusal is coming at the release either way ([`lane_refuses`], |
| 75 | /// [`Project::move_clip`]). |
| 76 | |
| 77 | pub |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | /// A clip edge being dragged: which end of which clip, and the timeline frame |
| 91 | /// the pointer has pulled it to. The box on screen is drawn from `to` while this |
| 92 | /// is set and the engine hears about it once, at the release |
| 93 | /// ([`Player::commit_trim`]) -- one edit, one undo step for the whole gesture, |
| 94 | /// exactly as an equalizer drag works. |
| 95 | |
| 96 | pub |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | /// A box select in flight: pressed on empty bed at `from`, pulled to `to` |
| 115 | /// (window coordinates). Under [`MARQUEE_SLOP`] it is still a click. |
| 116 | |
| 117 | pub |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | /// How far the pointer must travel before a press on empty bed becomes a box. |
| 123 | pub const MARQUEE_SLOP: f32 = 4.; |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | /// Which of the three pro trims a gesture or key makes (roll, slip, slide). |
| 144 | |
| 145 | pub |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | /// A shift-drag in flight on a clip edge (roll) or body (slip, slide). Like |
| 155 | /// [`Trim`] it is tracked on the root and the engine hears about it once, at |
| 156 | /// the release -- one edit, one undo step. |
| 157 | |
| 158 | pub |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | /// How long a trim edge's handle flashes warn when the pointer runs past a |
| 172 | /// media wall (the source has no more frames that way). |
| 173 | pub const TRIM_FLASH: Duration = from_millis; |
| 174 | |
| 175 | /// The media-wall stop an edge is pinned against, live: the edge is kept at a |
| 176 | /// bound while it is pulled through it, and the warn flash is for that stop |
| 177 | /// alone. `since` is when it began, `wall` the frame it is pinned to, so a |
| 178 | /// pointer that stays past the same wall is one stop, not a flash per sample. |
| 179 | |
| 180 | pub |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | /// The media wall a trim stopped against, if the pointer wanted past it: `at` |
| 196 | /// is where the pointer asked the edge to be, `to` where the engine let it |
| 197 | /// stand, `walls` the room the edge has. `None` when nothing was refused, or |
| 198 | /// when the bound that held is a neighbour or the timeline's own start, which |
| 199 | /// carry no flash -- only the source's end does. |
| 200 | pub |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | /// The handle width [`trims`] is built on: a box below three of these has no |
| 211 | /// trim zones at all. The zones themselves are [`TRIM_REACH`] either side of |
| 212 | /// each edge, which is wider than this strip, so this is the floor, not the |
| 213 | /// hit size. |
| 214 | pub const EDGE_W: f32 = 6.; |
| 215 | |
| 216 | /// How far a trim's hit zone reaches on *each* side of a clip edge: 24 px |
| 217 | /// centred on the edge, so the hand finds it by aim alone (WCAG 2.5.8, |
| 218 | /// [`HIT_MIN`]). The visible handle of a selected clip is [`TRIM_HANDLE`] |
| 219 | /// wide; the rest of the zone is a target, not a drawing. |
| 220 | pub const TRIM_REACH: f32 = HIT_MIN / 2.; |
| 221 | |
| 222 | /// The drawn trim handle a selected clip shows inside each edge. |
| 223 | |
| 224 | pub const TRIM_HANDLE: f32 = 12.; |
| 225 | |
| 226 | /// How far one edge's trim zone reaches, as `(inside, outside)` px from the |
| 227 | /// edge. `room` is the gap to the neighbour on that side (`f32::INFINITY` |
| 228 | /// where there is none): the outside reach stops at the middle of that gap, so |
| 229 | /// where two clips meet the clip under the pointer wins its own half of the |
| 230 | /// join. |
| 231 | /// |
| 232 | /// The inside reach shrinks on a clip under 48 px to a quarter of its width, |
| 233 | /// which keeps the middle half of it a move target -- the middle third is |
| 234 | /// what the rule guarantees, and a quarter leaves it room to breathe. |
| 235 | pub |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | /// A fade handle's own hit zone, at each *top* corner of an audio clip's box -- |
| 243 | /// never the trim strip's height, which is [`EDGE_W`] wide down the whole box |
| 244 | /// ([`trims`]) and would swallow a fade press if the two overlapped. Sitting |
| 245 | /// just inside the trim strip rather than on top of it, so one gesture is |
| 246 | /// still exactly one thing: the outer [`EDGE_W`] column lengthens or shortens |
| 247 | /// the clip, this small square at its top corner shapes the fade instead. |
| 248 | pub const FADE_HANDLE_W: f32 = 10.; |
| 249 | /// Only the label row's own height tall -- a fade handle reaching down into |
| 250 | /// the waveform would sit on top of the body drag and the waveform's own |
| 251 | /// tooltip both. |
| 252 | pub const FADE_HANDLE_H: f32 = 10.; |
| 253 | |
| 254 | /// A fade handle being dragged: which clip, which end (`is_in` for the head's |
| 255 | /// ramp-up, the tail's ramp-down otherwise), and the gesture's own state -- |
| 256 | /// `press_x` to measure the pixel delta from, `start` the fade length the |
| 257 | /// press found, `to` what the drag is showing right now, `cap` the clip's own |
| 258 | /// length in frames ([`Project::set_fade_in`]'s own clamp, so the drag never |
| 259 | /// draws past what a release would refuse). One clip, no group: unlike a trim |
| 260 | /// a fade never drags a neighbour, and unlike a caption it never wants a |
| 261 | /// track's walls. |
| 262 | |
| 263 | pub |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | /// What a volume-envelope drag holds: one key, or the line between key `i` and key `i + 1`. |
| 274 | |
| 275 | pub |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | /// A volume-envelope drag on one audio clip, tracked on the root like a fade is. A key moves in |
| 281 | /// time (between its neighbours and the clip's own source range) and in dB; a segment moves both |
| 282 | /// of its keys up or down by the same dB. `keys` is the envelope at the press, which the release |
| 283 | /// compares against; `shown` is what the drag is showing and what the release commits, in one |
| 284 | /// undo step. Positions are window pixels, and `origin` and `size` are the clip's own box. |
| 285 | |
| 286 | pub |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | /// Whether a clip box this wide gets its two trim strips at all. Below three |
| 308 | /// handles wide the pair would occlude the whole box: every press on it would |
| 309 | /// trim, and the clip could not be selected, dragged to another lane or picked |
| 310 | /// up by its middle -- which is exactly what a jumpcut leaves behind |
| 311 | /// ([`Player::cut_silences`] manufactures a great many short clips). Above it, |
| 312 | /// what is left between the two strips is a handle's width of body in its own |
| 313 | /// right. A clip too short for its handles is trimmed by zooming in first: the |
| 314 | /// bed is a magnifier, and the strip grows with the box. |
| 315 | pub |
| 316 | |
| 317 | |
| 318 | |
| 319 | /// How wide a clip's box is *drawn*, given the width its own length is worth |
| 320 | /// (`span`). Never under [`HIT_MIN`], even where that is wider than the clip is |
| 321 | /// long: zoomed far out a short take is worth a fraction of a pixel, and a box |
| 322 | /// nobody can put a pointer on is a clip that cannot be selected, dragged, given |
| 323 | /// a menu or reached at all -- which is strictly worse than one drawn a few |
| 324 | /// pixels too wide. The same call [`cue_box`] makes for a mark, and what every |
| 325 | /// editor draws. |
| 326 | /// |
| 327 | /// A drawing only: [`Scale::time_at`] still reads the bed, so a press inside the |
| 328 | /// padding names the frame it points at, and the box's head is the clip's own. |
| 329 | pub |
| 330 | |
| 331 | |
| 332 | |
| 333 | /// The sheet a card or a menu is painted on: the whole window, and the mouse |
| 334 | /// stops at it. Occluding is what tells gpui that nothing under this sheet is |
| 335 | /// hovered any more (`Hitbox::is_hovered`) -- without it the window carries on |
| 336 | /// hovering behind an open menu and pops *its* tooltip over the menu's items, |
| 337 | /// which is a card being painted over by the thing it covers. |
| 338 | /// |
| 339 | /// Every card and every menu takes its sheet from here, so no surface can be |
| 340 | /// drawn over the top of one by having been given a plain scrim. |
| 341 | pub |
| 342 | |
| 343 | |
| 344 | |
| 345 | /// The body every hanging menu is drawn on: the clip menu, the library row |
| 346 | /// menu and the open choice list, one shape for all three. |
| 347 | /// |
| 348 | /// It exists because the three drifted: each carried its own copy of the |
| 349 | /// plate chrome, so styling one (the picker, 2026-08-21) left the other two |
| 350 | /// painting the legacy raised grey -- the user's "right click menu in library |
| 351 | /// is old too". A plate is `panel` with a seam around it and a 6px radius |
| 352 | /// (DESIGN §2/§4); the legacy tree keeps its own raised sheet. One function, |
| 353 | /// so the next change reaches all three or none. |
| 354 | pub |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | /// The sheet a card with a *slider* in it takes instead: the same scrim, with |
| 368 | /// the window's own drag listeners on it as well. |
| 369 | /// |
| 370 | /// A scrim occludes, and occluding is where gpui's hit test stops |
| 371 | /// (`Hitbox::is_hovered`, window.rs:788) -- so while a card is up the root is |
| 372 | /// not hovered anywhere behind it and its `on_mouse_move`/`on_mouse_up` hear |
| 373 | /// nothing at all. Every drag in this window is tracked from the root, because |
| 374 | /// each of them starts on a strip a few pixels wide that the pointer leaves at |
| 375 | /// once ([`Player::drag_move`]), so a card's handles were set by the press and |
| 376 | /// then frozen: the value never followed the hand and the release never wrote. |
| 377 | /// The scrim is the one surface above the occluder that covers the whole card, |
| 378 | /// so the same two listeners go here, and a drag that leaves the card is picked |
| 379 | /// up by the root's copy of them without a seam. |
| 380 | pub |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | /// The seam between two panels, and the handle that resizes them: a strip |
| 387 | /// [`SPLIT_W`] wide with the resize cursor of its axis on it, which is the whole |
| 388 | /// of how a person finds out the layout moves at all. |
| 389 | /// |
| 390 | /// The press is all this element does. The gesture itself is the root's, like |
| 391 | /// every other drag in this window ([`Player::drag_move`]): a 6 px strip is not |
| 392 | /// where the pointer stays, and a divider whose own listeners tracked it would |
| 393 | /// stop following the hand on the first move. `stop_propagation` so the press |
| 394 | /// never reaches the region under it -- a seam over the timeline must not scrub. |
| 395 | /// |
| 396 | /// Drawn to the ghost grammar (DESIGN §11.2): nothing at rest -- a room whose |
| 397 | /// every seam is inked is the "crowded" the user named -- then one hairline of |
| 398 | /// dim ink under the pointer, and the same line one step brighter while the |
| 399 | /// hand is actually holding it. The band below is the *hit* area throughout; |
| 400 | /// only one 1 px line inside it is ever painted. `held` is the seam this window is |
| 401 | /// dragging right now ([`Player::split_drag`]), which the pointer leaves on the |
| 402 | /// first move -- so the lit line has to come from the model, not from `hover`. |
| 403 | /// |
| 404 | /// What the *hand* aims at is wider than what the eye is given: the press and |
| 405 | /// the resize cursor live on a [`GRAB_W`] band centred on the *line the eye |
| 406 | /// sees* -- one row above the strip, so it reaches past the panel edge the |
| 407 | /// strip stands in front of rather than being centred on the strip -- mounted |
| 408 | /// absolutely so it overlays its neighbours instead of pushing them (the strip |
| 409 | /// keeps its [`SPLIT_W`] of layout, and `layout::split_drag_size` keeps |
| 410 | /// answering in strip coordinates). A 6 px target missed by 5 px is a resize |
| 411 | /// the hand cannot find, which is the same as no resize at all (user |
| 412 | /// 2026-09-09: "panes should be enlargable and shrinkable" -- they already |
| 413 | /// were). The hairline is painted *by the band*, not by the strip, so the |
| 414 | /// whole band lights it: a line raised only by the pixels that already grab |
| 415 | /// the seam tells a hand nothing. The bench's band ([`BENCH_GRAB_H`]) is every |
| 416 | /// other seam's reach: the section head under it is gone (cleanse round 2) and |
| 417 | /// the ruler that starts the bench now answers presses itself, so a deeper |
| 418 | /// band would eat scrubs at the film's own top edge. |
| 419 | /// |
| 420 | /// A double press resets the seam to the window's own share |
| 421 | /// ([`Splits::clear`]): the cheap way back from a layout dragged somewhere |
| 422 | /// unusable, and the one every editor's dividers answer to. |
| 423 | pub |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | /// The grab on a lane's bottom edge (DESIGN §5 "Lane heights"): 2px inside the |
| 509 | /// lane's edge and 12px past it -- the 2px [`ROW_GAP`] plus 10px of the lane |
| 510 | /// below. It starts at the head's right edge, so the bed carries it and a head |
| 511 | /// keeps its own bottom pixels for its reorder grab and switches. It stays out |
| 512 | /// of the lane's bottom 2px and so does not cover the key marks drawn on a |
| 513 | /// clip's foot (`ui/bench_stance/lane.rs`), which must take their own presses. |
| 514 | /// A press starts the drag (`Player::lane_resize`, read by `drag_move`); a |
| 515 | /// double-click puts the lane back to its kind's default. |
| 516 | pub |
| 517 | |
| 518 | |
| 519 | |
| 520 | |
| 521 | + use<> |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | /// A press that stops here. What every card's body hands its scrim: the scrim |
| 566 | /// closes the card on a press, and the card is painted after it, so this listener |
| 567 | /// runs first (gpui dispatches topmost-first, window.rs:3705) and a press meant |
| 568 | /// for a button never closes the card out from under its own click -- the rule |
| 569 | /// the menus already follow ([`Player::library_card`]). |
| 570 | pub |
| 571 | |
| 572 | |
| 573 | |
| 574 | /// How close to an edge a dragged clip has to be let go for it to land *on* it: |
| 575 | /// the snap every timeline has, in pixels rather than frames so that it feels |
| 576 | /// the same at every zoom. Narrower than [`EDGE_W`] -- a hand aiming between two |
| 577 | /// takes must still be able to leave a gap of a few frames there. |
| 578 | pub const SNAP_PX: f64 = 5.; |
| 579 | |
| 580 | /// The same magnet, wider, for a drag's own *release* -- a library row or a |
| 581 | /// clip let go of, rather than an edge nudged one frame at a time. The user's |
| 582 | /// own complaint ("to drop at 0.0 you must be exactly at 0.0") is a 5px |
| 583 | /// window read at zoom: past a couple of minutes on screen a pixel is worth |
| 584 | /// several frames, and 5px of aim is not forgiving enough to feel like a |
| 585 | /// magnet at all. Twice [`SNAP_PX`], [`Scale::drop_snap_frames`]. |
| 586 | pub const DROP_SNAP_PX: f64 = 10.; |
| 587 | |
| 588 | /// The scrollbar's thumb never narrows past this, however long the timeline: |
| 589 | /// a thumb a pixel wide is a thumb no hand can hold. A quarter of the ruler's |
| 590 | /// own seek strip, which is the idiom it sits under. |
| 591 | pub const SCROLL_THUMB_MIN: f32 = 24.; |
| 592 | |
| 593 | /// The thickness of a scrollbar bar as drawn, in the one dimension the strip |
| 594 | /// spans: the height of the horizontal one under the lanes, the width of the |
| 595 | /// vertical one on the beds' right edge. This is what the layout spends. |
| 596 | pub const SCROLL_BAR_H: f32 = 6.; |
| 597 | |
| 598 | /// The hit area of a scrollbar strip, in the same dimension: a hand must be |
| 599 | /// able to find it without aiming (WCAG 2.5.8, [`HIT_MIN`]). The strip's row |
| 600 | /// is [`SCROLL_ROW_H`] tall; the band reaches [`SCROLL_HIT_UP`] above it into |
| 601 | /// the bottom of the lanes and [`SCROLL_HIT_DOWN`] below it, so the band is |
| 602 | /// at least [`HIT_MIN`] and the lanes give up no more than 8px for it. |
| 603 | pub const SCROLL_HIT: f32 = HIT_MIN; |
| 604 | |
| 605 | /// Where a held key would land, which is the whole of what auto-repeat has to |
| 606 | /// know. [`Player::repeat_scope`] answers it from the same state the handler |
| 607 | /// walks below itself. |
| 608 | |
| 609 | pub |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | /// Whether a *held* stroke means it again. One press is always one action; a |
| 622 | /// hold is only ever a value running, so this is what tells the two apart. |
| 623 | /// |
| 624 | /// The cards' arrows, because that is what every one of them moves a slider |
| 625 | /// with -- and only the arrows, so the equalizer's `r` cannot flatten five |
| 626 | /// bands forty times a second and the silence card's `enter` cannot cut forty |
| 627 | /// places again on the next tick. Outside a card the volume pair and nothing |
| 628 | /// else: play, cut, delete, save, export and every other binding is a one-shot, |
| 629 | /// exactly as it was when the handler filtered every held key alike. |
| 630 | pub |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 |