ReactOS  0.4.13-dev-249-gcba1a2f
tooldock.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DOCKBAR
 
struct  _DOCKBAR_ITEM_CALLBACKS
 
struct  _DOCKBAR_ITEM
 
struct  _TOOLBAR_DOCKS
 

Macros

#define DOCKS_COUNT   4
 

Typedefs

typedef struct _DOCKBAR DOCKBAR
 
typedef struct _DOCKBARPDOCKBAR
 
typedef const DOCKBARDockbar
 
typedef const DOCKBAR PVOID Context
 
typedef const DOCKBAR PVOID HWND hParent
 
typedef const DOCKBAR PVOID HWND HWNDhwnd
 
typedef BOOL(CALLBACKPDOCKBAR_DESTROYCLIENT) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, HWND hwnd)
 
typedef BOOL(CALLBACKPDOCKBAR_INSERTBAND) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, UINT *Index, LPREBARBANDINFO rbi)
 
typedef VOID(CALLBACKPDOCKBAR_DOCKBAND) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, DOCK_POSITION DockFrom, DOCK_POSITION DockTo, LPREBARBANDINFO rbi)
 
typedef VOID(CALLBACKPDOCKBAR_CHEVRONPUSHED) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, HWND hwndChild, LPNMREBARCHEVRON lpnm)
 
typedef struct _DOCKBAR_ITEM_CALLBACKS DOCKBAR_ITEM_CALLBACKS
 
typedef struct _DOCKBAR_ITEM_CALLBACKSPDOCKBAR_ITEM_CALLBACKS
 
typedef struct _DOCKBAR_ITEM DOCKBAR_ITEM
 
typedef struct _DOCKBAR_ITEMPDOCKBAR_ITEM
 
typedef VOID(CALLBACKPDOCKBAR_PARENTRESIZE) (PVOID Context, LONG cx, LONG cy)
 
typedef struct _TOOLBAR_DOCKS TOOLBAR_DOCKS
 
typedef struct _TOOLBAR_DOCKSPTOOLBAR_DOCKS
 

Enumerations

enum  DOCK_POSITION {
  TOP_DOCK = 0, LEFT_DOCK, RIGHT_DOCK, BOTTOM_DOCK,
  NO_DOCK
}
 

Functions

typedef BOOL (CALLBACK *PDOCKBAR_CREATECLIENT)(struct _TOOLBAR_DOCKS *TbDocks
 
VOID TbdInitializeDocks (PTOOLBAR_DOCKS TbDocks, HWND hWndParent, PVOID Context, PDOCKBAR_PARENTRESIZE ParentResizeProc)
 
INT TbdAdjustUpdateClientRect (PTOOLBAR_DOCKS TbDocks, PRECT rcClient)
 
HDWP TbdDeferDocks (HDWP hWinPosInfo, PTOOLBAR_DOCKS TbDocks)
 
BOOL TbdAddToolbar (PTOOLBAR_DOCKS TbDocks, const DOCKBAR *Dockbar, PVOID Context, const DOCKBAR_ITEM_CALLBACKS *DockbarCallbacks)
 
BOOL TbdDockBarIdFromClientWindow (PTOOLBAR_DOCKS TbDocks, HWND hWndClient, UINT *Id)
 
BOOL TbdHandleNotifications (PTOOLBAR_DOCKS TbDocks, LPNMHDR pnmh, LRESULT *Result)
 
VOID TbdHandleEnabling (PTOOLBAR_DOCKS TbDocks, HWND hWnd, BOOL Enable)
 
VOID TbdHandleActivation (PTOOLBAR_DOCKS TbDocks, HWND hWnd, WPARAM *wParam, LPARAM *lParam)
 
VOID TbdShowFloatingToolbars (PTOOLBAR_DOCKS TbDocks, BOOL Show)
 
BOOL TbdInitImpl (VOID)
 
VOID TbdUninitImpl (VOID)
 

Macro Definition Documentation

◆ DOCKS_COUNT

#define DOCKS_COUNT   4

Definition at line 72 of file tooldock.h.

Typedef Documentation

◆ Context

Definition at line 22 of file tooldock.h.

◆ DOCKBAR

◆ Dockbar

typedef const DOCKBAR* Dockbar

Definition at line 22 of file tooldock.h.

◆ DOCKBAR_ITEM

◆ DOCKBAR_ITEM_CALLBACKS

◆ hParent

Definition at line 22 of file tooldock.h.

◆ hwnd

Definition at line 22 of file tooldock.h.

◆ PDOCKBAR

◆ PDOCKBAR_CHEVRONPUSHED

typedef VOID(CALLBACK * PDOCKBAR_CHEVRONPUSHED) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, HWND hwndChild, LPNMREBARCHEVRON lpnm)

