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 libraries 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"
72 #include "XInterfaceI.h"
73 #include "XUICreateI.h"
79 /******** Private Function Declarations ********/
80 /******** End Public Function Declarations ********/
82 /******************************************************************************
84 * Private defines and variables
86 *****************************************************************************/
91 /******************************************************************************
95 *****************************************************************************/
96 #define NeedVertScrollbar(x) \
97 _DtHelpIS_AS_NEEDED((x)->neededFlags,_DtHelpVERTICAL_SCROLLBAR)
98 #define NeedHorzScrollbar(x) \
99 _DtHelpIS_AS_NEEDED((x)->neededFlags,_DtHelpHORIZONTAL_SCROLLBAR)
100 /******************************************************************************
104 *****************************************************************************/
107 DtHelpDispAreaStruct *pDAS,
112 pDAS->maxYpos = max_y + pDAS->marginHeight;
115 /******************************************************************************
117 * Semi Public Functions - these routines called by other modules within
120 *****************************************************************************/
121 /******************************************************************************
122 * Function: _DtHelpSetScrollBars
124 * Sets/Resets the vertical scroll bar values.
125 *****************************************************************************/
126 enum DoSomething { DoNothing, DoManage, DoUnmanage };
128 _DtHelpSetScrollBars (
129 XtPointer client_data,
131 Dimension new_height)
137 int changeHeight = 0;
143 int oldScrollPercent = 10000;
146 _DtCvUnit ret_height;
151 Dimension marginWidth;
152 Dimension marginHeight;
153 Dimension horzHeight;
158 XRectangle rectangle[1];
160 enum DoSomething doVert = DoNothing;
161 enum DoSomething doHorz = DoNothing;
162 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
165 * remember the old first line.
167 oldMaxYpos = pDAS->maxYpos;
168 if (pDAS->firstVisible && pDAS->maxYpos)
169 oldScrollPercent = pDAS->firstVisible * 10000 / pDAS->maxYpos;
172 * get the width and height of the scroll bars.
174 if (pDAS->vertScrollWid)
176 XtSetArg (args[0], XmNwidth , &vertWidth);
177 XtGetValues (pDAS->vertScrollWid, args, 1);
180 if (pDAS->horzScrollWid)
182 XtSetArg (args[0], XmNheight , &horzHeight);
183 XtGetValues (pDAS->horzScrollWid, args, 1);
187 * remember our old width and height
189 oldWidth = pDAS->dispWidth;
190 oldHeight = pDAS->dispHeight;
193 * Settle the sizing issue before we remap the scroll bars.
200 if (new_height != pDAS->dispHeight)
202 pDAS->dispHeight = new_height;
203 pDAS->dispUseHeight = new_height - 2 * pDAS->decorThickness;
204 if (((int) new_height) < 2 * ((int) pDAS->decorThickness))
205 pDAS->dispUseHeight = 0;
207 pDAS->visibleCount = ((int) pDAS->dispUseHeight) /
210 if (pDAS->visibleCount < 0)
211 pDAS->visibleCount = 0;
215 * check to see if we've changed width
217 if (new_width != pDAS->dispWidth)
222 pDAS->dispWidth = new_width;
223 pDAS->dispUseWidth = new_width - 2 * pDAS->decorThickness;
224 if (((int)new_width) < 2 * ((int) pDAS->decorThickness))
225 pDAS->dispUseWidth = 0;
228 * re-layout the information.
230 if (_DtCvSTATUS_OK ==
231 _DtCanvasResize(pDAS->canvas, _DtCvFALSE,
232 &ret_width, &ret_height))
233 SetMaxPositions (pDAS, ret_width, ret_height);
238 * Check to see if we have a vertical scrollbar and whether it
239 * is as_needed. If static, it is always mapped.
241 if (NULL != pDAS->vertScrollWid && NeedVertScrollbar(pDAS))
244 * will the information fit on one page?
246 if (pDAS->maxYpos <= ((int) pDAS->dispUseHeight))
249 * If the window has not already been 'stretched' by
250 * the width of the scrollbar and if the scrollbar is
251 * mapped, grow the window width.
253 if (0 == changeWidth && pDAS->vertIsMapped)
256 * set the flag to indicate that the window width
257 * has grown. This can occur only if the window
258 * has its vertical scrollbar already mapped.
261 new_width += vertWidth;
264 * Else check to see if the window has been shrunk.
265 * If so, then stretch it back out to its original
268 * This can occur only if
269 * a) The vertical scrollbar is not mapped.
270 * b) The previous pass through this code indicates
271 * that the window could not hold the length of
272 * the information, and therefore calculations and
273 * flags were set to map the vertical scrollbar.
274 * But a _DtCanvasResize() now indicates that a
275 * vertical scrollbar is not needed. So we don't
276 * need the vertical scrollbar and have to nuliify
277 * the calculation to include it.
279 else if (-1 == changeWidth)
282 new_width += vertWidth;
286 * The information will not fit on one page.
291 * If the window has not already been shrunk to
292 * accomidate the vertical scrollbar (and the scrollbar
293 * is not already mapped) then set the flags and
296 if (False == pDAS->vertIsMapped && 0 == changeWidth)
299 * set the flag to indicate that the window width
300 * has shrunk (and that consequently, the vertical
301 * scrollbar is not mapped).
304 if (new_width > vertWidth)
305 new_width -= vertWidth;
310 * Else check to see if the window has been streched.
311 * If so, then shrink it back out to its original
314 * This can occur only if
315 * a) The vertical scrollbar is mapped.
316 * b) The previous pass through this code indicates
317 * that the window could hold the length of
318 * the information, and therefore calculations and
319 * flags were set to unmap the vertical scrollbar.
320 * But a _DtCanvasResize() now indicates that a
321 * vertical scrollbar is needed. So we need
322 * the vertical scrollbar and have to nuliify
323 * the calculation to eliminate it.
325 else if (1 == changeWidth)
328 new_width -= vertWidth;
334 * Check to see if we have a horizontal scrollbar and whether it
335 * is as_needed. If static, it is always mapped.
337 if (NULL != pDAS->horzScrollWid && NeedHorzScrollbar(pDAS))
340 * will the information fit within the right border?
342 if (pDAS->maxX <= ((int) pDAS->dispUseWidth))
345 * If the window has not already been 'stretched' by
346 * the height of the scrollbar and if the scrollbar is
347 * mapped, grow the window.
349 if (0 == changeHeight && pDAS->horzIsMapped)
352 * set the flag to indicate that the window has
353 * grown. This can occur only if the window has
354 * its horizontal scrollbar already mapped.
357 new_height += horzHeight;
360 * Else check to see if the window has been shrunk.
361 * If so, stretch it back to its original height.
363 * This can occur only if
364 * a) The horizontal scrollbar is not mapped.
365 * b) The previous pass through the code indicated
366 * that the information exceeded the right border
367 * and therefore calculations and flags were set
368 * to map the horizontal scrollbar. But a
369 * _DtCanvasResize() now indicates that the
370 * horizontal scrollbar is not needed. So we
371 * have to nullify the calculations and flags
374 else if (-1 == changeHeight)
377 new_height += horzHeight;
381 * The information exceeds the right border of the window.
386 * If the window has no already been shrunk to
387 * accomidate the horizontal scrollbar (and the
388 * scrollbar is not already mapped), then set the
389 * flags and shrink the height.
391 if (False == pDAS->horzIsMapped && 0 == changeHeight)
394 * set the flag to indicate that the window height
395 * has shrunk (and that the scrollbar needs mapping).
398 if (new_height > horzHeight)
399 new_height -= horzHeight;
404 * Else check to see if the window has been streched.
405 * If so, then shrink it back out to its original
408 * This can occur only if
409 * a) The horizontal scrollbar is mapped.
410 * b) The previous pass through the code indicated
411 * that the information did not exceeded the right
412 * border and therefore calculations and flags were
413 * set to unmap the horizontal scrollbar. But a
414 * _DtCanvasResize() now indicates that the
415 * horizontal scrollbar is needed. So we
416 * have to nullify the calculations and flags
419 else if (1 == changeHeight)
422 new_height -= horzHeight;
427 } while (new_height != pDAS->dispHeight || new_width != pDAS->dispWidth);
430 * reset the first visible line, if needed.
432 if (oldScrollPercent != 10000 && pDAS->maxYpos != oldMaxYpos)
433 pDAS->firstVisible = pDAS->maxYpos * oldScrollPercent / 10000;
435 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
436 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
438 if (pDAS->firstVisible < 0)
439 pDAS->firstVisible = 0;
442 * Reset the virtual X value, if needed
444 if (pDAS->virtualX &&
445 (pDAS->maxX - pDAS->virtualX < ((int) pDAS->dispUseWidth)))
447 pDAS->virtualX = pDAS->maxX - pDAS->dispUseWidth;
448 if (pDAS->virtualX < 0)
453 * If I've changed my size, I've got to change my clip masks.
455 if (oldWidth != pDAS->dispWidth || oldHeight != pDAS->dispHeight)
458 * If the display area hasn't been realized, the resetting of
459 * the bottom right corner offsets will not cause a resize
460 * event to occur. Rather the overall window will grow by
461 * the width or height of the scroll bar and not cause the
462 * display area to shrink. Therefore when the exposure event
463 * is called the width or height will be not be equal to what
464 * I think it should be causing the code to believe a resize
465 * is in process. The short of the matter is that the exposure
466 * will not happen and we end up with a blank window.
468 * So for this case, resize the display area to what we think it
469 * should be and the exposure event will then happen.
470 if (!XtIsRealized (pDAS->dispWid))
473 XtSetArg(dispArgs[dispN], XmNwidth, pDAS->dispWidth); ++dispN;
474 XtSetArg(dispArgs[dispN], XmNheight, pDAS->dispHeight); ++dispN;
477 rectangle[0].x = pDAS->decorThickness;
478 rectangle[0].y = pDAS->decorThickness;
479 rectangle[0].width = pDAS->dispUseWidth;
480 rectangle[0].height = pDAS->dispUseHeight;
482 XSetClipRectangles(XtDisplay(pDAS->dispWid), pDAS->normalGC, 0, 0,
483 rectangle, 1, Unsorted);
484 XSetClipRectangles(XtDisplay(pDAS->dispWid), pDAS->invertGC, 0, 0,
485 rectangle, 1, Unsorted);
487 if (pDAS->resizeCall)
488 (*(pDAS->resizeCall)) (pDAS->clientData);
492 * Has the width changed? If so, then we are mapping or unmapping
493 * the vertical scrollbar.
495 if (-1 == changeWidth)
498 * manage the scrollbar, the window has shrunk.
502 XtSetArg(dispArgs[dispN], XmNrightAttachment, XmATTACH_WIDGET);
504 XtSetArg(dispArgs[dispN], XmNrightWidget, pDAS->vertScrollWid);
507 else if (1 == changeWidth)
510 * unmanage the scrollbar, the window has grown.
514 XtSetArg(dispArgs[dispN], XmNrightAttachment, XmATTACH_FORM);
519 * Has the height changed? If so, then we are mapping or unmapping
520 * the horizontal scrollbar.
522 if (-1 == changeHeight)
525 * manage the scrollbar, the window has shrunk.
529 XtSetArg(dispArgs[dispN], XmNbottomAttachment,XmATTACH_WIDGET);
531 XtSetArg(dispArgs[dispN], XmNbottomWidget,pDAS->horzScrollWid);
534 else if (1 == changeHeight)
537 * unmanage the scrollbar, the window has grown.
541 XtSetArg(dispArgs[dispN], XmNbottomAttachment, XmATTACH_FORM);
546 * get the margins, widths and height.
548 XtSetArg (args[0], XmNmarginWidth , &marginWidth);
549 XtSetArg (args[1], XmNmarginHeight, &marginHeight);
550 XtGetValues (XtParent (pDAS->dispWid), args, 2);
553 * have to map the scroll bars before the drawn button can be
554 * attached to them and can't unmap the scroll bars until
555 * the drawn button has been unattached from them. But we
556 * want to do the re-attachments all at once to minimize the
559 if (doHorz == DoManage)
561 if (!XtIsRealized(pDAS->horzScrollWid))
562 XtSetMappedWhenManaged (pDAS->horzScrollWid, True);
564 XtMapWidget (pDAS->horzScrollWid);
565 pDAS->horzIsMapped = True;
568 if (doVert == DoManage)
570 if (!XtIsRealized(pDAS->vertScrollWid))
571 XtSetMappedWhenManaged (pDAS->vertScrollWid, True);
573 XtMapWidget (pDAS->vertScrollWid);
574 pDAS->vertIsMapped = True;
577 if (pDAS->vertScrollWid && pDAS->vertIsMapped && doVert != DoUnmanage)
579 if (pDAS->horzScrollWid && pDAS->horzIsMapped && doHorz != DoUnmanage)
580 XtSetArg(args[0], XmNbottomOffset, (marginHeight + horzHeight));
582 XtSetArg(args[0], XmNbottomOffset, marginHeight);
587 * set the slider size.
589 slideSize = pDAS->dispUseHeight;
594 * determine the maximum size
596 maximum = pDAS->maxYpos;
598 if (maximum < slideSize)
605 * determine the page increment.
608 if (((int)pDAS->dispUseHeight) - pDAS->lineHeight > 2)
609 pageInc = pDAS->dispUseHeight - pDAS->lineHeight;
611 XtSetArg (args[n], XmNvalue , pDAS->firstVisible); ++n;
612 XtSetArg (args[n], XmNsliderSize , slideSize); ++n;
613 XtSetArg (args[n], XmNmaximum , maximum); ++n;
614 XtSetArg (args[n], XmNpageIncrement, pageInc); ++n;
615 XtSetValues (pDAS->vertScrollWid, args, n);
618 if (pDAS->horzScrollWid && pDAS->horzIsMapped && doHorz != DoUnmanage)
620 if (pDAS->vertScrollWid && pDAS->vertIsMapped && doVert != DoUnmanage)
621 XtSetArg(args[0], XmNrightOffset, (marginWidth + vertWidth));
623 XtSetArg(args[0], XmNrightOffset, marginWidth);
627 * determine the slider size.
629 slideSize = pDAS->dispUseWidth - 1;
634 * determine the maximum size
637 if (maximum < pDAS->maxX)
638 maximum = pDAS->maxX - 1;
644 * determine the page increment.
647 if (((int) pDAS->dispUseWidth) > 2)
648 pageInc = pDAS->dispUseWidth - 1;
650 XtSetArg (args[n], XmNvalue , pDAS->virtualX); n++;
651 XtSetArg (args[n], XmNsliderSize , slideSize); n++;
652 XtSetArg (args[n], XmNmaximum , maximum); n++;
653 XtSetArg (args[n], XmNpageIncrement, pageInc); ++n;
654 XtSetValues (pDAS->horzScrollWid, args, n);
658 * set the display area args
661 XtSetValues (pDAS->dispWid, dispArgs, dispN);
664 * unmap those we don't want.
666 if (doHorz == DoUnmanage)
668 if (!XtIsRealized(pDAS->horzScrollWid))
669 XtSetMappedWhenManaged (pDAS->horzScrollWid, False);
671 XtUnmapWidget (pDAS->horzScrollWid);
672 pDAS->horzIsMapped = False;
675 if (doVert == DoUnmanage)
677 if (!XtIsRealized(pDAS->vertScrollWid))
678 XtSetMappedWhenManaged (pDAS->vertScrollWid, False);
680 XtUnmapWidget (pDAS->vertScrollWid);
681 pDAS->vertIsMapped = False;
685 * return whether or not we generated a resize (and hence an expose
686 * event) by resizing the display area.
688 return (dispN ? True : False);
690 } /* End _DtHelpSetScrollBars */
692 /******************************************************************************
694 * Public Functions - those an application developer can call.
696 *****************************************************************************/
698 /*********************************************************************
701 * SetList creates a Text Graphic area with the appropriate scroll bars.
703 *********************************************************************/
705 _DtHelpDisplayAreaSetList (
706 XtPointer client_data,
707 XtPointer topic_handle,
714 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
717 * clear the selection
719 _DtHelpClearSelection (client_data);
722 * If there is anything to do
724 _DtCanvasSetTopic (pDAS->canvas, (_DtCvTopicPtr) topic_handle,
726 &width, &height, &scrollY);
729 * free the old topic and remember the new
731 _DtHelpDestroyTopicData(pDAS->lst_topic, _DtHelpDADestroyRegion,
732 (_DtCvPointer) pDAS);
734 pDAS->lst_topic = (_DtCvTopicPtr) topic_handle;
737 * do we want to scroll?
739 if (scroll_percent != -1)
740 scrollY = scroll_percent * height / 1000;
743 * Reset the scroll bars and perhaps do an expose.
745 SetMaxPositions (pDAS, width, height);
747 pDAS->firstVisible = scrollY;
749 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
750 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
752 if (pDAS->firstVisible < 0)
753 pDAS->firstVisible = 0;
755 (void) _DtHelpSetScrollBars (client_data, pDAS->dispWidth, pDAS->dispHeight);
756 if (XtIsRealized (pDAS->dispWid))
757 _DtHelpCleanAndDrawWholeCanvas(client_data);
759 } /* End _DtHelpDisplayAreaSetList */
761 /*****************************************************************************
762 * Function: void _DtHelpDisplayAreaDimensionsReturn (DtHelpDispAreaStruct *pDAS,
763 * int *ret_width, int *ret_height)
765 * Parameters pDAS Specifies the Display Area.
766 * ret_rows Returns the number of rows in
768 * ret_columns Returns the number of columns in
773 * Purpose: Allows access to the height and width of a Display Area.
775 *****************************************************************************/
777 _DtHelpDisplayAreaDimensionsReturn (
778 XtPointer client_data,
782 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
784 *ret_rows = ((int)pDAS->dispUseHeight) / pDAS->lineHeight;
785 *ret_columns = ((int) pDAS->dispUseWidth) / (pDAS->charWidth / 10);
787 } /* End _DtHelpDisplayAreaDimensionsReturn */
789 /*****************************************************************************
790 * Function: int _DtHelpGetScrollbarValue (DtHelpDispAreaStruct *pDAS)
792 * Parameters pDAS Specifies the Display Area.
794 * Returns: a value from -1 to 100.
795 * -1 means the vertical scrollbar was not created when
796 * the display area was created.
797 * 0 to 100 is the percentage the vertical scroll bar is
798 * scrolled displaying the current topic.
800 * Purpose: Allows the system to query the location of the scrollbar
801 * and remember for smart-backtracking.
803 *****************************************************************************/
805 _DtHelpGetScrollbarValue (XtPointer client_data)
807 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
811 if (pDAS->vertScrollWid != NULL)
814 if (pDAS->firstVisible && pDAS->maxYpos)
815 percent = (pDAS->firstVisible * 1000) / pDAS->maxYpos;
820 } /* End _DtHelpGetScrollbarValue */
822 /*****************************************************************************
823 * Function: int _DtHelpUpdatePath (DtHelpDispAreaStruct *pDAS,
825 * Parameters pDAS Specifies the Display Area.
827 * Returns: a value from -1 to 100.
828 * -1 means the vertical scrollbar was not created when
829 * the display area was created.
830 * 0 to 100 is the percentage the vertical scroll bar is
831 * scrolled displaying the current topic.
833 * Purpose: Allows the system to query the location of the scrollbar
834 * and remember for smart-backtracking.
836 *****************************************************************************/
839 DtHelpDispAreaStruct *pDAS,
840 _DtHelpVolumeHdl volume_handle,
849 XtPointer topic_handle;
852 * turn off the toc marker
854 _DtHelpDATocMarker(pDAS, False);
855 (void) _DtCanvasMoveTraversal(pDAS->canvas, _DtCvTRAVERSAL_OFF, False,
856 ((_DtCvValue) XtIsRealized(pDAS->dispWid)),
857 NULL, NULL, NULL, NULL, NULL);
860 * now create and set the topic
862 result = _DtHelpFormatToc(pDAS,volume_handle,loc_id,&realId,&topic_handle);
866 _DtCanvasSetTopic (pDAS->canvas, (_DtCvTopicPtr) topic_handle,
868 &width, &height, NULL);
871 * free the old topic and remember the new
873 _DtHelpDestroyTopicData(pDAS->lst_topic, _DtHelpDADestroyRegion,
874 (_DtCvPointer) pDAS);
876 pDAS->lst_topic = (_DtCvTopicPtr) topic_handle;
879 * Reset the scroll bars and perhaps do an expose.
881 SetMaxPositions (pDAS, width, height);
884 * now turn the traversal on - but only if there is a path in
889 (void) _DtCanvasMoveTraversal(pDAS->canvas, _DtCvTRAVERSAL_ID, False,
890 ((_DtCvStatus) XtIsRealized(pDAS->dispWid)), realId,
891 NULL, &(pDAS->toc_y), &(pDAS->toc_base), &(pDAS->toc_height));
894 * figure out where the first line should be...
896 tocY = pDAS->toc_y - pDAS->lineThickness;
897 tocHeight = pDAS->toc_height + (2 * pDAS->lineThickness);
899 if (tocY < pDAS->firstVisible ||
900 tocY + tocHeight > pDAS->firstVisible + ((int)pDAS->dispUseHeight))
902 pDAS->firstVisible = tocY;
903 if (pDAS->firstVisible + ((int)pDAS->dispUseHeight) > pDAS->maxYpos)
904 pDAS->firstVisible = pDAS->maxYpos - pDAS->dispUseHeight;
906 if (pDAS->firstVisible < 0)
907 pDAS->firstVisible = 0;
912 * Reset the scroll bars and perhaps do an expose.
914 (void) _DtHelpSetScrollBars((XtPointer) pDAS, pDAS->dispWidth, pDAS->dispHeight);
915 if (XtIsRealized (pDAS->dispWid))
916 _DtHelpCleanAndDrawWholeCanvas((XtPointer) pDAS);
919 _DtHelpDATocMarker((XtPointer) pDAS, True);
923 } /* End _DtHelpUpdatePath */
925 /*****************************************************************************
926 * Function: Widget _DtHelpDisplayAreaWidget ();
929 * client_data Specifies the display area pointer.
931 * Returns: the widget associated with the display area.
935 *****************************************************************************/
937 _DtHelpDisplayAreaWidget (
938 XtPointer client_data)
940 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
942 return (pDAS->dispWid);
945 /*****************************************************************************
946 * Function: XtPointer _DtHelpDisplayAreaData ();
949 * client_data Specifies the display area pointer.
951 * Returns: the client data associated with the display area.
955 *****************************************************************************/
957 _DtHelpDisplayAreaData (
958 XtPointer client_data)
960 DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
962 return (pDAS->clientData);