AaRffHH  d     dFootnote TableFootnote**. . / - lp(2\  \.TOCHeadingI@   a b-@VlW c  d  e f g  j  kTmOU R l: l mYӫpJ u= Y! ;" oҟ#$ nM%$&H9' <( p\)ǖ    (b/320797: Figure: Figure 1: Array_tile class hierarchyRk [9l14292: Figure: Figure 2: Dimensions of one cell and attributes names for positions of children within a cell f23567: Figure: Figure 3: The layout of children when ARRAY_TILE_LAYOUT is set to ARRAY_TILE_LAYOUT_ROW  i94812: Figure: Figure 4: The layout of children when ARRAY_TILE_LAYOUT is set to ARRAY_TILE_LAYOUT_COLUMN  Z68810: Figure: Figure 12: Setting the drawarea coordinate dimensions and drawing an circle  ;35102: Figure: Figure 11: Drawarea code to display a circle  O31032: Figure: Figure 13: The data structure for a custom display list function  cR92704: Figure: Figure 14: The drawing command for the custom display list function  =70469: Figure: Figure 15: The Display_list_arg data structure  TV13129: Figure: Figure 16: The rendering function for the custom display list operation  YV78234: Figure: Figure 17: The map event callback for the custom display list operation ! 97:048245: Figure: Figure 10: A clockobj set to 5:04 ' l14:38789: Figure: Figure 7: A box dimensions of a box object.   it a h awitZ68810: Figure: Figure 12: Setting the drawarea coordinate dimensions and drawing an circle bRAYl14292: Figure: Figure 2: Dimensions of one cell and attributes names for positions of children within a cellIL cCOLf23567: Figure: Figure 3: The layout of children when ARRAY_TILE_LAYOUT is set to ARRAY_TILE_LAYOUT_ROW d02:i94812: Figure: Figure 4: The layout of children when ARRAY_TILE_LAYOUT is set to ARRAY_TILE_LAYOUT_COLUMNu eom ;35102: Figure: Figure 11: Drawarea code to display a circlehaw fnd ;35102: Figure: Figure 11: Drawarea code to display a circleFe gispZ68810: Figure: Figure 12: Setting the drawarea coordinate dimensions and drawing an circle jplaO31032: Figure: Figure 13: The data structure for a custom display list functioneto k liR92704: Figure: Figure 14: The drawing command for the custom display list function lee=70469: Figure: Figure 15: The Display_list_arg data structure mZ68V13129: Figure: Figure 16: The rendering function for the custom display list operation n$RAY048245: Figure: Figure 10: A clockobj set to 5:04at o"namV78234: Figure: Figure 17: The map event callback for the custom display list operation p(chi:38789: Figure: Figure 7: A box dimensions of a box object.!<$lastpagenum>ig<$monthname> <$daynum>, <$year>Y"<$monthnum>/<$daynum>/<$shortyear>OL<$monthname> <$daynum>, <$year>g"<$monthnum>/<$daynum>/<$shortyear><$monthname> <$daynum>, <$year> "<$monthnum>/<$daynum>/<$shortyear>e  <$fullfilename>g  <$filename>t  <$paratext[Title]>e  <$paratext[Heading]>  <$curpagenum>O31  <$marker1>e  <$marker2>tu (Continued)Pagepage<$pagenum>iHeading & Page <$paratext> on page<$pagenum>e See Heading & Page%See <$paratext> on page<$pagenum>.g Table & Page7Table<$paranumonly>, <$paratext>, on page<$pagenum>:+ (Sheet <$tblsheetnum> of <$tblsheetcount>)i figure numbern<$paranumonly>wwPlkoxxPatyyP84:zzP : {{QaAa||QoAi}}Paon~~Pi38QgA @is Q.A@la@@dnu@"%QaAm@L@>, Vr>gJ$moV$daIhorIJthnUynuIr> I$moh$daJhorh hlfil   Figure 20:  h$pahtle=ht[Hl  Figure 21: O31h erkkkerk ked)kkagehm>ikdink <k> k$pal Figure 19: ageh <keek$pakk Pak<$kly>ktexkagekm>:k(Shkshek <$kounk fikernhumo=hhwPlhhathykkzP XBAaB|Bh}PaBB38kl Figure 24: hkk@kl Figure 22: nukk"k%kk@LkkkVkJkVkIkIkJkUkIkIkhkJkhkhklh Fik  hkkkk k21: h  kk kk kkkkhklk Figure 23: hdink <k> k$pakkurekhkkkkkkkkkkkkkkkk kk!kk"kk#kk$kk%kk&kk'kh(k=)hh*kh+hh,lh Figure 25: -k.kzP /k0kAa1k|2k3k}Pa4k5k386k7k9kure:lh Figure 17: ;h@<h=k>kure?kkAkkBkkFhkGhkHkkIkkJhkLhkMhkNhkOhkPhkQlk Figure 13: RhITkhVhJghhhTh Figure 7: ih Fijh  khlBmhnhohpP21:{l  Figure 11: k|l Figure 12: k}lh Figure 14: ~lure Figure 15: l < Figure 16: kl Figure 18: urehkhkhkhkhkkkhkhkhkk kk!kk"kk#kk$kk%k h&k k'k h(k h)hh*kh+hh,lh FiBhhl Figure 10: |h2kh3kh4kl5k Figure 9: h7kh9kl:l Figure 8: hkku4duw|dv}H$ wxu H$ hUU`J Hz xwyu : Hz hUU` hH$ yxzu FiH$ lUU`l eHz zy{u FiHz hUU`e HH{z|u HHkk` kHH|{u hHHk`h lH$ }~v H$ |kUU`h kHz ~}v kHz hUTUTh0SlingShot 2.0 Programmers Handbook11 HH~v HH` dH3K ^ H RH RFootnoteHqv? ^ hHzHzh Single Line H'Footnote z HvDf ^ HHe Double LineH  Double LinekH  Single LinezHZ TableFootnote EGX-Rb ^ EPoEPo TableFootnote\;SI1hWhddR$HCm v$HCmh` HH HH UUh \UUhAThe rendering callback for the custom display list operation e3[UU }Notice that no clipping is done in this rendering function. The gc in the Display_list_arg is guaranteed to have the @ZUUwproper clip rectangle so that the X server will not paint outside the bounds of the drawarea. In some situations, this SiMYUUpclipping may be inadequate because of limitations in the X coordinate space or because a large number of server ZXUUtnnclipped entries in a display list. You may decide to add clipping to a custom rendering function, trading off gWUU@'implementation effort for the feature. yVUU  zThe final callback for a custom display list operation detects if events map to the rendered parts of a drawarea. This is UUU qnot to be confused with the RECTOBJ_MAP_EVENT_PROC callback, which maps events to objects. This callback TUU tchecks to see if the things painted by the display list map to an event. Like the rendering function, the event map SUU li}callback is associated with the drawing operation when display_list_append() installs the operation into the display RUU anzlist. Also like the rendering function, the display list is traversed from the beginning to the end to detect if an event QUU@ inmaps to the drawarea. nIBm ecnIBmUUtn`in d`ay<drawarea1 = (Drawarea) xv_create( owner, DRAWAREA, NULL ); g `5VDrawArc( drawarea1, 0, 0, 2500, 2500, 0, 360*64 ); '`fi [fI%$ oeraIQ%mreVmarbm nobmEVOC`ch p`s.double left = 0.0; `ksdouble right = 1.0; a'`aydouble top = 0.0; . L2`Hdouble bottom = 1.0; =`li aH`ed4drawarea1 = (Drawarea) xv_create( owner, DRAWAREA, ndS`e DRAWAREA_LEFT_X, &left, R^`liDRAWAREA_RIGHT_X, &right, ci`liDRAWAREA_UPPER_Y, &top, nnit`etDRAWAREA_LOWER_Y, &bottom, `dr NULL ); n`7DDrawArc( drawarea1, 0.0, 0.0, .25, .25, 0, 360*64 ); ` n?6$a1= (H EAH(c(reUTUT 00These two function calls are actually made by the SlingShot packages when you do xv_set, so calling them in the application is unURUT@necessary if you set an attribute that causes the drawarea to be repainted. The appendix has more detail on these two function calls. H  blH (bl= UTUT`_Currently only DDrawString, DDrawImage, DFillRectangle, and DFillPoly support event detection. readRAHH HH UUh+RE _aUUh,AThe map event callback for the custom display list operation 2aUU(;xFigure "25# shows the map event function, CustomStringMapEvent(), used by our example custom display list ?aUU;eoperation. This function converts the virtual coordinates to X coordinates, and uses the XView macro hLaUU;al~rect_includesrect() to see if the event occured on the text. The return value indicates if the event was on the image YaUU@; s.that was rendered, in this case, on the text. kaUU ndpFinally, the attribute DRAWAREA_MAP_EVENTS controls one other aspect of the event mapping process for a xaUU= }drawarea. When set to the default value, DRAWAREA_MAP_ANY, all events falling in the rectangular region of a aUUwdrawarea are considered to map to the drawarea, and the display list event mapping callbacks are not invoked. When aUUset to DRAWAREA_MAP_FIRST, the display list is traversed until one of the map functions returns TRUE, indicating aUUt othat the event mapped to the drawarea. When set to DRAWAREA_MAP_LAST, all the map functions are called on.aUUvezregardless of multiple true return values. By combining DRAWAREA_MAP_LAST and VSetMarkKey(), you can find aUU@reXout what portion of a display list mapped to an event, even with overlapping rendering. ;_[<I_OasO ID] te ID]otpe`pptypedef struct { `= Display_list_cmdcmd; ` !doublevirtual_x, virtual_y; e'` rintstring_length; a2`drchar*string; =`aw} CustomString; am6n.W$ nt iV?mmRE@ BU is@ BUre`ti,voidDrawCustomString(drawarea, x, y, str) d `heDrawareadrawarea; _LA`p doublex, y; d'`char*str; of 2`rn{ es.=`DRCustomString*ptr; H`%static Display_list_vecvector = { uS`a CustomStringRender, ev^`rlCustomStringMapEvent, i` NULL, t`}; `T `] if(!str) `pe return; ``uc6ptr = (CustomString*) display_list_append(drawarea, `$&vector, sizeof(CustomString)); `t t`ptr->virtual_x = x; `ptr->virtual_y = y; `n.$ptr->string_length = strlen(str); `ptr->string = str; `} >$Xw]Q$$st LA`ou `*void CustomStringRender(dl_arg, ptr) `Display_list_arg*dl_arg; '`CustomString*ptr; st_2`{ =`mSintx, y; H`intcenter_x, center_y; S` L^`-x = dl_convert_rx(dl_arg, ptr->virtual_x); i` r)-y = dl_convert_ry(dl_arg, ptr->virtual_y); t`r  C`la0center_x = x - XTextWidth(dl_arg->font_info, &v`om0ptr->string, ptr->string_length)/2; `al5center_y = y + dl_arg->font_info->ascent - `G(dl_arg->font_info->ascent + dl_arg->font_info->descent)/2; st`  ` X<XDrawString(dl_arg->dpy, dl_arg->win_xid, dl_arg->gc, `center_x, center_y, `ptr->string, `ptr->string_length); ` v} ust` ar `m}$sp; [en+g ng[en+g` y`*typedef struct { `Drawareadrawarea; '`= Canvas_shellcanvas_shell; 2`'Rectrect;/* rect of drawarea */ ->v=`4doublex_m, x_b, y_m, y_b;/* interpolation */ XH`foXv_Fontfont; S`ptXFontStruct*font_info; )/2^`*void*assoc;/* client handle */ i`Xv_opaquecurrent_mark_key; argt`t  l`es,/* following only set during rendering */ `Display*dpy; >` idXIDwin_xid; `! GCgc; `" Cmscms; `#ng `$/* private fields */ `%vintindex; `&mvoid*ext; `'} Display_list_arg; [eg`( 6%/[een/ NQ sI$ImI! heImI!/*of`- `/ub2int CustomStringMapEvent(dl_arg, ptr, event) `.Display_list_arg*dl_arg; '`0tCustomString*ptr; 2`1*aEvent*event; =`2{ `H`?c Rectrect; ;S` ^`/rect.r_width = XTextWidth(dl_arg->font_info, i`&ptr->string, ptr->string_length); t`/rect.r_height = dl_arg->font_info->ascent + ` dl_arg->font_info->descent; $` f d`6Hrect.r_left = dl_convert_rx(dl_arg, ptr->virtual_x) - rect.r_width/2; '`7st8rect.r_top = dl_convert_ry(dl_arg, ptr->virtual_y) - `AeA(dl_arg->font_info->ascent + dl_arg->font_info->descent) / 2; s`B `=@if(rect_includespoint(&rect, event_x(event), event_y(event))) I`>@return TRUE;/* The user clicked on this text. */ i`9gMelse l_a`4>return FALSE;/* Did not click on this text. */ `5ng} tr;!`31 ame6m2`m {$m 5clockobj.rs/tmp_mnt/home/brianw/DOC/clockobj.rsor ~XVP&ri~|۷VmectJ>,K>en + d]/})Klrg>fo+$tK.g f~ $]\\z^_lGH>UU_UV##al|@,b7st^&Var p^&uG4s|<`Ai|G t dli|GuG4s|<[=[!_I[4s|<eveIf !fIf4s!J BK~w ex!J!J9RECTOBJ_BORDER*d 4sn LS"_I}*d 4s|<s t4Y|GUr;!4Y|G4pQ4s|<m Uu* :I& Uu* Qa_Imrs>/o_IQa_ImJ=rso_IpUV_IQpt QVm4J*%,K_IJ4pQ4s|<Kp_I~ A%Hw tp_Ip_IBOX_GAP~|,GH|.@,||UsUU7st]\UVar p]oG]\`Ad_JIF*%t dldod_JIF_ё0, $]-hw =0, 0, sBoxܞ Up "$((#GH U\/*#d$%%HH%$ HH4sUT UT`The Extensions -UU 4sThe following sections describe each of the SlingShot extensions. The descriptions are sorted by the class name so :UU@>/#the reader may wish to scan ahead. _IܞnHp &$'('(#_Iܞ-=p '$*&*&#4J~nHp ($&"&"#_IJ~ Up )$+*+*# A%H~-=p *$)')'#_IGH Up +$,),)#GHnHp ,$++#|g)-/> p3=~ aJkI/0-01_JIFV JkI~0/1-/1oV LT102-23$]/0/! y213-13 ,ʀ/Rectobj V LT324-<.\12> aJkI435-56W-.W*$?.A-.A> g)@UBUV_I*USA?W-?W>#*US *US*+#~ aJkIBC@CDV JkI~CBD@BDTV LTDCE@EFaBC/! yEDF@DF ʀ/1RectobjVV LTFEG@OQ0DE> aJkIGFH@HI-A>VUSUS*T~ aJkIXYVYZaBCV JkI~YXZVXZʀV LTZY[V[\VXY/! y[Z\VZ\ ʀ/RectobjV LT\[]VegZ[> aJkI]\^V^_aGH aJkIul