Definition at line 41 of file tooldock.h.

◆ PDOCKBAR_DESTROYCLIENT

typedef BOOL(CALLBACK * PDOCKBAR_DESTROYCLIENT) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, HWND hwnd)

Definition at line 26 of file tooldock.h.

◆ PDOCKBAR_DOCKBAND

typedef VOID(CALLBACK * PDOCKBAR_DOCKBAND) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, DOCK_POSITION DockFrom, DOCK_POSITION DockTo, LPREBARBANDINFO rbi)

Definition at line 35 of file tooldock.h.

◆ PDOCKBAR_INSERTBAND

typedef BOOL(CALLBACK * PDOCKBAR_INSERTBAND) (struct _TOOLBAR_DOCKS *TbDocks, const DOCKBAR *Dockbar, PVOID Context, UINT *Index, LPREBARBANDINFO rbi)

Definition at line 30 of file tooldock.h.

◆ PDOCKBAR_ITEM

◆ PDOCKBAR_ITEM_CALLBACKS

◆ PDOCKBAR_PARENTRESIZE

typedef VOID(CALLBACK * PDOCKBAR_PARENTRESIZE) (PVOID Context, LONG cx, LONG cy)

Definition at line 68 of file tooldock.h.

◆ PTOOLBAR_DOCKS

◆ TOOLBAR_DOCKS

Enumeration Type Documentation

◆ DOCK_POSITION

Enumerator
TOP_DOCK 
LEFT_DOCK 
RIGHT_DOCK 
BOTTOM_DOCK 
NO_DOCK 

Definition at line 2 of file tooldock.h.

3 {
4  TOP_DOCK = 0,
5  LEFT_DOCK,
8  NO_DOCK
DOCK_POSITION
Definition: tooldock.h:2

Function Documentation

◆ BOOL()

typedef BOOL ( CALLBACK PDOCKBAR_CREATECLIENT)

◆ TbdAddToolbar()

BOOL TbdAddToolbar ( PTOOLBAR_DOCKS  TbDocks,
const DOCKBAR Dockbar,
PVOID  Context,
const DOCKBAR_ITEM_CALLBACKS DockbarCallbacks 
)

Definition at line 585 of file tooldock.c.

589 {
590  PDOCKBAR_ITEM Item;
591  HWND hRebar;
592 
593  hRebar = TbDocks->hRebar[Dockbar->Position];
594  if (hRebar != NULL)
595  {
596  Item = HeapAlloc(ProcessHeap,
597  0,
598  sizeof(DOCKBAR_ITEM));
599  if (Item != NULL)
600  {
601  /* Initialize the item */
602  Item->DockBar = *Dockbar;
603  Item->Context = Context;
604  Item->hWndTool = NULL;
605  Item->PrevDock = Dockbar->Position;
606 
607  Item->Callbacks = Callbacks;
608 
609  /* Create the client control */
610  if (Callbacks->CreateClient != NULL &&
611  !Callbacks->CreateClient(TbDocks,
612  &Item->DockBar,
613  Context,
614  hRebar,
615  &Item->hWndClient))
616  {
618  0,
619  Item);
620 
621  return FALSE;
622  }
623 
624  /* Insert the item into the list */
625  Item->Next = TbDocks->Items;
626  TbDocks->Items = Item;
627 
628  return TdbInsertToolbar(TbDocks,
629  Item,
630  Dockbar->Position);
631  }
632  }
633 
634  return FALSE;
635 }
DOCK_POSITION PrevDock
Definition: tooldock.h:63
const DOCKBAR_ITEM_CALLBACKS * Callbacks
Definition: tooldock.h:65
struct _DOCKBAR_ITEM * Next
Definition: tooldock.h:58
DOCK_POSITION Position
Definition: tooldock.h:16
smooth NULL
Definition: ftsmooth.c:416
HWND hWndClient
Definition: tooldock.h:62
const DOCKBAR * Dockbar
Definition: tooldock.h:22
HWND hWndTool
Definition: tooldock.h:61
PDOCKBAR_ITEM Items
Definition: tooldock.h:80
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
HANDLE ProcessHeap
Definition: servman.c:15
HWND hRebar[DOCKS_COUNT]
Definition: tooldock.h:77
struct tagContext Context
Definition: acpixf.h:1012
DOCKBAR DockBar
Definition: tooldock.h:59
static BOOL TdbInsertToolbar(PTOOLBAR_DOCKS TbDocks, PDOCKBAR_ITEM Item, DOCK_POSITION Position)
Definition: tooldock.c:480
PVOID Context
Definition: tooldock.h:60
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by CreateToolbars().

