# Copyright (c) 1988 by Hewlett-Packard Company # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and that both that copyright notice and this permission # notice appear in supporting documentation, and that the name of # Hewlett-Packard not be used in advertising or publicity pertaining # to distribution of the software without specific, written prior # permission. NAME XmArcWidgetClass - Arc widget design for use with XmGraph. SYNOPSIS #include #include Graph.h #include Arc.h DESCRIPTION The XmArc widget is a special widget that resembles a gadget in that it has no window of its own. It draws in the window of the XmGraph widget, with cooperation of the Graph widget. The Arc widget can only be used with the Graph widget. An arc may be undirected, directed or bidirected. CLASSES The Arc widget inherits behavior from the Core widget class. Its class pointer is xmArcWidgetClass Its class name is XmArc. ARC RESOURCES The Arc widget defines a set of resource types used by the programmer to specify the data for the arc. These resources are used to set attributes for arcs when specifying node parent-child relationships. The following table contains the set of resources defined by the Arc widget. To specify any of these resources within the .Xdefaults file, simply drop the XmN prefix from the resource name. - 1 - Formatted: September 14, 1993 __________________________________________________________________________________ | XmArc Resource Set | |_________________________________________________________________________________| |Name | Class | Type | Default | Access | |_____________________|___________________|_________________|____________|________| |_____________________|___________________|_________________|____________|________| |XmNto | XmCTo | XmRPointer | NULL | CSG | |_____________________|___________________|_________________|____________|________| |XmNfrom | XmCFrom | XmRPointer | NULL | CSG | |_____________________|___________________|_________________|____________|________| |XmNdelta | XmCDelta | int | 5 | CSG | |_____________________|___________________|_________________|____________|________| |XmNfont | XmCFont | (XFontStruct*) | "Fixed | " | |_____________________|___________________|_________________|____________|________| |XmNarcWidth | XmCArcWidth | int | 0 | CSG | |_____________________|___________________|_________________|____________|________| |XmNstyle | XmCStyle | int | LineSolid | CSG | |_____________________|___________________|_________________|____________|________| |XmNcapStyle | XmCapStyle | int | CapButt | CSG | |_____________________|___________________|_________________|____________|________| |XmNdashes | XmCDashes | int | 4 | CSG | |_____________________|___________________|_________________|____________|________| |XmNdashOffset | XmCDashOffset | int | 0 | CSG | |_____________________|___________________|_________________|____________|________| |XmNlabel | XmCString | String | NULL | CSG | |_____________________|___________________|_________________|____________|________| |XmNmapLabel | XmCBoolean | Boolean | "True" | CSG | |_____________________|___________________|_________________|____________|________| |XmNarcDirection | XmCDirection | XmRArcDirection | XmDIRECTED | CSG | |_____________________|___________________|_________________|____________|________| |XmNforeground | XmCForeground | Pixel | "Black" | CSG | |_____________________|___________________|_________________|____________|________| |XmNhighlightColor | XmCHighlightColor | Pixel | "White" | CSG | |_____________________|___________________|_________________|____________|________| |XmNhighlight | XmCHighlight | Boolean | "False" | CSG | |_____________________|___________________|_________________|____________|________| |XmNfont | XmCFont | String | "Fixed" | CSG | |_____________________|___________________|_________________|____________|________| |XmNarmCallback | XmCCallback | Pointer | NULL | C | |_____________________|___________________|_________________|____________|________| |XmNdisarmCallback | XmCCallback | Pointer | NULL | C | |_____________________|___________________|_________________|____________|________| |XmNactivateCallback | XmCCallback | Pointer | NULL | C | |_____________________|___________________|_________________|____________|________| |XmNarcEditedCallback | XmCCallback | Pointer | NULL | C | |_____________________|___________________|_________________|____________|________| |XmNuserData | XmCUserData | Pointer | NULL | CSG | |_____________________|___________________|_________________|____________|________| - 2 - Formatted: September 14, 1993 XmNto The widget this arc points to. XmNfrom The widget this arc points from. XmNdelta To detect button clicks, a rectangular region of width = 2 * delta is created, with the arc at its center. Only applies to arcs where the parent is not the same as the child. XmNarcWidth The width, in pixels, of the line drawn for the arc. Zero means to draw using the server's fastest algorithm with a line width of one pixel. XmNstyle Specifies whether the line is solid in foreground, dashed in foreground, or alternating foreground and background. Possible values are LineSolid (the default), LineOnOffDash, or LineDoubleDash. XmNcapStyle Controls the appearance of the ends of a line. This characteristic affects the ends of lines drawn in dashes, and both ends of each dash in some cases. Possible values are CapNotLast, CapButt (the default), CapRound, and CapProjecting. XmNdashes Specifies the length of the dashes for custom-designed dashed lines. The default (4) is equivalent to the list {4,4} (a dash of 4 pixels, followed by a space of 4 pixels). XmNdashOffset Specifies the starting point of the dash pattern, from the parent node, for dashed lines. XmNlabel If not NULL (the default) it is a string which will be displayed with the arc. XmNmapLabel If true (the default), the label, if any, will be displayed. XmNarcDirection No semantic meaning. If XmDIRECTED, will display an arrow head on the child end, if XmBIDIRECTED will display an arrow head on both ends, otherwise no arrow head is displayed. - 3 - Formatted: September 14, 1993 XmNforeground Color in which the arc and its label will be drawn. XmNhighlightColor If XmNhighlight is true, color displayed when arc is selected. XmNfont Font used to write the label with when XmNlabel is not NULL. XmNarmCallback XmNdisarmCallback XmNarcEditedCallback This callback list is invoked when either the child or the parent nodes are changed. The arc widget is passed as an argument. INHERITED RESOURCES The following resources are inherited from the named superclasses: ______________________________________________________________________________________________ | Core Resource Set | |_____________________________________________________________________________________________| | Name | Class | Type | Default | Access | |_____________________|______________________|________________|______________________|________| |_____________________|______________________|________________|______________________|________| |XmNaccelerators | XmCAccelerators | XtTranslations | NULL | CSG | |_____________________|______________________|________________|______________________|________| |XmNancestorSensitive | XmCSensitive | Boolean | True | G | |_____________________|______________________|________________|______________________|________| |XmNbackground | XmCBackground | Pixel | dynamic | CSG | |_____________________|______________________|________________|______________________|________| |XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | |_____________________|______________________|________________|______________________|________| |XmNcolormap | XmCColormap | Colormap | XtCopyFromParent | CG | |_____________________|______________________|________________|______________________|________| |XmNdepth | XmCDepth | int | XtCopyFromParent | CG | |_____________________|______________________|________________|______________________|________| |XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C | |_____________________|______________________|________________|______________________|________| |XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG | |_____________________|______________________|________________|______________________|________| |XmNscreen | XmCScreen | Pointer | XtCopyScreen | CG | |_____________________|______________________|________________|______________________|________| |XmNsensitive | XmCSensitive | Boolean | True | CSG | |_____________________|______________________|________________|______________________|________| |XmNtranslations | XmCTranslations | XtTranslations | NULL | CSG | |_____________________|______________________|________________|______________________|________| - 4 - Formatted: September 14, 1993 Callback Information See XmGraph(3x) Behavior XmArc behavior when the XmGraph is not in edit mode is summarized below. ACTIONS BUGS This man page needs lots of work. XmNLabel resource of XmArc widget should be a compound string. ORIGIN Hewlett-Packard Company. AUTHORS Luis Miguel - Design and implementation of HP widget version of Graph widget Doug Young - Early prototype XwDAG and XwLink (now XmArc) widget and Motif port of Graph and Arc to XmGraph and XmArc Doug Young - nearly complete rewrite of Motif Graph (1/90) SEE ALSO Core(3X), Composite(3X), Constraint(3X), XmManager(3X), XmGraph(3x) Programming With The HP X Widgets, Programming With Xt Intrinsics, Programming With Xlib. - 5 - Formatted: September 14, 1993