SOXTPRINTDIALOG(3iv)

✨ SoXtPrintDialog ✨

okay bestie, so this is SoXtPrintDialog(3IV) β€” it's a whole manual page, she's giving vintage Inventor energy and honestly? iconic. grab a boba, we're doing this πŸ’–


🌸 NAME 🌸

SoXtPrintDialog β€” a dialog box for controlling printing πŸ–¨οΈβœ¨


πŸ¦‹ INHERITS FROM πŸ¦‹

SoXtComponent > SoXtPrintDialog

so she's a child of SoXtComponent, she inherited the whole bloodline, periodt πŸ‘‘


πŸ’… SYNOPSIS πŸ’…

#include <Inventor/Xt/SoXtPrintDialog.h>
typedef void SoXtPrintDialogCB(void *userData, SoXtPrintDialog *dialog)

Methods from class SoXtPrintDialog:

                     SoXtPrintDialog(Widget parent = NULL, const char *name
                          = NULL, SbBool buildInsideParent = TRUE)
                     ~SoXtPrintDialog()
void                setSceneGraph(SoNode *root )
SoNode *            getSceneGraph()
void                setSceneGraph(SoPath *path )
SoPath *            getSceneGraphPath()
void                setGLRenderAction(const SoGLRenderAction *act)
SoGLRenderAction *  getGLRenderAction()
void                setPrintSize(SbVec2f &inches)
void                setPrintSize(SbVec2s & )
void                setBeforePrintCallback(SoXtPrintDialogCB *f, void
                          *userData = NULL)
void                setAfterPrintCallback(SoXtPrintDialogCB *f, void
                          *userData = NULL)

Methods from class SoXtComponent:

virtual void            show()
virtual void            hide()
SbBool                  isVisible()
Widget                  getWidget() const
SbBool                  isTopLevelShell() const
Widget                  getShellWidget() const
Widget                  getParentWidget() const
void                    setSize(const SbVec2s &size)
SbVec2s                 getSize()
Display *               getDisplay()
void                    setTitle(const char *newTitle)
const char *            getTitle() const
void                    setIconTitle(const char *newIconTitle)
const char *            getIconTitle() const
void                    setWindowCloseCallback(SoXtComponentCB *func, void
                              *data = NULL)
static SoXtComponent *  getComponent(Widget w)
const char *            getWidgetName() const
const char *            getClassName() const

no cap, that's a lot of methods. she's highkey doing the most and we love that for her 🫢


πŸŽ€ DESCRIPTION πŸŽ€

so like, this class hands you an interactive widget for setting all the little options you'd wanna tweak when you're printing stuff with SoPrintAction and its subclasses πŸ’–

the options include:

  • whether to print with hidden lines or not πŸ™ˆ
  • whether to print using the Landscape format πŸŒ„
  • whether to print to a file or to a printer πŸ–¨οΈ

it's giving "one-stop shop for your printing vibe check", fr fr ✨


πŸ’– METHODS πŸ’–

🧚 Constructors & Destructor

                     SoXtPrintDialog(Widget parent = NULL, const char *name
                          = NULL, SbBool buildInsideParent = TRUE)
                     ~SoXtPrintDialog()

yeah so this is just the constructors and the destructor. the birth and the farewell. the main character arc 😭🌸


🌈 Scene Graph Stuff

void                setSceneGraph(SoNode *root )
SoNode *            getSceneGraph()
void                setSceneGraph(SoPath *path )
SoPath *            getSceneGraphPath()

Sets/gets the root node or path to nodes to be used for printing. so basically you're telling her what to print. very "here's the thing, do your magic" energy πŸ’«


⭐ The Render Action

void                setGLRenderAction(const SoGLRenderAction *act)
SoGLRenderAction *  getGLRenderAction()

Sets/gets the render action to be used when printing. the glow-up action, if you will. slay πŸ”₯


void                setPrintSize(SbVec2f &inches)
void                setPrintSize(SbVec2s & )

Sets/gets the size of the printed image. and listen β€” this is typically the same size as the window displaying the scene to be printed. so like, match the vibe of your window, bestie πŸͺŸβœ¨


πŸ‘‘ The Callbacks

void                setBeforePrintCallback(SoXtPrintDialogCB *f, void
                          *userData = NULL)
void                setAfterPrintCallback(SoXtPrintDialogCB *f, void
                          *userData = NULL)

okay so there are two callbacks being maintained here:

  1. one that gets called just before a print is executed πŸƒβ€β™€οΈπŸ’¨
  2. one that gets called after a print is executed βœ…

these two methods set the appropriate callback function β€” and set these to NULL to remove the callback. so if you're over it, just NULL it and walk away, no hard feelings πŸ’…


🌟 SEE ALSO 🌟

  • SoGLRenderAction
  • SoXtComponent

reminder bestie: this whole page is SoXtPrintDialog(3IV) β€” version 3IV, and the original footer didn't ship a date with it, so we're rolling with the vibes only πŸ™ˆ

okay that's the whole page, you ate that, go print something gorgeous πŸ’œπŸ¦‹πŸŒΈβœ¨