◆ TbdAdjustUpdateClientRect()

INT TbdAdjustUpdateClientRect ( PTOOLBAR_DOCKS  TbDocks,
PRECT  rcClient 
)

Definition at line 44 of file tooldock.c.

46 {
47  INT i, DocksVisible = 0;
48 
49  for (i = 0; i < DOCKS_COUNT; i++)
50  {
51  if (TbDocks->hRebar[i] != NULL)
52  {
53  DocksVisible++;
54  }
55  }
56 
57  if (DocksVisible != 0)
58  {
59  rcClient->top += TbDocks->rcRebar[TOP_DOCK].bottom;
60  rcClient->left += TbDocks->rcRebar[LEFT_DOCK].right;
61  rcClient->right -= TbDocks->rcRebar[RIGHT_DOCK].right;
62  rcClient->bottom -= TbDocks->rcRebar[BOTTOM_DOCK].bottom;
63  }
64 
65  TbDocks->rcClient = *rcClient;
66 
67  return DocksVisible;
68 }
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
RECT rcRebar[DOCKS_COUNT]
Definition: tooldock.h:78
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define DOCKS_COUNT
Definition: tooldock.h:72
HWND hRebar[DOCKS_COUNT]
Definition: tooldock.h:77
LONG bottom
Definition: windef.h:294
RECT rcClient
Definition: tooldock.h:79

Referenced by MainWndResize().

◆ TbdDeferDocks()

HDWP TbdDeferDocks ( HDWP  hWinPosInfo,
PTOOLBAR_DOCKS  TbDocks 
)

Definition at line 71 of file tooldock.c.

