OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TRichEditPrintout Class Reference

TRichEditPrintout encapsulates the information to print/preview data from a rich edit control. More...

#include <owl/richedpr.h>

Inheritance diagram for owl::TRichEditPrintout:
owl::TPrintout owl::TStreamableBase

Public Member Functions

 TRichEditPrintout (TPrinter &printer, TRichEdit &richEdit, LPCTSTR title)
 Constructs a Printout object which represent a RICHEDIT's document.
 
 TRichEditPrintout (TPrinter &printer, TRichEdit &richEdit, const tstring &title)
 String-aware overload.
 
 ~TRichEditPrintout ()
 
void GetDialogInfo (int &minPage, int &maxPage, int &selFromPage, int &selToPage)
 This method is invoked by the printer or print-preview classes to allow the printout to update the page range information.
 
void SetPrintParams (TPrintDC *dc, TSize pageSize)
 This method is invoked by the printer or print-preview objects to hand the printout object the target device context and the size of its pages.
 
bool HasPage (int pageNumber)
 This routine is invoked to asked the printout object whether it has necessary information to print the specified page.
 
void BeginPrinting ()
 This routine is invoked to inform the printout that a printing operation has started.
 
void PrintPage (int page, TRect &rect, uint flags)
 This routine is invoked to request the printout object to print a page.
 
void EndPrinting ()
 This routine is invoked to inform the printout that the printint operation has ended.
 
void CleanupPrintParams ()
 This is an overriden virtual method of TPrintout.
 
int PageOfOffset (int offset)
 Returns the index of the page at the particular offset within the buffer of an edit control.
 
- Public Member Functions inherited from owl::TPrintout
 TPrintout (LPCTSTR title)
 Constructs an instance of TPrintout with the given title.
 
 TPrintout (const tstring &title)
 Constructs an instance of TPrintout with the given title.
 
virtual ~TPrintout ()
 Place-holder.
 
virtual void BeginDocument (int startPage, int endPage, uint flags)
 The printer object's Print function calls BeginDocument once before printing each copy of a document.
 
virtual void EndDocument ()
 The printer object's Print function calls EndDocument after each copy of the document finishes printing.
 
TSize GetPageSize () const
 Retrieves the size of the page.
 
LPCTSTR GetTitle () const
 Returns the title of the current printout.
 
bool WantBanding () const
 Returns true if banding is desired.
 
void SetBanding (bool banding=true)
 Sets the banding flag for the printout.
 
bool WantForceAllBands () const
 Returns true if the force all bands.
 
void SetForceAllBands (bool force=true)
 Sets the force banding flag.
 
TPrintDCGetPrintDC ()
 Returns the DC associated with the printout.
 
- Public Member Functions inherited from owl::TStreamableBase
virtual ~TStreamableBase ()
 

Protected Attributes

TPrinterPrinter
 Ref. to associated printer.
 
TRichEditRichEdit
 Ref. to associated control.
 
TSize SizePhysPage
 Physical size of printer (pels)
 
TSize SizePhysInch
 Size of printer in inches.
 
TSize Margins
 Size of margins.
 
TFormatRange FmtRange
 Range of text to format.
 
bool FlushCache
 Have cached formatted data.
 
int TextLen
 Length of text formatted.
 
int PageCount
 Number of pages formatted.
 
TIntArray PageIndices
 Index of page offsets.
 

Additional Inherited Members

- Protected Member Functions inherited from owl::TPrintout
void SetTitle (LPCTSTR title)
 Sets a new title for this printout.
 
void SetTitle (const tstring &title)
 Sets a new title for this printout. The passed title string is copied.
 
void SetPrintDC (TPrintDC *dc)
 Sets the associated DC.
 
void SetPageSize (const TSize &pagesize)
 Sets the size of the page.
 

Detailed Description

TRichEditPrintout encapsulates the information to print/preview data from a rich edit control.

For example, it holds the offset of pages, the range of data to be printer/previewed, etc.

Definition at line 85 of file richedpr.h.

Constructor & Destructor Documentation

◆ TRichEditPrintout() [1/2]

owl::TRichEditPrintout::TRichEditPrintout ( TPrinter & printer,
TRichEdit & richEdit,
LPCTSTR title )

