OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
prevwin.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of TPreviewWin, the Preview Window class
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_PREVWIN_H)
10#define OWL_PREVWIN_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/decframe.h>
18#include <owl/controlb.h>
19#include <owl/printer.h>
20#include <owl/preview.h>
21#include <owl/buttonga.h>
22#include <owl/textgadg.h>
23
24
25namespace owl {
26
27#include <owl/preclass.h>
28
29/// \addtogroup print
30/// @{
31/// \class TPreviewWin
32// ~~~~~ ~~~~~~~~~~~
33/// TPreviewWin encapsulates a simple preview window frame. It contains one or two
34/// preview pages as well as a simple toolbar.
35//
37 public:
40 TPrintout& printout,
44
48 TPrintout& printout,
50 const tstring& title,
52
53 ~TPreviewWin() override;
54
55 protected:
56
57 void Init();
58
59 void SetupWindow() override;
60 virtual void LayoutPages();
61 virtual TPreviewPage* GetNewPreviewPage(TWindow* parent,
62 TPrintout& printout,
65 int pagenum = 1);
66 virtual void SetupSpeedBar();
67 virtual void UpdateSpeedBar();
68
69 int FirstPage; ///< First Page displayed
70 int LastPage; ///< Last Page displayed
71 TWindow& DataWindow; ///< Window /w data we're previewing
72 TPrinter& Printer; ///< Printer device object
73 TPrintout& Printout; ///< Printer document object
74 TPrintDC* PrnDC; ///< Printer DC
75 TSize PrinterPageSize; ///< Printer's page size
76
77 TControlBar* PreviewSpeedBar; ///< Pointer to toolbar object
78 TPreviewPage* Page1; ///< Pointer to first preview page
79 TPreviewPage* Page2; ///< Pointer to second preview page
80
81 private:
82 TLayoutWindow* Client;
83
84 void CmPrevious();
85 void CePrevious(TCommandEnabler& ce);
86 void CmNext();
87 void CeNext(TCommandEnabler& ce);
88 void CmOneUp();
89 void CmTwoUp();
90 void CeTwoUp(TCommandEnabler& ce);
91 void CmDone();
92
94};
95
96/// @}
97
98#include <owl/posclass.h>
99
100
101} // OWL namespace
102
103
104#endif // OWL_PREVWIN_H
Definition of class TButtonGadget.
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
Definition window.h:209
Derived from TGadgetWindow, TControlBar implements a control bar that provides mnemonic access for it...
Definition controlb.h:61
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
Definition decframe.h:74
Derived from TWindow, TLayoutWindow provides functionality for defining the layout metrics for a wind...
Definition layoutwi.h:122
TPreviewPage encapsulates a window which displays print-preview data.
Definition preview.h:44
TPreviewWin encapsulates a simple preview window frame.
Definition prevwin.h:36
TPrinter & Printer
Printer device object.
Definition prevwin.h:72
int FirstPage
First Page displayed.
Definition prevwin.h:69
TPrintDC * PrnDC
Printer DC.
Definition prevwin.h:74
TPreviewPage * Page1
Pointer to first preview page.
Definition prevwin.h:78
TWindow & DataWindow
Window /w data we're previewing.
Definition prevwin.h:71
int LastPage
Last Page displayed.
Definition prevwin.h:70
TPrintout & Printout
Printer document object.
Definition prevwin.h:73
TControlBar * PreviewSpeedBar
Pointer to toolbar object.
Definition prevwin.h:77
TSize PrinterPageSize
Printer's page size.
Definition prevwin.h:75
TPreviewPage * Page2
Pointer to second preview page.
Definition prevwin.h:79
A DC class that provides access to a printer.
Definition dc.h:874
TPrinter is an encapsulation around the Windows printer device interface, and represents the physical...
Definition printer.h:164
TPrintout represents the physical printed document that is to sent to a printer to be printed.
Definition printer.h:76
The tagSIZE struct is defined as.
Definition geometry.h:234
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
Definition of class TControlBar.
Definition of class TDecoratedFrame, a TFrameWindow that can manage decorations around the client win...
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
std::string tstring
Definition defs.h:79
#define _OWLCLASS
Definition defs.h:338
Definition of print preview classes.
Definition of text gadget class TGadget.