SgArc(3X)

SgArc - Arc widget designed for use with SgGraph.

As shipped in IRIX 6.5. First release of IRIX 6.5.

     NAME
          SgArc - Arc widget designed for use with SgGraph.

     SYNOPSIS
          #include <Xm/Xm.h> #include <Sgm/Graph.h> #include
          <Sgm/Arc.h>

     VERSION
          This page documents the version of Sgm that accompanies
          Motif 1.2.

     DESCRIPTION
          The SgArc 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 SgGraph 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 sgArcWidgetClass

          Its class name is SgArc.

     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.

     _____________________________________________________________________________
    |                             SgArc Resource Set                             |
    |____________________|_______________|_________________|____________|________|
    | Name               |  Class        |  Type           |  Default   |  Access|
    |____________________|_______________|_________________|____________|________|
    |____________________|_______________|_________________|____________|________|
    | XmNto              |  XmCTo        |  XmRPointer     |  NULL      |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNfrom            |  XmCFrom      |  XmRPointer     |  NULL      |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNtoPosition      |  XmCPosition  |  XmRShort       |  50        |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNfromPosition    |  XmCPosition  |  XmRShort       |  50        |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNfromSide        |  XmCSide      |  XmRShort       |  XmRIGHT   |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNtoSide          |  XmCSide      |  XmRShort       |  XmLEFT    |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNarcDirection    |  XmCDirection |  XmRArcDirection|  XmDIRECTED|  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNforeground      |  XmCForeground|  Pixel          |  "Black"   |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNhighlight       |  XmCHighlight |  Boolean        |  "False"   |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNfontList        |  XmCFontList  |  FontList       |  "Fixed    |  "     |
    |____________________|_______________|_________________|____________|________|
    | XmNlabelString     |  XmCXmString  |  XmString       |  dynamic   |  CSG   |
    |____________________|_______________|_________________|____________|________|
    | XmNmapLabel        |  XmCBoolean   |  Boolean        |  "FALSE"   |  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   |
    |____________________|_______________|_________________|____________|________|
    | XmNarmCallback     |  XmCCallback  |  Pointer        |  NULL      |  C     |
    |____________________|_______________|_________________|____________|________|
    | XmNdisarmCallback  |  XmCCallback  |  Pointer        |  NULL      |  C     |
    |____________________|_______________|_________________|____________|________|
    | XmNactivateCallback|  XmCCallback  |  Pointer        |  NULL      |  C     |
    |____________________|_______________|_________________|____________|________|
    | XmNatribute        |  XmCAttribute |  Atom           |  NULL      |  C     |
    |____________________|_______________|_________________|____________|________|
    | XmNuserData        |  XmCUserData  |  Pointer        |  NULL      |  CSG   |
    |____________________|_______________|_________________|____________|________|
    |____________________|_______________|_________________|____________|________|

                         |               |                 |            |

          XmNto
               The widget this arc points to.


          XmNfrom
               The widget this arc points from.


          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
               If XmDIRECTED, will display an arrow head on the child
               end, if XmBIDIRECTED will display an arrow head on both
         |     ends, otherwise |o arrow head is displa|ed.             |                      |        |
         |                     |                      |                |                      |        |
         |XmNforeground        |                      |                |                      |        |
         |     Color in which t|e arc and its label wi|l be drawn.     |                      |        |
         |                     |                      |                |                      |        |
         |XmNfontList          |                      |                |                      |        |
         |     Font used to wri|e the label with when |mNmapLabel is   |                      |        |
         |     true.           |                      |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNarmCallback       |                      |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNdisarmCallback    |                      |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNactivateCallback  |                      |                |                      |        |
         |     These callbacks |re equivalent to the p|shbutton        |                      |        |
         |     callbacks of the|same name.            |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNfromSide          |                      |                |                      |        |
         |     If the parent gr|ph widget's XmNdrawMod| resource is    |                      |        |
         |     set to XmPOSITIO|_PROPORTIONAL, this re|ource           |                      |        |
         |     determines the s|de of the "from" node |o which this    |                      |        |
         |     arc is attached.|Possible values are Xm|EFT, XmRIGHT,   |                      |        |
         |     XmTOP, and XmBOT|OM.                   |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNfromPosition      |                      |                |                      |        |
         |     If the parent gr|ph widget's XmNdrawMod| resource is    |                      |        |
         |     set to XmPOSITIO|_PROPORTIONAL, this re|ource           |                      |        |
         |     determines the p|sition of the arc at t|e point it      |                      |        |
         |     leaves the "from| node. Values are give| in percentages |                      |        |
         |     of the relevant |ode size, and can rang| from 0-100.    |                      |        |
         |                     |                      |                |                      |        |
         |XmNtoSide            |                      |                |                      |        |
         |     If the parent gr|ph widget's XmNdrawMod| resource is    |                      |        |
         |     set to XmPOSITIO|_PROPORTIONAL, this re|ource           |                      |        |
         |     determines the s|de of the "to" node to|which this arc  |                      |        |
         |     is attached. Pos|ible values are XmLEFT| XmRIGHT,       |                      |        |
         |     XmTOP, and XmBOT|OM.                   |                |                      |        |
         |                     |                      |                |                      |        |
         |XmNtoPosition        |                      |                |                      |        |
         |     If the parent gr|ph widget's XmNdrawMod| resource is    |                      |        |
         |     set to XmPOSITIO|_PROPORTIONAL, this re|ource           |                      |        |
         |     determines the p|sition of the arc at t|e point it      |                      |        |
         |     leaves the "to" |ode. Values are given |n percentages   |                      |        |
         |     of the relevant |ode size, and can rang| from 0-100.    |                      |        |
         |                     |                      |                |                      |        |
         |                     |                      |                |                      |        |
     INHE|ITED RESOURCES       |                      |                |                      |        |
         |The following resourc|s are inherited from t|e 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 SgGraph(3x)


     UTILITY FUNCTIONS
          Widget SgCreateArc (graph, name, args, n_args)
            XwGraphWidget  graph;
            char           name;
            ArgList          args;
            int              n_args;

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

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

          SgCreateAttachedArc 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
          successful.

          Widget SgArcGetPos (arc, x1, y1, x2, y2)
            SgArcWidget  arc;
            Position      *x1, *y1, *x2, *y2;

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

     RELATED INFORMATION
          Composite(3X), Constraint(3X), Core(3X), XmManager(3X),
          SgGrid(3X),