2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: HelpDialogP.h /main/6 1996/04/13 11:55:10 ageorge $ */
24 /*************************************<+>*************************************
25 *****************************************************************************
27 ** File: HelpDialogP.h
29 ** Project: Cache Creek (Rivers) Project:
31 ** Description: Privite Header file for HelpDialog.c
34 ** (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
36 ** (c) Copyright 1993, 1994 Hewlett-Packard Company
37 ** (c) Copyright 1993, 1994 International Business Machines Corp.
38 ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
39 ** (c) Copyright 1993, 1994 Novell, Inc.
41 *******************************************************************
42 *************************************<+>*************************************/
44 #ifndef _DtHelpDialogP_h
45 #define _DtHelpDialogP_h
47 #include <Xm/BulletinBP.h>
49 #include <Dt/HelpDialog.h>
51 #include "FileListUtilsI.h"
52 #include "GlobSearchP.h"
54 #define XmDIALOG_SUFFIX "_popup"
55 #define XmDIALOG_SUFFIX_SIZE 6
58 /* Defines for use in allocation geometry matrix. */
59 #define TB_MAX_WIDGETS_VERT 7
60 #define TB_MAX_NUM_WIDGETS 12
63 /****************************************************************
65 * Topic List Info Structure Definition (History & Jump Back Lists)
67 ****************************************************************/
68 typedef struct _DtTopicListStruct {
70 XmString topicTitleLbl;
75 struct _DtTopicListStruct *pNext;
76 struct _DtTopicListStruct *pPrevious;
80 /****************************************************************
82 * Volume List Info: History Dialog only.
84 ****************************************************************/
85 typedef struct _DtHistoryListStruct {
89 struct _DtHistoryListStruct *pNext;
90 struct _DtTopicListStruct *pTopicHead;
91 struct _DtTopicListStruct *pTopicTale;
92 } DtHistoryListStruct;
95 /****************************************************************
97 * Help Callback return structure
99 ****************************************************************/
100 typedef struct _DtHelpListStruct {
103 struct _DtHelpCommonHelpStuff * help;
104 struct _DtHelpListStruct * pNext;
105 struct _DtHelpListStruct * pPrevious;
110 /****************************************************************
112 * Kewword Search entry structure.
114 ****************************************************************/
118 Boolean matchesFindPattern;
124 /* Class Part Structure Definition */
128 XtPointer extension; /* Pointer to extension record */
129 } DtHelpDialogWidgetClassPart;
134 /* Full class record declaration */
136 typedef struct _DtHelpDialogWidgetClassRec
138 CoreClassPart core_class;
139 CompositeClassPart composite_class;
140 ConstraintClassPart constraint_class;
141 XmManagerClassPart manager_class;
142 XmBulletinBoardClassPart bulletin_board_class;
143 DtHelpDialogWidgetClassPart selection_box_class;
144 } DtHelpDialogWidgetClassRec;
146 externalref DtHelpDialogWidgetClassRec dtHelpDialogWidgetClassRec;
149 typedef struct _DtHelpDisplayWidgetStuff
151 short textColumns; /* Columns Resource Value resource */
152 short textRows; /* Rows Resource Value resource */
153 char * locationId; /* Current Topic String resource */
154 char * helpVolume; /* Current Project File resource */
155 char * manPage; /* man page resource */
156 char * stringData; /* string data resource */
157 char * helpFile; /* help file resource */
158 unsigned char scrollBarPolicy; /* Scrollbar policy resource */
159 unsigned char executionPolicy; /* Link/script exec policy resource */
160 XtCallbackList hyperLinkCallback; /* Hypertext Callback resource */
161 _DtHelpVolumeHdl volumeHandle; /* handle of current volume */
162 unsigned char helpType; /* Current displayed file type resource */
163 char * topicTitleStr; /* title of topic */
164 int count; /* Nonexistent topic title count */
165 XmString topicTitleLbl; /* XmString title of topic */
166 Boolean firstTimePopupFlag; /* False, untel we map the widget */
169 } _DtHelpDisplayWidgetStuff;
171 typedef struct _DtHelpCommonHelpStuff
173 XtPointer pDisplayArea; /* Display widget handle */
175 /* for help on help */
176 char * helpOnHelpVolume; /* help on help volume resource */
177 DtHelpListStruct * pHelpListHead; /* Help List Pointer */
178 Widget onHelpDialog; /* help on help dialog */
180 char * sysVolumeSearchPath; /* system search path */
181 char * userVolumeSearchPath; /* user search path */
183 char * currentHelpFile; /* Current help file */
184 int topicOffset; /* Offset into help file */
186 char * topLevelId; /* Toplevel topic volume displayed */
187 int topLevelTopicOffset;
188 } _DtHelpCommonHelpStuff;
190 typedef struct _DtHelpGeneralHelpStuff
192 char * parentId; /* used for "Up" menu */
194 Boolean volumeFlag; /* set when to process new vol */
196 Widget definitionBox;
197 XtCallbackList closeCallback; /* Window Close Callback */
199 Dimension marginHeight;
200 Dimension marginWidth;
201 } _DtHelpGeneralHelpStuff;
204 typedef struct _DtHelpBrowserStuff
206 int visiblePathCount; /* Number of path lines shown */
207 XtPointer pTocArea; /* Toc area handle */
213 Boolean showTopLevelBtn;
214 Widget btnBoxBackBtn;
215 Widget btnBoxHistoryBtn;
216 Widget btnBoxIndexBtn;
217 Widget btnBoxTopLevelBtn;
218 } _DtHelpBrowserStuff;
220 typedef struct _DtHelpMenuStuff
224 /* Help Dialog Widgets */
242 typedef struct _DtHelpHistoryStuff
244 /* Path Area Variables */
245 DtTopicListStruct * pPathListHead;
246 DtTopicListStruct * pPathListTale;
249 /* History Dialog Widgets & variables */
250 Widget volumeList; /* Scrolled volume list */
251 Widget topicList; /* Scrolled topic list */
252 Widget historyWidget; /* Top Level History Shell */
253 Widget topicsListLabel;
254 DtHistoryListStruct * pHistoryListHead; /* Head pointer to history */
255 } _DtHelpHistoryStuff;
257 typedef struct _DtHelpBacktrackStuff
259 /* Jump List variables */
260 DtTopicListStruct * pJumpListHead;
261 DtTopicListStruct * pJumpListTale;
264 } _DtHelpBacktrackStuff;
266 typedef struct _DtHelpGlobSearchStuff
268 /* search dialog resource (undocumented) */
269 char * hitPrefixFont; /* hit prefix mono-space font resource */
271 /* host application locale settings */
272 char * iconv3Codeset; /* iconv3-ok codeset of app */
273 _DtHelpCeIconvContext iconv3Context; /* from vol to app locale */
275 /* File Selection Dialog font list */
276 XmFontList volTitlesFontList; /*font list req'd by font titles*/
278 /* Search Dialog Widgets & variables */
285 Widget fullIndexRadBtn;
286 Widget containsRadBtn;
293 Widget selectionDlg; /* selectionBox (child of dlg) */
294 char * curVolPath; /* cur vol shown in btn label */
295 char * rawWordStr; /* word as taken from srchWord */
296 char * normWordStr; /* normalized word str */
297 char * localeWordStr; /* after iconv() of NormWordStr */
298 wchar_t wordFieldFirstChar;
300 short statusLineUsage;
301 _DtHelpGlobSrchSources srchSources; /* current state of radio but */
302 _DtHelpFileEntry curSrchVol; /* vol currently being searched */
303 unsigned int hitsFontLoaded:1; /* is font loaded? */
304 unsigned int volScanDone:1; /* is the volume list complete? */
305 unsigned int fullIndex:1; /* state of search */
306 unsigned int readyToStart:1; /* state of search */
307 unsigned int hitsFound:1; /* state of search */
308 unsigned int searchInProgress:1; /* state of search */
309 unsigned int curVolRadBtnSens:1; /* state of curVol sens */
310 short volLeftCnt; /* updated during search */
311 _DtHelpFileList volListHead; /* info on search topics found */
312 XtWorkProcId workProcId; /* ID of search proc */
313 } _DtHelpGlobSearchStuff;
315 typedef struct _DtHelpPrintStuff
317 /* printing resources */
318 char * helpPrint; /* help print command resource */
319 unsigned char paperSize; /* paper size resource */
320 char * printer; /* printer destination resource */
321 char * printVolume; /* volume to print resource */
323 /* Print Dialog widgets & variables */
324 Widget printForm; /* Form inside top level print shell */
325 Widget subject; /* label for subject matter to print */
326 Widget printerField; /* text field for printer */
327 Widget copiesField; /* text field for copies */
328 Widget letterBtn; /* menu item for letter paper */
329 Widget legalBtn; /* menu item for legal paper */
330 Widget execBtn; /* menu item for executive paper */
331 Widget a4Btn; /* menu item for A4 paper */
332 Widget b5Btn; /* menu item for B5 paper */
333 Widget paperSizeOptMenu; /* menu item for A4 paper */
334 Widget topicsFrame; /* frame holding print topic selection */
335 Widget curTopicBtn; /* radio btn for cur topic */
336 Widget subTopicsBtn; /* radio btn for cur & sub topics */
337 Widget tocBtn; /* radio btn for table of contents */
338 Widget allTopicsBtn; /* radio btn for all topics */
339 Widget paperTopicsSeparator; /* hidden sep btwn paper size & topic sel */
340 Widget topicsBtnsSeparator; /* sep between topic sel & btns */
344 /* fields for the GeneralHelp widget record */
347 _DtHelpDisplayWidgetStuff display;
348 _DtHelpCommonHelpStuff help;
349 _DtHelpGeneralHelpStuff ghelp;
350 _DtHelpBrowserStuff browser;
351 _DtHelpMenuStuff menu;
352 _DtHelpHistoryStuff history;
353 _DtHelpBacktrackStuff backtr;
354 _DtHelpGlobSearchStuff srch;
355 _DtHelpPrintStuff print;
356 } DtHelpDialogWidgetPart;
359 /****************************************************************
361 * Full instance record declaration
363 ****************************************************************/
365 typedef struct _DtHelpDialogWidgetRec
368 CompositePart composite;
369 ConstraintPart constraint;
370 XmManagerPart manager;
371 XmBulletinBoardPart bulletin_board;
372 DtHelpDialogWidgetPart help_dialog;
373 } DtHelpDialogWidgetRec;
377 /******** Private Function Declarations ********/
379 extern XmGeoMatrix _DtHelpDialogWidgetGeoMatrixCreate(
382 XtWidgetGeometry *desired) ;
383 extern Boolean _DtHelpDialogWidgetNoGeoRequest(
384 XmGeoMatrix geoSpec) ;
386 /******** End Private Function Declarations ********/
390 #endif /* _XmTemplateBP_h */
391 /* DON'T ADD ANYTHING AFTER THIS #endif */