73 {
74  LONG cx, cy;
75  HDWP hRet = hWinPosInfo;
76 
77  cx = TbDocks->rcClient.right - TbDocks->rcClient.left;
78  cy = TbDocks->rcClient.bottom - TbDocks->rcClient.top;
79 
80  /* Top dock */
81  if (TbDocks->hRebar[TOP_DOCK] != NULL)
82  {
83  hRet = DeferWindowPos(hRet,
84  TbDocks->hRebar[TOP_DOCK],
85  NULL,
86  TbDocks->rcClient.left - TbDocks->rcRebar[LEFT_DOCK].right,
87  TbDocks->rcClient.top - TbDocks->rcRebar[TOP_DOCK].bottom,
88  cx + TbDocks->rcRebar[LEFT_DOCK].right + TbDocks->rcRebar[RIGHT_DOCK].right,
89  TbDocks->rcRebar[TOP_DOCK].bottom,
90  SWP_NOZORDER);
91  if (hRet == NULL)
92  return NULL;
93  }
94 
95  /* Left dock */
96  if (TbDocks->hRebar[LEFT_DOCK] != NULL)
97  {
98  hRet = DeferWindowPos(hRet,
99  TbDocks->hRebar[LEFT_DOCK],
100  NULL,
101  TbDocks->rcClient.left - TbDocks->rcRebar[LEFT_DOCK].right,
102  TbDocks->rcClient.top,
103  TbDocks->rcRebar[LEFT_DOCK].right,
104  cy,
105  SWP_NOZORDER);
106  if (hRet == NULL)
107  return NULL;
108  }
109 
110  /* Right dock */
111  if (TbDocks->hRebar[RIGHT_DOCK] != NULL)
112  {
113  hRet = DeferWindowPos(hRet,
114  TbDocks->hRebar[RIGHT_DOCK],
115  NULL,
116  TbDocks->rcClient.right,
117  TbDocks->rcClient.top,
118  TbDocks->rcRebar[RIGHT_DOCK].right,
119  cy,
120  SWP_NOZORDER);
121  if (hRet == NULL)
122  return NULL;
123  }
124 
125  /* Bottom dock */
126  if (TbDocks->hRebar[BOTTOM_DOCK] != NULL)
127  {
128  hRet = DeferWindowPos(hRet,
129  TbDocks->hRebar[BOTTOM_DOCK],
130  NULL,
131  TbDocks->rcClient.left - TbDocks->rcRebar[LEFT_DOCK].right,
132  TbDocks->rcClient.bottom,
133  cx + TbDocks->rcRebar[LEFT_DOCK].right + TbDocks->rcRebar[RIGHT_DOCK].right,
134  TbDocks->rcRebar[BOTTOM_DOCK].bottom,
135  SWP_NOZORDER);
136  if (hRet == NULL)
137  return NULL;
138  }
139 
140  return hRet;
141 }
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
LONG right
Definition: windef.h:293
RECT rcRebar[DOCKS_COUNT]
Definition: tooldock.h:78
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
smooth NULL
Definition: ftsmooth.c:416
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND hRebar[DOCKS_COUNT]
Definition: tooldock.h:77
_Out_opt_ int * cx
Definition: commctrl.h:570
LONG bottom
Definition: windef.h:294
RECT rcClient
Definition: tooldock.h:79

Referenced by MainWndResize().

◆ TbdDockBarIdFromClientWindow()

BOOL TbdDockBarIdFromClientWindow ( PTOOLBAR_DOCKS  TbDocks,
HWND  hWndClient,
UINT Id 
)

Definition at line 267 of file tooldock.c.

270 {
271  PDOCKBAR_ITEM Item;
272  BOOL Ret = FALSE;
273 
274  Item = TbDocks->Items;
275  while (Item != NULL)
276  {
277  if (Item->hWndClient == hWndClient)
278  {
279  *Id = Item->DockBar.BarId;
280  Ret = TRUE;
281  break;
282  }
283 
284  Item = Item->Next;
285  }
286 
287  return Ret;
288 }
#define TRUE
Definition: types.h:120
DWORD Id
struct _DOCKBAR_ITEM * Next
Definition: tooldock.h:58
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
HWND hWndClient
Definition: tooldock.h:62
UINT BarId
Definition: tooldock.h:13
PDOCKBAR_ITEM Items
Definition: tooldock.h:80
DOCKBAR DockBar
Definition: tooldock.h:59

Referenced by MainWndProc().

◆ TbdHandleActivation()

VOID TbdHandleActivation ( PTOOLBAR_DOCKS  TbDocks,
HWND  hWnd,
WPARAM wParam,
LPARAM lParam 
)

Definition at line 992 of file tooldock.c.

