XmArc(3X)

NAME
XmArcWidgetClass - Arc widget design for use with XmGraph.

SYNOPSIS
#include <Xm/Xm.h>
#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.

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" | CSG
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
XmNlabelString | XmCXmString | XmString | dynamic | CSG
XmNmapLabel | XmCBoolean | Boolean | "FALSE" | 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

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.

XmNlabelString
    This resource specifies a compound string which will be displayed with the arc, if the XmNmapLabel resource is true. If no labelString is given, the widget defaults to using the widget name as the label.

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.

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

  Callback Information

See XmGraph(3x)

  Behavior
XmArc behavior when the XmGraph is not in edit mode is summarized below.

ACTIONS

UTILITY FUNCTIONS

Widget XmCreateArc (graph, name, args, n_args)
  XwGraphWidget graph;
  char name;
  ArgList args;
  int n_args;

A convenience function that creates an XmArc widget named name whose parent is graph.

Widget XmCreateAttachedArc (graph, name, from, to, args, n_args)
  XwGraphWidget graph;
  char name;
  Widget from;
  Widget to;
  ArgList args;
  int n_args;

XmCreateAttachedArc creates an arc from from to to with arguments args, name name, and returns its widget ID. from and to must be node widgets in graph. Returns NULL if not succesful.

Widget XmArcGetPos (arc, x1, y1, x2, y2)
  XmArcWidget arc;
  Position *x1, *y1, *x2, *y2;

XmArcGetPos returns the coordinates of the endpoints of the given arc.

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.