Panner(3I)

πŸ’– Panner β€” two-dimensional scrolling and zooming πŸ’–

okay bestie, welcome to Panner(3I), straight out of the InterViews Reference Manual. this is the lil guy who does 2D scrolling AND zooming at the same time, no cap. sit down, grab a strawberry πŸ“, we're gonna get you fluent.


✨ NAME ✨

Panner β€” two-dimensional scrolling and zooming πŸ¦‹


🌸 SYNOPSIS 🌸

#include <InterViews/panner.h>

πŸŽ€ DESCRIPTION πŸŽ€

so a panner is an interactor that manipulates the perspective of another interactor β€” that's how you get two-dimensional scrolling and zooming, periodt. πŸ’…

the way that a panner is built: it's a slider plus a whole lil squad of adjusters β€” specifically two zoomers and four movers. πŸ‘‘

the slider's position and size literally reflect the current origin, size, and aspect ratio in the interactor's perspective. and when you drag that slider around with the mouse? that changes the perspective's curx and cury members. slay.


πŸ‘‘ PUBLIC OPERATIONS πŸ‘‘

Panner(Interactor*, int size = 0)

create a panner for the given interactor, optionally with the given width. if the size is 0, a reasonable default size is used (it's giving "we got you"). the panner's aspect ratio reflects that of the perspective. ✨

Slider(Interactor*)

Slider::Handle(Event&)

Slider::Reshape(Shape&)

Slider::Update()

a slider reflects and lets the user specify the visible portion of the view. 🌈

here's the vibe: a rectangle represents the visible area, and the area surrounding it represents the total area.

  • clicking and holding down any mouse button on the rectangle lets you drag it to a different position within the total area. 🫢
  • the perspective's current origin is shifted to reflect the new position when the button is released.
  • holding down the shift key while dragging the rectangle constrains its motion horizontally or vertically. (iconic behavior honestly)
  • clicking outside the rectangle moves it in the corresponding one of eight directions; for example, clicking to the right of the rectangle moves it to the right.
  • if the left mouse button is used, the movement increment equals the perspective's sx or sy member variables.
  • the middle mouse button increments by lx or ly.
  • the right mouse button centers the rectangle around the cursor. 🎯

the Reshape call sets the width of the slider to that of the passed Shape and calls Change on the parent interactor. Update redisplays the slider to reflect a change in the interactor's perspective.


🧚 X DEFAULTS 🧚

the `syncScroll` resource specifies whether the slider should work in real-time or not. ⏱️

  • when synchronized scrolling is employed, the interactor scrolls synchronously as the slider is dragged.
  • otherwise, the slider's outline follows the mouse during dragging, and the interactor is scrolled only after the user stops dragging the slider.

sliders will scroll synchronously if their syncScroll resource is set to `on` or `true`.


πŸ”₯ SEE ALSO πŸ”₯

Adjuster(3I), Interactor(3I), Perspective(3I)


ok that's the whole page bestie, you ate that πŸ’–βœ¨ go forth and pan responsibly πŸ¦‹

InterViews β€” 15 January 1988 πŸ’œ mwah, bye!! πŸŽ€