TextComp(3U)
β¨ TextComp(3U) β¨
okay so bestie, welcome to the InterViews Reference Manual entry for TextComp π this is your one-stop shop for the multiline text component subject, its view, its structured graphic, and its PostScript glow-up π¦
πΈ NAME πΈ
TextComp, TextView, TextGraphic, PSText β the multiline text component squad: subject, view, structured graphic, and PostScript external representation π
π SYNOPSIS π
#include <Unidraw/Components/text.h>
π¦ DESCRIPTION π¦
So TextComp is a GraphicComp that defines a piece of multiline text, periodt. It uses a TextGraphic (which is a subclass of Label, iykyk) to store all its graphical attributes. TextView is a GraphicView for actually displaying the text on screen, and PSText is a PostScriptView that externalizes the subject's information in PostScript form π₯
π TEXTCOMP PUBLIC OPERATIONS π
TextComp(TextGraphic* = nil)β the constructor, and she takes an optionalTextGraphicthat defines the attributes of the text πvirtual void Interpret(Command*)virtual void Uninterpret(Command*)βTextCompredefines(Un)interpretto ignoreBrushCmdandPatternCmd, and to(un)interpretFontCmd. that's the whole vibe π―TextGraphic* GetText()β returns theTextGraphicthat defines the text component's attributes. lowkey it's just a more specific form of theGetGraphicoperation β¨
π TEXTVIEW PUBLIC OPERATIONS π
TextView(TextComp* = nil)β create aTextView, optionally supplying the subject π«Άvirtual void Interpret(Command*)βTextViewinterpretsAlignToGridCmdto align its lower-left to the grid πvirtual Manipulator* CreateManipulator(Viewer*, Event&, Transformer*, Tool*)virtual void InterpretManipulator(Manipulator*)βTextViewredefines how she responds to manipulation with aGraphicCompTool.GraphicCompToollets the user position and type out the component's text usingTextManipβοΈ and ngl, the positioning of the text will be influenced by gravity, if there is any.TextViewalso defines a response to theReshapeToolso the user can edit the text. heads up though: the subject is actually replaced (viaReplaceCmd) with a brand newTextCompsubject positioned at the originalTextComp's location, but reflecting the edited text π like, new subject, who disTextComp* GetTextComp()β return the subject π
π TEXTVIEW PROTECTED OPERATIONS π
virtual boolean TextChanged()β returns whether the text in the subject is any different from the text in the view π
π TEXTGRAPHIC PUBLIC OPERATIONS π
TextGraphic(const char*, int h, Graphic* = nil)TextGraphic(const char*, Graphic*)β create aTextGraphic, specifying its text, optional inter-line spacing, and an optional graphic from which to obtain default graphics attributes.TextGraphicstores a copy of the given string (behavior she inherits fromLabel, no cap). If inter-line spacing isn't specified, then lines get separated to reflect the font height reported byPSFontπvoid SetLineHeight(int)int GetLineHeight()β explicitly set and get the inter-line spacing β¨virtual boolean operator == (TextGraphic&)virtual boolean operator != (TextGraphic&)β report whether the given graphic contains, or does not contain, an identical copy of the text in this π§
β PSTEXT PUBLIC OPERATIONS β
PSText(TextComp* = nil)β construct a PostScript external representation of the given subject, if there is one π«
π PSTEXT PROTECTED OPERATIONS π
const char* Filter(const char* string, int length)β filters out escaped embedded control characters and other special characters that would cause syntax errors in the PostScript output π«β¨
πΈ SEE ALSO πΈ
FontCmd(3U), GraphicComp(3U), GraphicCompTool(3U), GraphicView(3U), Grid(3U), Label(3U), PostScriptView(3U), ReshapeTool(3U), align(3U), edit(3U), manips(3U), pspaint(3U) π«Ά
and that's the whole page bestie, no notes π go forth and manipulate some text
this iconic lil doc came from Unidraw, dated 23 January 1991 β yes she's vintage, and yes she still ate π mwah, stan a classic ππ
π¦ 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