134{
135 switch (message)
136 {
137
138
139 case WM_PAINT:
140 {
141 PAINTSTRUCT ps;
143
144
146 {
147
150
151
152 RECT r;
153 GetClientRect(hwnd, &r);
155 {
157 else MakeGradientSuper(
pDock->
cachedBackground, r,
pSettings->
Dock->
type,
pSettings->
Dock->Color1,
pSettings->
Dock->Color2,
pSettings->
Dock->
Color3,
pSettings->
Dock->
Color4,
pSettings->
Dock->
Color5,
pSettings->
Dock->
Color6,
pSettings->
Dock->
Color7,
pSettings->
Dock->
Color8,
pSettings->
Dock->
interlaced,
pSettings->
Dock->
bevelstyle,
pSettings->
Dock->
bevelposition,
pSettings->
bevelWidth,
pSettings->
Dock->
borderColor,
pSettings->
Dock->
borderWidth);
158
160 {
161 CreateBorderSuper(
pDock->
cachedBackground, r,
pSettings->
DockBorder->
type,
pSettings->
DockBorder->Color1,
pSettings->
DockBorder->Color2,
pSettings->
DockBorder->
Color3,
pSettings->
DockBorder->
Color4,
pSettings->
DockBorder->
Color5,
pSettings->
DockBorder->
Color6,
pSettings->
DockBorder->
Color7,
pSettings->
DockBorder->
Color8,
pSettings->
Dock->
borderWidth);
162 }
163 }
164 else
165 {
166 MakeGradientSuper(
pDock->
cachedBackground, r,
B_SOLID, 0x000000, 0, 0, 0, 0, 0, 0, 0,
false,
BEVEL_FLAT, 0, 0, 0, 0);
167 HFONT font = CreateFont(
pSettings->
Dock->
FontHeight, 0, 0, 0,
pSettings->
Dock->
FontWeight,
false,
false,
false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE,
pSettings->
Dock->
Font);
170 DrawTextWithEffects(
pDock->
cachedBackground, r,
"---", DT_CENTER | DT_VCENTER | DT_NOPREFIX | DT_SINGLELINE | DT_WORD_ELLIPSIS, 0xffffff,
false, 0,
false, 0, 0, 0);
172 }
173
174 DeleteObject(tempBitmap);
175
176
178 }
179
180
181 BitBlt(hdc, ps.rcPaint.left, ps.rcPaint.top, (ps.rcPaint.right - ps.rcPaint.left), (ps.rcPaint.bottom - ps.rcPaint.top),
pDock->
cachedBackground, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY);
182
184 }
185 break;
186
187
188
189 case WM_CLOSE:
190 return 0;
191
192
193
195 {
196
197
199 }
200 break;
201
202
203
204 case WM_DISPLAYCHANGE:
205 {
206
208 }
209 break;
210
211 case WM_SETTINGCHANGE:
212 {
213
214
216 return 0;
217 }
218
219
220
222 {
223 if (IsWindow((HWND)lParam))
224 {
226 plugin.hwndPlugin = (HWND)lParam;
228
229 SetWindowLongPtr((HWND)lParam, GWL_STYLE, (GetWindowLongPtr((HWND)lParam, GWL_STYLE) & ~WS_POPUP) | WS_CHILD);
231 }
232
234 }
235 break;
236
237
238
240 {
241 vector<dockPluginItem>::iterator dockPlugin;
242
244 {
245 if (dockPlugin->hwndPlugin == (HWND)lParam)
246 {
247 if (IsWindow((HWND)lParam))
248 {
249 SetWindowLongPtr((HWND)lParam, GWL_STYLE, (GetWindowLongPtr((HWND)lParam, GWL_STYLE) & ~WS_CHILD) | WS_POPUP);
250 SetParent((HWND)lParam, NULL);
251 }
252
254
255 break;
256 }
257 }
258
260 }
261 break;
262
263
264
266 {
268 }
269 break;
270
271
272
274 {
280 }
281 break;
282
283
284
285 case WM_NCHITTEST:
286 {
287 POINT p;
288 GetCursorPos(&p);
289 RECT r;
293
296
297
298
300 {
301 if (GetAsyncKeyState(VK_CONTROL) & 0x8000)
302 {
304 return HTCAPTION;
305 }
306 }
307
308 return HTCLIENT;
309 }
310
311
312
313 case WM_LBUTTONUP:
314 {
316 return 0;
317 }
318
319 case WM_LBUTTONDOWN: {} break;
320
321
322
323 case WM_RBUTTONUP:
324 case WM_NCRBUTTONUP:
325 {
326 if (GetAsyncKeyState(VK_CONTROL) & 0x8000) SendMessage(
GetBBWnd(),
BB_MENU, 0, 0);
327 else if (GetAsyncKeyState(VK_MENU) & 0x8000) SendMessage(
GetBBWnd(),
BB_MENU, 0, 0);
329 return 0;
330 }
331
332 case WM_RBUTTONDOWN:
333 case WM_NCRBUTTONDOWN: {} break;
334
335
336
337 case WM_MBUTTONUP:
338 case WM_NCMBUTTONUP:
339 {
343 }
344 break;
345
346 case WM_MBUTTONDOWN:
347 case WM_NCMBUTTONDOWN: {} break;
348
349
350
351 case WM_XBUTTONDOWN:
352 {
353 if (HIWORD(wParam) == XBUTTON1)
354 {
359 }
360 }
361 break;
362
363
364
365 case WM_MOUSEWHEEL:
366 case WM_MOUSEHWHEEL:
367 {
368
369
370 POINT p;
371 GetCursorPos(&p);
375 if ((pluginWnd != NULL) && (pluginWnd !=
pDock->
hDockWnd)) PostMessage(pluginWnd, message, (WPARAM)wParam, (LPARAM)lParam);
376 }
377 break;
378
379
380
381 case WM_DROPFILES:
382 {
384 }
385 break;
386
387
388
389 case WM_WINDOWPOSCHANGING:
390 {
392 {
393
395 {
397 }
398 }
399 return 0;
400 }
401
402
403
404 case WM_EXITSIZEMOVE:
405 {
407 {
409
410 RECT r;
415
417 }
418
419 return 0;
420 }
421
422
423
424 case WM_TIMER:
425 {
427 {
429 return 0;
430 }
431 }
432 break;
433
434
435
436 default:
437 return DefWindowProc(hwnd,message,wParam,lParam);
438
439
440 }
441 return 0;
442}
int ParseDropFiles(HWND hwnd, WPARAM wParam)
Definition BBApi.cpp:3381
void DrawImageIntoRect(HDC hdc, RECT r, StyleItem *styleItem, bool useAlpha, bool drawBorder)
Definition BBApi.cpp:2333
void MakeGradientSuper(HDC hdc, RECT rect, int type, COLORREF color1, COLORREF color2, COLORREF color3, COLORREF color4, COLORREF color5, COLORREF color6, COLORREF color7, COLORREF color8, bool bInterlaced, int bevelStyle, int bevelPosition, int bevelWidth, COLORREF borderColour, int borderWidth)
Definition BBApi.cpp:2127
MenuCommon * pMenuCommon
Definition Blackbox.cpp:41
void SnapWindowToEdge(WINDOWPOS *pwPos, int nDist, bool bUseScreenSize)
Definition BBApi.cpp:1970
void CreateBorderSuper(HDC hdc, RECT rect, int type, COLORREF color1, COLORREF color2, COLORREF color3, COLORREF color4, COLORREF color5, COLORREF color6, COLORREF color7, COLORREF color8, int borderWidth)
Definition BBApi.cpp:2250
void DrawTextWithEffects(HDC hdc, RECT r, LPSTR text, unsigned int format, COLORREF textColor, bool outline, COLORREF outlineColor, bool shadow, COLORREF shadowColor, int shadowX, int shadowY)
Definition BBApi.cpp:3519
#define DOCK_ADD
Definition BBApi.h:251
#define B_SOLID
Definition BBApi.h:80
#define DOCK_UPDATE
Definition BBApi.h:253
#define BB_TOGGLEPLUGINS
Definition BBApi.h:167
#define BB_MENU
Definition BBApi.h:160
#define BB_RECONFIGURE
Definition BBApi.h:147
#define BEVEL_FLAT
Definition BBApi.h:105
#define DOCK_REMOVE
Definition BBApi.h:252
#define B_IMAGEFROMFILE
Definition BBApi.h:83
#define BB_TOGGLEDOCK
Definition BBApi.h:170
#define BB_TOGGLETOOLBAR
Definition BBApi.h:171
#define PLACEMENT_MANUAL
Definition Settings.h:67
void PlaySoundFX(int sound)
Definition Sounds.cpp:40
@ SFX_TOGGLE_ELEMENT
Definition Sounds.h:48
bool dockSnapToEdges
Definition Settings.h:237
int bevelWidth
Definition Settings.h:564
StyleItem * DockBorder
Definition Settings.h:445
void WritePlacement(Placement *inputPlacement)
Definition Settings.cpp:3436
int edgeSnapThreshold
Definition Settings.h:354
int placement
Definition Settings.h:89
int rcx
Definition Settings.h:90
int rcy
Definition Settings.h:91
COLORREF Color5
Definition BBApi.h:436
int bevelstyle
Definition BBApi.h:400
COLORREF Color4
Definition BBApi.h:434
bool parentRelative
Definition BBApi.h:403
COLORREF Color6
Definition BBApi.h:437
int type
Definition BBApi.h:402
int bevelposition
Definition BBApi.h:401
COLORREF Color7
Definition BBApi.h:438
COLORREF Color8
Definition BBApi.h:439
bool interlaced
Definition BBApi.h:404
COLORREF Color3
Definition BBApi.h:433
COLORREF borderColor
Definition BBApi.h:418