OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TRichEditPrintout encapsulates the information to print/preview data from a rich edit control. More...
#include <owl/richedpr.h>
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. | |
TPrintDC * | GetPrintDC () |
Returns the DC associated with the printout. | |
Public Member Functions inherited from owl::TStreamableBase | |
virtual | ~TStreamableBase () |
Protected Attributes | |
TPrinter & | Printer |
Ref. to associated printer. | |
TRichEdit & | RichEdit |
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. | |
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.
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.
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.
owl::TRichEditPrintout::~TRichEditPrintout | ( | ) |
Definition at line 77 of file richedpr.cpp.
References _T, FlushCache, owl::TRichEdit::FormatRange(), owl::TWindow::GetHandle(), RichEdit, and WARN.
|
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.
void owl::TRichEditPrintout::CleanupPrintParams | ( | ) |
|
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.
|
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.
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.
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.
This routine is invoked to request the printout object to print a page.
Reimplemented from owl::TPrintout.
Definition at line 218 of file richedpr.cpp.
References owl::TRichEdit::DisplayBand(), FlushCache, FmtRange, owl::TRichEdit::FormatRange(), owl::TDC::GetDeviceCaps(), PageCount, PageIndices, PRECONDITION, RichEdit, owl::TDC::SetMapMode(), owl::TFormatRange::SetRange(), owl::TDC::SetViewportExt(), owl::TDC::SetWindowExt(), SizePhysInch, and SizePhysPage.
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.
Reimplemented from owl::TPrintout.
Definition at line 123 of file richedpr.cpp.
References owl::TTypedArray< T, R, A >::Add(), FmtRange, owl::TRichEdit::FormatRange(), owl::TDC::GetAttributeHDC(), owl::TDC::GetDeviceCaps(), owl::TDC::GetHDC(), owl::TRichEdit::GetTextLength(), Margins, PageCount, PageIndices, PRECONDITION, RichEdit, owl::TFormatRange::SetPageRect(), owl::TPrintout::SetPrintParams(), owl::TFormatRange::SetRange(), owl::TFormatRange::SetRenderDC(), owl::TFormatRange::SetRenderRect(), owl::TFormatRange::SetTargetDC(), owl::TArrayBase::Size(), SizePhysInch, SizePhysPage, and TextLen.
|
protected |
Have cached formatted data.
Definition at line 131 of file richedpr.h.
|
protected |
Range of text to format.
Definition at line 130 of file richedpr.h.
|
protected |
Size of margins.
Definition at line 129 of file richedpr.h.
|
protected |
Number of pages formatted.
Definition at line 133 of file richedpr.h.
|
protected |
Index of page offsets.
Definition at line 134 of file richedpr.h.
|
protected |
Ref. to associated printer.
Definition at line 125 of file richedpr.h.
|
protected |
Ref. to associated control.
Definition at line 126 of file richedpr.h.
|
protected |
Size of printer in inches.
Definition at line 128 of file richedpr.h.
|
protected |
Physical size of printer (pels)
Definition at line 127 of file richedpr.h.
|
protected |
Length of text formatted.
Definition at line 132 of file richedpr.h.