996 {
997  BOOL SynchronizeSiblings = TRUE;
998  BOOL KeepActive = *(BOOL*)wParam;
999  HWND hWndActivate = *(HWND*)lParam;
1000  PDOCKBAR_ITEM Item;
1001 
1002  Item = TbDocks->Items;
1003  while (Item != NULL)
1004  {
1005  if (Item->hWndTool != NULL &&
1006  Item->hWndTool == hWndActivate)
1007  {
1008  KeepActive = TRUE;
1009  SynchronizeSiblings = FALSE;
1010  break;
1011  }
1012  Item = Item->Next;
1013  }
1014 
1015  if (hWndActivate != (HWND)-1)
1016  {
1017  if (SynchronizeSiblings)
1018  {
1019  Item = TbDocks->Items;
1020  while (Item != NULL)
1021  {
1022  if (Item->hWndTool != NULL &&
1023  Item->hWndTool != hWnd &&
1024  Item->hWndTool != hWndActivate)
1025  {
1026  SendMessage(Item->hWndTool,
1027  WM_NCACTIVATE,
1028  (WPARAM)KeepActive,
1029  (LPARAM)-1);
1030  }
1031  Item = Item->Next;
1032  }
1033  }
1034  }
1035  else
1036  *lParam = 0;
1037 
1038  *wParam = (WPARAM)KeepActive;
1039 }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
UINT_PTR WPARAM
Definition: windef.h:207
WPARAM wParam
Definition: combotst.c:138
struct _DOCKBAR_ITEM * Next
Definition: tooldock.h:58
#define WM_NCACTIVATE
Definition: winuser.h:1670
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
HWND hWndTool
Definition: tooldock.h:61
PDOCKBAR_ITEM Items
Definition: tooldock.h:80
#define SendMessage
Definition: winuser.h:5709
LPARAM lParam
Definition: combotst.c:139

Referenced by MainWndProc(), and ToolDockWndProc().

◆ TbdHandleEnabling()

VOID TbdHandleEnabling ( PTOOLBAR_DOCKS  TbDocks,
HWND  hWnd,
BOOL  Enable 
)

Definition at line 972 of file tooldock.c.

975 {
976  PDOCKBAR_ITEM Item;
977 
978  Item = TbDocks->Items;
979  while (Item != NULL)
980  {
981  if (Item->hWndTool != NULL &&
982  Item->hWndTool != hWnd)
983  {
984  EnableWindow(Item->hWndTool,
985  Enable);
986  }
987  Item = Item->Next;
988  }
989 }
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
HWND hWnd
Definition: settings.c:17
struct _DOCKBAR_ITEM * Next
Definition: tooldock.h:58
smooth NULL
Definition: ftsmooth.c:416
HWND hWndTool
Definition: tooldock.h:61
PDOCKBAR_ITEM Items
Definition: tooldock.h:80
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)

Referenced by MainWndProc().

◆ TbdHandleNotifications()

BOOL TbdHandleNotifications ( PTOOLBAR_DOCKS  TbDocks,
LPNMHDR  pnmh,
LRESULT Result 
)

Definition at line 291 of file tooldock.c.

