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: SetList.c /main/16 1996/11/18 16:35:22 cde-hp $ */
24 /************************************<+>*************************************
25 ****************************************************************************
29 ** Project: Text Graphic Display Library
31 ** Description: This body of code creates the Line and Graphic Tables for
35 ****************************************************************************
36 ************************************<+>*************************************/
38 * (c) Copyright 1996 Digital Equipment Corporation.
39 * (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992,
40 1993, 1994, 1996 Hewlett-Packard Company.
41 * (c) Copyright 1993, 1994, 1996 International Business Machines Corp.
42 * (c) Copyright 1993, 1994, 1996 Sun Microsystems, Inc.
43 * (c) Copyright 1993, 1994, 1996 Novell, Inc.
44 * (c) Copyright 1996 FUJITSU LIMITED.
45 * (c) Copyright 1996 Hitachi.
60 #include "CanvasSegP.h"
67 #include "DisplayAreaP.h"
68 #include "CallbacksI.h"
69 #include "FontAttrI.h"
71 #include "XInterfaceI.h"
72 #include "XUICreateI.h"
78 /******** Private Function Declarations ********/
79 /******** End Public Function Declarations ********/
81 /******************************************************************************
83 * Private defines and variables
85 *****************************************************************************/
90 /******************************************************************************
94 *****************************************************************************/
95 #define NeedVertScrollbar(x) \
96 _DtHelpIS_AS_NEEDED((x)->neededFlags,_DtHelpVERTICAL_SCROLLBAR)
97 #define NeedHorzScrollbar(x) \
98 _DtHelpIS_AS_NEEDED((x)->neededFlags,_DtHelpHORIZONTAL_SCROLLBAR)
99 /******************************************************************************
103 *****************************************************************************/
106 DtHelpDispAreaStruct *pDAS,
111 pDAS->maxYpos = max_y + pDAS->marginHeight;
114 /******************************************************************************
116 * Semi Public Functions - these routines called by other modules within
119 *****************************************************************************/
120 /******************************************************************************
121 * Function: _DtHelpSetScrollBars
123 * Sets/Resets the vertical scroll bar values.
124 *****************************************************************************/
125 enum DoSomething { DoNothing, DoManage, DoUnmanage };
127 _DtHelpSetScrollBars (
128 XtPointer client_data,
130 Dimension new_height)
136 int changeHeight = 0;
142 int oldScrollPercent = 10000;
145 _DtCvUnit ret_height;
150 Dimension marginWidth;
151 Dimension marginHeight;
152 Dimension horzHeight;
157 XRectangle rectangle[1];
159 enum DoSomething doVert = DoNothing;
160 enum DoSomething doHorz = DoNothing;
161 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
164 * remember the old first line.
166 oldMaxYpos = pDAS->maxYpos;
167 if (pDAS->firstVisible && pDAS->maxYpos)
168 oldScrollPercent = pDAS->firstVisible * 10000 / pDAS->maxYpos;
171 * get the width and height of the scroll bars.
173 if (pDAS->vertScrollWid)
175 XtSetArg (args[0], XmNwidth , &vertWidth);
176 XtGetValues (pDAS->vertScrollWid, args, 1);
179 if (pDAS->horzScrollWid)
181 XtSetArg (args[0], XmNheight , &horzHeight);
182 XtGetValues (pDAS->horzScrollWid, args, 1);
186 * remember our old width and height
188 oldWidth = pDAS->dispWidth;
189 oldHeight = pDAS->dispHeight;
192 * Settle the sizing issue before we remap the scroll bars.
199 if (new_height != pDAS->dispHeight)
201 pDAS->dispHeight = new_height;
202 pDAS->dispUseHeight = new_height - 2 * pDAS->decorThickness;
203 if (((int) new_height) < 2 * ((int) pDAS->decorThickness))
204 pDAS->dispUseHeight = 0;
206 pDAS->visibleCount = ((int) pDAS->dispUseHeight) /
209 if (pDAS->visibleCount < 0)
210 pDAS->visibleCount = 0;
214 * check to see if we've changed width
216 if (new_width != pDAS->dispWidth)
221 pDAS->dispWidth = new_width;
222 pDAS->dispUseWidth = new_width - 2 * pDAS->decorThickness;
223 if (((int)new_width) < 2 * ((int) pDAS->decorThickness))
224 pDAS->dispUseWidth = 0;
227 * re-layout the information.
229 if (_DtCvSTATUS_OK ==
230 _DtCanvasResize(pDAS->canvas, _DtCvFALSE,
231 &ret_width, &ret_height))
232 SetMaxPositions (pDAS, ret_width, ret_height);
237 * Check to see if we have a vertical scrollbar and whether it
238 * is as_needed. If static, it is always mapped.
240 if (NULL != pDAS->vertScrollWid && NeedVertScrollbar(pDAS))
243 * will the information fit on one page?
245 if (pDAS->maxYpos <= ((int) pDAS->dispUseHeight))
248 * If the window has not already been 'stretched' by
249 * the width of the scrollbar and if the scrollbar is
250 * mapped, grow the window width.
252 if (0 == changeWidth && pDAS->vertIsMapped)
255 * set the flag to indicate that the window width
256 * has grown. This can occur only if the window
257 * has its vertical scrollbar already mapped.
260 new_width += vertWidth;
263 * Else check to see if the window has been shrunk.
264 * If so, then stretch it back out to its original
267 * This can occur only if
268 * a) The vertical scrollbar is not mapped.
269 * b) The previous pass through this code indicates
270 * that the window could not hold the length of
271 * the information, and therefore calculations and
272 * flags were set to map the vertical scrollbar.
273 * But a _DtCanvasResize() now indicates that a
274 * vertical scrollbar is not needed. So we don't
275 * need the vertical scrollbar and have to nuliify
276 * the calculation to include it.
278 else if (-1 == changeWidth)
281 new_width += vertWidth;
285 * The information will not fit on one page.
290 * If the window has not already been shrunk to
291 * accomidate the vertical scrollbar (and the scrollbar
292 * is not already mapped) then set the flags and
295 if (False == pDAS->vertIsMapped && 0 == changeWidth)
298 * set the flag to indicate that the window width
299 * has shrunk (and that consequently, the vertical
300 * scrollbar is not mapped).
303 if (new_width > vertWidth)
304 new_width -= vertWidth;
309 * Else check to see if the window has been streched.
310 * If so, then shrink it back out to its original
313 * This can occur only if
314 * a) The vertical scrollbar is mapped.
315 * b) The previous pass through this code indicates
316 * that the window could hold the length of
317 * the information, and therefore calculations and
318 * flags were set to unmap the vertical scrollbar.
319 * But a _DtCanvasResize() now indicates that a
320 * vertical scrollbar is needed. So we need
321 * the vertical scrollbar and have to nuliify
322 * the calculation to eliminate it.
324 else if (1 == changeWidth)
327 new_width -= vertWidth;
333 * Check to see if we have a horizontal scrollbar and whether it
334 * is as_needed. If static, it is always mapped.
336 if (NULL != pDAS->horzScrollWid && NeedHorzScrollbar(pDAS))
339 * will the information fit within the right border?
341 if (pDAS->maxX <= ((int) pDAS->dispUseWidth))
344 * If the window has not already been 'stretched' by
345 * the height of the scrollbar and if the scrollbar is
346 * mapped, grow the window.
348 if (0 == changeHeight && pDAS->horzIsMapped)
351 * set the flag to indicate that the window has
352 * grown. This can occur only if the window has
353 * its horizontal scrollbar already mapped.
356 new_height += horzHeight;
359 * Else check to see if the window has been shrunk.
360 * If so, stretch it back to its original height.
362 * This can occur only if
363 * a) The horizontal scrollbar is not mapped.
364 * b) The previous pass through the code indicated
365 * that the information exceeded the right border
366 * and therefore calculations and flags were set
367 * to map the horizontal scrollbar. But a
368 * _DtCanvasResize() now indicates that the
369 * horizontal scrollbar is not needed. So we
370 * have to nullify the calculations and flags
373 else if (-1 == changeHeight)
376 new_height += horzHeight;
380 * The information exceeds the right border of the window.
385 * If the window has no already been shrunk to
386 * accomidate the horizontal scrollbar (and the
387 * scrollbar is not already mapped), then set the
388 * flags and shrink the height.
390 if (False == pDAS->horzIsMapped && 0 == changeHeight)
393 * set the flag to indicate that the window height
394 * has shrunk (and that the scrollbar needs mapping).
397 if (new_height > horzHeight)
398 new_height -= horzHeight;
403 * Else check to see if the window has been streched.
404 * If so, then shrink it back out to its original
407 * This can occur only if
408 * a) The horizontal scrollbar is mapped.
409 * b) The previous pass through the code indicated
410 * that the information did not exceeded the right
411 * border and therefore calculations and flags were
412 * set to unmap the horizontal scrollbar. But a
413 * _DtCanvasResize() now indicates that the
414 * horizontal scrollbar is needed. So we
415 * have to nullify the calculations and flags
418 else if (1 == changeHeight)
421 new_height -= horzHeight;
426 } while (new_height != pDAS->dispHeight || new_width != pDAS->dispWidth);
429 * reset the first visible line, if needed.
431 if (oldScrollPercent != 10000 && pDAS->maxYpos != oldMaxYpos)
432 pDAS->firstVisible = pDAS->maxYpos * oldScrollPercent / 10000;
434 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
435 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
437 if (pDAS->firstVisible < 0)
438 pDAS->firstVisible = 0;
441 * Reset the virtual X value, if needed
443 if (pDAS->virtualX &&
444 (pDAS->maxX - pDAS->virtualX < ((int) pDAS->dispUseWidth)))
446 pDAS->virtualX = pDAS->maxX - pDAS->dispUseWidth;
447 if (pDAS->virtualX < 0)
452 * If I've changed my size, I've got to change my clip masks.
454 if (oldWidth != pDAS->dispWidth || oldHeight != pDAS->dispHeight)
457 * If the display area hasn't been realized, the resetting of
458 * the bottom right corner offsets will not cause a resize
459 * event to occur. Rather the overall window will grow by
460 * the width or height of the scroll bar and not cause the
461 * display area to shrink. Therefore when the exposure event
462 * is called the width or height will be not be equal to what
463 * I think it should be causing the code to believe a resize
464 * is in process. The short of the matter is that the exposure
465 * will not happen and we end up with a blank window.
467 * So for this case, resize the display area to what we think it
468 * should be and the exposure event will then happen.
469 if (!XtIsRealized (pDAS->dispWid))
472 XtSetArg(dispArgs[dispN], XmNwidth, pDAS->dispWidth); ++dispN;
473 XtSetArg(dispArgs[dispN], XmNheight, pDAS->dispHeight); ++dispN;
476 rectangle[0].x = pDAS->decorThickness;
477 rectangle[0].y = pDAS->decorThickness;
478 rectangle[0].width = pDAS->dispUseWidth;
479 rectangle[0].height = pDAS->dispUseHeight;
481 XSetClipRectangles(XtDisplay(pDAS->dispWid), pDAS->normalGC, 0, 0,
482 rectangle, 1, Unsorted);
483 XSetClipRectangles(XtDisplay(pDAS->dispWid), pDAS->invertGC, 0, 0,
484 rectangle, 1, Unsorted);
486 if (pDAS->resizeCall)
487 (*(pDAS->resizeCall)) (pDAS->clientData);
491 * Has the width changed? If so, then we are mapping or unmapping
492 * the vertical scrollbar.
494 if (-1 == changeWidth)
497 * manage the scrollbar, the window has shrunk.
501 XtSetArg(dispArgs[dispN], XmNrightAttachment, XmATTACH_WIDGET);
503 XtSetArg(dispArgs[dispN], XmNrightWidget, pDAS->vertScrollWid);
506 else if (1 == changeWidth)
509 * unmanage the scrollbar, the window has grown.
513 XtSetArg(dispArgs[dispN], XmNrightAttachment, XmATTACH_FORM);
518 * Has the height changed? If so, then we are mapping or unmapping
519 * the horizontal scrollbar.
521 if (-1 == changeHeight)
524 * manage the scrollbar, the window has shrunk.
528 XtSetArg(dispArgs[dispN], XmNbottomAttachment,XmATTACH_WIDGET);
530 XtSetArg(dispArgs[dispN], XmNbottomWidget,pDAS->horzScrollWid);
533 else if (1 == changeHeight)
536 * unmanage the scrollbar, the window has grown.
540 XtSetArg(dispArgs[dispN], XmNbottomAttachment, XmATTACH_FORM);
545 * get the margins, widths and height.
547 XtSetArg (args[0], XmNmarginWidth , &marginWidth);
548 XtSetArg (args[1], XmNmarginHeight, &marginHeight);
549 XtGetValues (XtParent (pDAS->dispWid), args, 2);
552 * have to map the scroll bars before the drawn button can be
553 * attached to them and can't unmap the scroll bars until
554 * the drawn button has been unattached from them. But we
555 * want to do the re-attachments all at once to minimize the
558 if (doHorz == DoManage)
560 if (!XtIsRealized(pDAS->horzScrollWid))
561 XtSetMappedWhenManaged (pDAS->horzScrollWid, True);
563 XtMapWidget (pDAS->horzScrollWid);
564 pDAS->horzIsMapped = True;
567 if (doVert == DoManage)
569 if (!XtIsRealized(pDAS->vertScrollWid))
570 XtSetMappedWhenManaged (pDAS->vertScrollWid, True);
572 XtMapWidget (pDAS->vertScrollWid);
573 pDAS->vertIsMapped = True;
576 if (pDAS->vertScrollWid && pDAS->vertIsMapped && doVert != DoUnmanage)
578 if (pDAS->horzScrollWid && pDAS->horzIsMapped && doHorz != DoUnmanage)
579 XtSetArg(args[0], XmNbottomOffset, (marginHeight + horzHeight));
581 XtSetArg(args[0], XmNbottomOffset, marginHeight);
586 * set the slider size.
588 slideSize = pDAS->dispUseHeight;
593 * determine the maximum size
595 maximum = pDAS->maxYpos;
597 if (maximum < slideSize)
604 * determine the page increment.
607 if (((int)pDAS->dispUseHeight) - pDAS->lineHeight > 2)
608 pageInc = pDAS->dispUseHeight - pDAS->lineHeight;
610 XtSetArg (args[n], XmNvalue , pDAS->firstVisible); ++n;
611 XtSetArg (args[n], XmNsliderSize , slideSize); ++n;
612 XtSetArg (args[n], XmNmaximum , maximum); ++n;
613 XtSetArg (args[n], XmNpageIncrement, pageInc); ++n;
614 XtSetValues (pDAS->vertScrollWid, args, n);
617 if (pDAS->horzScrollWid && pDAS->horzIsMapped && doHorz != DoUnmanage)
619 if (pDAS->vertScrollWid && pDAS->vertIsMapped && doVert != DoUnmanage)
620 XtSetArg(args[0], XmNrightOffset, (marginWidth + vertWidth));
622 XtSetArg(args[0], XmNrightOffset, marginWidth);
626 * determine the slider size.
628 slideSize = pDAS->dispUseWidth - 1;
633 * determine the maximum size
636 if (maximum < pDAS->maxX)
637 maximum = pDAS->maxX - 1;
643 * determine the page increment.
646 if (((int) pDAS->dispUseWidth) > 2)
647 pageInc = pDAS->dispUseWidth - 1;
649 XtSetArg (args[n], XmNvalue , pDAS->virtualX); n++;
650 XtSetArg (args[n], XmNsliderSize , slideSize); n++;
651 XtSetArg (args[n], XmNmaximum , maximum); n++;
652 XtSetArg (args[n], XmNpageIncrement, pageInc); ++n;
653 XtSetValues (pDAS->horzScrollWid, args, n);
657 * set the display area args
660 XtSetValues (pDAS->dispWid, dispArgs, dispN);
663 * unmap those we don't want.
665 if (doHorz == DoUnmanage)
667 if (!XtIsRealized(pDAS->horzScrollWid))
668 XtSetMappedWhenManaged (pDAS->horzScrollWid, False);
670 XtUnmapWidget (pDAS->horzScrollWid);
671 pDAS->horzIsMapped = False;
674 if (doVert == DoUnmanage)
676 if (!XtIsRealized(pDAS->vertScrollWid))
677 XtSetMappedWhenManaged (pDAS->vertScrollWid, False);
679 XtUnmapWidget (pDAS->vertScrollWid);
680 pDAS->vertIsMapped = False;
684 * return whether or not we generated a resize (and hence an expose
685 * event) by resizing the display area.
687 return (dispN ? True : False);
689 } /* End _DtHelpSetScrollBars */
691 /******************************************************************************
693 * Public Functions - those an application developer can call.
695 *****************************************************************************/
697 /*********************************************************************
700 * SetList creates a Text Graphic area with the appropriate scroll bars.
702 *********************************************************************/
704 _DtHelpDisplayAreaSetList (
705 XtPointer client_data,
706 XtPointer topic_handle,
713 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
716 * clear the selection
718 _DtHelpClearSelection (client_data);
721 * If there is anything to do
723 _DtCanvasSetTopic (pDAS->canvas, (_DtCvTopicPtr) topic_handle,
725 &width, &height, &scrollY);
728 * free the old topic and remember the new
730 _DtHelpDestroyTopicData(pDAS->lst_topic, _DtHelpDADestroyRegion,
731 (_DtCvPointer) pDAS);
733 pDAS->lst_topic = (_DtCvTopicPtr) topic_handle;
736 * do we want to scroll?
738 if (scroll_percent != -1)
739 scrollY = scroll_percent * height / 1000;
742 * Reset the scroll bars and perhaps do an expose.
744 SetMaxPositions (pDAS, width, height);
746 pDAS->firstVisible = scrollY;
748 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
749 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
751 if (pDAS->firstVisible < 0)
752 pDAS->firstVisible = 0;
754 (void) _DtHelpSetScrollBars (client_data, pDAS->dispWidth, pDAS->dispHeight);
755 if (XtIsRealized (pDAS->dispWid))
756 _DtHelpCleanAndDrawWholeCanvas(client_data);
758 } /* End _DtHelpDisplayAreaSetList */
760 /*****************************************************************************
761 * Function: void _DtHelpDisplayAreaDimensionsReturn (DtHelpDispAreaStruct *pDAS,
762 * int *ret_width, int *ret_height)
764 * Parameters pDAS Specifies the Display Area.
765 * ret_rows Returns the number of rows in
767 * ret_columns Returns the number of columns in
772 * Purpose: Allows access to the height and width of a Display Area.
774 *****************************************************************************/
776 _DtHelpDisplayAreaDimensionsReturn (
777 XtPointer client_data,
781 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
783 *ret_rows = ((int)pDAS->dispUseHeight) / pDAS->lineHeight;
784 *ret_columns = ((int) pDAS->dispUseWidth) / (pDAS->charWidth / 10);
786 } /* End _DtHelpDisplayAreaDimensionsReturn */
788 /*****************************************************************************
789 * Function: int _DtHelpGetScrollbarValue (DtHelpDispAreaStruct *pDAS)
791 * Parameters pDAS Specifies the Display Area.
793 * Returns: a value from -1 to 100.
794 * -1 means the vertical scrollbar was not created when
795 * the display area was created.
796 * 0 to 100 is the percentage the vertical scroll bar is
797 * scrolled displaying the current topic.
799 * Purpose: Allows the system to query the location of the scrollbar
800 * and remember for smart-backtracking.
802 *****************************************************************************/
804 _DtHelpGetScrollbarValue (XtPointer client_data)
806 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
810 if (pDAS->vertScrollWid != NULL)
813 if (pDAS->firstVisible && pDAS->maxYpos)
814 percent = (pDAS->firstVisible * 1000) / pDAS->maxYpos;
819 } /* End _DtHelpGetScrollbarValue */
821 /*****************************************************************************
822 * Function: int _DtHelpUpdatePath (DtHelpDispAreaStruct *pDAS,
824 * Parameters pDAS Specifies the Display Area.
826 * Returns: a value from -1 to 100.
827 * -1 means the vertical scrollbar was not created when
828 * the display area was created.
829 * 0 to 100 is the percentage the vertical scroll bar is
830 * scrolled displaying the current topic.
832 * Purpose: Allows the system to query the location of the scrollbar
833 * and remember for smart-backtracking.
835 *****************************************************************************/
838 DtHelpDispAreaStruct *pDAS,
839 _DtHelpVolumeHdl volume_handle,
848 XtPointer topic_handle;
851 * turn off the toc marker
853 _DtHelpDATocMarker(pDAS, False);
854 (void) _DtCanvasMoveTraversal(pDAS->canvas, _DtCvTRAVERSAL_OFF, False,
855 ((_DtCvValue) XtIsRealized(pDAS->dispWid)),
856 NULL, NULL, NULL, NULL, NULL);
859 * now create and set the topic
861 result = _DtHelpFormatToc(pDAS,volume_handle,loc_id,&realId,&topic_handle);
865 _DtCanvasSetTopic (pDAS->canvas, (_DtCvTopicPtr) topic_handle,
867 &width, &height, NULL);
870 * free the old topic and remember the new
872 _DtHelpDestroyTopicData(pDAS->lst_topic, _DtHelpDADestroyRegion,
873 (_DtCvPointer) pDAS);
875 pDAS->lst_topic = (_DtCvTopicPtr) topic_handle;
878 * Reset the scroll bars and perhaps do an expose.
880 SetMaxPositions (pDAS, width, height);
883 * now turn the traversal on - but only if there is a path in
888 (void) _DtCanvasMoveTraversal(pDAS->canvas, _DtCvTRAVERSAL_ID, False,
889 ((_DtCvStatus) XtIsRealized(pDAS->dispWid)), realId,
890 NULL, &(pDAS->toc_y), &(pDAS->toc_base), &(pDAS->toc_height));
893 * figure out where the first line should be...
895 tocY = pDAS->toc_y - pDAS->lineThickness;
896 tocHeight = pDAS->toc_height + (2 * pDAS->lineThickness);
898 if (tocY < pDAS->firstVisible ||
899 tocY + tocHeight > pDAS->firstVisible + ((int)pDAS->dispUseHeight))
901 pDAS->firstVisible = tocY;
902 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
903 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
905 if (pDAS->firstVisible < 0)
906 pDAS->firstVisible = 0;
911 * Reset the scroll bars and perhaps do an expose.
913 (void) _DtHelpSetScrollBars((XtPointer) pDAS, pDAS->dispWidth, pDAS->dispHeight);
914 if (XtIsRealized (pDAS->dispWid))
915 _DtHelpCleanAndDrawWholeCanvas((XtPointer) pDAS);
918 _DtHelpDATocMarker((XtPointer) pDAS, True);
922 } /* End _DtHelpUpdatePath */
924 /*****************************************************************************
925 * Function: Widget _DtHelpDisplayAreaWidget ();
928 * client_data Specifies the display area pointer.
930 * Returns: the widget associated with the display area.
934 *****************************************************************************/
936 _DtHelpDisplayAreaWidget (
937 XtPointer client_data)
939 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
941 return (pDAS->dispWid);
944 /*****************************************************************************
945 * Function: XtPointer _DtHelpDisplayAreaData ();
948 * client_data Specifies the display area pointer.
950 * Returns: the client data associated with the display area.
954 *****************************************************************************/
956 _DtHelpDisplayAreaData (
957 XtPointer client_data)
959 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
961 return (pDAS->clientData);