datas(3U)

πŸ’– datas(3U) β€” the InterViews Reference Manual, but make it cute πŸ’–

okay bestie, welcome to datas(3U) from the InterViews Reference Manual. this is the Unidraw corner of the world and it's literally just a little squad of Data subclasses that exist so undo can remember stuff. yes, undo. the thing you beg for after you delete your whole canvas. iconic behaviour, honestly. 🫢


✨ NAME ✨

ColorData, GSData, MobilityData, MoveData, VoidData β€” Data subclasses for storing common undo information. that's the whole vibe. five little data-holders, each one carrying the receipts so you can rewind. πŸ’…


✨ SYNOPSIS ✨

#include <Unidraw/Commands/datas.h>

one include, zero drama. πŸŽ€


✨ DESCRIPTION ✨

so the Unidraw library ships with several Data subclasses already predefinied for you β€” wait, predefined, sorry, my fingers slipped, it's giving typo energy 😭 β€” and they store the common undo information you're gonna need. let's go one by one:

  • ColorData stores two PSColors β€” usually the foreground and background colors, like a little before-and-after selfie of your palette. 🎨
  • GSData stores a whole complete set of graphics state inside a FullGraphic object. the full fit. the entire outfit. ✨
  • MobilityData stores the mobility and the graphics state info you need to undo a change in mobility. both. at once. multitasking queen. πŸ‘‘
  • MoveData stores a horizontal and a vertical distance. that's it, that's the girl. she moves. πŸ’ƒ
  • VoidData stores a void pointer β€” and lowkey it's the useful alternative to deriving trivially from Data just to store one word of information. no cap, sometimes you just need one word and a dream. πŸ’€

🎨 COLORDATA PUBLIC OPERATIONS 🎨

  • ColorData(PSColor*, PSColor*) β€” creates a ColorData instance, and you hand it the PSColor objects it's gonna store. give her the colors, she holds them. that's the arrangement. πŸ’–

πŸ–ΌοΈ GSDATA PUBLIC OPERATIONS πŸ–ΌοΈ

  • GSData(Graphic*) β€” creates a GSData instance, and you supply the Graphic object it copies a complete set of graphics state from. the GSData constructor copies all of that into its _gs member, and that's where you can go get it later. it's saved. it's safe. it's in _gs. 🫢

πŸ¦‹ MOBILITYDATA PUBLIC OPERATIONS πŸ¦‹

  • MobilityData(Mobility, Graphic*) β€” creates a MobilityData instance, and you supply the mobility plus a Graphic object to copy a complete set of graphics state from. the MobilityData constructor copies the graphic into its _gs member, from whence it can be retrieved later. same _gs energy, different subclass. 🌸

πŸ•Ί MOVEDATA PUBLIC OPERATIONS πŸ•Ί

  • MoveData(float, float) β€” creates a MoveData instance, and you supply two floating point numbers that normally represent horizontal and vertical movement. normally. iykyk. πŸ”₯

πŸ•³οΈ VOIDDATA PUBLIC OPERATIONS πŸ•³οΈ

  • VoidData(void*) β€” creates a VoidData instance, and you supply a pointer to an object of unknown type. mysterious. ethereal. a void pointer with main character energy. 🌈

πŸ‘€ SEE ALSO πŸ‘€

  • Data(3U)
  • Graphic(3U)
  • globals(3U)

go read those too bestie, they're the extended universe. πŸ“šβœ¨


heads up: VoidData exists specifically so you don't have to derive trivially from Data just to store one word of information. that's not a warning, that's a favour. take it. πŸ™ˆ

and that's the page!! this one came from Unidraw, dated 24 January 1991, and yeah it's filed under datas(3U) β€” old school but still serving. periodt. πŸ’œπŸŽ€βœ¨