9#if !defined(OWL_PREVIEW_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
142 virtual void ReOrg();
157 TSize * oldExtent=0);
161 TSize * oldExtent=0);
172 TFont* CurrentPreviewFont;
191 return ::DPtoLP(
static_cast<HDC
>(
Handle), points, count);
212 return ::LPtoDP(HDC(
Handle), points, count);
#define PRECONDITION(condition)
Class wrapper for management of color values.
TDC is the root class for GDI DC wrappers.
HANDLE Handle
< make this function available to derivatives
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
TPoint is a support class, derived from tagPOINT.
HDC GetAttributeHDC() const
Overriden to return printer's HDC.
TPrintDC & PrnDC
DC of 'real' device (aka TargetDevice) whose output we're previewing.
TPreviewDCBase(TDC &screen, TPrintDC &printdc)
Constructs a basic Preview DC.
int GetPageNumber() const
Retrieves the index of the page currently being previewed (painted) on the preview page window.
void Paint(TDC &, bool, TRect &) override
Using a TPrintPreviewDC, 'print' the current page (PageNum) of Printout onto the window DC provided.
TPreviewPage(TWindow *parent, TPrintout &printout, TPrintDC &prndc, TSize &printExtent, int pagenum=1)
Constructs a TPreviewPage object where parent is the parent window, printout is a reference to the co...
void EvSize(uint sizeType, const TSize &size)
Invalidates the entire window when the size of the page displayed in the preview window changes.
void SetPageNumber(int newNum)
Sets newNum to the number of the page currently displayed in the preview window.
A DC class that provides access to a printer.
TPrintDC(HDC handle, TAutoDelete autoDelete=NoAutoDelete)
Creates a TPrintDC object for the DC given by handle.
bool SDPtoLP(TPoint *points, int count=1) const
Converts each of the count points in the points array from screen device points to logical points of ...
TColor SetBkColor(const TColor &color)
Sets the current background color of this DC to the given color value or the nearest available.
void RestoreFont()
Restores the original GDI font object to this DC.
bool ScaleWindowExt(int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=0)
Modifies this DC's window extents relative to the current values.
virtual void ReOrg()
Gets the x- and y- extents of the viewport, equalizes the logical and screen points,...
TColor SetTextColor(const TColor &color)
Sets the current text color of this DC to the given color value.
virtual void ReScale()
Maps the points of the printer DC to the screen DC.
bool SetWindowExt(const TSize &extent, TSize *oldExtent=0)
Sets the DC's window x- and y-extents to the given extent values.
bool LPtoSDP(TPoint *points, int count=1) const
Converts each of the count points in the points array from logical points of the printer DC to screen...
void SelectStockObject(int index)
Retrieves a handle to a predefined stock font.
TPrintPreviewDC(TDC &screen, TPrintDC &printdc, const TRect &client, const TRect &clip)
TPrintPreviewDC's constructor takes a screen DC as well as a printer DC.
virtual void SyncFont()
Sets the screen font equal to the current printer font.
bool ScaleViewportExt(int xNum, int xDenom, int yNum, int yDenom, TSize *oldExtent=0)
Modifies this DC's viewport extents relative to the current values.
bool SetViewportOrg(const TPoint &origin, TPoint *oldOrg=0)
Sets the printer DC's viewport origin to the given origin value, and saves the previous origin in old...
bool OffsetViewportOrg(const TPoint &delta, TPoint *oldOrg=0)
Modifies this DC's viewport origin relative to the current values.
int SetMapMode(int mode)
Sets the current window mapping mode of this DC to mode.
int GetDeviceCaps(int index) const
GetDeviceCaps returns capability information, such as font and pitch attributes, about the printer DC...
void SelectObject(const TFont &newFont)
Selects the given font object into this DC.
bool SetViewportExt(const TSize &extent, TSize *oldExtent=0)
Sets the screen's viewport x- and y-extents to the given extent values.
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.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
TWindow(TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
Adds this to the child list of parent if nonzero, and calls EnableAutoCreate so that this will be cre...
Definition of GDI DC encapsulation classes: TDC, TWindowDC, TScreenDC, TDesktopDC,...
Object Windows Library (OWLNext Core).
Base window class TWindow definition, including HWND encapsulation.