Constructs a Printout object which represent a RICHEDIT's document.

Definition at line 28 of file richedpr.cpp.

References owl::TTypedArray< T, R, A >::Add(), PageIndices, PRECONDITION, and RichEdit.

◆ TRichEditPrintout() [2/2]

owl::TRichEditPrintout::TRichEditPrintout ( TPrinter & printer,
TRichEdit & richEdit,
const tstring & title )

String-aware overload.

Definition at line 53 of file richedpr.cpp.

References owl::TTypedArray< T, R, A >::Add(), PageIndices, PRECONDITION, and RichEdit.

◆ ~TRichEditPrintout()

owl::TRichEditPrintout::~TRichEditPrintout ( )

Member Function Documentation

◆ BeginPrinting()

void owl::TRichEditPrintout::BeginPrinting ( )
virtual

This routine is invoked to inform the printout that a printing operation has started.

Reimplemented from owl::TPrintout.

Definition at line 202 of file richedpr.cpp.

◆ CleanupPrintParams()

void owl::TRichEditPrintout::CleanupPrintParams ( )

This is an overriden virtual method of TPrintout.

Todo
There is no such method in TPrintout and there is no implementation of this method anywhere, so it should be removed

◆ EndPrinting()

void owl::TRichEditPrintout::EndPrinting ( )
virtual

This routine is invoked to inform the printout that the printint operation has ended.

Reimplemented from owl::TPrintout.

Definition at line 210 of file richedpr.cpp.

◆ GetDialogInfo()

void owl::TRichEditPrintout::GetDialogInfo ( int & minPage,
int & maxPage,
int & selFromPage,
int & selToPage )
virtual

This method is invoked by the printer or print-preview classes to allow the printout to update the page range information.

Reimplemented from owl::TPrintout.

Definition at line 96 of file richedpr.cpp.

References CHECK, owl::TRichEdit::GetSelection(), PageCount, PageOfOffset(), RichEdit, and TextLen.

◆ HasPage()

bool owl::TRichEditPrintout::HasPage ( int pageNumber)
virtual

This routine is invoked to asked the printout object whether it has necessary information to print the specified page.

Reimplemented from owl::TPrintout.

Definition at line 292 of file richedpr.cpp.

References PageCount.

◆ PageOfOffset()

int owl::TRichEditPrintout::PageOfOffset ( int offset)

Returns the index of the page at the particular offset within the buffer of an edit control.

Definition at line 302 of file richedpr.cpp.

References PageCount, PageIndices, PRECONDITION, and TextLen.

◆ PrintPage()

void owl::TRichEditPrintout::PrintPage ( int page,
TRect & rect,
uint flags )
virtual

◆ SetPrintParams()

Member Data Documentation

◆ FlushCache

bool owl::TRichEditPrintout::FlushCache
protected

Have cached formatted data.

Definition at line 131 of file richedpr.h.

◆ FmtRange

TFormatRange owl::TRichEditPrintout::FmtRange
protected

Range of text to format.

Definition at line 130 of file richedpr.h.

◆ Margins

TSize owl::TRichEditPrintout::Margins
protected

Size of margins.

Definition at line 129 of file richedpr.h.

◆ PageCount

int owl::TRichEditPrintout::PageCount
protected

Number of pages formatted.

Definition at line 133 of file richedpr.h.

◆ PageIndices

TIntArray owl::TRichEditPrintout::PageIndices
protected

Index of page offsets.

Definition at line 134 of file richedpr.h.

◆ Printer

TPrinter& owl::TRichEditPrintout::Printer
protected

Ref. to associated printer.

Definition at line 125 of file richedpr.h.

◆ RichEdit

TRichEdit& owl::TRichEditPrintout::RichEdit
protected

Ref. to associated control.

Definition at line 126 of file richedpr.h.

◆ SizePhysInch

TSize owl::TRichEditPrintout::SizePhysInch
protected

Size of printer in inches.

Definition at line 128 of file richedpr.h.

◆ SizePhysPage

TSize owl::TRichEditPrintout::SizePhysPage
protected

Physical size of printer (pels)

Definition at line 127 of file richedpr.h.

◆ TextLen

int owl::TRichEditPrintout::TextLen
protected

Length of text formatted.

Definition at line 132 of file richedpr.h.


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