Perspective(3I)
π Perspective(3I) π
okay bestie, gather round, we're doing the InterViews Reference Manual today and honestly? this one's a little cutie. it's Perspective(3I), it lives in the 3I section, and it's about figuring out what part of a thing you can actually see. iconic behavior.
β¨ NAME β¨
Perspective β the visible portion of an interactor π«Ά
πΈ SYNOPSIS πΈ
#include <InterViews/perspective.h>
π¦ DESCRIPTION π¦
so a perspective object describes which part of an interactor's total display area is actually visible inside the interactor's canvas. that's it, that's the whole vibe. and the main use of perspectives? scrolling, panning, and zooming interactors β the trio, the moment, the main character energy β¨
let's meet the member variables, because they're doing all the work here:
- the member variables
(x0, y0)define the origin of the interactor's display area π widthandheightdefine the total height of the area- the member variables
(curx, cury)define the lower-left corner of the interactor's canvas, relative to the total area π curwidthandcurheightdefine how much of the total area is displayed in the canvas
and then there's the little squad of increments:
- the member variables
sx,sy,lx, andlyspecify small and large increments in each dimension π
these increments are what a scroller uses to implement line and page scrolling. no cap, that's literally their whole job.
π PUBLIC OPERATIONS π
π Perspective()
define a new perspective with all member variables initialized to zero. blank slate, fresh start, clean girl aesthetic fr fr.
π void Attach(Interactor*)
add to the list of interactors that are interested in updates to the perspective. these interactors reflect the perspective visually β examples include scrollers and sliders π
π void Detach(Interactor*)
remove an interactor from the list of those interested in updates. this operation should be called from the interactor's destructor β don't skip this one bestie, it's not optional.
π void Init(Coord x0, Coord y0, Coord width, Coord height)
initialize the perspective display area β¨ (yes, the same x0, y0, width, height from up top, they're getting their official setup moment).
π void Update()
notify all the interactors interested in the perspective that it has changed. and listen: the perspective's interactor should call Update after modifying its perspective β otherwise everyone's just out here looking at stale info and that's embarrassing π
π₯ SEE ALSO π₯
Adjuster(3I), Interactor(3I), Panner(3I), Scroller(3I)
go read those too, they're all in the friend group π«Ά
and that's the whole page, bestie!! this one came from the InterViews era, dated 15 June 1987 β vintage but still slaying π β¨ love that for us. mwah π
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms