Manipulator(3U)
β¨ Manipulator(3U) β¨
okay bestie, this is a page from the InterViews Reference Manual and it's about Manipulator, which is literally the blueprint for all the direct-manipulation girlies out there π
πΈ NAME πΈ
Manipulator β the base class for defining direct-manipulation semantics. it's giving "foundation of the whole vibe" fr fr π
π SYNOPSIS π
#include <Unidraw/manip.h>
π¦ DESCRIPTION π¦
so basically, tools use manipulator objects to wrap up all the mechanics of direct manipulation. manipulators take your user input events and turn them into an animation sequence that characterizes the manipulation. like, they're the ones running the whole show β¨
and here's the iconic part: a manipulator breaks the manipulation down into three phases:
- the grasping phase β happens at the very start of the manipulation, and it lets the manipulator initialize the state it's gonna need in the later phases. setup era π«Ά
- the manipulating phase β this is the main character moment, where the manipulator accepts input events and generates graphical output that characterizes successive frames of the animation π
- finally, the effect phase β happens at the end of the manipulation and lets the manipulator finalize its state. closing the loop, no cap π
and heads up: Manipulator is an abstract base class. different subclasses support different manipulation semantics β so this one's just the template, not the whole meal π
π MANIPULATOR PUBLIC OPERATIONS π
virtual void Grasp(Event&)Graspgets called exactly once, right at the beginning of direct manipulation, so the manipulator can initialize its internal state based on the initiating event. one shot, one opportunity π€virtual boolean Manipulating(Event&)Manipulatinggets called over and over during the manipulation, every time a new event shows up, until it returnsfalse. each call toManipulatingshould produce a new frame of the animation that characterizes the manipulation. it's literally the frame-by-frame slay β¨virtual void Effect(Event&)Effectgets called once at the end of direct manipulation, letting the manipulator finalize its internal state based on the last event supplied to theManipulatingoperation. wrap it up, periodt πvirtual void SetViewer(Viewer*)virtual Viewer* GetViewer()virtual void SetTool(Tool*)virtual Tool* GetTool()these get and set the viewer β the one the manipulator generates graphical output in β and the tool that created the manipulator. and ngl, by default these operations do nothing. subclasses that actually need this info have to redefine these operations to assign and retrieve the state they require. so if you want it, you gotta build it π οΈ
π§ MANIPULATOR PROTECTED OPERATIONS π§
Manipulator()the constructor is protected, which disallows instantiation of abstract base class objects. it's exclusive, it's VIP-only, it's not for just anyone π
π SEE ALSO π
Event(3I), Tool(3U), Viewer(3U)
and that's the whole page bestie, you ate it up fr fr π this one comes to you from Unidraw, dated 1 August 1990 β old but iconic, iykyk πβ¨
π¦ 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