AaR^33.0HH  d    dFootnote TableFootnote**. . / - lp(2\* \/TOCHeadingI% +  h      l* q+,- . r/01 2 s345 6 i789 : t;   $97396: Figure: Figure 14: A drawicon  bP:74281: Figure: Figure 17: Normal and highlighted drawrects - %U;79586: Figure: Figure 26: Drawtext justification attributes 1 )K@50237: Figure: Figure 28: A callback to make grip move in an arc 5 I+63380: Figure: Figure 30: Arrow head styles0F> 9  S85225: Figure: Figure 31: Attributes for controlling the dimensions of an arrowhead   a a h $97396: Figure: Figure 14: A drawicon i6+63380: Figure: Figure 30: Arrow head stylesaoo q*:74281: Figure: Figure 17: Normal and highlighted drawrects r.\;79586: Figure: Figure 26: Drawtext justification attributes s2@50237: Figure: Figure 28: A callback to make grip move in an arc t:S85225: Figure: Figure 31: Attributes for controlling the dimensions of an arrowhead-!<$lastpagenum><$monthname> <$daynum>, <$year>"<$monthnum>/<$daynum>/<$shortyear> <$monthname> <$daynum>, <$year> "<$monthnum>/<$daynum>/<$shortyear>e <$monthname> <$daynum>, <$year>-"<$monthnum>/<$daynum>/<$shortyear>us <$fullfilename>  <$filename>g  <$paratext[Title]> t  <$paratext[Heading]>  <$curpagenum>re:  <$marker1>he <$marker2>  (Continued)Pagepage<$pagenum>tHeading & Page <$paratext> on page<$pagenum>See Heading & Page%See <$paratext> on page<$pagenum>. Table & Page7Table<$paranumonly>, <$paratext>, on page<$pagenum>:+ (Sheet <$tblsheetnum> of <$tblsheetcount>)s figure number9<$paranumonly> wwParixxP2yyPge:zzPaba{{Q Ae||QA:}}P:ig~~P trQrAiQnAf@@la AV<$dJ$yeV"Im>/I/<$J> U$moI<$dI$yeJ"Km>/ Figure 26: yeahhthnhynuhr>-l$mo Figure 27: /<$hyeakkenak ke>gh$pahtlehht[Hh hpagl  ! Figure 33: h$maZBtinBBeBgenBHeBageltex' Figure 39: enuhBdinK`%SeShtexUhgeWh>.Xhle YhablZhumo[=par\hon ]hgen^l+# Figure 35: tnu_h <$`hounah fibher9ckumodkekfkriqhxrhshyPgthuhbavh{xkyk|Qzkkigl~ Figure 28: lAi Figure 32: Afl" Figure 34: l@$ Figure 36: l& Figure 38: Jhl( Figure 40: /<$kJkUkIkIkJkKk Fikyeakkkkkl27:% Figure 37: kkhhhhhhBhhh!hk$mahktinkkehgenhHekagektexkurekhkBhK`hShkUhhWhlXh) Figure 41: kumohparhon Egenh+kureh_hh`hlah Figure 29: humokdkPekkfkhqhhrhhshPthhbak{hh|QPhkh28:hAikurehlh FiPh Fikk&k38:hPh40:kJhUPIhl Figure 30: FiPkhhl Figure 31: khh%k37:CkhhCkhCkCk!hC$makhtinCkehgen hHe!kage#htex3hureuTduhw|hdvk}hH$ wxu kH$ reUU` kHz xwyu hHz hUU` hH$ yxzu H$ AikUU` hHz zy{u Hz PUU`0: HH{z|u HHFik` hHH|{u kHHk` hH$ }~v hH$ !UU` aHz ~}v Hz kUTUThre0SlingShot 2.0 Programmers Handbook37 HH~v HHh` dH3K ^ H RH RFootnoteHqv? ^ hHzHzh Single Line H'Footnote z HvDf ^ HH: Double LineH  Double LinekH  Single LineHZ TableFootnote EGX-Rb ^ EPoEPo TableFootnoted$HCm $HCmK` ~h^ Vh Sikj[e$"[%D*noe[*[޽D;*zehw/@`H }eehwSamplemc]4 *letjqtjqIgzdyg@ydqtjqEU*g*w*g *w*g*mc]4 *kj[e$"[%D*[%[eD;@gmhCgmhmhgOe Ta'Vt/J> 6 '^h'^hDrawicon=<[e2=<[e=<[e=<=bgt7 6 p)hp)h Drawimageg~3* gh~gret, 6 )h)hhDrawtexte[%Vt@M%>: *>:`H`4drawicon1 = (Drawicon) xv_create(parent, DRAWICON, `DRAWTEXT_STRING, Sample, `@!DRAWIMAGE_IMAGE1, smiley_face, '` NULL); jmF$mVm ;ۺ$m{x$q 5drawrect.rs/tmp_mnt/home/brianw/DOC/drawrect.rsdHH HH '` Drawicon UU uThe Drawicon extension is subclassed from the Rectobj extension and inherits its attributes and features. A drawicon )UU@nalso understands the attributes for a drawtext and drawimage. The following figure shows the class hierarchy. ;UUhq sUU`hDrawicon class hierarchy UU %kA drawicon object conveniently manages two objects, a drawtext and a drawimage, and positions them in file UUawvmanager style: the image is above (or left of) the text and both are centered. The drawicon creates the drawimage and UUac{drawtext object when it is created, and recenters them or resizes itself when the text or the images changes size. UU}Figure 27  shows the code to create a drawicon with and the code to create it with the string Sample and the server UU@image smiley_face. ϪUUh UUhDrA drawicon UUUU icsThe Drawicon extension accepts the attributes of the Drawimage and Drawtext extensions and forwards the attributes UUUUer|to them. In the figure, DRAWTEXT_STRING and DRAWIMAGE_IMAGE1 are attributes of the Drawtext and UU@hVDrawimage extensions. The attributes that it forwards are listed in the appendix. ƪUU awxThe handles of these two objects can be retrieved with the attributes DRAWICON_TEXT and DRAWICON_IMAGE. heӪUU c{Usually an application does not need to use these handles because the Drawicon forwards most attributes, but there rs ઢUUseare some attributes that are only useful when set on the individual objects, such as RECTOBJ_FG. Also, callbacks eUUpsuch as double click procedures should be set on the drawicon rather than the individual drawtext and drawimage UU@;objects because the Drawicon handles this on their behalf. tend DexHH esHH fi` Drawimage UU  aoThe Drawimage extension is subclassed from the Rectobj extension and inherits its attributes and features. The at )UU@st,following figure shows the class hierarchy. ha;UUhr o csUU`thDrawimage class hierarchy UU DRoThe drawimage takes a XView server image and displays it on a canvas_shell. The server image is specified with rawUU arDRAWIMAGE_IMAGE1. A second server image can be specified to display the drawimage when it is highlighted with UUobnDRAWIMAGE_IMAGE2. If no highlighted image is specified, a rectangle is drawn around the object when it is UU@wi selected. ªUU  dZThe drawimage can be non-rectangular. Both the normal and highlight images can have masks ϪUUn(DRAWIMAGE_IMAGE1_MASK and DRAWIMAGE_IMAGE2_MASK). The masks are server images that are 1 bit ܪUUodeep and should probably be the same size as the images. Where the images have a bit set, the drawicon will be Rec骤UU iwpainted. Events are also clipped to this mask, events at locations where there is no bit set will not be mapped to the UUUU@ drawicon. UU astIf the SERVER_IMAGE_DEPTH of the server_image is 1, the drawimage is rendered in RECTOBJ_FG. If the erUUd rSERVER_IMAGE_DEPTH is more than one, the image will be multicolored. The application must take care to set up "UUhtuthe color maps correctly and to make sure that the depth matches the depth of the canvas_shell that the drawimage is h/UU@s to appear in. AUU tThe size of the drawimage is taken from the width and height of the normal and highlighted images (whichever is UUNUU@WI larger). KdveHH UUHHl @sae `Kre Drawline UU e nThe Drawline extension is subclassed from the Rectobj extension and inherits its attributes and features. The )UU@ s,following figure shows the class hierarchy. ;UUh  UsUU`Drawline class hierarchy tUU  1A drawline is an straight line between two points. Endpoints are specified with the DRAWLINE_X and DRAWLINE_Y UU@ aattributes. For example: t`xv_set(drawline, y a`atDRAWLINE_X, 0, 11, `DRAWLINE_Y, 0, 13, `r DRAWLINE_X, 1, 50, `imDRAWLINE_Y, 1, 100, nd `!alNULL); ꪩUU # ipositions endpoint 0 at (11, 13) and endpoint 1 at (50, 100), relative to the parents origin. Each endpoint also can UU#shave an arrow head. The attribute DRAWLINE_ARROW_STYLE specifies the type of arrowhead, as shown in Figure assUUH#j 6307. inUUhte4 e<UUh5Arrow head styles <UU 3laARROW_NONE is the default value, a plain line. Both ARROW_FILLED and ARROW_HOLLOW are filled polygon i<UU3woshapes. With ARROW_FILLED the arrow head is drawn completely in the foreground color (RECTOBJ_FG). With t<UU3ARROW_HOLLOW, the arrow head is drawn in the background color (RECTOBJ_BG) and outlined in the foreground <UUH3RAcolor (RECTOBJ_FG). The dimensions of the arrow head are controlled with three attributes, as shown in Figure :31;. ns <UUh 18 eoUUx10>9Attributes for controlling the dimensions of an arrowhead d aibHH peHH Fiss`j Drawrect nUU tenThe Drawrect extension is subclassed from the Rectobj extension and inherits its attributes and features. The )UU@e.,following figure shows the class hierarchy. OL;UUhs p isUU`woDrawrect class hierarchy LUU xThe Drawrect extension is useful for grouping children because it paints a border. If the drawrect is in a canvas_shell ARUUHJwith a control cms it uses 3d colors, as shown in Figure *33+. UU YutoThe Drawrect extension handles its children exactly as the Bag extension does and the BAG_ANCHORED and heUUYwitBAG_AUTO_SHRINK attributes can be used on a drawrect. The drawrect uses three attributes that are to be used in esªUUYhexplace of RECTOBJ_BORDER. DRAWRECT_BORDER1 is the thickness of the area between the outside edges of the peϪUUYodrawrect and beginning of the painted border. DRAWRECT_BORDER2 is the thickness of the painted border. is ܪUUYe sDRAWRECT_BORDER3 is the distance between painted border and the children. RECTOBJ_BORDER is set to the s h骤UU@Ysum of these three attributes. `UUhss  crUUh% Normal and highlighted drawrects fdinawg) jkon~ aJkIwnin V JkI~ YV LTes/! y siʀ/_RectobjV LTAU> aJkIn drvoid grip_done_proc(paint_window, event, canvas_shell, grip) e Xv_windowpaint_window; undmaEvent*event; gn Canvas_shellcanvas_shell; @dsGripgrip; UU` ȷ6n  isbeiW@-   t ((LDrawtext layoutBy 1WqQ-    re1(1(tDRAWTEXT_JUSTIFY value16|0n  i andxo*vaHH hiHH++  of(ri`UURectobj thUU  dtThe Rectobj extension is subclassed from the XView Generic extension (the root of the class hierarchy) and inherits vo)UU@reMits attributes and features. The following figure shows the class hierarchy. ;UUhv tsUU`heRectobj class hierarchy UU d tThe Rectobj extension is the superclass for all of the SlingShot extensions. It supports the attributes, callbacks, UU*}hierarchy, and geometry features that are shared by its subclasses. The section A Sample Program at the beginning of 6UU@wthis document gives an overview of the rectobjs base features, and the section that follows highlights the callbacks. UU (rThe Rectobj extension uses function pointers as hooks for implementing subclasses. Most subclasses have their own ªUUvaysettings for these function pointers to get their specific behavior. Applications may override these callbacks to change ϪUUThtthe behavior of an object. The most common changes would be to reset the RECTOBJ_EVENT_PROC for a different ܪUU@itZevent behavior, or to reset the RECTOBJ_PAINT_PROC to get a different appearance. `The Paint Callback clUU oEach subclass defines its paint function by setting the RECTOBJ_PAINT_PROC. The paint function has the triUU@following form: *' eo>void (*rectobj_paint_proc)(rectobj_public, dpy, win, xrects) 2Rectobj rectobj_public; = dDisplay *dpy; HbjWindow win; anS@ fXv_xrectlist*xrects; adUU`UUwThe paint proc is called when an expose event arrives from the server or when an object explicitly requests a repaint. wn vUU vaThe xrects parameter describes the areas that need to be repainted. (Xv_xrectlist is defined in ). UUviNo painting should be done outside the intersection of the objects rect (i.e. XV_RECT) and the rectangles listed in UUsexrects. The Xlib function XSetClipRectangles() does this exact function. The reason for this restriction is that objects sUU@s bmay overlap. Painting regardless of the clipping rectangles will upset the visual stacking order. UU g |If the object has any children, these must be painted after the object has painted itself so the children will appear to be reUUunaffected. Usually the paint callback will call rectobj_paint_children(), a convenience function that iterates through ThɪUU@Va rectobjs children and paints each child that clips against the xrects. `The Map Event Callback ctsUU crrThe events that are received by a canvas_shell need to be processed to determine which rectobj they fall on. This UUshyprocessing would be trivial if all rectobjs are rectangular, but some will not be. A slice of a pie chart or a line with UUxroinput gravity are good examples of this. Although a rectangular bounding box could be specified, they may have n i"UU}sensitive areas that arent rectangular. To allow events to be sent to appropriately to all objects, a callback is needed to U/UU@bjJsee if the event maps to a rectobj. This function has the following form: ; n 3Rectobj (*rectobj_map_event_proc)(rectobj, event) UsFt Rectobjrectobj; Q@hiEvent*event; cbUU ctIf the event_x() and event_y() of the event touch the rectobj, then rectobj should be returned. If not, NULL should be MaoUUtstreturned. If the object has children, these should be checked in reverse order that they were painted in. (The last he|UU}object painted appears on top, so it should be the first that is checked.) For convenience, rectobj_map_event_proc() a[fqinut P’ A0body UUHH nHH topr`ct Drawtext cUU SnThe Drawtext extension is subclassed from the Rectobj extension and inherits its attributes and features. The )UU@Sbj'following figure shows this hierarchy. ;UUhtct csUU`Drawtext class hierarchy cUU ctrA drawtext object displays a string on a canvas_shell. Each drawtext can also have its own font. For example, the UU@ot`following code fragment creates a blue drawtext object saying Hello World in my_font: ld er!xv_create( owner, DRAWTEXT, "DRAWTEXT_STRING, Hello World, ulDRAWTEXT_FONT, my_font, ce"RECTOBJ_FOREGROUND_COLOR, BLUE, @ NULL); ߪUU tThe string specified by DRAWTEXT_STRING is copied into allocated memory. The memory is reallocated when the 쪨UUxstring is changed, and freed when the object is destroyed. Alternately, you may use DRAWTEXT_STRING_PTR eUUssxwhich specifies a string but does not allocate memory. The advantage of this attribute is that it can be more efficient hiUU@>with strings that are statically allocated and do not change. UU UUtThe Drawtext calculates its minimum width and height from the string and the font that it uses. However you may , %UUtoverride the width and height by directly setting the XV_WIDTH and XV_HEIGHT. The attribute 2UUte{DRAWTEXT_LENGTH also specifies the object width, but in numbers of characters. It is the recommended method of ?UUspecifying space, especially for editable drawtext objects. If the width that you specify is larger than the string width, allLUU mthe string is justified within the space with DRAWTEXT_JUSTIFY. Figure .35/ illustrates the effect of this attribute. usYUUINyThe boxes on the left indicate the bounds of the drawtext and the position of the text. The attribute names on the right efUU@ mCindicate the value that DRAWTEXT_JUSTIFY should be set to. y axUUh]t , UUh^UU&-Drawtext justification attributes 4UU ZvWhen the font or string is changed the size of the drawtext may shrink or expand accordingly. If you directly set the AUUZXV_WIDTH and XV_HEIGHT, the drawtext will never be smaller than the size you specified. However, the prefered NUU@Zhaoway to set the size of a drawtext is with DRAWTEXT_LENGTH, especially if the object is to be editable. ext`UU hetLike many other SlingShot objects, a drawtext object can be selected, can have a double click procedure, and can be stmUUhefthe source and target of a drag and drop operation. The drawtext can also be made editable by setting zUU@ThDRAWTEXT_EDITABLE to TRUE. The user can edit the value of the string by clicking, typing, and pressing return. UU BIn2$  BIn2$ a`c  `dint e`ettHlimit_move_proc(paint_window, event, canvas_shell, grip, new_x, new_y) of'`fshXv_windowpaint_window; f y2`xe Event*event; =`yCanvas_shellcanvas_shell; H`zveGrip grip; thS`edshort *new_x; ^`short *new_y; i` d{ xt t`XT int tmp; esp`ec s`xttmp = *new_x - START_Y; `t tmp = MAX(0, tmp); e`, @tmp = MIN(MAX_X, tmp);/* *new_x is now in range of 0..100 */ he`ar ` o>*new_y = (50 * sin((double)(tmp * M_PI)/MAX_X)) + START_Y ; `DR*new_x = tmp + START_X; `se a`f return TRUE; cki`es} ret`n2 $Im$d+HH HH *nvUU@w_Jwill check if events occur on children and return non NULL if so. UU *wThe default event mapping callback assumes a rectangular object and handles children. Each rectobjs map event %UU@Tcallback is settable and gettable via the RECTOBJ_MAP_EVENT_PROC attribute. B`The Event Callback WUU p vOnce event to rectobj mapping is done, the rectobjs RECTOBJ_EVENT_PROC is called. The event function has the dUU@f following form: p Hvoid (*rectobj_event_proc)(paint_window, event, canvas_shell, rectobj) T_{Xv_windowpaint_window; X; seEvent*event; E;Canvas_shellcanvas_shell; @n2Rectobjrectobj; UU qThis callback handles raw events and sees one event at a time. It should probably return immediately so that the UUpnotifier can dispatch other events. In some circumstances, several events need to be examined to determine what ǪUUdelaction to take. For example, a double click is actually four events: down-up-down-up. For these situations, ntԪUU@1rectobj_set_event_grab() has been provided. 檡UU PRzThe function event_to_rectobj() is useful if the event callback needs to know what rectobj the event maps to. For UU@Rwexample, an event callback this to determine if the one button click was on the same object as the first button click. HvUU t_vThere is no concept of a event mask for an individual rectobj. All rectobjs in a canvas_shell share the event mask of UU@entheir canvas shell. E;/`caThe Add Child Callback @DUU ecxWhenever a child is added to a parent (aka owner), the parent gets notification through this function. The attribute is edQUU@ 0RECTOBJ_ADD_CHILD_PROC and it has the form: ev]`um'void (*add_child_proc)(parent, child) ed h`Rectobjparent; acs`exRectobjchild; isUU nt|This function is called once for each set of XV_OWNER (or RECTOBJ_PARENT), including when it is called as a UUUUtizchild is created. What is done here depends on the parent. It may, for example, allocate data structures and attach it to UU a}the child using XV_KEY_DATA. If the parent is a geometry manager, it should not position or resize the child in this UU@coVcallback. The parents geometry management callback will be invoked for this purpose. `The Delete Child Callback ݪUU pWhenever a child is removed from a parent, the parent gets notification through this function. The attribute is heꪖUU@ic0RECTOBJ_DEL_CHILD_PROC and it has the form:  RE'void (*del_child_proc)(parent, child) ormRectobjparent; d_ @d)Rectobjchild; UU nt}This function is called once for each set of XV_OWNER (or RECTOBJ_PARENT), including when a child is *UUJ_tdestroyed. What is done here depends on the parent. If any data structures were allocated when the child was added, he7UUorrthey should be freed here. If any geometry management needs to be done because of the childs removal, the parent DUU@etshould do it here. noa`zeThe Set Geometry Callback vUU baXWhenever an object is moved or resized, the object is notified by a callback though its UU@teERECTOBJ_SET_GEOMETRY_PROC. This callback has the following form: adio,n.HH HH s rm`6void (*set_geometry_proc)(rectobj, newrect, oldrect) `ctRectobjrectobj; `ctRect*newrect; '`ThRect*oldrect; 7UU t vThis callback may be invoked for two reasons: the application set the objects attributes for size and position, or a DUUentparent has decided that an object should have a different size or position. In response to this callback the object beQUUy sshould recalculate any dependencies based on geometry (such as the geometry of children). Child geometries are set re.^UU@owith rectobj_set_geometry(), which makes some checks and then calls the childs set geometry callback. ied{`ugThe Manage Child Callback UU ETyWhen an object changes size or position as a result of attributes being set, the objects parent is notified through the UU@Rparents RECTOBJ_MANAGE_CHILD_PROC. This callback has the following form: `c)Evoid (*manage_child)(parent, child, child_new_rect, child_old_rect) `ctRectobjparent; '`Rectobjchild; `ThRect*child_new_rect; f`e Rect*child_old_rect; s檤UU ze]This callback propagates geometry changes up the rectobj hierarchy. The convenience function rUUonnrectobj_geometry_manage() initiates the changes by making some checks and calls the parents manage child UUhescallback. Within this function, the parent can request changes in its own geometry or change the geometry of other mak UU tchildren. The parent can satisfy the new size or position, it should call rectobj_set_geometry() on the child. It may UU@ioKalso call rectobj_set_geometry() on other children as it sees fit. h td .D_HH llHHk hi` c Temp_grip UU  qThe Temp_grip extension is subclassed from the Drawimage extension and inherits its attributes and features. The c)UU@,following figure shows the class hierarchy. ;UUhTh bsUU`meTemp_grip class hierarchy UU WensThe Temp_grip extension is very similar to the Grip extension. However, the temp_grip is transient and can only be allUUWag{created under special circumstances. It supports all the attributes that the grip class does. A temp_grip object is useful e gUU@Wakdfor associating grip movement semantics with objects that dont ordinarily have these capabilities. l UU omrWhen the user starts dragging an object, the RECTOBJ_START_DRAG_PROC is called. From this callback is the ªUUvonly place that a temp_grip can be created. Once created, it takes control over the event stream, as if the temp_grip ϪUU@@object was the object that the user initially started dragging. _g᪥UU ubqHow might this be used? For example, imagine that you have a drawarea object that presents time horizontally. To UUlahallow the user to select a portion of information in the time, you could have them click and drag (with WUUp pGRIP_RUBBER_STYLE set appropriately) to identify the horizontal region of interest. The problem is that the UUUUunUdrawarea doesnt do anything with the click and drag. But you can use the drawareas eUUus_RECTOBJ_START_DRAG_PROC to create a temp_grip object with GRIP_RUBBER_STYLE set to ina"UU@paQGRIP_RUBBER_VLINE_PAIR. This will handle the drag events and the animation. R4UU PRuA second example is the rubberband selection mode that is supported by the default background event proc. It creates tAUUolsa temp_grip object with GRIP_RUBBER_STYLE set to GRIP_RUBBER_RECT. When the button is release, its ed NUU@aGRIP_DONE_PROC callback is used to select the objects inside of the rubberbanding rectangle. s`UU`alSWhen the user releases the mouse button, the temp_grip is destroyed automatically. e tHP j d!!k UUz y! t l-host.rs/tmp_mnt/home/brianw/DOC/host.rshg)UUsng)dre ~ aJkIRETOBV JkI~tep_gV LTYL/! y GRʀ/Rectobjll V LTma> aJkI eamp aJkIV aJkIV aJkI V +0>g)?w1 JkIV t *JkI~/t *LT+g! y Tq$+$Rectobj at *LT'?Vk JkI  !V @ *JkI~ !! a@ *LT! "%(V ، JkI"!##$V # *JkI~#"$"$ # *LT$#%&'"#gA y%$&!( 9$$ XView Generic-Jg2@ y&%'$' T7$J$V Drawimage# *LT'&((?V$&@ *LT(')'8?!%*$)(**US9 JkI*)445*USg)+US,> JkI,-+-.V *JkI~-,.+,.V *LT.-/+/0,-O/g! y/.0+.0 @$O/$Rectobj V *LT0/1+:./r JkI102+23 *pUV *JkI~213+13+gpUV *LT327+7:$127S *JkI~4*5*5T7S *LT54668k*4F;g. y65858 k]$F;$ Temp_gripu gA y73:+3: k$u $ XView Generic7S *LT869(9?56!U98;8;?#!U70US9pUV *LT:7<+0>c-37*;9=9=?7$*VUS **$<:>+@ *_=;?;?*_tmVUS9j><+:USjj@US@ *q*?=I=djI~kk/HHkj HH  @O/`obTree VUU X1tThe Tree extension is subclassed from the Rectobj extension and inherits its attributes and features. The following 7)UU@XSfigure shows this hierarchy. T;UUhU 6sUU`;Tree class hierarchy 5UU ;vA tree object positions its children in a hierarchy, connecting them with drawline objects. When changes occur in the UU6ztree hierarchy or in the state (e.g. sizes) of its children, the tree may change the position of its children for optimal UUH9Elayout. The children can be a member of any subclass of Rectobj. >UUh  UU`?(An example tree with drawicon nodes UU uChildren are added to the tree in a two step process. First, the tree must be set as the parent of the child (during ̪UUxv_create() or by explicit set of XV_OWNER). Second, the position within the layout hierarchy must be specified. This ٪UU@1Qsecond step is done by setting the TREE_ADD_LINK attribute. For example: i`. 3xv_set(tree1, TREE_ADD_LINK, node1, node2, NULL); is UU othis function calls forges a link from node1 to node2, where node2 becomes a leaf of node1, and both node1 and chUU@chnode2 are children of tree1. eUU ngoTREE_ADD_LINK can be used to build hierarchies from the bottom up. This might the case when an application han"UU ivconstructs a tree during a depth first traversals of its data structures. In these circumstances, the hierarchy under /UU@Rconstruction will not be visible until it is linked to the root node of the tree. AUU  awThe links between nodes are broken by the attribute TREE_UNLINK. For example, assuming that node2 is linked to NUU@ornode1: citZ`ER*xv_set(tree1, TREE_UNLINK, node2, NULL); kUU e qunlinks node2 from node1. If tree surgery is to preformed, nodes should always be unlinked before relinking them lg)ltrm de~ aJkImnlnoV JkI~nmolmok romV LTonplpqesmn/! ypoqloq chʀ/:RectobjhilV LTqprlz|ngop> aJkIrqslstldhieM7UۼKt rphlޮK$da($;@3N1X($R13N1($i#3N1UU*I u'ɑIRs'/a$I^=MenI7}8ArQ6*I Q>́6>QF 8($MY*I $UXMYUr]X.O7w͏9n Uw8͏sN8URh 3($3I($63I($MY3I($3R5AdubLeftdv&RightdC ReferencedICoverDd,pddYdnddd* d*+pd+*,d,+. d.,/ Ied/.0j NSd0/ w=}L'@=+Footnote$$f>t class-description class-endf?A HlY$5 Dprosed( f@P chaptere Single Lineprose,pfAA  class-endfBP*  section.prosefCQ HlFono Dprose( fDP  class-name Single Lineclass-descriptionfEq  $Hlos DhcodefF  CellHeadingfG CellBodyfHT   TableTitleT:Table : fI Body@J   Headerme @Ke FigureFigure : prose $$fLq hl attr-default Default: attr-procs$$fMp attr-description attr-argumentfNA Hl Dattr-endTa@O  FooterfPP  subsectionproseefQP  subsectionprose6$$fSA l attr-usageUsage:attr-end@U  tFooter@V   FooterfWP  attr-nameattr-description @Ye Figure Figure : prosefZA fHl Decprose$$f[q l attr-argument Argument: attr-defaultH$f]Q  ,l tHerl@ Dlist with bullet$$f^q Wl attr-procsProcs: attr-usage@_Footnotef`P  sectionprosefaQ  Heclosf DhlistingfcP  sectionprose fhA Hlstbuet DprosefiQ usa $Hl@ DhFocode65" fjA tioHoslf Dlist descriptionfkQ  $Hglf Dhcode @le Figure Figure : Hprose% zV  Times-12-i   egY H Courier-10 _  h zV5"zVTimes-16 zV h Times-10-i zVegY  Times-10-izVlTimes-16 Times-10Times-24 @ Courier-9  Helvetica-12 zV+>:Times-12 egY   _ Courier-9 Times-12 zVHTimes-1010 h _h h5" _ Courier-10 _  Ti _ Courier-9 egY _Ti _ Courier-10 zVlTimes-10); Z Z Z Z Z F ZF ZF ZF ZFF ZeujeThinfMediumgDoublehThick@i Very Thin eeeeeeeeegHHFGF0HFGFHFGFHFGFHFGFFormat A efeeeeefHHFGFHFGFHFGFHFGFHFGFFormat B-=-.CommentCourierTimes Helvetica Regular Regular BoldRegularItalic8CBOuX\2[ P"Kb"|k~i4Xug,+,<}@I)Ջ۞7G`%U)yuJRJ& tG )B3ZbjE O`[#=M=m$ldӶAƏ|sR[ӹ6Xl_x;G(CH /5+]e.p5iƂsf)2%c