OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
ocfevx.h
Go to the documentation of this file.
1#if !defined(OCFEVX_H)
2#define OCFEVX_H
3
4#include <owl/private/defs.h>
5#if defined(BI_HAS_PRAGMA_ONCE)
6# pragma once
7#endif
8
9//
10// LRESULT MainWnd_OnOcEvent(HWND hwnd, WPARAM wParam, LPARAM lParam)
11//
12#define HANDLE_WM_OCEVENT(hwnd, wParam, lParam, fn)\
13 (LRESULT)(fn)((hwnd), (wParam), (lParam))
14
15//
16// macros for WM_OCEVENT subdispatching
17//
18#define HANDLE_OCF(hwnd, message, fn) \
19 case (message): return (LRESULT)HANDLE_##message((hwnd), (lParam), (fn))
20
21
22//
23// bool Cls_OnOcAppInsMenus(HWND hwnd, TOcMenuDescr * menuDescr)
24//
25#define HANDLE_OC_APPINSMENUS(hwnd, lParam, fn) \
26 (LRESULT)(UINT)(bool)(fn)((hwnd), (TOcMenuDescr *)(lParam))
27
28
29//
30// bool Cls_OnOcAppMenus(HWND hwnd, TOcMenuDescr * menuDescr)
31//
32#define HANDLE_OC_APPMENUS(hwnd, lParam, fn) \
33 (LRESULT)(UINT)(bool)(fn)((hwnd), (TOcMenuDescr *)(lParam))
34
35
36//
37// bool Cls_OnOcAppProcessMsg(HWND hwnd, MSG * msg)
38//
39#define HANDLE_OC_APPPROCESSMSG(hwnd, lParam, fn) \
40 (LRESULT)(UINT)(fn)((hwnd), (MSG *)(lParam))
41
42
43//
44// bool Cls_OnOcAppFrameRect(HWND hwnd, TRect * rect)
45//
46#define HANDLE_OC_APPFRAMERECT(hwnd, lParam, fn) \
47 (LRESULT)(UINT)(fn)((hwnd), (TRect *)(lParam))
48
49
50//
51// bool Cls_OnOcAppBorderSpaceReq(HWND hwnd, TRect * rect)
52//
53#define HANDLE_OC_APPBORDERSPACEREQ(hwnd, lParam, fn) \
54 (LRESULT)(UINT)(fn)((hwnd), (TRect *)(lParam))
55
56
57//
58// bool Cls_OnOcAppBorderSpaceSet(HWND hwnd, TRect * rect)
59//
60#define HANDLE_OC_APPBORDERSPACESET(hwnd, lParam, fn) \
61 (LRESULT)(UINT)(fn)((hwnd), (TRect *)(lParam))
62
63
64//
65// void Cls_OnOcAppStatusText(HWND hwnd, const char * text)
66//
67#define HANDLE_OC_APPSTATUSTEXT(hwnd, lParam, fn) \
68 ((fn)((hwnd), (const char *)(lParam)), 0L)
69
70
71//
72// void Cls_OnOcAppRestoreUI(HWND hwnd)
73//
74#define HANDLE_OC_APPRESTOREUI(hwnd, lParam, fn) \
75 ((fn)((hwnd)), 0L)
76
77
78//
79// void Cls_OnOcAppDialogHelp(HWND hwnd, TOcDialogHelp * dialogHelp)
80//
81#define HANDLE_OC_APPDIALOGHELP(hwnd, lParam, fn) \
82 ((fn)((hwnd), (TOcDialogHelp *)(lParam)), 0L)
83
84
85//
86// TOcView * Cls_OnOcAppCreateComp(HWND hwnd, TDocTemplate * docTemplate)
87//
88#define HANDLE_OC_APPCREATECOMP(hwnd, lParam, fn) \
89 (LRESULT)(fn)((hwnd), (TDocTemplate *)(lParam))
90
91
92//
93// bool Cls_OnOcAppShutDown(HWND hwnd)
94//
95#define HANDLE_OC_APPSHUTDOWN(hwnd, lParam, fn) \
96 (LRESULT)(UINT)(fn)((hwnd))
97
98
99//
100// View events
101//
102
103//
104// const char * Cls_OnOcViewTitle(HWND hwnd)
105//
106#define HANDLE_OC_VIEWTITLE(hwnd, lParam, fn) \
107 (LRESULT)(fn)((hwnd))
108
109
110//
111// bool Cls_OnOcViewBorderSpaceReq(HWND hwnd, TRect * rect)
112//
113#define HANDLE_OC_VIEWBORDERSPACEREQ(hwnd, lParam, fn) \
114 (LRESULT)(UINT)(fn)((hwnd), (TRECT *)(lParam))
115
116
117//
118// bool Cls_OnOcViewBorderSpaceSet(HWND hwnd, TRect * rect)
119//
120#define HANDLE_OC_VIEWBORDERSPACESET(hwnd, lParam, fn) \
121 (LRESULT)(UINT)(fn)((hwnd), (TRECT *)(lParam))
122
123
124//
125// bool Cls_OnOcViewDrop(HWND hwnd, TOcDragDrop * dragDropInfo)
126//
127#define HANDLE_OC_VIEWDROP(hwnd, lParam, fn) \
128 (LRESULT)(fn)((hwnd), (TOcDragDrop *)(lParam))
129
130
131//
132// bool Cls_OnOcViewDrag(HWND hwnd, TOcDragDrop * dragDropInfo)
133//
134#define HANDLE_OC_VIEWDRAG(hwnd, lParam, fn) \
135 (LRESULT)(UINT)(fn)((hwnd), (TOcDragDrop *)(lParam))
136
137
138//
139// bool Cls_OnOcViewScroll(HWND hwnd, TOcScrollDir * scrollDir)
140//
141#define HANDLE_OC_VIEWSCROLL(hwnd, lParam, fn) \
142 (LRESULT)(UINT)(fn)((hwnd), (TOcScrollDir *)(lParam))
143
144
145//
146// bool Cls_OnOcViewPartInvalid(HWND hwnd, TOcPartChangeInfo * part)
147//
148#define HANDLE_OC_VIEWPARTINVALID(hwnd, lParam, fn) \
149 (LRESULT)(UINT)(fn)((hwnd), (TOcPartChangeInfo *)(lParam))
150
151
152//
153// bool Cls_OnOcViewPaint(HWND hwnd, TOcViewPaint * paintInfo)
154//
155#define HANDLE_OC_VIEWPAINT(hwnd, lParam, fn) \
156 (LRESULT)(UINT)(fn)((hwnd), (TOcViewPaint *)(lParam))
157
158
159//
160// bool Cls_OnOcViewLoadPart(HWND hwnd, TOcSaveLoad * loadInfo)
161//
162#define HANDLE_OC_VIEWLOADPART(hwnd, lParam, fn) \
163 (LRESULT)(UINT)(fn)((hwnd), (TOcSaveLoad *)(lParam))
164
165
166//
167// bool Cls_OnOcViewSavePart(HWND hwnd, TOcSaveLoad * saveInfo)
168//
169#define HANDLE_OC_VIEWSAVEPART(hwnd, lParam, fn) \
170 (LRESULT)(UINT)(fn)((hwnd), (TOcSaveLoad *)(lParam))
171
172
173//
174// bool Cls_OnOcViewClose(HWND hwnd)
175//
176#define HANDLE_OC_VIEWCLOSE(hwnd, lParam, fn) \
177 (LRESULT)(UINT)(fn)((hwnd))
178
179//
180// bool Cls_OnOcViewInsMenus(HWND hwnd, TOcMenuDescr * menuDescr)
181//
182#define HANDLE_OC_VIEWINSMENUS(hwnd, lParam, fn) \
183 (LRESULT)(UINT)(fn)((hwnd), (TOcMenuDescr *)(lParam))
184
185
186//
187// bool Cls_OnOcViewShowTools(HWND hwnd, TOcToolBar * toolBarInfo)
188//
189#define HANDLE_OC_VIEWWSHOWTOOLS(hwnd, lParam, fn) \
190 (LRESULT)(UINT)(fn)((hwnd), (TOcToolBar *)(lParam))
191
192
193//
194// bool Cls_OnOcViewGetPalette(HWND hwnd, LOGPALETTE * * paletteInfo)
195//
196#define HANDLE_OC_VIEWGETPALETTE(hwnd, lParam, fn) \
197 (LRESULT)(UINT)(fn)((hwnd), (LOGPALETTE * *)(lParam))
198
199
200//
201// HANDLE Cls_OnOcViewClipData(HWND hwnd, TOcFormat * formatInfo)
202//
203#define HANDLE_OC_VIEWCLIPDATA(hwnd, lParam, fn) \
204 (LRESULT)(fn)((hwnd), (TOcFormat *)(lParam))
205
206
207//
208// bool Cls_OnOcViewPartSize(HWND hwnd, TRect * rect)
209//
210#define HANDLE_OC_VIEWPARTSIZE(hwnd, lParam, fn) \
211 (LRESULT)(UINT)(fn)((hwnd), (TRECT *)(lParam))
212
213
214//
215// bool Cls_OnOcViewOpenDoc(HWND hwnd, const char * text)
216//
217#define HANDLE_OC_VIEWOPENDOC(hwnd, lParam, fn) \
218 (LRESULT)(UINT)(fn)((hwnd), (const char *)(lParam))
219
220
221//
222// bool Cls_OnOcViewAttachWindow(HWND hwnd)
223//
224#define HANDLE_OC_VIEWATTACHWINDOW(hwnd, lParam, fn) \
225 (LRESULT)(UINT)(fn)((hwnd))
226
227
228//
229// bool Cls_OnOcViewSetScale(HWND hwnd, TOcScaleFactor* scaleInfo)
230//
231#define HANDLE_OC_VIEWSETSCALE(hwnd, lParam, fn) \
232 (LRESULT)(UINT)(fn)((hwnd), (TOcScaleFactor*)(lParam))
233
234//
235// bool Cls_OnOcViewGetScale(HWND hwnd, TOcScaleFactor* scaleInfo)
236//
237#define HANDLE_OC_VIEWGETSCALE(hwnd, lParam, fn) \
238 (LRESULT)(UINT)(fn)((hwnd), (TOcScaleFactor*)(lParam))
239
240
241//
242// bool Cls_OnOcViewSetSiteRect(HWND hwnd, TRect * rect)
243//
244#define HANDLE_OC_VIEWSETSITERECT(hwnd, lParam, fn) \
245 (LRESULT)(UINT)(fn)((hwnd), (TRect *)(lParam))
246
247
248//
249// bool Cls_OnOcViewGetSiteRect(HWND hwnd, TRect * rect)
250//
251#define HANDLE_OC_VIEWGETSITERECT(hwnd, lParam, fn) \
252 (LRESULT)(UINT)(fn)((hwnd), (TRect *)(lParam))
253
254
255//
256// void Cls_OnOcViewSetTitle(HWND hwnd, const char * title)
257//
258#define HANDLE_OC_VIEWSETTITLE(hwnd, lParam, fn) \
259 ((fn)((hwnd), (const char *)(lParam)), 0)
260
261
262#endif // OCFEVENT