OWLNext
7.0
Borland's Object Windows Library for the modern age
Toggle main menu visibility
Loading...
Searching...
No Matches
clipview.h
Go to the documentation of this file.
1
//----------------------------------------------------------------------------
2
// ObjectWindows
3
// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4
//
5
/// \file
6
/// Mixin class TClipboardViewer that allows a TWindow derived class to hook in
7
/// on the clipboard notification chain.
8
//----------------------------------------------------------------------------
9
10
#if !defined(OWL_CLIPVIEW_H)
11
#define OWL_CLIPVIEW_H
12
13
#include <
owl/private/defs.h
>
14
#if defined(BI_HAS_PRAGMA_ONCE)
15
# pragma once
16
#endif
17
18
#include <
owl/window.h
>
19
20
namespace
owl
{
21
22
23
#include <
owl/preclass.h
>
24
25
/// \addtogroup mixin
26
/// @{
27
/// \class TClipboardViewer
28
// ~~~~~ ~~~~~~~~~~~~~~~~
29
/// Mix-in class that registers as a clipboard viewer when the user interface
30
/// element is created and removes itself from the clipboard-viewer chain when
31
/// it is destroyed
32
//
33
class
_OWLCLASS
TClipboardViewer
:
virtual
public
TWindow
{
34
protected
:
35
TClipboardViewer
();
36
TClipboardViewer
(HWND hWnd,
TModule
* module = 0);
37
38
TEventStatus
DoChangeCBChain
(HWND hWndRemoved, HWND hWndNext);
39
TEventStatus
DoDestroy
();
40
TEventStatus
DoDrawClipboard
();
///< pass to next window in clipboard-viewer chain
41
42
// Override method defined by TWindow
43
//
44
void
SetupWindow
()
override
;
45
46
// Message response functions
47
//
48
void
EvChangeCBChain
(HWND hWndRemoved, HWND hWndNext);
49
void
EvDestroy
();
50
void
EvDrawClipboard
();
///< pass to next window in clipboard-viewer chain
51
52
HWND
GetNextWindow
()
const
;
53
void
SetNextWindow
(HWND hwndnext);
54
55
protected_data
:
56
THandle
HWndNext;
///< Next window in clipboard-viewer chain /!CQ 'Next'?
57
58
private
:
59
// Hidden to prevent accidental copying or assignment
60
//
61
TClipboardViewer
(
const
TClipboardViewer
&);
62
TClipboardViewer
& operator =(
const
TClipboardViewer
&);
63
64
DECLARE_RESPONSE_TABLE(
TClipboardViewer
);
65
DECLARE_CASTABLE;
66
};
67
/// @}
68
69
#include <
owl/posclass.h
>
70
71
72
//
73
// Inline implementations
74
//
75
76
//
77
/// Return the next window in the viewer chain.
78
//
79
inline
HWND
TClipboardViewer::GetNextWindow
()
const
{
80
return
HWndNext;
81
}
82
83
//
84
/// Set the next window in the viewer chain.
85
//
86
inline
void
TClipboardViewer::SetNextWindow
(HWND hwndnext) {
87
HWndNext = hwndnext;
88
}
89
90
91
}
// OWL namespace
92
93
94
#endif
// OWL_CLIPVIEW_H
owl::TClipboardViewer::TClipboardViewer
TClipboardViewer()
Constructs a TClipboardViewer object.
Definition
clipview.cpp:32
owl::TClipboardViewer::DoChangeCBChain
TEventStatus DoChangeCBChain(HWND hWndRemoved, HWND hWndNext)
Tests to see if the Clipboard has changed and, if so, DoChangeCBChain forwards this message.
Definition
clipview.cpp:52
owl::TClipboardViewer::SetNextWindow
void SetNextWindow(HWND hwndnext)
Set the next window in the viewer chain.
Definition
clipview.h:86
owl::TClipboardViewer::GetNextWindow
HWND GetNextWindow() const
Return the next window in the viewer chain.
Definition
clipview.h:79
owl::TClipboardViewer::DoDestroy
TEventStatus DoDestroy()
Removes the window from the Clipboard-viewer chain.
Definition
clipview.cpp:77
owl::TClipboardViewer::EvDrawClipboard
void EvDrawClipboard()
pass to next window in clipboard-viewer chain
Definition
clipview.cpp:110
owl::TClipboardViewer::SetupWindow
void SetupWindow() override
Adds a window to the Clipboard-viewer chain.
Definition
clipview.cpp:87
owl::TClipboardViewer::EvDestroy
void EvDestroy()
Responds to a WM_DESTROY message when a window is removed from the Clipboard-viewer chain.
Definition
clipview.cpp:122
owl::TClipboardViewer::EvChangeCBChain
void EvChangeCBChain(HWND hWndRemoved, HWND hWndNext)
Responds to a WM_CHANGECBCHAIN message.
Definition
clipview.cpp:97
owl::TClipboardViewer::DoDrawClipboard
TEventStatus DoDrawClipboard()
pass to next window in clipboard-viewer chain
Definition
clipview.cpp:66
owl::TModule
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition
module.h:78
owl::TWindow::TWindow
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
window.cpp:341
owl::TWindow::THandle
HWND THandle
TWindow encapsulates an HWND.
Definition
window.h:418
owl::TEventStatus
TEventStatus
Mixin window event implementation return status.
Definition
window.h:107
owl
Object Windows Library (OWLNext Core).
Definition
animctrl.h:22
protected_data
#define protected_data
Definition
defs.h:208
defs.h
_OWLCLASS
#define _OWLCLASS
Definition
defs.h:338
posclass.h
preclass.h
window.h
Base window class TWindow definition, including HWND encapsulation.
include
owl
clipview.h
Generated by
1.18.0