Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoXtPrintDialog Class Reference

Dialog box for controlling printing. More...

#include <Inventor/Xt/SoXtPrintDialog.h>

+ Inheritance diagram for SoXtPrintDialog:

Public Member Functions

 SoXtPrintDialog (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
 Constructor.
 
 SoXtPrintDialog (SoGLRenderAction *act, SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
 Constructor that takes a render action.
 
 ~SoXtPrintDialog ()
 Destructor.
 
void setSceneGraph (SoPath *path)
 Sets the path to nodes to be used for printing.
 
void setSceneGraph (SoNode *root)
 Sets the root node to be used for printing.
 
SoNodegetSceneGraph ()
 Gets the root node to be used for printing.
 
SoPathgetSceneGraphPath ()
 Gets the path to nodes to be used for printing.
 
void setGLRenderAction (const SoGLRenderAction *act)
 Sets the render action to be used when printing.
 
SoGLRenderActiongetGLRenderAction ()
 Gets the render action to be used when printing.
 
void setPrintSize (const SbVec2f &inches)
 Sets the size of the printed image in inches.
 
void setPrintSize (const SbVec2s &pixels)
 Sets the size of the printed image in pixels.
 
void setBeforePrintCallback (SoXtPrintDialogCB *f, void *userData=NULL)
 Two callbacks are maintained, one which gets called just before a print is executed, and one which gets called after a print is executed.
 
void setAfterPrintCallback (SoXtPrintDialogCB *f, void *userData=NULL)
 Two callbacks are maintained, one which gets called just before a print is executed, and one which gets called after a print is executed.
 
- Public Member Functions inherited from SoXtComponent
virtual void show ()
 This shows the component.
 
virtual void hide ()
 This hides the component.
 
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
SoWidget getWidget () const
 This returns the base widget for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
SoWidget getShellWidget () const
 Returns the shell widget (NULL if the shell hasn't been created by this component).
 
SoWidget getParentWidget () const
 Returns the parent widget, be it a shell or not.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget.
 
SbVec2s getSize ()
 Convenience routine on the widget.
 
SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable () const
 Queries if it is possible to put the viewer in fullscreen mode.
 
Display * getDisplay ()
 Returns the X display associated with this components widget.
 
SoNONUNICODE void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
SbString getTitle () const
 Gets window title.
 
SoNONUNICODE void setIconTitle (const char *newIconTitle)
 Sets icon title.
 
void setIconTitle (const SbString &newIconTitle)
 Sets icon title.
 
SbString getIconTitle () const
 Gets icon title.
 
void setWindowCloseCallback (SoXtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 
SbString getWidgetName () const
 Returns the widget name.
 
SbString getClassName () const
 Returns the class name.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoXtComponent
static void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoXtComponentgetComponent (SoWidget w)
 This returns the SoXtComponent for this widget.
 

Detailed Description

Dialog box for controlling printing.

This class provides an interactive widget for setting available options used in printing with the SoPrintAction and its subclasses. Options include whether to print with hidden lines or not, whether to print using the Landscape format, whether to print to a file or a printer.

RESOURCES

     !!------------------------------------------------
     !! Print Dialog
     !!------------------------------------------------
     *IvPrintDialTitle.labelString: Print Dialog
     *IvPrintDialIconTitle.labelString: Print Dialog
     *IvPrintDialPrinter.labelString: Printer:
     *IvPrintDialPageOut.labelString: Page Output:
     *IvPrintDialToPrinter.labelString: To Printer
     *IvPrintDialToFile.labelString: To File
     *IvPrintDialQuit.labelString: Quit
     *IvPrintDialPrint.labelString: Print
     *IvPrintDialMessage.labelString: Message:
     *IvPrintDialFileFormat.labelString: File Format:
     *IvPrintDialPostScript.labelString: PostScript
     *IvPrintDialRGB.labelString: RGB
     *IvPrintDialPrintQuality.labelString: Print Quality:
     *IvPrintDialHigh.labelString: High
     *IvPrintDialDraft.labelString: Draft
     *IvPrintDialPageFormat.labelString: Page Format
     *IvPrintDialPortrait.labelString: Portrait
     *IvPrintDialLandscape.labelString: Landscape
     *IvPrintDialPrintSize.labelString: Print Size (inches):
     *IvPrintDialFileName.labelString: File Name:
     *IvPrintDialResolution.labelString: Resolution
     *IvPrintDialBy.labelString: by
     *IvPrintDialDpi.labelString: DPI:
     *IvPrintDialMess1.labelString: Printing in progress...
     *IvPrintDialMess2.labelString: ERROR: Empty database.
     *IvPrintDialMess3.labelString: ERROR: Exceeds
     *IvPrintDialMess4.labelString: ERROR: Could not execute print.
     *IvPrintDialMess5.labelString: ERROR: Could not execute print.
     *IvPrintDialMess6.labelString: ERROR: No printer.
     *IvPrintDialMess7.labelString: ERROR: Couldn't open
     *IvPrintDialMess8.labelString: ERROR: No file name.
     *IvPrintDialMess9.labelString: ERROR: Could not open file.
     *IvPrintDialMess10.labelString: ERROR: Could not get data.
     *IvPrintDialMess11.labelString: ERROR: Could not get data.
     *IvPrintDialMess12.labelString: Printing completed.
    

SEE ALSO

SoGLRenderAction, SoXtComponent

Definition at line 139 of file SoXtPrintDialog.h.

Constructor & Destructor Documentation

◆ SoXtPrintDialog() [1/2]

SoXtPrintDialog::SoXtPrintDialog ( SoWidget  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE 
)

Constructor.

◆ SoXtPrintDialog() [2/2]

SoXtPrintDialog::SoXtPrintDialog ( SoGLRenderAction act,
SoWidget  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE 
)

Constructor that takes a render action.

◆ ~SoXtPrintDialog()

SoXtPrintDialog::~SoXtPrintDialog ( )

Destructor.

Member Function Documentation

◆ getGLRenderAction()

SoGLRenderAction * SoXtPrintDialog::getGLRenderAction ( )

Gets the render action to be used when printing.

◆ getSceneGraph()

SoNode * SoXtPrintDialog::getSceneGraph ( )
inline

Gets the root node to be used for printing.

Definition at line 173 of file SoXtPrintDialog.h.

◆ getSceneGraphPath()

SoPath * SoXtPrintDialog::getSceneGraphPath ( )
inline

Gets the path to nodes to be used for printing.

Definition at line 177 of file SoXtPrintDialog.h.

◆ setAfterPrintCallback()

void SoXtPrintDialog::setAfterPrintCallback ( SoXtPrintDialogCB f,
void *  userData = NULL 
)
inline

Two callbacks are maintained, one which gets called just before a print is executed, and one which gets called after a print is executed.

This method sets the after print callback. Set it to NULL to remove the callback.

Definition at line 333 of file SoXtPrintDialog.h.

◆ setBeforePrintCallback()

void SoXtPrintDialog::setBeforePrintCallback ( SoXtPrintDialogCB f,
void *  userData = NULL 
)
inline

Two callbacks are maintained, one which gets called just before a print is executed, and one which gets called after a print is executed.

This method sets the before print callback. Set it to NULL to remove the callback.

Definition at line 324 of file SoXtPrintDialog.h.

◆ setGLRenderAction()

void SoXtPrintDialog::setGLRenderAction ( const SoGLRenderAction act)

Sets the render action to be used when printing.

◆ setPrintSize() [1/2]

void SoXtPrintDialog::setPrintSize ( const SbVec2f inches)

Sets the size of the printed image in inches.

This is typically the same size as the window displaying the scene to be printed.

◆ setPrintSize() [2/2]

void SoXtPrintDialog::setPrintSize ( const SbVec2s pixels)

Sets the size of the printed image in pixels.

This is typically the same size as the window displaying the scene to be printed.

◆ setSceneGraph() [1/2]

void SoXtPrintDialog::setSceneGraph ( SoNode root)

Sets the root node to be used for printing.

◆ setSceneGraph() [2/2]

void SoXtPrintDialog::setSceneGraph ( SoPath path)

Sets the path to nodes to be used for printing.


The documentation for this class was generated from the following file: