edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiBfbc29d1Tahinli2 months ago972 commits
| 1 | //! The timeline's arithmetic: takes, trims, snapping and envelopes. |
| 2 | |
| 3 | use crate::*; |
| 4 | |
| 5 | /// Whether this clip is a whole take, i.e. whether deleting it may close the |
| 6 | /// hole under it: a take is what the first pair of lanes carries between them, |
| 7 | /// `V1`'s picture and the sound grouped with it, and dropping one moves the |
| 8 | /// frames after it on every lane. A caption a hand grouped with the clip |
| 9 | /// counts as its partner too: the group is what pairs, not the lane's kind -- |
| 10 | /// and a group answers `true` from *whichever* member's lane the question is |
| 11 | /// asked from, added row or not, because a grouped delete |
| 12 | /// ([`PlaybackSession::delete_clip`] -> `Project::delete_members`) closes |
| 13 | /// every member's own lane by its own span already, not just the first pair's. |
| 14 | /// |
| 15 | /// Everything else is a half or a layer, and is *lifted* instead: a half whose |
| 16 | /// picture was lifted (what a lift leaves behind) has no take to ripple, and an |
| 17 | /// *ungrouped* clip on a further lane is laid over the timeline rather than |
| 18 | /// part of it -- closing a hole under it would drag the take beneath out of |
| 19 | /// step with it. |
| 20 | pub |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | /// The clip a Group would pair this one with: the first clip on another track, |
| 63 | /// in the order the lanes are drawn, covering exactly the same frames and not in |
| 64 | /// this clip's group already. Exactly the same frames because that is all a |
| 65 | /// group id can mean (engine `links_are_consistent`), which is what leaves |
| 66 | /// nothing for a second click to choose. `None` when no track has one, and the |
| 67 | /// notice says so. |
| 68 | pub |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | /// What the timeline has picked: every clip and caption a hand ctrl-clicked |
| 95 | /// into the selection, in click order and with no two the same. The last of |
| 96 | /// them is the [`anchor`](Selection::anchor) -- the one every action that is |
| 97 | /// about *one* thing (delete, lift, copy, the equalizer) acts on -- and the |
| 98 | /// whole list is what a manual Group names to the engine. |
| 99 | /// |
| 100 | /// Indices move under every edit, exactly as the single mark this replaces |
| 101 | /// did, so every edit that renumbers a lane clears the picks it cannot keep |
| 102 | /// honest. Pure and engine-free, so a test can build one without a window. |
| 103 | |
| 104 | pub |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | /// The lane stack's thumb over a track `h` px tall: `(y, height)` of the box |
| 170 | /// standing for the visible share of a stack `content` px tall in a box |
| 171 | /// `box_h` px tall, taken down by `scrolled` px. Full track when the whole |
| 172 | /// stack is on screen, never shorter than |
| 173 | /// [`SCROLL_THUMB_MIN`] when it is not, and never off the track either way. |
| 174 | pub |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | /// Whether a click marks this box: any pick on it always, and any box sharing |
| 194 | /// a group id with a pick -- the clip the anchor was ctrl-clicked beside, and |
| 195 | /// the caption a hand pinned to a clip. A group whose only member is picked |
| 196 | /// marks that member alone, which is what makes a detached half separately |
| 197 | /// deletable. |
| 198 | /// |
| 199 | /// `pick_links` are the group ids of the picks themselves, read by the caller |
| 200 | /// off the session in the same order as `picks` -- the one fact this pure |
| 201 | /// question cannot know. |
| 202 | pub |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | /// The clip a trim is *showing*, worked out the way `Project::trim` will write |
| 212 | /// it: the timeline room the edge leaves is turned into source frames by the one |
| 213 | /// conversion that exists for it ([`Speed::fit`]), and the box is drawn from |
| 214 | /// that. The preview and the commit are then the same arithmetic -- a box let go |
| 215 | /// of stays where the hand left it at every rate. Assigning the timeline count |
| 216 | /// straight to the source field, as this used to, drew a speeded clip's tail |
| 217 | /// moving at the wrong rate (it snapped on release) and drew a *head* trim |
| 218 | /// moving the clip's other edge, since the length it implied was not the length |
| 219 | /// the release would commit. |
| 220 | /// |
| 221 | /// A still grows forward from source frame 0 instead: every frame of it is the |
| 222 | /// same picture, so there is no earlier one for an in-point to walk back to. |
| 223 | /// |
| 224 | /// Room too narrow to hold one source frame is the edit the engine refuses, and |
| 225 | /// the box is drawn unchanged rather than as something that will not be |
| 226 | /// committed. |
| 227 | pub |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | /// The cut odometer's own arithmetic (DESIGN.md §6): where `,` `.` land from |
| 277 | /// `idx`, `stride` cuts forward or back among `len` of them. Clamped rather |
| 278 | /// than wrapping -- an odometer that wraps at the last cut reads as landing |
| 279 | /// back at the first, which is not "next" -- so a walk already at either end |
| 280 | /// simply holds there, the way [`Player::step`]'s own ends do. |
| 281 | pub |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | /// The no-aim trim's own arithmetic (DESIGN.md §6): `current` moved `dir` |
| 295 | /// frames (usually ±1, a held key's ratchet) and clamped into the room |
| 296 | /// [`engine::PlaybackSession::trim_room`] already answered -- the same wall a |
| 297 | /// pointer drag is clamped to, so a keyboard trim can never draw an edge the |
| 298 | /// engine would refuse. |
| 299 | pub |
| 300 | |
| 301 | |
| 302 | |
| 303 | /// Whether a loop-trim window ([`ActionId::LoopTrim`]) has been played out to |
| 304 | /// its far edge and wants restarting at its near one: pure so the pump's own |
| 305 | /// tick ([`Player::pump`]) is one `if` over a fact this decides. `None` -- |
| 306 | /// loop-trim off -- never restarts anything. |
| 307 | pub |
| 308 | |
| 309 | |
| 310 | |
| 311 | /// Which window is actually looping, in priority order: the i/o range |
| 312 | /// ([`Player::range`]) beats the subject-cut trim ([`Player::loop_trim`]) |
| 313 | /// beats the whole timeline -- but only once *something* is already armed |
| 314 | /// (`loop_on` or `loop_trim`). A bare in/out mark with neither on is an |
| 315 | /// export mark first, not a loop request, so it answers `None` here and |
| 316 | /// never restarts anything on its own. |
| 317 | pub |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | /// Where a play resumes from on crossing into [`Transport::Ended`] |
| 329 | /// (`Player::pump`): the active window's own near edge |
| 330 | /// ([`active_loop_window`]) when one is armed, *even when its far edge is |
| 331 | /// the film's own last frame* -- half of all cuts in a two-clip film sit on |
| 332 | /// the final clip (DESIGN.md §6), so that coincidence is not an edge case |
| 333 | /// and must not read as "reached the end, stop". Falls back to the |
| 334 | /// whole-timeline loop's top, and `None` -- nothing armed -- restarts |
| 335 | /// nothing, which is the halt this crossing otherwise means. |
| 336 | pub |
| 337 | |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | /// How many timeline frames a stretch of a subtitle track is worth: the one |
| 348 | /// conversion between the two clocks a caption has -- microseconds for its |
| 349 | /// words, frames for where it sits -- and the app-side twin of the engine's own |
| 350 | /// (`Project::trim_sub_room`). Never zero: a placement of no frames is the one |
| 351 | /// [`Project::place_sub`] refuses as empty, and a track shorter than a frame is |
| 352 | /// still a caption somebody dragged. |
| 353 | /// A fade handle's drag, turned into timeline frames: `dx` pixels at `pps` |
| 354 | /// pixels per second, at `fps` frames per second -- the one conversion a |
| 355 | /// fade-in or fade-out handle needs, and the app-side twin of every other |
| 356 | /// pixel-to-frame door on this bed ([`Scale::time_at`]). Zero for a |
| 357 | /// degenerate scale (nothing drawn to drag against), never negative on its |
| 358 | /// own -- the caller adds this to the fade's length before clamping to the |
| 359 | /// clip's own room, so a delta can still shrink a fade by coming back signed. |
| 360 | pub |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | pub |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | /// The *placement* a trim is showing, the same way for a caption: |
| 377 | /// [`Project::trim_sub`] moves the head or the tail and the window follows it, |
| 378 | /// so the box on screen is the frames alone -- the words it will keep are the |
| 379 | /// engine's arithmetic at the release, and nothing here draws them. |
| 380 | /// |
| 381 | /// An edge that has not moved draws the placement it pressed, and one dragged |
| 382 | /// past its other end keeps the one frame the engine's own walls always leave. |
| 383 | pub |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | |
| 399 | |
| 400 | /// Which index on its own lane a dragged clip is at *now*: the one it was picked |
| 401 | /// up at while nothing has moved, and wherever the clip itself has slid to when |
| 402 | /// an edit during the drag rippled the lane's indices -- a delete, an undo or a |
| 403 | /// paste from a stroke, none of which gpui's frozen drag payload hears about. |
| 404 | /// `None` when the clip is gone altogether, and then the drop is not an edit at |
| 405 | /// all: moving whatever slid into its place is the one thing the hand did not |
| 406 | /// ask for. A lane's clips are disjoint and sorted, so at most one of them can |
| 407 | /// be the clip that was picked up. Generic over what a lane holds, because a |
| 408 | /// [`SubClip`] is dragged under exactly the same rule. |
| 409 | pub |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | /// Which index a lane's mark is on after that lane was renumbered: the caption |
| 417 | /// that starts at `start`, and `None` when it is not there any more. |
| 418 | /// |
| 419 | /// The mark on a caption is an index like a clip's ([`Player::selected`]), and a |
| 420 | /// subtitle lane both *inserts in start order* ([`engine::Project::place_sub`]) |
| 421 | /// and removes, so any placement or lift renumbers every caption after it and an |
| 422 | /// index left as it was names a neighbour -- the caption the next Delete would |
| 423 | /// take. So the mark is read off the caption's start frame before such an edit |
| 424 | /// and found again by it after: captions on a lane are disjoint and in order, so |
| 425 | /// a start frame names exactly one of them and is the identity an index is not. |
| 426 | pub |
| 427 | |
| 428 | |
| 429 | |
| 430 | /// Scales an envelope to its own loudest sample, so a quietly mastered source |
| 431 | /// still draws as a shape. The fixtures peak around an eighth of full scale, and |
| 432 | /// an eighth of a 30 px lane is a flat line -- which says "silent" about a file |
| 433 | /// that is not. |
| 434 | pub |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | /// The min/max envelope of `peaks` over the source seconds `from..to`, as |
| 446 | /// `(x, top, bottom)` columns of a `w` x `h` box. Every point is inside that box |
| 447 | /// -- a clip's waveform cannot paint over its neighbour -- and every column is |
| 448 | /// at least a pixel tall, so silence reads as a line through the middle rather |
| 449 | /// than as a polygon with no area. |
| 450 | pub |
| 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 | /// Records its parent's laid-out box: gpui hands a mouse listener the window |
| 478 | /// position only, and the ruler sits behind the panel's padding. Paints |
| 479 | /// nothing and takes no hitbox of its own, so the click still reaches the bar. |
| 480 | pub |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | /// [`bounds_probe`] for a box something *else* is laid out against: it also asks |
| 487 | /// for one more frame whenever the height changed. |
| 488 | /// |
| 489 | /// A measurement is read by the frame after the one that took it, and a notice |
| 490 | /// arriving over a paused picture repaints exactly once -- so without this the |
| 491 | /// cue would sit under that notice until something else happened to draw, which |
| 492 | /// on a paused window can be never. |
| 493 | pub |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | /// Where along an element a click landed, 0..1. An element that was never |
| 508 | /// painted has no width, and reads as its start rather than as NaN. |
| 509 | pub |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | /// Where along an element a click landed, in pixels from its own left edge: |
| 517 | /// [`frac_along`] in the units the timeline is drawn in, since a [`Scale`] |
| 518 | /// measures in pixels and not in shares of a bed. Clamped to the element -- a |
| 519 | /// drag that slid off the end names its end -- and an element that was never |
| 520 | /// painted reads as its start. |
| 521 | pub |
| 522 | |
| 523 | |
| 524 | |
| 525 | /// [`px_along`] turned through a right angle, for the lane stack's scrollbar: |
| 526 | /// how far down its track a press landed. |
| 527 | pub |
| 528 | |
| 529 | |
| 530 | |
| 531 | /// One turn of the wheel as a single number, positive for a turn *up*, in |
| 532 | /// whatever units the device sends (a mouse counts lines, a touchpad pixels). |
| 533 | /// A tilt wheel's own axis counts as the same gesture: it is the sideways |
| 534 | /// scroll a mouse that has one sends, and the controls this drives have one |
| 535 | /// direction each, so the two axes are one answer here. |
| 536 | pub |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | /// The frame a dropped clip's head lands on: `raw`, unless one of `marks` is |
| 548 | /// within `tol` frames of where its head -- or its tail, `len` frames along -- |
| 549 | /// would come to rest, in which case that edge wins. The snap every timeline |
| 550 | /// has: clips meet exactly instead of a frame apart, and the hand does not have |
| 551 | /// to aim. The nearest mark wins, and a head landing on one beats a tail at the |
| 552 | /// same distance -- what was dragged is the head. |
| 553 | pub |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | /// The edges worth landing on, off *every* lane: both ends of every clip on the |
| 570 | /// timeline, less `skip` -- the clip being dragged, which does not snap to where |
| 571 | /// it already is -- and less `skip_link`, the group id of whatever is being |
| 572 | /// dragged: its clips travel with it, and so does any caption the id names. |
| 573 | /// `skip` is a lane's place in `lanes` and an index into it; `skip_link` is |
| 574 | /// read off a caption by the caller, whose drag has no clip for `skip` to |
| 575 | /// name. The playhead and the head of the timeline go on the end: a clip meets |
| 576 | /// the cursor and the start of the show as readily as it meets another take. |
| 577 | /// |
| 578 | /// All lanes rather than the one being dropped on, because a cut is made across |
| 579 | /// the timeline: a title on V2 lines up with the shot under it, and a sound |
| 580 | /// effect lines up with the frame it belongs to. |
| 581 | pub |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | /// [`snapped`], and the mark that pulled it there -- the line the bed draws |
| 614 | /// while the hand is still moving. `None` when nothing was near enough: a line |
| 615 | /// standing over open bed would promise a landing that is not going to happen. |
| 616 | /// The head is read before the tail, exactly as [`snapped`] prefers it. |
| 617 | /// |
| 618 | /// `on` is the switch ([`ActionId::ToggleSnap`]): off, the gesture lands raw and |
| 619 | /// draws no line at all, which is the whole point of being able to turn it off. |
| 620 | pub |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | /// Whether the magnet is on for the gesture in flight: the switch, unless |
| 638 | /// `alt` is held -- the temporary override Resolve, Premiere and Final Cut all |
| 639 | /// put on that key, off for this one drag and leaving the switch where the hand |
| 640 | /// left it. [`Player::snap_live`]'s whole rule, here so it can be read without |
| 641 | /// a window. |
| 642 | pub |
| 643 | |
| 644 | |
| 645 | |
| 646 | /// Where a drag lands and the mark that pulled it there: the frame under the |
| 647 | /// pointer, less however far into the box the hand grabbed it (so a clip travels |
| 648 | /// with the pointer rather than jumping its head under it), snapped by |
| 649 | /// [`snap_cue`]. One answer, asked by the shadow drawn in flight |
| 650 | /// ([`Player::preview_ghost`]), by the line ([`Player::preview_drop`]) and by |
| 651 | /// the drop that commits ([`Player::move_clip`]) -- which is what makes the |
| 652 | /// promise and the landing the same frame. |
| 653 | pub |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | /// Where a clip `len` frames long, let go over *another* lane with its head |
| 665 | /// asked at `at`, really comes to rest -- `None` when the engine refuses the |
| 666 | /// drop outright. A mirror of [`Project::move_room`]: the release is refused |
| 667 | /// only when the asked head sits *inside* a take already there (a clamp has no |
| 668 | /// answer for that), or when the gap it names is narrower than the clip; |
| 669 | /// otherwise the head is clamped into that gap exactly as a same-lane move is |
| 670 | /// ([`gap_clamp`]). `others` is `(start, end)` of every clip already on the |
| 671 | /// destination lane, less the ones travelling with this one. |
| 672 | /// |
| 673 | /// The shadow reads this, so a landing the release *will* make is never drawn |
| 674 | /// as refused -- a whole-span overlap test refuses far more than the engine |
| 675 | /// does, and a shadow that lies about a refusal reads as a broken timeline. |
| 676 | pub |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | /// Where a clip staying on its own lane really comes to rest: `want`, clamped |
| 694 | /// into the gap it is sitting in -- the take behind it and the take in front of |
| 695 | /// it are walls ([`Project::move_selection`] clamps the delta by exactly these, |
| 696 | /// it does not refuse), so a clip dragged hard left past its neighbour lands |
| 697 | /// flush against that neighbour's tail rather than nowhere. `now` is its head |
| 698 | /// today, which is what names the gap. The shadow reads this, so the box drawn |
| 699 | /// in flight is the box the release leaves behind. |
| 700 | pub |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | /// The lane a release lands on when the pointer is off the rows themselves: |
| 717 | /// the row under it while its kind can hold what is in the hand, and otherwise |
| 718 | /// the last one that could -- a picture clip carried down across A1 on its way |
| 719 | /// to the empty bench below is still aiming at V1. [`Player::drag_lane`]'s |
| 720 | /// whole rule. |
| 721 | pub |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | /// Why this file may not go on that lane, in the words the refusal is told in -- |
| 729 | /// `None` when it may. A file with no picture belongs on an audio lane and |
| 730 | /// nowhere else, and a still is silent, so an audio lane is the one place it |
| 731 | /// cannot go. Asked twice: by the ghost tinting itself as refused on the way |
| 732 | /// down, and by the insert that commits ([`Player::insert_source`]), so what is |
| 733 | /// shown as impossible is exactly what is refused. |
| 734 | /// |
| 735 | /// `has_video` is [`Player::has_video`]'s answer for `path`: the probed truth |
| 736 | /// where the header has been read, and an extension's guess otherwise -- never |
| 737 | /// `engine::is_audio` alone, which a song muxed into an `.mp4` lies to. |
| 738 | pub |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | /// Where down an element a pointer sits, 0..1 from the top: the vertical twin |
| 760 | /// of [`frac_along`], for the equalizer, whose gain axis is the y one. An |
| 761 | /// element that was never painted reads as its middle -- flat, the one answer |
| 762 | /// that changes nothing -- rather than as a full boost. |
| 763 | pub |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | |
| 963 |