OWLNext
7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
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
25
namespace
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
//
36
class
_OWLCLASS
TPreviewWin
:
public
TDecoratedFrame
{
37
public
:
38
TPreviewWin
(
TWindow
*
parentWindow
,
39
TPrinter
&
printer
,
40
TPrintout
& printout,
41
TWindow
&
dataWindow
,
42
LPCTSTR
title
,
43
TLayoutWindow
*
client
);
44
45
TPreviewWin
(
46
TWindow
*
parentWindow
,
47
TPrinter
&
printer
,
48
TPrintout
& printout,
49
TWindow
&
dataWindow
,
50
const
tstring
&
title
,
51
TLayoutWindow
*
client
);
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,
63
TPrintDC
&
prndc
,
64
TSize
&
printExtent
,
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
93
DECLARE_RESPONSE_TABLE
(
TPreviewWin
);
94
};
95
96
/// @}
97
98
#include <
owl/posclass.h
>
99
100
101
}
// OWL namespace
102
103
104
#endif
// OWL_PREVWIN_H
buttonga.h
Definition of class TButtonGadget.
VarType
Definition
safearray.h:14
owl::TCommandEnabler
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
Definition
window.h:209
owl::TControlBar
Derived from TGadgetWindow, TControlBar implements a control bar that provides mnemonic access for it...
Definition
controlb.h:61
owl::TDecoratedFrame
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
Definition
decframe.h:74
owl::TLayoutWindow
Derived from TWindow, TLayoutWindow provides functionality for defining the layout metrics for a wind...
Definition
layoutwi.h:122
owl::TPreviewPage
TPreviewPage encapsulates a window which displays print-preview data.
Definition
preview.h:44
owl::TPreviewWin
TPreviewWin encapsulates a simple preview window frame.
Definition
prevwin.h:36
owl::TPreviewWin::Printer
TPrinter & Printer
Printer device object.
Definition
prevwin.h:72
owl::TPreviewWin::FirstPage
int FirstPage
First Page displayed.
Definition
prevwin.h:69
owl::TPreviewWin::PrnDC
TPrintDC * PrnDC
Printer DC.
Definition
prevwin.h:74
owl::TPreviewWin::Page1
TPreviewPage * Page1
Pointer to first preview page.
Definition
prevwin.h:78
owl::TPreviewWin::DataWindow
TWindow & DataWindow
Window /w data we're previewing.
Definition
prevwin.h:71
owl::TPreviewWin::LastPage
int LastPage
Last Page displayed.
Definition
prevwin.h:70
owl::TPreviewWin::Printout
TPrintout & Printout
Printer document object.
Definition
prevwin.h:73
owl::TPreviewWin::PreviewSpeedBar
TControlBar * PreviewSpeedBar
Pointer to toolbar object.
Definition
prevwin.h:77
owl::TPreviewWin::PrinterPageSize
TSize PrinterPageSize
Printer's page size.
Definition
prevwin.h:75
owl::TPreviewWin::Page2
TPreviewPage * Page2
Pointer to second preview page.
Definition
prevwin.h:79
owl::TPrintDC
A DC class that provides access to a printer.
Definition
dc.h:874
owl::TPrinter
TPrinter is an encapsulation around the Windows printer device interface, and represents the physical...
Definition
printer.h:164
owl::TPrintout
TPrintout represents the physical printed document that is to sent to a printer to be printed.
Definition
printer.h:76
owl::TSize
The tagSIZE struct is defined as.
Definition
geometry.h:234
owl::TWindow
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition
window.h:414
controlb.h
Definition of class TControlBar.
decframe.h
Definition of class TDecoratedFrame, a TFrameWindow that can manage decorations around the client win...
DECLARE_RESPONSE_TABLE
#define DECLARE_RESPONSE_TABLE(cls)
Definition
eventhan.h:436
owl
Object Windows Library (OWLNext Core)
Definition
animctrl.h:22
owl::tstring
std::string tstring
Definition
defs.h:79
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
preview.h
Definition of print preview classes.
printer.h
textgadg.h
Definition of text gadget class TGadget.
include
owl
prevwin.h
Generated by
1.10.0