OWLNext    7.0
Borland's Object Windows Library for the modern age
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
20namespace 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//
33class _OWLCLASS TClipboardViewer : virtual public TWindow {
34 protected:
36 TClipboardViewer(HWND hWnd, TModule* module = 0);
37
38 TEventStatus DoChangeCBChain(HWND hWndRemoved, HWND hWndNext);
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
56 THandle HWndNext; ///< Next window in clipboard-viewer chain /!CQ 'Next'?
57
58 private:
59 // Hidden to prevent accidental copying or assignment
60 //
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//
80 return HWndNext;
81}
82
83//
84/// Set the next window in the viewer chain.
85//
86inline void TClipboardViewer::SetNextWindow(HWND hwndnext) {
87 HWndNext = hwndnext;
88}
89
90
91} // OWL namespace
92
93
94#endif // OWL_CLIPVIEW_H
TClipboardViewer()
Constructs a TClipboardViewer object.
Definition clipview.cpp:32
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
void SetNextWindow(HWND hwndnext)
Set the next window in the viewer chain.
Definition clipview.h:86
HWND GetNextWindow() const
Return the next window in the viewer chain.
Definition clipview.h:79
TEventStatus DoDestroy()
Removes the window from the Clipboard-viewer chain.
Definition clipview.cpp:77
void EvDrawClipboard()
pass to next window in clipboard-viewer chain
Definition clipview.cpp:110
void SetupWindow() override
Adds a window to the Clipboard-viewer chain.
Definition clipview.cpp:87
void EvDestroy()
Responds to a WM_DESTROY message when a window is removed from the Clipboard-viewer chain.
Definition clipview.cpp:122
void EvChangeCBChain(HWND hWndRemoved, HWND hWndNext)
Responds to a WM_CHANGECBCHAIN message.
Definition clipview.cpp:97
TEventStatus DoDrawClipboard()
pass to next window in clipboard-viewer chain
Definition clipview.cpp:66
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:78
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
HWND THandle
TWindow encapsulates an HWND.
Definition window.h:418
TEventStatus
Mixin window event implementation return status.
Definition window.h:107
Object Windows Library (OWLNext Core).
Definition animctrl.h:22
#define protected_data
Definition defs.h:208
#define _OWLCLASS
Definition defs.h:338
Base window class TWindow definition, including HWND encapsulation.