Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvPrintableText Class Reference

This class encapsulates a text so that it can be printed with this library. More...

#include <ilviews/printing/printables.h>

Inheritance diagram for IlvPrintableText:
IlvPrintable IlvPrintableFormattedText

Public Member Functions

 IlvPrintableText (IlvPalette *palette, IlString const &text, IlvPosition alignment=IlvCenter)
 The constructor. More...
 
 ~IlvPrintableText ()
 The destructor. More...
 
IlvPosition getAlignment () const
 Gets the alignment of the text to be printed. More...
 
virtual IlvRect getBBox (IlvPrintableJob const &job) const
 Gets the bounding box of the area to print. More...
 
IlvPalettegetPalette () const
 Gets the palette used to print the text. More...
 
IlString getText () const
 Gets the text to be printed. More...
 
void setAlignment (IlvPosition alignment)
 Sets the alignment of the text to be printed. More...
 
void setPalette (IlvPalette *palette)
 Sets the palette used to print the text. More...
 
void setText (IlString const &text)
 Sets the text to be printed. More...
 
- Public Member Functions inherited from IlvPrintable
 IlvPrintable ()
 The default constructor.
 
 IlvPrintable (IlvPrintable const &other)
 The copy constructor. More...
 
virtual ~IlvPrintable ()
 The destructor. More...
 
void lock ()
 Locks the current instance. More...
 
IlvPrintableoperator= (IlvPrintable const &other)
 The assignment operator. More...
 
IlBoolean print (IlvPrintableJob const &job) const
 Prints the contents of the object. More...
 
void unlock ()
 Unlocks the current instance. More...
 

Protected Member Functions

virtual IlBoolean internalPrint (IlvPrintableJob const &job) const
 This function actually prints the document. More...
 
void modifyText (IlString const &newText) const
 This function modifies the text to be printed. More...
 

Detailed Description

This class encapsulates a text so that it can be printed with this library.

Library: ilvprint

See also
IlvPrintableDocument::append()

Constructor & Destructor Documentation

IlvPrintableText::IlvPrintableText ( IlvPalette palette,
IlString const &  text,
IlvPosition  alignment = IlvCenter 
)

The constructor.

It locks the palette.

Parameters
paletteThe palette used to print the frame.
textThe text to print.
alignmentThe position of the text.
IlvPrintableText::~IlvPrintableText ( )

The destructor.

It unlocks the palette.

Member Function Documentation

IlvPosition IlvPrintableText::getAlignment ( ) const

Gets the alignment of the text to be printed.

Returns
The alignment of the text to be printed.
virtual IlvRect IlvPrintableText::getBBox ( IlvPrintableJob const &  job) const
virtual

Gets the bounding box of the area to print.

Returns
The bounding box.

Implements IlvPrintable.

Reimplemented in IlvPrintableFormattedText.

IlvPalette* IlvPrintableText::getPalette ( ) const

Gets the palette used to print the text.

Returns
The palette used to print the text.
IlString IlvPrintableText::getText ( ) const

Gets the text to be printed.

Returns
The text to be printed.
virtual IlBoolean IlvPrintableText::internalPrint ( IlvPrintableJob const &  job) const
protectedvirtual

This function actually prints the document.

Parameters
jobThe settings of the current print job.
Returns
IlFalse if an error occurred during the printing, IlTrue otherwise.

Implements IlvPrintable.

Reimplemented in IlvPrintableFormattedText.

void IlvPrintableText::modifyText ( IlString const &  newText) const
protected

This function modifies the text to be printed.

This function is intended to be used by classes such as IlPrintableFormattedText, whose text contains portions to be replaced dynamically during the printing.

Parameters
newTextThe new text.
void IlvPrintableText::setAlignment ( IlvPosition  alignment)

Sets the alignment of the text to be printed.

Parameters
alignmentThe alignment of the text to be printed.
void IlvPrintableText::setPalette ( IlvPalette palette)

Sets the palette used to print the text.

Parameters
paletteThe palette used to print the text.
void IlvPrintableText::setText ( IlString const &  text)

Sets the text to be printed.

Parameters
textThe text to be printed.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.