749N/A/*********************************************************** 749N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, 749N/Aand the Massachusetts Institute of Technology, Cambridge, Massachusetts. 749N/APermission to use, copy, modify, and distribute this software and its 749N/Adocumentation for any purpose and without fee is hereby granted, 749N/Aprovided that the above copyright notice appear in all copies and that 749N/Aboth that copyright notice and this permission notice appear in 749N/Asupporting documentation, and that the names of Digital or MIT not be 749N/Aused in advertising or publicity pertaining to distribution of the 749N/Asoftware without specific, written prior permission. 749N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 749N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 749N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 749N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 749N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 749N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 749N/A******************************************************************/ 749N/A {
/* core_class fields */ 749N/A /* class_name */ "Viewport",
749N/A {
/* composite_class fields */ 749N/A {
/* constraint_class fields */ 749N/A /* subresource_count */ 0,
749N/A {
/* form_class fields */ 749N/A {
/* viewport_class fields */ 749N/A * Initialize all widget pointers to NULL. 749N/A return;
/* If we are not forcing the bars then we are done. */ 749N/A * Set the clip widget to the correct height. 749N/A /* take care of bars, &tc. */ 749N/A /* this is dirty, but it saves the following code: */ 749N/A /* %%% do we need to hide this child from Form? */ 749N/A * intended.{width,height} caches the eventual child dimensions, 749N/A * but we don't set the mode bits until after we decide that the 749N/A * child's preferences are not acceptable. 749N/A do {
/* while intended != prev */ 749N/A * note that having once decided to turn on either bar 749N/A * we'll not change our mind until we're next resized, 749N/A * thus avoiding potential oscillations. 749N/A/* Function Name: ComputeWithForceBars 749N/A * Description: Computes the layout give forcebars is set. 749N/A * Arguments: widget - the viewport widget. 749N/A * query - whether or not to query the child. 749N/A * intended - the cache of the childs height is 749N/A * stored here ( USED AND RETURNED ). 749N/A * clip_width, clip_height - size of clip window. 749N/A * (USED AND RETURNED ). 749N/A * If forcebars then needs = allows = has. 749N/A * Thus if needsvert is set it MUST have a scrollbar. 749N/A#
else /* else not macII */ 749N/A#
else /* else not macII */ 749N/A /* horizontal scrollbar will be needed so possibly reduce height */ 749N/A /* vertical scrollbar will be needed, so possibly reduce width */ 749N/A /* This is the Realize call; we'll inherit a w&h iff none currently */