Clipboard(3U)
π Clipboard(3U) π
okay so bestie, we're in the InterViews Reference Manual today and we are talking about the Clipboard class β the little icon that manages a whole list of graphical component subjects. she's giving admin assistant energy and honestly? she ate. π
β¨ NAME β¨
Clipboard β manages a list of graphical component subjects ποΈβ¨
πΈ SYNOPSIS πΈ
#include <Unidraw/clipboard.h>
π¦ DESCRIPTION π¦
so basically a Clipboard maintains a list of GraphicComp objects and provides operations for manipulating that list. that's it. that's the whole job. π
and the plot twist? Catalog and Command classes use clipboards to store the graphical components they affect. so she's not just doing this for herself, she's carrying the whole team. main character energy fr fr. π
π PUBLIC OPERATIONS π
Clipboard(GraphicComp* = nil)β construct a brand new clipboard object, and if you want, hand her aGraphicCompthat should show up on the list from the jump. optional bestie, no pressure. π«Άvirtual ~Clipboard()β delete the clipboard. β οΈ but listen: deleting the clipboard does not delete theGraphicCompobjects she's holding. they just get evicted, they don't get deleted. no cap.void Init(Selection*)/void CopyInit(Selection*)βInitinitializes the clipboard with the subjects belonging to the graphical views in the given selection object.CopyInitinitializes it with copies of those subjects. same vibe, but one of them clones. πͺβ¨void Clear()β remove allGraphicCompobjects from the clipboard. and nope, the objects are not deleted. they're just... uninvited from the group chat. πvoid DeleteComps()β delete eachGraphicCompin the clipboard. but here's the tea: this operation does not delete the list itself, so you can still iterate through the list afterwards.DeleteCompsis generally called just before the clipboard is destroyed. rip to them but the list structure lives on. πͺ¦void Append(GraphicComp*)void Prepend(GraphicComp*)void InsertAfter(Iterator, GraphicComp*)void InsertBefore(Iterator, GraphicComp*)void Remove(GraphicComp*)void Remove(Iterator&)β operations for adding and removingGraphicCompobjects from the clipboard.InsertAfterandInsertBeforetake an iterator that specifies the point before or after which the givenGraphicCompshould be inserted. andRemove(Iterator&)? she removes theGraphicCompthe iterator refers to and increments the iterator to point to the followingGraphicComp. multitasking queen. β¨GraphicComp* GetComp(Iterator)/void SetComp(GraphicComp*, Iterator&)βGetCompeffectively dereferences an iterator, returning theGraphicCompit points to.SetCompinitializes an iterator to point to the givenGraphicCompobject, assuming that object is in the clipboard. (emphasis on assuming, bestie β don't be out here assuming. π)void First(Iterator&)void Last(Iterator&)void Next(Iterator&)void Prev(Iterator&)boolean Done(Iterator&)β operations for iterating through theGraphicCompsin the clipboard.FirstandLastmodify the iterator to point to the first and lastGraphicCompobjects.NextandPrevmake the iterator point to the succeeding and precedingGraphicCompobjects. andDonereturns whether the iterator points to the sentinel object on the list, which marks the beginning and the end of the list. the sentinel is literally the bouncer at both doors. πͺπͺboolean IsEmpty()/boolean Includes(GraphicComp*)β return whether or not the clipboard is empty, or whether it includes the givenGraphicCompobject. vibe check, essentially. πvirtual Clipboard* Copy()/virtual Clipboard* DeepCopy()βCopycreates a new clipboard with a list of the sameGraphicCompobjects as this one.DeepCopycreates a new clipboard containing copies of the objects in this one. one shares, one clones. know the difference, it matters. π
π§ PROTECTED OPERATIONS π§
UList* Elem(Iterator)/GraphicComp* Comp(UList*)β theClipboardclass stores itsGraphicCompobjects in aUList. these convenience functions convert an iterator into aUListelement, and dereference aUListelement to obtain aGraphicCompobject, respectively. lowkey just translation services. π
β SEE ALSO β
Catalog(3U), Command(3U), GraphicComp(3U), Iterator(3U), Selection(3U), UList(3U)
π and that's the whole page bestie, you're officially Clipboard-literate, iykyk π
okay so this little icon of a manual page came from Unidraw, dated 12 June 1990, and it's filed under Clipboard(3U). vintage but still slaying, as always. π¦πβ¨
π¦ 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