17#if defined(__BORLANDC__)
84 WARN(!
ok,
_T(
"TRichEditPrintout::~TRichEditPrintout: Terminating due to failed precondition."));
85 if (!
ok) std::terminate();
345 Printout.SetPrintParams(&
pdc, PrintExtent);
347 if (Printout.HasPage(PageNum)) {
348 Printout.BeginPrinting();
349 Printout.BeginDocument(PageNum, PageNum,
pfBoth);
351 Printout.EndDocument();
352 Printout.EndPrinting();
#define WARN(condition, message)
#define PRECONDITION(condition)
TDC is the root class for GDI DC wrappers.
virtual int GetDeviceCaps(int index) const
Used under WIN3.1 or later, GetDeviceCaps returns capability information about this DC.
virtual int SetMapMode(int mode)
Sets the current window mapping mode of this DC to mode.
virtual HDC GetAttributeHDC() const
Returns the attributes of the DC object.
virtual bool SetWindowExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's window x- and y-extents to the given extent values.
bool PatBlt(int x, int y, int w, int h, uint32 rop=PATCOPY)
virtual bool SetViewportExt(const TSize &extent, TSize *oldExtent=nullptr)
Sets this DC's viewport x- and y-extents to the given extent values.
HDC GetHDC() const
Return the handle of the device context.
Derived from TWindow, TLayoutWindow provides functionality for defining the layout metrics for a wind...
TPreviewDCBase is the base class encapsulating a 'dual' device context - i.e.
TPreviewPage encapsulates a window which displays print-preview data.
TPreviewWin encapsulates a simple preview window frame.
A DC class that provides access to a printer.
TPrinter is an encapsulation around the Windows printer device interface, and represents the physical...
TPrintout represents the physical printed document that is to sent to a printer to be printed.
virtual void SetPrintParams(TPrintDC *dc, TSize pageSize)
SetPrintParams sets DC to dc and PageSize to pageSize.
TRect is a mathematical class derived from tagRect.
TRichEdit encapsulates a rich edit control, a window in which a user can enter, edit and format text.
bool DisplayBand(TRect &)
int FormatRange(const TFormatRange &range, bool render=true)
void GetSelection(int &startPos, int &endPos) const override
Retrieves the starting and ending character position of the selection in the rich edit control.
int GetTextLength() const
TRichEditPagePreview is a window which displays rich edit data formatted for a particular printer DC.
void Paint(TDC &dc, bool, TRect &clip)
WM_PAINT handler of RichEdit PagePreview window.
TRichEditPagePreview(TWindow *parent, TPrintout &printout, TPrintDC &prndc, TSize &printExtent, int pagenum=1)
Constructor of RichEdit PagePreview object.
TRichEditPreviewFrame(TWindow *parentWindow, TPrinter &printer, TPrintout &printout, TRichEdit &richEdit, LPCTSTR title, TLayoutWindow *client)
Constructor of a RichEdit Preview Frame.
TPreviewPage * GetNewPreviewPage(TWindow *parent, TPrintout &printout, TPrintDC &prndc, TSize &printExtent, int pagenum=1)
Returns pointer to a preview page object.
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 pa...
int TextLen
Length of text formatted.
TIntArray PageIndices
Index of page offsets.
TRichEdit & RichEdit
Ref. to associated control.
void PrintPage(int page, TRect &rect, uint flags)
This routine is invoked to request the printout object to print a page.
int PageCount
Number of pages formatted.
void BeginPrinting()
This routine is invoked to inform the printout that a printing operation has started.
TFormatRange FmtRange
Range of text to format.
void SetPrintParams(TPrintDC *dc, TSize pageSize)
This method is invoked by the printer or print-preview objects to hand the printout object the target...
bool FlushCache
Have cached formatted data.
TSize SizePhysInch
Size of printer in inches.
int PageOfOffset(int offset)
Returns the index of the page at the particular offset within the buffer of an edit control.
TSize SizePhysPage
Physical size of printer (pels)
bool HasPage(int pageNumber)
This routine is invoked to asked the printout object whether it has necessary information to print th...
void EndPrinting()
This routine is invoked to inform the printout that the printint operation has ended.
TSize Margins
Size of margins.
TRichEditPrintout(TPrinter &printer, TRichEdit &richEdit, LPCTSTR title)
Constructs a Printout object which represent a RICHEDIT's document.
The tagSIZE struct is defined as.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TRect GetClientRect() const
Gets the coordinates of the window's client area (the area in a window you can use for drawing).
HWND GetHandle() const
Returns the handle of the window.
Definition of class TControl.
Definition of class TEdit.
Definition of class TEditFile, a text edit which can find/replace and read/write from/to a file.
Definition of class TEditSearch, an edit control that responds to Find, Replace and FindNext menu com...
@ pfBoth
Current band accepts both text and graphics.
Object Windows Library (OWLNext Core)
Definition of class TRichEdit.
Definition of classes supporting Printing/PrintPreview for TRichEdit.
Base window class TWindow definition, including HWND encapsulation.