OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
ocfevent.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4/// \file
5/// Definition of OWL signatures for ObjectComponents messages
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_OCFEVENT_H)
9#define OCF_OCFEVENT_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16#include <owl/eventhan.h>
17#include <ocf/ocapp.h>
18#include <ocf/ocview.h>
19#include <ocf/occtrl.h>
20
21#if defined(OWL5_COMPAT)
22
23namespace ocf {
24
25//----------------------------------------------------------------------------
26// Signatures for ObjectComponents messages
27//
28DECLARE_SIGNATURE1(bool,B_OC_MD_Sig,TOcMenuDescr &)
29DECLARE_SIGNATURE1(bool,B_OC_DD_Sig,TOcDragDrop &)
30DECLARE_SIGNATURE1(bool,B_OC_VSCROLL_Sig,TOcScrollDir)
31DECLARE_SIGNATURE1(bool,B_OC_PCI_Sig,TOcPartChangeInfo&)
32DECLARE_SIGNATURE1(bool,B_OC_VP_Sig,TOcViewPaint &)
33DECLARE_SIGNATURE1(bool,B_OC_VSP_Sig,TOcSaveLoad &)
34DECLARE_SIGNATURE1(bool,B_OC_VCF_Sig,TOcFormatData &)
35DECLARE_SIGNATURE1(bool,B_OC_VTB_Sig,TOcToolBarInfo &)
36DECLARE_SIGNATURE1(bool,B_OC_VSS_Sig,TOcScaleFactor&)
37DECLARE_SIGNATURE1(bool,B_OC_PS_Sig,TOcPartSize &)
38DECLARE_SIGNATURE1(bool,B_OC_IT_Sig,TOcItemName&)
39DECLARE_SIGNATURE1(bool,B_OC_SL_Sig,TOcLinkView&)
40DECLARE_SIGNATURE1(bool,B_OC_PA_Sig,TOcPart&)
41DECLARE_SIGNATURE1(bool,B_OC_PO_Sig,TOcInitInfo&)
42DECLARE_SIGNATURE1(bool,B_OC_PI32_Sig,owl::int32*)
43DECLARE_SIGNATURE1(bool,B_OC_PI16_Sig,owl::int16*)
44DECLARE_SIGNATURE1(bool,B_OC_I16_Sig,owl::int16)
45DECLARE_SIGNATURE1(bool,B_OC_PB_Sig,bool*)
46DECLARE_SIGNATURE1(bool,B_OC_PPTS_Sig,owl::TString**)
47DECLARE_SIGNATURE1(bool,B_OC_PPID_Sig,IDispatch **)
48DECLARE_SIGNATURE1(bool,B_OC_PTS_Sig,owl::TString*)
49DECLARE_SIGNATURE1(bool,B_OC_PID_Sig,IDispatch*)
50DECLARE_SIGNATURE1(bool,B_U_Sig,owl::uint)
51
52// Signature templates used to validate OCX-events handlers
53//
54DECLARE_SIGNATURE1(bool,B_OC_PE_Sig,TCtrlEvent*)
55DECLARE_SIGNATURE1(bool,B_OC_PME_Sig,TCtrlMouseEvent*)
56DECLARE_SIGNATURE1(bool,B_OC_PKE_Sig,TCtrlKeyEvent*)
57DECLARE_SIGNATURE1(bool,B_OC_PFE_Sig,TCtrlFocusEvent*)
58DECLARE_SIGNATURE1(bool,B_OC_PPE_Sig,TCtrlPropertyEvent*)
59DECLARE_SIGNATURE1(bool,B_OC_PCE_Sig,TCtrlCustomEvent*)
60DECLARE_SIGNATURE1(bool,B_OC_PEE_Sig,TCtrlErrorEvent*)
61
62} // OCF namespace
63
64#endif
65
66//----------------------------------------------------------------------------
67// Dispatchers for the WM_OCEVENT message and individual events
68//
69
70namespace owl
71{
72
73//
74// Dispatch specialization for the WM_OCEVENT message
75//
76template <>
78{
79 //
80 // Raw message dispatch
81 // Takes the event as a 'uint' and the event argument as a TParam2. Returns a TResult.
82 //
83 template <class F>
84 static TResult Encode(F sendMessage, HWND wnd, uint eventId, TParam2 p2)
85 {return sendMessage(wnd, WM_OCEVENT, eventId, p2);}
86
87 template <class T, TResult (T::*M)(uint eventId, TParam2)>
88 static TResult Decode(void* i, TParam1 p1, TParam2 p2)
89 {return (static_cast<T*>(i)->*M)(static_cast<uint>(p1), p2);}
90
91 //
92 // Base class template for WM_OCEVENT events
93 // Event handlers take a single parameter of the given type and return a boolean result.
94 //
95 template <owl::uint NotificationCode, typename TParamType>
96 struct TNotificationDispatchBase
97 {
98 template <class F>
99 static bool Encode(F sendMessage, HWND wnd, TParamType p)
100 {return sendMessage(wnd, WM_OCEVENT, NotificationCode, static_cast<TParam2>(p)) == TRUE;}
101
102 template <class T, bool (T::*M)(TParamType p)>
103 static TResult Decode(void* i, TParam1, TParam2 p2)
104 {return (static_cast<T*>(i)->*M)(static_cast<TParamType>(p2)) ? TRUE : FALSE;}
105 };
106
107 //
108 // Specialization for pointer parameter
109 //
110 template <owl::uint NotificationCode, typename TParamType>
111 struct TNotificationDispatchBase<NotificationCode, TParamType*>
112 {
113 template <class F>
114 static bool Encode(F sendMessage, HWND wnd, TParamType* p)
115 {return sendMessage(wnd, WM_OCEVENT, NotificationCode, reinterpret_cast<TParam2>(p)) == TRUE;}
116
117 template <class T, bool (T::*M)(TParamType* p)>
118 static TResult Decode(void* i, TParam1, TParam2 p2)
119 {return (static_cast<T*>(i)->*M)(reinterpret_cast<TParamType*>(p2)) ? TRUE : FALSE;}
120 };
121
122 //
123 // Specialization for reference parameter
124 // Guards against creating null-references. If a null pointer is passed in `TParam2`, then the
125 // decoder does not forward the message, but instead returns FALSE.
126 //
127 template <owl::uint NotificationCode, typename TParamType>
128 struct TNotificationDispatchBase<NotificationCode, TParamType&>
129 {
130 template <class F>
131 static bool Encode(F sendMessage, HWND wnd, TParamType& p)
132 {return sendMessage(wnd, WM_OCEVENT, NotificationCode, reinterpret_cast<TParam2>(&p)) == TRUE;}
133
134 template <class T, bool (T::*M)(TParamType& p)>
135 static TResult Decode(void* i, TParam1, TParam2 p2)
136 {
137 PRECONDITION(p2);
138 return (p2 != 0 && (static_cast<T*>(i)->*M)(*reinterpret_cast<TParamType*>(p2))) ? TRUE : FALSE;
139 }
140 };
141
142 //
143 // Specialization for no (void) parameter
144 //
145 template <owl::uint NotificationCode>
146 struct TNotificationDispatchBase<NotificationCode, void>
147 {
148 template <class F>
149 static bool Encode(F sendMessage, HWND wnd)
150 {return sendMessage(wnd, WM_OCEVENT, NotificationCode, 0) == TRUE;}
151
152 template <class T, bool (T::*M)()>
153 static TResult Decode(void* i, TParam1, TParam2)
154 {return (static_cast<T*>(i)->*M)() ? TRUE : FALSE;}
155 };
156
157 //
158 // Dispatch template for WM_OCEVENT events
159 //
160 template <owl::uint NotificationCode>
161 struct TNotificationDispatch;
162
163};
164
165template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPINSMENUS> : TNotificationDispatchBase<OC_APPINSMENUS, ocf::TOcMenuDescr&> {};
166template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPMENUS> : TNotificationDispatchBase<OC_APPMENUS, ocf::TOcMenuDescr&> {};
167template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPPROCESSMSG> : TNotificationDispatchBase<OC_APPPROCESSMSG, MSG*> {}; // B_MSG_Sig
168template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPFRAMERECT> : TNotificationDispatchBase<OC_APPMENUS, TRect*> {}; // B_RECT_Sig
169template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPBORDERSPACEREQ> : TNotificationDispatchBase<OC_APPMENUS, TRect*> {}; // B_RECT_Sig
170template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPBORDERSPACESET> : TNotificationDispatchBase<OC_APPMENUS, TRect*> {}; // B_RECT_Sig
171
172template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPSTATUSTEXT> // v_CS_Sig
173{
174 template <class F>
175 static void Encode(F sendMessage, HWND wnd, LPCTSTR statusText)
176 {sendMessage(wnd, WM_OCEVENT, OC_APPSTATUSTEXT, reinterpret_cast<TParam2>(statusText));}
177
178 template <class T, void (T::*M)(LPCTSTR statusText)>
179 static TResult Decode(void* i, TParam1, TParam2 p2)
180 {return (static_cast<T*>(i)->*M)(reinterpret_cast<LPCTSTR>(p2)), 0;}
181};
182
183template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPRESTOREUI> // v_Sig
184{
185 template <class F>
186 static void Encode(F sendMessage, HWND wnd)
187 {sendMessage(wnd, WM_OCEVENT, OC_APPRESTOREUI, 0);}
188
189 template <class T, void (T::*M)()>
190 static TResult Decode(void* i, TParam1, TParam2)
191 {return (static_cast<T*>(i)->*M)(), 0;}
192};
193
194template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPDIALOGHELP>
195{
196 template <class F>
197 static void Encode(F sendMessage, HWND wnd, ocf::TOcDialogHelp& p)
198 {sendMessage(wnd, WM_OCEVENT, OC_APPDIALOGHELP, reinterpret_cast<TParam2>(&p));}
199
200 template <class T, void (T::*M)(ocf::TOcDialogHelp& p)>
201 static TResult Decode(void* i, TParam1, TParam2 p2)
202 {
203 PRECONDITION(p2);
204 return p2 != 0 ? ((static_cast<T*>(i)->*M)(*reinterpret_cast<ocf::TOcDialogHelp*>(p2)), 0) : 0;
205 }
206};
207
208template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_APPSHUTDOWN> // B_Sig
209: TNotificationDispatchBase<OC_APPSHUTDOWN, void>
210{};
211
212template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWTITLE> // CS_Sig
213{
214 template <class F>
215 static LPCTSTR Encode(F sendMessage, HWND wnd)
216 {return reinterpret_cast<LPCTSTR>(sendMessage(wnd, WM_OCEVENT, OC_VIEWTITLE, 0));}
217
218 template <class T, LPCTSTR (T::*M)()>
219 static TResult Decode(void* i, TParam1, TParam2)
220 {return reinterpret_cast<TResult>((static_cast<T*>(i)->*M)());}
221};
222
223template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSETTITLE> // v_CS_Sig
224{
225 template <class F>
226 static void Encode(F sendMessage, HWND wnd, LPCTSTR title)
227 {sendMessage(wnd, WM_OCEVENT, OC_VIEWSETTITLE, reinterpret_cast<TParam2>(title));}
228
229 template <class T, void (T::*M)(LPCTSTR title)>
230 static TResult Decode(void* i, TParam1, TParam2 p2)
231 {return (static_cast<T*>(i)->*M)(reinterpret_cast<LPCTSTR>(p2)), 0;}
232};
233
234template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWBORDERSPACEREQ> : TNotificationDispatchBase<OC_VIEWBORDERSPACEREQ, TRect*> {}; // B_RECT_Sig
235template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWBORDERSPACESET> : TNotificationDispatchBase<OC_VIEWBORDERSPACESET, TRect*> {}; // B_RECT_Sig
236template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWDROP> : TNotificationDispatchBase<OC_VIEWDROP, ocf::TOcDragDrop&> {};
237template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWDRAG> : TNotificationDispatchBase<OC_VIEWDRAG, ocf::TOcDragDrop&> {};
238template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSCROLL> : TNotificationDispatchBase<OC_VIEWSCROLL, ocf::TOcScrollDir> {};
239template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWPARTINVALID> : TNotificationDispatchBase<OC_VIEWPARTINVALID, ocf::TOcPartChangeInfo&> {};
240template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWPAINT> : TNotificationDispatchBase<OC_VIEWPAINT, ocf::TOcViewPaint&> {};
241template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWLOADPART> : TNotificationDispatchBase<OC_VIEWLOADPART, ocf::TOcSaveLoad&> {};
242template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSAVEPART> : TNotificationDispatchBase<OC_VIEWSAVEPART, ocf::TOcSaveLoad&> {};
243template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWCLOSE> : TNotificationDispatchBase<OC_VIEWCLOSE, void> {}; // B_Sig
244template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWINSMENUS> : TNotificationDispatchBase<OC_VIEWINSMENUS, ocf::TOcMenuDescr&> {};
245template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSHOWTOOLS> : TNotificationDispatchBase<OC_VIEWSHOWTOOLS, ocf::TOcToolBarInfo&> {};
246template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWGETPALETTE> : TNotificationDispatchBase<OC_VIEWGETPALETTE, LOGPALETTE**> {}; // B_PPALETTE_Sig
247template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWCLIPDATA> : TNotificationDispatchBase<OC_VIEWCLIPDATA, ocf::TOcFormatData&> {};
248template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSETDATA> : TNotificationDispatchBase<OC_VIEWSETDATA, ocf::TOcFormatData&> {};
249template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWPARTSIZE> : TNotificationDispatchBase<OC_VIEWPARTSIZE, ocf::TOcPartSize&> {};
250template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWOPENDOC> : TNotificationDispatchBase<OC_VIEWOPENDOC, LPCTSTR> {}; // B_CS_Sig
251template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWATTACHWINDOW> : TNotificationDispatchBase<OC_VIEWATTACHWINDOW, bool> {}; // B_B_Sig
252template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSETSCALE> : TNotificationDispatchBase<OC_VIEWSETSCALE, ocf::TOcScaleFactor&> {};
253template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWGETSCALE> : TNotificationDispatchBase<OC_VIEWGETSCALE, ocf::TOcScaleFactor&> {};
254template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWGETSITERECT> : TNotificationDispatchBase<OC_VIEWGETSITERECT, TRect*> {}; // B_RECT_Sig
255template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSETSITERECT> : TNotificationDispatchBase<OC_VIEWSETSITERECT, TRect*> {}; // B_RECT_Sig
256template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWGETITEMNAME> : TNotificationDispatchBase<OC_VIEWGETITEMNAME, ocf::TOcItemName&> {};
257template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWSETLINK> : TNotificationDispatchBase<OC_VIEWSETLINK, ocf::TOcLinkView&> {};
258template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWBREAKLINK> : TNotificationDispatchBase<OC_VIEWBREAKLINK, ocf::TOcLinkView&> {};
259template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWPARTACTIVATE> : TNotificationDispatchBase<OC_VIEWPARTACTIVATE, ocf::TOcPart&> {};
260template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWPASTEOBJECT> : TNotificationDispatchBase<OC_VIEWPASTEOBJECT, ocf::TOcInitInfo&> {};
261template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_VIEWDOVERB> : TNotificationDispatchBase<OC_VIEWDOVERB, uint> {}; // B_U_Sig
262
263template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETBACKCOLOR> : TNotificationDispatchBase<OC_AMBIENT_GETBACKCOLOR, int32*> {}; // B_OC_PI32_Sig
264template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETFORECOLOR> : TNotificationDispatchBase<OC_AMBIENT_GETFORECOLOR, int32*> {}; // B_OC_PI32_Sig
265template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETLOCALEID> : TNotificationDispatchBase<OC_AMBIENT_GETLOCALEID, int32*> {}; // B_OC_PI32_Sig
266template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETTEXTALIGN> : TNotificationDispatchBase<OC_AMBIENT_GETTEXTALIGN, int16*> {}; // B_OC_PI16_Sig
267template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETMESSAGEREFLECT> : TNotificationDispatchBase<OC_AMBIENT_GETMESSAGEREFLECT, bool*> {}; // B_OC_PB_Sig
268template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETUSERMODE> : TNotificationDispatchBase<OC_AMBIENT_GETUSERMODE, bool*> {}; // B_OC_PB_Sig
269template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETUIDEAD> : TNotificationDispatchBase<OC_AMBIENT_GETUIDEAD, bool*> {}; // B_OC_PB_Sig
270template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETSHOWGRABHANDLES> : TNotificationDispatchBase<OC_AMBIENT_GETSHOWGRABHANDLES, bool*> {}; // B_OC_PB_Sig
271template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETSHOWHATCHING> : TNotificationDispatchBase<OC_AMBIENT_GETSHOWHATCHING, bool*> {}; // B_OC_PB_Sig
272template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETSUPPORTSMNEMONICS> : TNotificationDispatchBase<OC_AMBIENT_GETSUPPORTSMNEMONICS, bool*> {}; // B_OC_PB_Sig
273template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETDISPLAYASDEFAULT> : TNotificationDispatchBase<OC_AMBIENT_GETDISPLAYASDEFAULT, bool*> {}; // B_OC_PB_Sig
274template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETDISPLAYNAME> : TNotificationDispatchBase<OC_AMBIENT_GETDISPLAYNAME, TString**> {}; // B_OC_PPTS_Sig
275template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETSCALEUNITS> : TNotificationDispatchBase<OC_AMBIENT_GETSCALEUNITS, TString**> {}; // B_OC_PPTS_Sig
276template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_GETFONT> : TNotificationDispatchBase<OC_AMBIENT_GETFONT, IDispatch**> {}; // B_OC_PPID_Sig
277
278template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETBACKCOLOR> : TNotificationDispatchBase<OC_AMBIENT_SETBACKCOLOR, int32> {}; // B_I32_Sig
279template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETFORECOLOR> : TNotificationDispatchBase<OC_AMBIENT_SETFORECOLOR, int32> {}; // B_I32_Sig
280template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETLOCALEID> : TNotificationDispatchBase<OC_AMBIENT_SETLOCALEID, int32> {}; // B_I32_Sig
281template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETTEXTALIGN> : TNotificationDispatchBase<OC_AMBIENT_SETTEXTALIGN, int16> {}; // B_OC_I16_Sig
282template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETMESSAGEREFLECT> : TNotificationDispatchBase<OC_AMBIENT_SETMESSAGEREFLECT, bool> {}; // B_B_Sig
283template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETUSERMODE> : TNotificationDispatchBase<OC_AMBIENT_SETUSERMODE, bool> {}; // B_B_Sig
284template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETUIDEAD> : TNotificationDispatchBase<OC_AMBIENT_SETUIDEAD, bool> {}; // B_B_Sig
285template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETSHOWGRABHANDLES> : TNotificationDispatchBase<OC_AMBIENT_SETSHOWGRABHANDLES, bool> {}; // B_B_Sig
286template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETSHOWHATCHING> : TNotificationDispatchBase<OC_AMBIENT_SETSHOWHATCHING, bool> {}; // B_B_Sig
287template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETDISPLAYASDEFAULT> : TNotificationDispatchBase<OC_AMBIENT_SETDISPLAYASDEFAULT, bool> {}; // B_B_Sig
288template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETSUPPORTSMNEMONICS> : TNotificationDispatchBase<OC_AMBIENT_SETSUPPORTSMNEMONICS, bool> {}; // B_B_Sig
289template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETDISPLAYNAME> : TNotificationDispatchBase<OC_AMBIENT_SETDISPLAYNAME, TString*> {}; // B_OC_PTS_Sig
290template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETSCALEUNITS> : TNotificationDispatchBase<OC_AMBIENT_SETSCALEUNITS, TString*> {}; // B_OC_PTS_Sig
291template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_AMBIENT_SETFONT> : TNotificationDispatchBase<OC_AMBIENT_SETFONT, IDispatch*> {}; // B_OC_PID_Sig
292
293template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_CLICK> : TNotificationDispatchBase<OC_CTRLEVENT_CLICK, ocf::TCtrlEvent*> {};
294template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_DBLCLICK> : TNotificationDispatchBase<OC_CTRLEVENT_DBLCLICK, ocf::TCtrlEvent*> {};
295template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_MOUSEDOWN> : TNotificationDispatchBase<OC_CTRLEVENT_MOUSEDOWN, ocf::TCtrlMouseEvent*> {};
296template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_MOUSEUP> : TNotificationDispatchBase<OC_CTRLEVENT_MOUSEUP, ocf::TCtrlMouseEvent*> {};
297template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_MOUSEMOVE> : TNotificationDispatchBase<OC_CTRLEVENT_MOUSEMOVE, ocf::TCtrlMouseEvent*> {};
298template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_KEYDOWN> : TNotificationDispatchBase<OC_CTRLEVENT_KEYDOWN, ocf::TCtrlKeyEvent*> {};
299template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_KEYUP> : TNotificationDispatchBase<OC_CTRLEVENT_KEYUP, ocf::TCtrlKeyEvent*> {};
300template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_ERROREVENT> : TNotificationDispatchBase<OC_CTRLEVENT_ERROREVENT, ocf::TCtrlErrorEvent*> {};
301template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_FOCUS> : TNotificationDispatchBase<OC_CTRLEVENT_FOCUS, ocf::TCtrlFocusEvent*> {};
302template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_PROPERTYCHANGE> : TNotificationDispatchBase<OC_CTRLEVENT_PROPERTYCHANGE, ocf::TCtrlPropertyEvent*> {};
303template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_PROPERTYREQUESTEDIT> : TNotificationDispatchBase<OC_CTRLEVENT_PROPERTYREQUESTEDIT, ocf::TCtrlPropertyEvent*> {};
304template <> struct TDispatch<WM_OCEVENT>::TNotificationDispatch<OC_CTRLEVENT_CUSTOMEVENT> : TNotificationDispatchBase<OC_CTRLEVENT_CUSTOMEVENT, ocf::TCtrlCustomEvent*> {};
305
306} // namespace
307
308//----------------------------------------------------------------------------
309// Event response table macros for ObjectConnections events
310//
311
312//
313// Internal response table entry macro for OCF events
314// Looks up the dispatcher (decoder) in owl::TDispatch<WM_OCEVENT>::TNotificationDispatch.
315//
316#define OCF_EV_(notificationCode, method)\
317 {{WM_OCEVENT}, notificationCode,\
318 OWL_DISPATCH(::owl::TDispatch<WM_OCEVENT>::TNotificationDispatch<notificationCode>::Decode, method)}
319
320//
321// Raw OC compound document family event
322//
323#define EV_OCEVENT(id, method) OWL_ID_EV_(WM_OCEVENT, id, method)
324
325//
326// App and app frame window events
327//
328#define EV_OC_APPINSMENUS OCF_EV_(OC_APPINSMENUS, EvOcAppInsMenus) // B_OC_MD_Sig
329#define EV_OC_APPMENUS OCF_EV_(OC_APPMENUS, EvOcAppMenus) // B_OC_MD_Sig
330#define EV_OC_APPPROCESSMSG OCF_EV_(OC_APPPROCESSMSG, EvOcAppProcessMsg) // B_MSG_Sig
331#define EV_OC_APPFRAMERECT OCF_EV_(OC_APPFRAMERECT, EvOcAppFrameRect) // B_RECT_Sig
332#define EV_OC_APPBORDERSPACEREQ OCF_EV_(OC_APPBORDERSPACEREQ, EvOcAppBorderSpaceReq) // B_RECT_Sig
333#define EV_OC_APPBORDERSPACESET OCF_EV_(OC_APPBORDERSPACESET, EvOcAppBorderSpaceSet) // B_RECT_Sig
334#define EV_OC_APPSTATUSTEXT OCF_EV_(OC_APPSTATUSTEXT, EvOcAppStatusText) // v_CS_Sig
335#define EV_OC_APPRESTOREUI OCF_EV_(OC_APPRESTOREUI, EvOcAppRestoreUI) // v_Sig
336#define EV_OC_APPDIALOGHELP OCF_EV_(OC_APPDIALOGHELP, EvOcAppDialogHelp) // v_OC_AH_Sig
337#define EV_OC_APPSHUTDOWN OCF_EV_(OC_APPSHUTDOWN, EvOcAppShutdown) // B_Sig
338
339//
340// View events
341//
342#define EV_OC_VIEWTITLE OCF_EV_(OC_VIEWTITLE, EvOcViewTitle) // CS_Sig
343#define EV_OC_VIEWSETTITLE OCF_EV_(OC_VIEWSETTITLE, EvOcViewSetTitle) // v_CS_Sig
344#define EV_OC_VIEWBORDERSPACEREQ OCF_EV_(OC_VIEWBORDERSPACEREQ, EvOcViewBorderSpaceReq) // B_RECT_Sig
345#define EV_OC_VIEWBORDERSPACESET OCF_EV_(OC_VIEWBORDERSPACESET, EvOcViewBorderSpaceSet) // B_RECT_Sig
346#define EV_OC_VIEWDROP OCF_EV_(OC_VIEWDROP, EvOcViewDrop) // B_OC_DD_Sig
347#define EV_OC_VIEWDRAG OCF_EV_(OC_VIEWDRAG, EvOcViewDrag) // B_OC_DD_Sig
348#define EV_OC_VIEWSCROLL OCF_EV_(OC_VIEWSCROLL, EvOcViewScroll) // B_OC_VSCROLL_Sig
349#define EV_OC_VIEWPARTINVALID OCF_EV_(OC_VIEWPARTINVALID, EvOcViewPartInvalid) // B_OC_PCI_Sig
350#define EV_OC_VIEWPAINT OCF_EV_(OC_VIEWPAINT, EvOcViewPaint) // B_OC_VP_Sig
351#define EV_OC_VIEWLOADPART OCF_EV_(OC_VIEWLOADPART, EvOcViewLoadPart) // B_OC_VSP_Sig
352#define EV_OC_VIEWSAVEPART OCF_EV_(OC_VIEWSAVEPART, EvOcViewSavePart) // B_OC_VSP_Sig
353#define EV_OC_VIEWCLOSE OCF_EV_(OC_VIEWCLOSE, EvOcViewClose) // B_Sig
354#define EV_OC_VIEWINSMENUS OCF_EV_(OC_VIEWINSMENUS, EvOcViewInsMenus) // B_OC_MD_Sig
355#define EV_OC_VIEWSHOWTOOLS OCF_EV_(OC_VIEWSHOWTOOLS, EvOcViewShowTools) // B_OC_VTB_Sig
356#define EV_OC_VIEWGETPALETTE OCF_EV_(OC_VIEWGETPALETTE, EvOcViewGetPalette) // B_PPALETTE_Sig
357#define EV_OC_VIEWCLIPDATA OCF_EV_(OC_VIEWCLIPDATA, EvOcViewClipData) // B_OC_VCF_Sig
358#define EV_OC_VIEWSETDATA OCF_EV_(OC_VIEWSETDATA, EvOcViewSetData) // B_OC_VCF_Sig
359#define EV_OC_VIEWPARTSIZE OCF_EV_(OC_VIEWPARTSIZE, EvOcViewPartSize) // B_OC_PS_Sig
360#define EV_OC_VIEWOPENDOC OCF_EV_(OC_VIEWOPENDOC, EvOcViewOpenDoc) // B_CS_Sig
361#define EV_OC_VIEWATTACHWINDOW OCF_EV_(OC_VIEWATTACHWINDOW, EvOcViewAttachWindow) // B_B_Sig
362#define EV_OC_VIEWSETSCALE OCF_EV_(OC_VIEWSETSCALE, EvOcViewSetScale) // B_OC_VSS_Sig
363#define EV_OC_VIEWGETSCALE OCF_EV_(OC_VIEWGETSCALE, EvOcViewGetScale) // B_OC_VSS_Sig
364#define EV_OC_VIEWGETSITERECT OCF_EV_(OC_VIEWGETSITERECT, EvOcViewGetSiteRect) // B_RECT_Sig
365#define EV_OC_VIEWSETSITERECT OCF_EV_(OC_VIEWSETSITERECT, EvOcViewSetSiteRect) // B_RECT_Sig
366#define EV_OC_VIEWGETITEMNAME OCF_EV_(OC_VIEWGETITEMNAME, EvOcViewGetItemName) // B_OC_IT_Sig
367#define EV_OC_VIEWSETLINK OCF_EV_(OC_VIEWSETLINK, EvOcViewSetLink) // B_OC_SL_Sig
368#define EV_OC_VIEWBREAKLINK OCF_EV_(OC_VIEWBREAKLINK, EvOcViewBreakLink) // B_OC_SL_Sig
369#define EV_OC_VIEWPARTACTIVATE OCF_EV_(OC_VIEWPARTACTIVATE, EvOcViewPartActivate) // B_OC_PA_Sig
370#define EV_OC_VIEWPASTEOBJECT OCF_EV_(OC_VIEWPASTEOBJECT, EvOcViewPasteObject) // B_OC_PO_Sig
371#define EV_OC_VIEWDOVERB OCF_EV_(OC_VIEWDOVERB, EvOcViewDoVerb) // B_U_Sig
372
373//
374// OCX container
375//
376
377//
378// Standard Ambient properties - query
379//
380#define EV_OC_AMBIENT_GETBACKCOLOR OCF_EV_(OC_AMBIENT_GETBACKCOLOR, EvOcAmbientGetBackColor) // B_OC_PI32_Sig
381#define EV_OC_AMBIENT_GETFORECOLOR OCF_EV_(OC_AMBIENT_GETFORECOLOR, EvOcAmbientGetForeColor) // B_OC_PI32_Sig
382#define EV_OC_AMBIENT_GETLOCALEID OCF_EV_(OC_AMBIENT_GETLOCALEID, EvOcAmbientGetLocaleID) // B_OC_PI32_Sig
383#define EV_OC_AMBIENT_GETTEXTALIGN OCF_EV_(OC_AMBIENT_GETTEXTALIGN, EvOcAmbientGetTextAlign) // B_OC_PI16_Sig
384#define EV_OC_AMBIENT_GETMESSAGEREFLECT OCF_EV_(OC_AMBIENT_GETMESSAGEREFLECT, EvOcAmbientGetMessageReflect) // B_OC_PB_Sig
385#define EV_OC_AMBIENT_GETUSERMODE OCF_EV_(OC_AMBIENT_GETUSERMODE, EvOcAmbientGetUserMode) // B_OC_PB_Sig
386#define EV_OC_AMBIENT_GETUIDEAD OCF_EV_(OC_AMBIENT_GETUIDEAD, EvOcAmbientGetUIDead) // B_OC_PB_Sig
387#define EV_OC_AMBIENT_GETSHOWGRABHANDLES OCF_EV_(OC_AMBIENT_GETSHOWGRABHANDLES, EvOcAmbientGetShowGrabHandles) // B_OC_PB_Sig
388#define EV_OC_AMBIENT_GETSHOWHATCHING OCF_EV_(OC_AMBIENT_GETSHOWHATCHING, EvOcAmbientGetShowHatching) // B_OC_PB_Sig
389#define EV_OC_AMBIENT_GETSUPPORTSMNEMONICS OCF_EV_(OC_AMBIENT_GETSUPPORTSMNEMONICS, EvOcAmbientGetSupportsMnemonics) // B_OC_PB_Sig
390#define EV_OC_AMBIENT_GETDISPLAYASDEFAULT OCF_EV_(OC_AMBIENT_GETDISPLAYASDEFAULT, EvOcAmbientGetDisplayAsDefault) // B_OC_PB_Sig
391#define EV_OC_AMBIENT_GETDISPLAYNAME OCF_EV_(OC_AMBIENT_GETDISPLAYNAME, EvOcAmbientGetDisplayName) // B_OC_PPTS_Sig
392#define EV_OC_AMBIENT_GETSCALEUNITS OCF_EV_(OC_AMBIENT_GETSCALEUNITS, EvOcAmbientGetScaleUnits) // B_OC_PPTS_Sig
393#define EV_OC_AMBIENT_GETFONT OCF_EV_(OC_AMBIENT_GETFONT, EvOcAmbientGetFont) // B_OC_PPID_Sig
394
395//
396// Standard Ambient properties - mutation
397//
398#define EV_OC_AMBIENT_SETBACKCOLOR OCF_EV_(OC_AMBIENT_SETBACKCOLOR, EvOcAmbientSetBackColor) // B_I32_Sig
399#define EV_OC_AMBIENT_SETFORECOLOR OCF_EV_(OC_AMBIENT_SETFORECOLOR, EvOcAmbientSetForeColor) // B_I32_Sig
400#define EV_OC_AMBIENT_SETLOCALEID OCF_EV_(OC_AMBIENT_SETLOCALEID, EvOcAmbientSetLocaleID) // B_I32_Sig
401#define EV_OC_AMBIENT_SETTEXTALIGN OCF_EV_(OC_AMBIENT_SETTEXTALIGN, EvOcAmbientSetTextAlign) // B_OC_I16_Sig
402#define EV_OC_AMBIENT_SETMESSAGEREFLECT OCF_EV_(OC_AMBIENT_SETMESSAGEREFLECT, EvOcAmbientSetMessageReflect) // B_B_Sig
403#define EV_OC_AMBIENT_SETUSERMODE OCF_EV_(OC_AMBIENT_SETUSERMODE, EvOcAmbientSetUserMode) // B_B_Sig
404#define EV_OC_AMBIENT_SETUIDEAD OCF_EV_(OC_AMBIENT_SETUIDEAD, EvOcAmbientSetUIDead) // B_B_Sig
405#define EV_OC_AMBIENT_SETSHOWGRABHANDLES OCF_EV_(OC_AMBIENT_SETSHOWGRABHANDLES, EvOcAmbientSetShowGrabHandles) // B_B_Sig
406#define EV_OC_AMBIENT_SETSHOWHATCHING OCF_EV_(OC_AMBIENT_SETSHOWHATCHING, EvOcAmbientSetShowHatching) // B_B_Sig
407#define EV_OC_AMBIENT_SETDISPLAYASDEFAULT OCF_EV_(OC_AMBIENT_SETDISPLAYASDEFAULT, EvOcAmbientSetDisplayAsDefault) // B_B_Sig
408#define EV_OC_AMBIENT_SETSUPPORTSMNEMONICS OCF_EV_(OC_AMBIENT_SETSUPPORTSMNEMONICS, EvOcAmbientSetSupportsMnemonics) // B_B_Sig
409#define EV_OC_AMBIENT_SETDISPLAYNAME OCF_EV_(OC_AMBIENT_SETDISPLAYNAME, EvOcAmbientSetDisplayName) // B_OC_PTS_Sig
410#define EV_OC_AMBIENT_SETSCALEUNITS OCF_EV_(OC_AMBIENT_SETSCALEUNITS, EvOcAmbientSetScaleUnits) // B_OC_PTS_Sig
411#define EV_OC_AMBIENT_SETFONT OCF_EV_(OC_AMBIENT_SETFONT, EvOcAmbientSetFont) // B_OC_PID_Sig
412
413//
414// Standard control events
415//
416#define EV_OC_CTRLEVENT_CLICK OCF_EV_(OC_CTRLEVENT_CLICK, EvOcCtrlClick) // B_OC_PE_Sig
417#define EV_OC_CTRLEVENT_DBLCLICK OCF_EV_(OC_CTRLEVENT_DBLCLICK, EvOcCtrlDblClick) // B_OC_PE_Sig
418#define EV_OC_CTRLEVENT_MOUSEDOWN OCF_EV_(OC_CTRLEVENT_MOUSEDOWN, EvOcCtrlMouseDown) // B_OC_PME_Sig
419#define EV_OC_CTRLEVENT_MOUSEUP OCF_EV_(OC_CTRLEVENT_MOUSEUP, EvOcCtrlMouseUp) // B_OC_PME_Sig
420#define EV_OC_CTRLEVENT_MOUSEMOVE OCF_EV_(OC_CTRLEVENT_MOUSEMOVE, EvOcCtrlMouseMove) // B_OC_PME_Sig
421#define EV_OC_CTRLEVENT_KEYDOWN OCF_EV_(OC_CTRLEVENT_KEYDOWN, EvOcCtrlKeyDown) // B_OC_PKE_Sig
422#define EV_OC_CTRLEVENT_KEYUP OCF_EV_(OC_CTRLEVENT_KEYUP, EvOcCtrlKeyUp) // B_OC_PKE_Sig
423#define EV_OC_CTRLEVENT_ERROREVENT OCF_EV_(OC_CTRLEVENT_ERROREVENT, EvOcCtrlErrorEvent) // B_OC_PEE_Sig
424#define EV_OC_CTRLEVENT_FOCUS OCF_EV_(OC_CTRLEVENT_FOCUS, EvOcCtrlFocus) // B_OC_PFE_Sig
425#define EV_OC_CTRLEVENT_PROPERTYCHANGE OCF_EV_(OC_CTRLEVENT_PROPERTYCHANGE, EvOcCtrlPropertyChange) // B_OC_PPE_Sig
426#define EV_OC_CTRLEVENT_PROPERTYREQUESTEDIT OCF_EV_(OC_CTRLEVENT_PROPERTYREQUESTEDIT, EvOcCtrlPropertyRequestEdit) // B_OC_PPE_Sig
427#define EV_OC_CTRLEVENT_CUSTOMEVENT OCF_EV_(OC_CTRLEVENT_CUSTOMEVENT, EvOcCtrlCustomEvent) // B_OC_PCE_Sig
428
429#endif // OCF_OCFEVENT_H
#define PRECONDITION(condition)
Definition checks.h:227
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Definition string.h:67
Definition of TEventHandler and related classes & macros.
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
TOcDialogHelp
Definition ocobject.h:27
class _ICLASS TOcPart
Definition ocapp.h:34
TOcScrollDir
Definition ocobject.h:52
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
signed long int32
Definition number.h:30
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
signed short int16
Definition number.h:29
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
LRESULT TResult
Result type.
Definition dispatch.h:52
unsigned int uint
Definition number.h:25
Definition of TOcApp application connection class.
#define WM_OCEVENT
Definition ocapp.h:337
#define OC_APPRESTOREUI
Definition ocapp.h:349
#define OC_APPDIALOGHELP
Definition ocapp.h:350
#define OC_APPSTATUSTEXT
Definition ocapp.h:348
Definition of TOcControl class - Proxy object representing a control in.
Definition of Compound Document TOcView Class.
#define OC_VIEWTITLE
Definition ocview.h:763
#define OC_VIEWSETTITLE
Definition ocview.h:764
static TResult Decode(void *i, TParam1, TParam2 p2)
Definition ocfevent.h:201
static void Encode(F sendMessage, HWND wnd, ocf::TOcDialogHelp &p)
Definition ocfevent.h:197
static TResult Decode(void *i, TParam1, TParam2 p2)
Definition ocfevent.h:179
static void Encode(F sendMessage, HWND wnd, LPCTSTR statusText)
Definition ocfevent.h:175
static TResult Decode(void *i, TParam1, TParam2 p2)
Definition ocfevent.h:230
static void Encode(F sendMessage, HWND wnd, LPCTSTR title)
Definition ocfevent.h:226
static bool Encode(F sendMessage, HWND wnd, TParamType p)
Definition ocfevent.h:99
static TResult Decode(void *i, TParam1, TParam2 p2)
Definition ocfevent.h:103
static TResult Encode(F sendMessage, HWND wnd, uint eventId, TParam2 p2)
Definition ocfevent.h:84
static TResult Decode(void *i, TParam1 p1, TParam2 p2)
Definition ocfevent.h:88
Undefined default template for dispatchers Template specialization is used to allow the compiler to l...
Definition dispatch.h:258