Use a binary search to find entries in resource directories.
[wine/dcerpc.git] / programs / winhelp / winhelp.h
blob3cbb2b1e9c2477bda764670d330fb24d8bcf39a7
1 /*
2 * Help Viewer
4 * Copyright 1996 Ulrich Schmid
5 */
7 #define MAX_LANGUAGE_NUMBER 255
8 #define MAX_PATHNAME_LEN 1024
9 #define MAX_STRING_LEN 255
11 #define INTERNAL_BORDER_WIDTH 5
12 #define POPUP_YDISTANCE 20
13 #define SHADOW_DX 20
14 #define SHADOW_DY 20
15 #define BUTTON_CX 6
16 #define BUTTON_CY 6
18 #ifndef RC_INVOKED
20 #include "hlpfile.h"
21 #include "macro.h"
23 typedef struct tagHelpLinePart
25 RECT rect;
26 LPCSTR lpsText;
27 UINT wTextLen;
28 HFONT hFont;
29 COLORREF color;
31 struct
33 LPCSTR lpszPath;
34 LONG lHash;
35 BOOL bPopup;
36 } link;
38 HGLOBAL hSelf;
39 struct tagHelpLinePart *next;
40 } WINHELP_LINE_PART;
42 typedef struct tagHelpLine
44 RECT rect;
45 WINHELP_LINE_PART first_part;
46 struct tagHelpLine *next;
47 } WINHELP_LINE;
49 typedef struct tagHelpButton
51 HWND hWnd;
53 LPCSTR lpszID;
54 LPCSTR lpszName;
55 LPCSTR lpszMacro;
57 WPARAM wParam;
59 RECT rect;
61 HGLOBAL hSelf;
62 struct tagHelpButton *next;
63 } WINHELP_BUTTON;
65 typedef struct tagWinHelp
67 LPCSTR lpszName;
69 WINHELP_BUTTON *first_button;
70 HLPFILE_PAGE *page;
71 WINHELP_LINE *first_line;
73 HWND hMainWnd;
74 HWND hButtonBoxWnd;
75 HWND hTextWnd;
76 HWND hShadowWnd;
78 HFONT (*fonts)[2];
79 UINT fonts_len;
81 HCURSOR hArrowCur;
82 HCURSOR hHandCur;
84 HGLOBAL hSelf;
85 struct tagWinHelp *next;
86 } WINHELP_WINDOW;
88 typedef struct
90 UINT wVersion;
91 HANDLE hInstance;
92 HWND hPopupWnd;
93 UINT wStringTableOffset;
94 WINHELP_WINDOW *active_win;
95 WINHELP_WINDOW *win_list;
96 } WINHELP_GLOBALS;
98 extern WINHELP_GLOBALS Globals;
100 VOID WINHELP_CreateHelpWindow(LPCSTR, LONG, LPCSTR, BOOL, HWND, LPPOINT, INT);
101 INT WINHELP_MessageBoxIDS(UINT, UINT, WORD);
102 INT WINHELP_MessageBoxIDS_s(UINT, LPCSTR, UINT, WORD);
104 extern CHAR MAIN_WIN_CLASS_NAME[];
105 extern CHAR BUTTON_BOX_WIN_CLASS_NAME[];
106 extern CHAR TEXT_WIN_CLASS_NAME[];
107 extern CHAR SHADOW_WIN_CLASS_NAME[];
108 extern CHAR STRING_BUTTON[];
109 extern CHAR STRING_MENU_Xx[];
110 extern CHAR STRING_DIALOG_TEST[];
112 #define STRINGID(id) (0x##id + Globals.wStringTableOffset)
114 #else /* RC_INVOKED */
116 #define STRINGID(id) id
118 #endif
120 /* Stringtable index */
121 #define IDS_LANGUAGE_ID STRINGID(00)
122 #define IDS_WINE_HELP STRINGID(01)
123 #define IDS_ERROR STRINGID(02)
124 #define IDS_WARNING STRINGID(03)
125 #define IDS_INFO STRINGID(04)
126 #define IDS_NOT_IMPLEMENTED STRINGID(05)
127 #define IDS_HLPFILE_ERROR_s STRINGID(06)
128 #define IDS_CONTENTS STRINGID(07)
129 #define IDS_SEARCH STRINGID(08)
130 #define IDS_BACK STRINGID(09)
131 #define IDS_HISTORY STRINGID(0a)
132 #define IDS_ALL_FILES STRINGID(0b)
133 #define IDS_HELP_FILES_HLP STRINGID(0c)
135 /* Menu `File' */
136 #define WH_OPEN 11
137 #define WH_PRINT 12
138 #define WH_PRINTER_SETUP 13
139 #define WH_EXIT 14
141 /* Menu `Edit' */
142 #define WH_COPY_DIALOG 21
143 #define WH_ANNOTATE 22
145 /* Menu `Bookmark' */
146 #define WH_BOOKMARK_DEFINE 31
148 /* Menu `Help' */
149 #define WH_HELP_ON_HELP 41
150 #define WH_HELP_ON_TOP 42
151 #define WH_ABOUT 43
152 #define WH_ABOUT_WINE 44
154 /* Buttons */
155 #define WH_FIRST_BUTTON 500
157 /* Local Variables: */
158 /* c-file-style: "GNU" */
159 /* End: */