294 {
295  BOOL Handled = FALSE;
296 
297  if (pnmh->hwndFrom != NULL)
298  {
300 
302  {
303  if (pnmh->hwndFrom == TbDocks->hRebar[Position])
304  {
305  switch (pnmh->code)
306  {
307  case RBN_HEIGHTCHANGE:
308  {
309  TbnRebarChangeSize(TbDocks,
310  Position);
311  break;
312  }
313 
314  case RBN_BEGINDRAG:
315  {
316  *Result = TbnRebarBeginDrag(TbDocks,
317  Position,
318  (LPNMREBAR)pnmh);
319  break;
320  }
321 
322  case RBN_ENDDRAG:
323  {
324  TbnRebarEndDrag(TbDocks,
325  Position,
326  (LPNMREBAR)pnmh);
327  break;
328  }
329 
330  case RBN_CHEVRONPUSHED:
331  {
332  TbnRebarChevronPushed(TbDocks,
333  Position,
334  (LPNMREBARCHEVRON)pnmh);
335  break;
336  }
337  }
338 
339  Handled = TRUE;
340  break;
341  }
342  }
343  }
344 
345  return Handled;
346 }
#define TRUE
Definition: types.h:120
#define RBN_HEIGHTCHANGE
Definition: commctrl.h:1600
static COORD Position
Definition: mouse.c:34
UINT code
Definition: winuser.h:3112
unsigned int BOOL
Definition: ntddk_ex.h:94
#define RBN_BEGINDRAG
Definition: commctrl.h:1604
smooth NULL
Definition: ftsmooth.c:416
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
DOCK_POSITION
Definition: tooldock.h:2
static VOID TbnRebarEndDrag(PTOOLBAR_DOCKS TbDocks, DOCK_POSITION Position, LPNMREBAR lpnmrb)
Definition: tooldock.c:250
_In_ BOOLEAN Handled
Definition: ketypes.h:337
static LRESULT TbnRebarBeginDrag(PTOOLBAR_DOCKS TbDocks, DOCK_POSITION Position, LPNMREBAR lpnmrb)
Definition: tooldock.c:229
HWND hwndFrom
Definition: winuser.h:3110
static VOID TbnRebarChangeSize(PTOOLBAR_DOCKS TbDocks, DOCK_POSITION Position)
Definition: tooldock.c:165
HWND hRebar[DOCKS_COUNT]
Definition: tooldock.h:77
static VOID TbnRebarChevronPushed(PTOOLBAR_DOCKS TbDocks, DOCK_POSITION Position, LPNMREBARCHEVRON lpnm)
Definition: tooldock.c:208
#define RBN_ENDDRAG
Definition: commctrl.h:1605
#define RBN_CHEVRONPUSHED
Definition: commctrl.h:1609

Referenced by MainWndProc().

◆ TbdInitializeDocks()

VOID TbdInitializeDocks ( PTOOLBAR_DOCKS  TbDocks,
HWND  hWndParent,
PVOID  Context,
PDOCKBAR_PARENTRESIZE  ParentResizeProc 
)

Definition at line 1064 of file tooldock.c.

1068 {
1072 
1074 
1075  TbDocks->hParent = hWndParent;
1076  TbDocks->Context = Context;
1077  TbDocks->ParentResize = ParentResizeProc;
1078 
1079  for (Position = TOP_DOCK; Position < NO_DOCK; Position++)
1080  {
1081  switch (Position)
1082  {
1083  case LEFT_DOCK:
1084  case RIGHT_DOCK:
1085  rbStyle |= CCS_VERT;
1086  break;
1087  default:
1088  rbStyle &= ~CCS_VERT;
1089  break;
1090  }
1091 
1094  NULL,
1095  rbStyle,
1096  0,
1097  0,
1098  0,
1099  0,
1100  TbDocks->hParent,
1101  NULL,
1102  hInstance,
1103  NULL);
1104 
1105  if (TbDocks->hRebar[Position] != NULL)
1106  {
1107  SetWindowSubclass(TbDocks->hRebar[Position],
1109  1,
1110  (DWORD_PTR)TbDocks);
1111  }
1112  }
1113 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
static COORD Position
Definition: mouse.c:34
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define CCS_VERT
Definition: commctrl.h:2221
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HINSTANCE hInstance
Definition: charmap.c:20
#define CreateWindowEx
Definition: winuser.h:5621
smooth NULL
Definition: ftsmooth.c:416
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
DOCK_POSITION
Definition: tooldock.h:2
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1261
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
unsigned long DWORD
Definition: ntddk_ex.h:95
PVOID Context
Definition: tooldock.h:76
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define REBARCLASSNAME
Definition: commctrl.h:1438
HWND hRebar[DOCKS_COUNT]
Definition: tooldock.h:77
static LRESULT CALLBACK RebarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
Definition: tooldock.c:718
HWND hParent
Definition: tooldock.h:75
#define CCS_NOMOVEY
Definition: commctrl.h:2215
struct tagContext Context
Definition: acpixf.h:1012
#define CCS_NOMOVEX
Definition: commctrl.h:2224
#define WS_VISIBLE
Definition: pedump.c:620
PDOCKBAR_PARENTRESIZE ParentResize
Definition: tooldock.h:81

