10#include <owl/prevwin.rh>
11#include <owl/editfile.rh>
45 PreviewSpeedBar(
nullptr),
152#if defined(BI_MSG_LANGUAGE) && BI_MSG_LANGUAGE == 0x0411
198 data.FromPage > 0 ?
data.FromPage : 1);
295#if BI_MSG_LANGUAGE == 0x0411
326TPreviewWin::CeNext (TCommandEnabler&
ce)
338TPreviewWin::CmPrevious()
377TPreviewWin::CmOneUp ()
398TPreviewWin::CeTwoUp(TCommandEnabler&
ce)
409TPreviewWin::CmTwoUp()
411 if (
Page2 ==
nullptr) {
#define PRECONDITION(condition)
static const TColor SysAppWorkspace
The symbolic system color value for the background of multiple document interface (MDI) applications.
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
Derived from TGadgetWindow, TControlBar implements a control bar that provides mnemonic access for it...
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
@ Top
Refers to top edge of frame.
void SetupWindow() override
Override SetupWindow in order to layout & position decorations Calls TLayoutWindow::Layout to size an...
virtual void Insert(TWindow &decoration, TLocation location=Top)
Insert a decoration window into position at one of the four edges.
@ Recessed
Recessed into the window.
TGadget * GadgetWithId(int id) const
Returns the gadget with a given ID, or 0 if none is found.
void Insert(TGadget &, TPlacement=After, TGadget *sibling=nullptr) override
Inserts a gadget before or after a sibling gadget (TPlacement).
When specifying the layout metrics for a window, four layout constraints are needed.
Derived from TWindow, TLayoutWindow provides functionality for defining the layout metrics for a wind...
virtual void Layout()
Causes the window to resize and position its children according to the specified metrics.
void SetChildLayoutMetrics(TWindow &child, const TLayoutMetrics &metrics)
Sets the metrics for the window and removes any existing ones.
bool RemoveChildLayoutMetrics(const TWindow &child)
Removes child (layout) metrics for a given child (if found) and updates other children as necessary.
TPoint is a support class, derived from tagPOINT.
TPreviewPage encapsulates a window which displays print-preview data.
int GetPageNumber() const
Retrieves the index of the page currently being previewed (painted) on the preview page window.
void SetPageNumber(int newNum)
Sets newNum to the number of the page currently displayed in the preview window.
TPreviewWin encapsulates a simple preview window frame.
TPrinter & Printer
Printer device object.
void SetupWindow() override
Overriden virtual of TWindow to allow preview frame to create the preview page(s).
TPreviewWin(TWindow *parentWindow, TPrinter &printer, TPrintout &printout, TWindow &dataWindow, LPCTSTR title, TLayoutWindow *client)
Destructor of Preview frame window. Performs general cleanup.
TPrintDC * PrnDC
Printer DC.
TPreviewPage * Page1
Pointer to first preview page.
virtual void SetupSpeedBar()
virtual void LayoutPages()
Repositions the preview page(s) using the aspect ratio of the printer when determining the dimensions...
TPrintout & Printout
Printer document object.
virtual TPreviewPage * GetNewPreviewPage(TWindow *parent, TPrintout &printout, TPrintDC &prndc, TSize &printExtent, int pagenum=1)
Returns a pointer to a TPreviewPage object.
TControlBar * PreviewSpeedBar
Pointer to toolbar object.
TSize PrinterPageSize
Printer's page size.
virtual void UpdateSpeedBar()
TPreviewPage * Page2
Pointer to second preview page.
A DC class that provides access to a printer.
TPrintDialog::TData contains information required to initialize the printer dialog box with the user'...
TPrinter is an encapsulation around the Windows printer device interface, and represents the physical...
TSize GetPageSize() const
Returns the size of the page.
virtual void SetPageSizes(const TPrintDC &dc)
Updates the PageSize variables by querying the device capabilities of the specified device context.
TPrintDialog::TData & GetSetup()
Returns a reference to the TPrintDialog data structure.
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.
virtual void GetDialogInfo(int &minPage, int &maxPage, int &selFromPage, int &selToPage)
Retrieves information needed to allow the printing of selected pages of the document and returns true...
TRect is a mathematical class derived from tagRect.
TSeparatorGadget is a simple class you can use to create a separator between gadgets.
The tagSIZE struct is defined as.
Derived from TGadget, TTextGadget is a text gadget object.
@ Left
Aligns the text at the left edge of the bounding rectangle.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
void SetBkgndColor(TColor color, bool shouldUpdate=true)
Sets the background color for the window.
virtual bool Create()
Creates the window interface element to be associated with this ObjectWindows interface element.
TWindow * GetParentO() const
Return the OWL's parent for this window.
void GetClientRect(TRect &rect) const
Gets the coordinates of the window's client area and then copies them into the object referred to by ...
HWND GetHandle() const
Returns the handle of the window.
virtual void CloseWindow(int retVal=0)
Determines if it is okay to close a window before actually closing the window.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
#define lmParent
Use to represent the parent in layout metrics.
@ lmTop
The top edge of the window.
@ lmBottom
The bottom edge of the window.
@ lmRight
The right edge of the window.
@ lmLeft
The left edge of the window.
Object Windows Library (OWLNext Core)
#define TYPESAFE_DOWNCAST(object, toClass)
Definition of TPreviewWin, the Preview Window class.
#define EV_COMMAND_ENABLE(id, method)
Response table entry for enabling a command.
#define EV_COMMAND(id, method)
Response table entry for a menu/accelerator/push button message.