- Revert 47615. Please fix actual sysreg instead of adding inconsistency between...
[reactos.git] / rosapps / templates / imagesoft / tooldock.h
1
2 typedef enum
3 {
4 TOP_DOCK = 0,
5 LEFT_DOCK,
6 RIGHT_DOCK,
7 BOTTOM_DOCK,
8 NO_DOCK
9 } DOCK_POSITION;
10
11 typedef struct _DOCKBAR
12 {
13 UINT BarId;
14 LPCTSTR lpName;
15 UINT DisplayTextId;
16 DOCK_POSITION Position;
17 } DOCKBAR, *PDOCKBAR;
18
19 struct _TOOLBAR_DOCKS;
20
21 typedef BOOL (CALLBACK *PDOCKBAR_CREATECLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
22 const DOCKBAR *Dockbar,
23 PVOID Context,
24 HWND hParent,
25 HWND *hwnd);
26 typedef BOOL (CALLBACK *PDOCKBAR_DESTROYCLIENT)(struct _TOOLBAR_DOCKS *TbDocks,
27 const DOCKBAR *Dockbar,
28 PVOID Context,
29 HWND hwnd);
30 typedef BOOL (CALLBACK *PDOCKBAR_INSERTBAND)(struct _TOOLBAR_DOCKS *TbDocks,
31 const DOCKBAR *Dockbar,
32 PVOID Context,
33 UINT *Index,
34 LPREBARBANDINFO rbi);
35 typedef VOID (CALLBACK *PDOCKBAR_DOCKBAND)(struct _TOOLBAR_DOCKS *TbDocks,
36 const DOCKBAR *Dockbar,
37 PVOID Context,
38 DOCK_POSITION DockFrom,
39 DOCK_POSITION DockTo,
40 LPREBARBANDINFO rbi);
41 typedef VOID (CALLBACK *PDOCKBAR_CHEVRONPUSHED)(struct _TOOLBAR_DOCKS *TbDocks,
42 const DOCKBAR *Dockbar,
43 PVOID Context,
44 HWND hwndChild,
45 LPNMREBARCHEVRON lpnm);
46
47 typedef struct _DOCKBAR_ITEM_CALLBACKS
48 {
49 PDOCKBAR_CREATECLIENT CreateClient;
50 PDOCKBAR_DESTROYCLIENT DestroyClient;
51 PDOCKBAR_INSERTBAND InsertBand;
52 PDOCKBAR_DOCKBAND DockBand;
53 PDOCKBAR_CHEVRONPUSHED ChevronPushed;
54 } DOCKBAR_ITEM_CALLBACKS, *PDOCKBAR_ITEM_CALLBACKS;
55
56 typedef struct _DOCKBAR_ITEM
57 {
58 struct _DOCKBAR_ITEM *Next;
59 DOCKBAR DockBar;
60 PVOID Context;
61 HWND hWndTool;
62 HWND hWndClient;
63 DOCK_POSITION PrevDock;
64 UINT PrevBandIndex;
65 const DOCKBAR_ITEM_CALLBACKS *Callbacks;
66 } DOCKBAR_ITEM, *PDOCKBAR_ITEM;
67
68 typedef VOID (CALLBACK *PDOCKBAR_PARENTRESIZE)(PVOID Context,
69 WORD cx,
70 WORD cy);
71
72 #define DOCKS_COUNT 4
73 typedef struct _TOOLBAR_DOCKS
74 {
75 HWND hParent;
76 PVOID Context;
77 HWND hRebar[DOCKS_COUNT];
78 RECT rcRebar[DOCKS_COUNT];
79 RECT rcClient;
80 PDOCKBAR_ITEM Items;
81 PDOCKBAR_PARENTRESIZE ParentResize;
82 PDOCKBAR_ITEM Dragging;
83 UINT DraggingBandId;
84 TCHAR szTempText[255];
85 } TOOLBAR_DOCKS, *PTOOLBAR_DOCKS;
86
87 VOID TbdInitializeDocks(PTOOLBAR_DOCKS TbDocks,
88 HWND hWndParent,
89 PVOID Context,
90 PDOCKBAR_PARENTRESIZE ParentResizeProc);
91 INT TbdAdjustUpdateClientRect(PTOOLBAR_DOCKS TbDocks,
92 PRECT rcClient);
93 HDWP TbdDeferDocks(HDWP hWinPosInfo,
94 PTOOLBAR_DOCKS TbDocks);
95 BOOL TbdAddToolbar(PTOOLBAR_DOCKS TbDocks,
96 const DOCKBAR *Dockbar,
97 PVOID Context,
98 const DOCKBAR_ITEM_CALLBACKS *DockbarCallbacks);
99 BOOL TbdDockBarIdFromClientWindow(PTOOLBAR_DOCKS TbDocks,
100 HWND hWndClient,
101 UINT *Id);
102 BOOL TbdHandleNotifications(PTOOLBAR_DOCKS TbDocks,
103 LPNMHDR pnmh,
104 LRESULT *Result);
105 VOID TbdHandleEnabling(PTOOLBAR_DOCKS TbDocks,
106 HWND hWnd,
107 BOOL Enable);
108 VOID TbdHandleActivation(PTOOLBAR_DOCKS TbDocks,
109 HWND hWnd,
110 WPARAM *wParam,
111 LPARAM *lParam);
112 VOID TbdShowFloatingToolbars(PTOOLBAR_DOCKS TbDocks,
113 BOOL Show);
114 BOOL TbdInitImpl(VOID);
115 VOID TbdUninitImpl(VOID);