Referenced by InitMainWnd().

◆ TbdInitImpl()

BOOL TbdInitImpl ( VOID  )

Definition at line 1116 of file tooldock.c.

1117 {
1118  WNDCLASSEX wc = {0};
1119 
1120  wc.cbSize = sizeof(WNDCLASSEX);
1121  wc.style = CS_HREDRAW | CS_VREDRAW;
1124  wc.hInstance = hInstance;
1125  wc.hCursor = LoadCursor(NULL,
1126  IDC_ARROW);
1127  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
1129 
1130  return RegisterClassEx(&wc) != (ATOM)0;
1131 }
UINT style
Definition: winuser.h:3155
#define RegisterClassEx
Definition: winuser.h:5703
HCURSOR hCursor
Definition: winuser.h:3161
WNDPROC lpfnWndProc
Definition: winuser.h:3156
LPCSTR lpszClassName
Definition: winuser.h:3164
WORD ATOM
Definition: dimm.idl:113
#define CS_HREDRAW
Definition: winuser.h:648
HINSTANCE hInstance
Definition: charmap.c:20
static LRESULT CALLBACK ToolDockWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: tooldock.c:642
static const TCHAR szToolDockWndClass[]
Definition: tooldock.c:3
HINSTANCE hInstance
Definition: winuser.h:3159
smooth NULL
Definition: ftsmooth.c:416
UINT cbSize
Definition: winuser.h:3154
#define TD_EXTRA_BYTES
Definition: tooldock.c:639
HBRUSH hbrBackground
Definition: winuser.h:3162
#define CS_VREDRAW
Definition: winuser.h:653
int cbWndExtra
Definition: winuser.h:3158
#define COLOR_BTNFACE
Definition: winuser.h:918
#define LoadCursor
Definition: winuser.h:5678
#define IDC_ARROW
Definition: winuser.h:682
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5585

Referenced by _tWinMain().

◆ TbdShowFloatingToolbars()

VOID TbdShowFloatingToolbars ( PTOOLBAR_DOCKS  TbDocks,
BOOL  Show 
)

Definition at line 1042 of file tooldock.c.

1044 {
1045  PDOCKBAR_ITEM Item;
1046 
1047  Item = TbDocks->Items;
1048  while (Item != NULL)
1049  {
1050  if (Item->hWndTool != NULL)
1051  {
1052  if ((Show && !IsWindowVisible(Item->hWndTool)) ||
1053  (!Show && IsWindowVisible(Item->hWndTool)))
1054  {
1055  ShowWindow(Item->hWndTool,
1056  (Show ? SW_SHOW : SW_HIDE));
1057  }
1058  }
1059  Item = Item->Next;
1060  }
1061 }
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
struct _DOCKBAR_ITEM * Next
Definition: tooldock.h:58
smooth NULL
Definition: ftsmooth.c:416
#define SW_SHOW
Definition: winuser.h:769
HWND hWndTool
Definition: tooldock.h:61
PDOCKBAR_ITEM Items
Definition: tooldock.h:80
BOOL WINAPI IsWindowVisible(_In_ HWND)

◆ TbdUninitImpl()

VOID TbdUninitImpl ( VOID  )

Definition at line 1134 of file tooldock.c.

1135 {
1137  hInstance);
1138 }
HINSTANCE hInstance
Definition: charmap.c:20
static const TCHAR szToolDockWndClass[]
Definition: tooldock.c:3
#define UnregisterClass
Definition: winuser.h:5727

Referenced by _tWinMain().