/******************************************************************************/ /** **/ /** Copyright (c) Digital Equipment Corporation, 1991 **/ /** All Rights Reserved. Unpublished rights reserved **/ /** under the copyright laws of the United States. **/ /** **/ /** The software contained on this media is proprietary **/ /** to and embodies the confidential technology of **/ /** Digital Equipment Corporation. Possession, use, **/ /** duplication or dissemination of the software and **/ /** media is authorized only pursuant to a valid written **/ /** license from Digital Equipment Corporation. **/ /** **/ /** RESTRICTED RIGHTS LEGEND Use, duplication, or **/ /** disclosure by the U.S. Government is subject to **/ /** restrictions as set forth in Subparagraph (c)(1)(ii) **/ /** of DFARS 252.227-7013, or in FAR 52.227-19, as **/ /** applicable. **/ /** **/ /******************************************************************************/ /******************************************************************************/ /* */ /* */ /* FACILITY: */ /* */ /* Network Editor Widget */ /* */ /* ABSTRACT: */ /* */ /* External Neted definitions */ /* */ /******************************************************************************/ #include /******************************************************************************/ /* */ /* Define the events supported by NetEd */ /* */ /******************************************************************************/ /* Window events */ #define NetedKeventEnterLeave 0 #define NetedKeventResize 1 #define NetedKeventGrid 2 /* Object events */ #define NetedKeventHot 3 /* Button events */ #define NetedKeventHelp 4 #define NetedKeventDouble 5 #define NetedKeventPress 6 #define NetedKeventClick 7 #define NetedKeventNodeAnnSel 8 #define NetedKeventNodeSel 9 #define NetedKeventConAnnSel 10 #define NetedKeventConSel 11 /* Window - Button events */ #define NetedKeventNodeMoved 12 #define NetedKeventRegionSel 13 #define NetedKeventNodeCreated 14 #define NetedKeventConCreated 15 #define NetedKeventScroll 16 #define NetedKeventZoom 17 #define NetedKeventHighest 17 /* highest numbered event */ #define NetedKeventCount NetedKeventHighest+1 /* Number of NetEd events - make it 0 based */ #define NetedKeventMaxWindow 2 #define NetedKeventMaxObject 3 #define NetedKeventMaxButton 11 /******************************************************************************/ /* */ /* Define constants which can be passed to NetedEnableEvent to specify ANY, */ /* ALL, or EXACT mode for matching the selection criteria. */ /* */ /******************************************************************************/ #define NetedKmodeAny 0 /* If ANY bits match */ #define NetedKmodeAll 1 /* If ALL bits match */ #define NetedKmodeExact 2 /* If EXACT match */ /******************************************************************************/ /* */ /* Constants for connection style. */ /* */ /******************************************************************************/ #define NetedKconStyleCenter 1 /* connect to geometric center of node */ #define NetedKconStyleClosest 2 /* connect to closest connection point */ #define NetedKconStyleSpecific 3 /* connect to specific connection point */ /******************************************************************************/ /* */ /* Define constants used for state of connection curvature. */ /* */ /******************************************************************************/ #define NetedKcurvatureJagged 0 /* Connection is made up of straight line segments */ /* running directly from point to point -- hence its */ /* jagged appearance. */ #define NetedKcurvatureRectilinear 1 /* Connection is made up of straight line segments */ /* consisting of only horizontal or vertical segments.*/ #define NetedKcurvatureCurvilinear 2 /* Connection is made up of enough segments to make */ /* a smooth-appearing curve. */ /* DECPLan-private curvature codes. */ #define NetedKcurvatureRectS_F 255 #define NetedKcurvatureRectS_S 254 #define NetedKcurvatureRectF_F 253 #define NetedKcurvatureJaggedS_F 252 #define NetedKcurvatureJaggedS_S 251 #define NetedKcurvatureJaggedF_F 250 /******************************************************************************/ /* */ /* Define constants that control whether the corners of rectilinear */ /* connections should be rounded and, if so, by what style and amount. */ /* */ /******************************************************************************/ #define NetedKcornerRoundNone 0 /* No corner rounding is to be done. */ /* This is the default value for the */ /* corner_round_style field of the connection type */ /* values structure. */ #define NetedKcornerRound1Line 1 /* Corner rounding is to be done by clipping the */ /* corner off by a single straight line. */ /******************************************************************************/ /* */ /* Constants for predefined node types. */ /* */ /******************************************************************************/ #define NetedKntBoxCent 0 /* Box-type node with no connection points */ #define NetedKntBoxSpec 1 /* Box-type node with specific connection style */ #define NetedKntBox3DSpec 2 /* "3D" box-type node with specific connection style */ #define NetedKntCircSpec 3 /* Circle with specific connection style */ #define NetedKntCircClos 4 /* Circle with closest connection style */ #define NetedKntCardDeck 5 /* Deck of cards with center connection style */ #define NetedKntPoint 6 /* Single point */ #define NetedKntBigVAX 7 /* Big VAX */ #define NetedKntCircSpecDash 8 /* Dashed circle with specific connection style */ #define NetedKntCircClosDash 9 /* Dashed circle with closest connection style */ #define NetedKntHighest 9 /* highest numbered node type */ /******************************************************************************/ /* */ /* Codes for whether supernodes should be displayed as a single supernode */ /* or as its constituent members. */ /* */ /******************************************************************************/ #define NetedKmember 0 #define NetedKsuperNode 1 /******************************************************************************/ /* */ /* Constants for predefined con types. */ /* */ /******************************************************************************/ #define NetedKctLine 0 /* Line-type connection; no arrowheads */ #define NetedKctLineArrowEnd 1 /* Line-type connection; arrowhead at destination end */ #define NetedKctLineArrowBoth 2 /* Line-type connection; arrowhead at both ends */ #define NetedKctRectArrowEnd 3 /* Rectilinear connection; arrowhead at one end */ #define NetedKctCurveArrowEnd 4 /* Curvilinear connection; arrowhead at one end */ #define NetedKctHighest 4 /* highest numbered con type */ /******************************************************************************/ /* */ /* Codes for Connection points on rectangular objects */ /* */ /******************************************************************************/ /* */ /* NetedKconPntTopCent */ /* | */ /* | */ /* NetedKconPntTopLeft | NetedKconPntTopRight */ /* \ | / */ /* \ | / */ /* \ | / */ /* \ | / */ /* o-----o-----o */ /* | | */ /* NetedKconPntLeftCent---o o---NetedKconPntRightCent */ /* | | */ /* o-----o-----o */ /* / | \ */ /* / | \ */ /* / | \ */ /* / | \ */ /* NetedKconPntBotLeft | NetedKconPntBotRight */ /* | */ /* | */ /* NetedKconPntBotCent */ /* */ #define NetedKconPntTopLeft 0 #define NetedKconPntLeftCent 1 #define NetedKconPntBotLeft 2 #define NetedKconPntBotCent 3 #define NetedKconPntBotRight 4 #define NetedKconPntRightCent 5 #define NetedKconPntTopRight 6 #define NetedKconPntTopCent 7 /******************************************************************************/ /* */ /* Define some external typedefs ... */ /* */ /******************************************************************************/ typedef Widget NetedTwidgetId; /* Type for GObE widget */ typedef unsigned long int NetedTobjectId; /* Type for objects */ typedef unsigned long int NetedTtypeId; /* Type for Neted node and connection types */ /******************************************************************************/ /* */ /* Cycle Checking Constants: */ /* */ /* Constants for the kinds of connections that cycle checking should look at */ /* when checking for a cycle in a network. These are needed by the routine */ /* NetedCheckCycle. To make the implementation easier for checking the */ /* kinds of connections the caller has specified, these constants correspond */ /* to the bit values as in: */ /* --------------------------------------------- */ /* | Explicit | Implicit | Visible | Invisible | */ /* --------------------------------------------- */ /* */ /******************************************************************************/ #define NetedKallCon 15 /* All connections */ #define NetedKallExplicit 11 /* Visible and invisible explicit cons */ #define NetedKallImplicit 7 /* Visible and invisible implicit cons */ #define NetedKvisibleExplicit 9 /* Visible explicit cons only */ #define NetedKvisibleImplicit 5 /* Visible implicit cons only */ #define NetedKinvisibleExplicit 10 /* Invisible explicit cons only */ #define NetedKinvisibleImplicit 6 /* Invisible implicit cons only */ /******************************************************************************/ /* */ /* Constants which are returned from NetedGetObjectKind to indicate the */ /* kind of object. */ /* */ /******************************************************************************/ #define NetedKobjectNode 0 /* The object is a node */ #define NetedKobjectSupernode 1 /* The object is a supernode */ #define NetedKobjectExplicitCon 2 /* The object is an explicit connection */ #define NetedKobjectImplicitCon 3 /* The object is an implicit connection */ /******************************************************************************/ /* */ /* The following constants define bits corresponding to fields of a */ /* NetedNodeTypeValuesStruct and NetedConTypeValuesStruct. Since most of the */ /* fields in both of these values structures are identical, the same bitmask */ /* symbols will be used. */ /* */ /* These bitmasks are used to signal to NetEd which fields of */ /* the structure are valid when creating or modifying a node type. */ /* */ /******************************************************************************/ #define NetedMnbSelectMask 1 #define NetedMnbConCurvature 2 #define NetedMnbInvisible 4 #define NetedMnbConPoints 8 #define NetedMnbConStyle 16 #define NetedMnbAnnotLocations 32 #define NetedMnbDrawMembers 64 #define NetedMnbDrawConPoints 128 #define NetedMnbUserData 256 #define NetedMnbGobeId 512 #define NetedMnbAnnotationGGC 1024 #define NetedMnbConGGC 2048 #define NetedMnbCornerRoundStyle 4096 #define NetedMnbCornerRoundAmount 8192 #define NetedMnbUnused_14 16384 #define NetedMnbUnused_15 32768 #define NetedMnbUnused_16 65536 #define NetedMnbUnused_17 131072 #define NetedMnbUnused_18 262144 #define NetedMnbUnused_19 524288 #define NetedMnbUnused_20 1048576 #define NetedMnbUnused_21 2097152 #define NetedMnbUnused_22 4194304 #define NetedMnbUnused_23 8388608 #define NetedMnbUnused_24 16777216 #define NetedMnbUnused_25 33554432 #define NetedMnbUnused_26 67108864 #define NetedMnbUnused_27 134217728 #define NetedMnbUnused_28 268435456 #define NetedMnbUnused_29 536870912 #define NetedMnbUnused_30 1073741824 #define NetedMnbUnused_31 -2147483648 /******************************************************************************/ /* */ /* This structure is used within several other structures to specify a world */ /* coordinate point. */ /* */ /******************************************************************************/ typedef struct { float x; /* X coordinate */ float y; /* Y coordinate */ } NetedPointStruct; /******************************************************************************/ /* */ /* This structure defines a world coordinate rectangle. It is used primarily */ /* for specifying the display window rectangle in the high level create. */ /* */ /******************************************************************************/ typedef struct { NetedPointStruct ll; /* Lower left corner */ NetedPointStruct ur; /* Upper right corner */ } NetedRectangleStruct; /******************************************************************************/ /* */ /* NOTE !!! These external value structures are organized in a particular */ /* way. All fields that are common between both nodes and */ /* connections are placed in the beginning of NetedNodeType - */ /* ValuesStruct and NetedConTypeValuesStruct. If in the future */ /* any expansion needs to be done to these structures, and the */ /* the field is a common field, place it at the beginning of */ /* both structures, if it is not common, place the field at the */ /* end of the structure. */ /* */ /******************************************************************************/ /******************************************************************************/ /* */ /* Public node type values structure. */ /* */ /******************************************************************************/ typedef struct { unsigned int annot_count; /* number of annotation fields */ unsigned int con_count; /* number of connection points */ unsigned char con_style; /* connection style (center, specific, etc.) */ unsigned long int invisible; /* true (1) = invisible */ int user_data; /* default user (private) data */ unsigned long int annotation_ggc; /* GObE Graphics Context for annotation */ unsigned long int select_mask[4]; /* Selection bitmask */ unsigned long int gobe_id; /* id of GObE subtree */ NetedPointStruct *annot_loc; /* pointer to array of annotation locations [[THINK!]] */ NetedPointStruct *con_points; /* pointer to array of connection points [[THINK!]] */ struct { /* default flags [[ May not need whole longword. ]] */ unsigned draw_members : 1; /* . if true, draw supernode as members */ unsigned draw_con_points : 1; /* . if true, draw connection points */ unsigned reserved : 30; /* . fill bits; adjust when adding new flags */ } flags; } NetedNodeTypeValuesStruct; /******************************************************************************/ /* */ /* Public connection type values structure. */ /* */ /******************************************************************************/ typedef struct { unsigned int annot_count; /* number of annotation fields */ unsigned int con_count; /* number of connection points */ unsigned char con_style; /* connection style (center, specific, etc.) */ unsigned long int invisible; /* true (1) = invisible */ int user_data; /* default user (private) data */ unsigned long int annotation_ggc; /* GObE Graphics Context for annotation */ unsigned long int con_ggc; /* GObE Graphics Context for con */ unsigned long int select_mask[4]; /* Selection bitmask */ float *annot_loc; /* pointer to array of annotation locations [[THINK!]] */ float *con_points; /* pointer to array of connection points [[THINK!]] */ struct { /* default flags [[ May not need whole longword. ]] */ unsigned draw_con_points : 1; /* . if true, draw connection points */ unsigned reserved : 31; /* . fill bits; adjust when adding new flags */ } flags; unsigned char con_curvature; /* Connection curvature property */ unsigned char corner_round_style; /* Specifies what kind of rounding, */ /* if any, should be applied to the */ /* corners of connections with */ /* rectilinear curvature. */ /* Acceptable values are: */ /* NetedKcornerRoundNone [default]*/ /* NetedKcornerRound1Line */ /* Clip corners with one line */ /* segment */ /* [Futures, maybe] */ /* NetedKcornerRound2Line */ /* NetedKcornerRoundCircle */ float corner_round_amount; /* World coordinate system size. */ /* Default 0.0. */ /* */ /* Controls the size of the rounding */ /* to be applied to corners. */ /* */ /* If corner_round_style = */ /* NetedKcornerRoundNone*/ /* then this field is ignored. */ /* */ /* If corner_round_style = */ /* NetedKcornerRound1Line*/ /* then this is the amount clipped. */ /* */ /* | amount | */ /* |<-clipped->| */ /* --------o -+- */ /* \ ^ */ /* \ |amount clipped*/ /* \ V */ /* o --- */ /* | */ /* | */ /* */ /* */ /* [Futures, maybe ] */ /* */ /* If corner_round_style = */ /* NetedKcornerRoundCircle*/ /* then this is the radius of the arc */ /* used to draw a quarter circle to */ /* form the corner. */ /* */ /* */ } NetedConTypeValuesStruct; /******************************************************************************/ /* */ /* Define the traversal direction and style constants. */ /* */ /******************************************************************************/ #define NetedKsearchForward 0 #define NetedKsearchBackward 1 #define NetedKtraverseDepthfirst 0 #define NetedKtraverseBreadthfirst 1 /******************************************************************************/ /* */ /* Define resource names for Neted. String names for resources start with a */ /* lowercase and the first letter of each subsequent descriptive word */ /* in the resource name is in uppercase. */ /* */ /******************************************************************************/ #define NetedNconPointSize "NetedconPointSize" /* default connection-point size */ #define NetedNselectNodeAnnot "NetedselectNodeAnnot" /* Set to 1 for node annonation */ #define NetedNselectConAnnot "NetedselectConAnnot" /* Set to 1 for connection annonation */ #define NetedNdefaultNodeType "NeteddefaultNodeType" /* Default node Type */ #define NetedNdefaultConType "NeteddefaultConType" /* Default connection type */ #define NetedNdefaultImpType "NeteddefaultImpType" /* Default implicit connection type */ #define NetedNcreateImplicit "NetedcreateImplicit" /* Create implicit connections (boolean) */ #define NetedNautoPushCon "NetedautoPushCon" /* Set to 1 if connections are pushed */ /******************************************************************************/ /* */ /* Callback resources */ /* */ /******************************************************************************/ #define NetedNenterLeaveCallback "NetedNenterLeaveCallback" /* Enter and Leave widget */ #define NetedNresizeCallback "NetedNresizeCallback" /* resize completed */ #define NetedNgridCallback "NetedNgridCallback" /* Grid crossing */ #define NetedNscrollCallback "NetedNscrollCallback" /* scroll completion */ #define NetedNzoomCallback "NetedNzoomCallback" /* zoom completion */ #define NetedNhelpCallback "NetedNhelpCallback" /* Help/MBx */ #define NetedNhotCallback "NetedNhotCallback" /* Hot object */ #define NetedNclickCallback "NetedNclickCallback" /* click */ #define NetedNdoubleCallback "NetedNdoubleCallback" /* double-click */ #define NetedNpressCallback "NetedNpressCallback" /* press */ #define NetedNnodeAnnSelCallback "NetedNnodeAnnSelCallback" /* Node Annotation selected */ #define NetedNnodeCreatedCallback "NetedNnodeCreatedCallback" /* Node created */ #define NetedNnodeMovedCallback "NetedNnodeMovedCallback" /* Node moved */ #define NetedNnodeSelCallback "NetedNnodeSelCallback" /* Node selected */ #define NetedNconAnnSelCallback "NetedNconAnnSelCallback" /* Connection Annotation selected */ #define NetedNconCreatedCallback "NetedNconCreatedCallback" /* connection created */ #define NetedNconSelCallback "NetedNconSelCallback" /* Connection selected */ #define NetedNregionSelCallback "NetedNregionSelCallback" /* Region selected */ /******************************************************************************/ /* */ /* Define resource classes for NetEd resources. By convention, resource */ /* classes are always spelled starting with a capital letter. */ /* */ /******************************************************************************/ #define NetedCconPointSize "NetedconPointSize" /* default connection-point size */ #define NetedCselectNodeAnnot "NetedselectNodeAnnot" /* Set to 1 for node annonation */ #define NetedCselectConAnnot "NetedselectConAnnot" /* Set to 1 for connection annonation */ #define NetedCdefaultNodeType "NeteddefaultNodeType" /* Default node shape */ #define NetedCdefaultConType "NeteddefaultConType" /* Default connection shape */ #define NetedCdefaultImpType "NeteddefaultImpType" /* Default implicit connection shape */ #define NetedCcreateImplicit "NetedcreateImplicit" /* Create implicit connections (boolean) */ #define NetedCautoPushCon "NetedautoPushCon" /* Set to one if connections are pushed */ /******************************************************************************/ /* */ /* Event structures */ /* */ /******************************************************************************/ typedef struct { unsigned long int type; /* Event code */ Time time; /* Time stamp of event */ unsigned long int ann_index; /* Index of annotation, only valid if Select annotation event */ unsigned long int object; /* NetEd object id */ unsigned long int button; /* Button syntax */ float x; /* X coordinate of event */ float y; /* Y coordinate of event */ } NetedEventSelStruct; typedef struct { unsigned long int type; /* Event code */ Time time; /* Time stamp of event */ unsigned long int flag; /* Press/Release (Press event only) */ unsigned long int object; /* NetEd object id */ unsigned long int button; /* Button state */ float x; /* World X */ float y; /* World Y */ } NetedEventNodeCreatedStruct; typedef struct { unsigned long int type; /* Event code */ Time time; /* Time stamp of event */ unsigned long int flag; /* done/cancelled flag */ unsigned long int object; /* NetEd object id */ unsigned long int button; /* Button state */ float x; /* Pointer coord */ float y; unsigned long int status; /* Completion status */ float loc_x; /* World X of location point */ float loc_y; /* World Y of location point */ } NetedEventNodeMovedStruct; typedef struct { unsigned long int type; /* Event code */ Time time; /* Time stamp of event */ unsigned long int object; /* NetEd object id */ unsigned long int button; /* Button syntax */ unsigned long int source; /* NetEd id of the source */ unsigned long int destination; /* NetEd id of the destination */ unsigned long int source_point; /* Index of the connection point */ unsigned long int destination_point; /* Index of the destination point */ unsigned long int status; /* Completion status */ } NetedEventConCreatedStruct; typedef struct { unsigned long int type; /* Event code */ Time time; /* Time stamp of event */ unsigned long int button; /* Button syntax */ unsigned long int *node_list; /* List of node objects in region */ unsigned long int *con_list; /* List of connection objects in region */ unsigned long int node_count; /* The number of nodes in the list */ unsigned long int con_count; /* The number of connections in the list */ NetedRectangleStruct select_region; /* The coordinates of the region */ } NetedEventRegionSelStruct; /******************************************************************************/ /* */ /* Generic event structure which contains only the type field. This is so */ /* the application the event type field without assuming any particular event */ /* type. */ /* */ /******************************************************************************/ typedef struct { unsigned long int type; /* Event code */ } NetedEventGenericStruct; /******************************************************************************/ /* */ /* NetedDDIFReturnInfo structure */ /* */ /******************************************************************************/ typedef struct _NetedDDIFReturnInfo { GobeTobjectId *new_node_list; /* List of new nodes */ int new_node_count; /* Number of new nodes */ GobeTobjectId *new_con_list; /* List of new connections */ int new_con_count; /* Number of new connections */ GobeTobjectId *new_node_type_list; /* List of new node types */ int new_node_type_count; /* Number of new node types */ GobeTobjectId *new_con_type_list; /* List of new con types */ int new_con_type_count; /* Number of new con types */ } NetedDDIFReturnInfo; /******************************************************************************/ /* */ /* Structure passed to the precedence layout routines which defines certain */ /* aspects of how the layout algorithm is to operate. */ /* */ /******************************************************************************/ typedef struct { unsigned int flags; caddr_t reserved; } NetedLayoutControlStruct; /******************************************************************************/ /* */ /* Bit definitions within the flag word of the NetedLayoutControlStruct. */ /* */ /******************************************************************************/ #define NetedMnbLayoutNoInitSort 1 /* Omit doing the sort within a column*/ /* by number of of connections. */ /******************************************************************************/ /* */ /* Bit definitions within the mask longword that controls the operation of */ /* NetedGetConsByClass. */ /* */ /******************************************************************************/ #define NetedMnbExamineVisual 1 /* This value causes the classification */ /* algorithm to apply the same filters in*/ /* the selection of nodes and */ /* connections as are selected by the */ /* precedence layout routines. */ /* For example, nodes and connections */ /* inside contracted supernodes are not */ /* considered. */ /******************************************************************************/ /* */ /* Status codes */ /* */ /******************************************************************************/ #define neted_k_facility 1 /* just different from GObE */ #define neted_k_severity_warning 0 #define neted_k_severity_success 1 #define neted_k_severity_error 2 #define neted_k_severity_info 3 /******************************************************************************/ /* */ /* Warning status codes (severity = 0) */ /* */ /******************************************************************************/ #define NetedSCinuse (neted_k_facility << 15 | 0 << 3 | neted_k_severity_warning) /* Cannot change rendition fields of type which is in use */ #define NetedSCbusynodetype (neted_k_facility << 15 | 1 << 3 | neted_k_severity_warning) /* Node type cannot be deleted while in use */ #define NetedSCbusycontype (neted_k_facility << 15 | 2 << 3 | neted_k_severity_warning) /* Connection type cannot be deleted while in use */ #define NetedSCcycle (neted_k_facility << 15 | 3 << 3 | neted_k_severity_warning) /* Cycle detected in the network */ #define NetedSCnottree (neted_k_facility << 15 | 4 << 3 | neted_k_severity_warning) /* Graph is not a tree */ /******************************************************************************/ /* */ /* Success status codes (severity = 1) */ /* */ /******************************************************************************/ #define NetedSCsuccess (neted_k_facility << 15 | 0 << 3 | neted_k_severity_success) /******************************************************************************/ /* */ /* Error status codes (severity = 2) */ /* */ /******************************************************************************/ #define NetedSCbadobject (neted_k_facility << 15 | 0 << 3 | neted_k_severity_error) /* Invalid or no object ID specified */ #define NetedSCbadtrav (neted_k_facility << 15 | 1 << 3 | neted_k_severity_error) /* Traversal type parameter is invalid */ #define NetedSCbadfilespec (neted_k_facility << 15 | 2 << 3 | neted_k_severity_error) /* Invalid file specification */ #define NetedSCbaddochandle (neted_k_facility << 15 | 3 << 3 | neted_k_severity_error) /* Invalid document handle */ #define NetedSCbadindex (neted_k_facility << 15 | 4 << 3 | neted_k_severity_error) /* Index was <0 or greater than the number of annotations - 1 */ /* NOTE: 5 is available */ #define NetedSCbadlayoutstyle (neted_k_facility << 15 | 6 << 3 | neted_k_severity_error) /* Invalid layout style code */ #define NetedSCbadsuperflag (neted_k_facility << 15 | 7 << 3 | neted_k_severity_error) /* Invalid super_flag code */ #define NetedSCbadobjecttype (neted_k_facility << 15 | 8 << 3 | neted_k_severity_error) /* Invalid or no object type specified */ #define NetedSCbadnodetype (neted_k_facility << 15 | 9 << 3 | neted_k_severity_error) /* Node type id was not valid */ #define NetedSCnotsuper (neted_k_facility << 15 | 10 << 3 | neted_k_severity_error) /* Super_node is not a super node */ #define NetedSCshrunk (neted_k_facility << 15 | 11 << 3 | neted_k_severity_error) /* Display window was shrunk to remain within the scroll region */ #define NetedSCoccupied (neted_k_facility << 15 | 12 << 3 | neted_k_severity_error) /* Grid point already occupied by a node */ #define NetedSCreserved (neted_k_facility << 15 | 13 << 3 | neted_k_severity_error) /* Grid point already reserved */ #define NetedSCnotreserved (neted_k_facility << 15 | 14 << 3 | neted_k_severity_error) /* Grid point is not reserved */ #define NetedSCinvgridpoint (neted_k_facility << 15 | 15 << 3 | neted_k_severity_error) /* At least one of the requested grid points is outside of the grid */ #define NetedSCbadcontype (neted_k_facility << 15 | 16 << 3 | neted_k_severity_error) /* Connection type id was not valid */ #define NetedSCbadattr (neted_k_facility << 15 | 17 << 3 | neted_k_severity_error) /* Bad attribute supplied */ #define NetedSCnopoints (neted_k_facility << 15 | 18 << 3 | neted_k_severity_error) /* No points specified for connection or annonation */ #define NetedSCbadconstyle (neted_k_facility << 15 | 19 << 3 | neted_k_severity_error) /* Bad connection style */ #define NetedSCbadsource (neted_k_facility << 15 | 20 << 3 | neted_k_severity_error) /* Bad source object when creating a connection */ #define NetedSCbaddest (neted_k_facility << 15 | 21 << 3 | neted_k_severity_error) /* Bad destination object when creating a connection */ #define NetedSCbadsourcepoint (neted_k_facility << 15 | 22 << 3 | neted_k_severity_error) /* Bad source point number when creating a connection */ #define NetedSCbaddestpoint (neted_k_facility << 15 | 23 << 3 | neted_k_severity_error) /* Bad destination point number when creating a connection */ #define NetedSCbadggc (neted_k_facility << 15 | 24 << 3 | neted_k_severity_error) /* Bad GGC specified */ #define NetedSCbadtypebits (neted_k_facility << 15 | 25 << 3 | neted_k_severity_error) /* Invalid type mask bits set */ #define NetedSCbadstring (neted_k_facility << 15 | 26 << 3 | neted_k_severity_error) /* Bad string descriptor */ #define NetedSCbadevent (neted_k_facility << 15 | 27 << 3 | neted_k_severity_error) /* Invalid event code supplied */ #define NetedSCbadmode (neted_k_facility << 15 | 28 << 3 | neted_k_severity_error) /* Invalid selection criteria mode */ #define NetedSCbadsearchdirection (neted_k_facility << 15 | 29 << 3 | neted_k_severity_error) /* Bad search direction argument */ #define NetedSCbadcontextid (neted_k_facility << 15 | 30 << 3 | neted_k_severity_error) /* Bad context id argument */ #define NetedSCnostring (neted_k_facility << 15 | 31 << 3 | neted_k_severity_error) /* Index for annotation is OK, but the annotation has not been set */ #define NetedSCbadcycleflag (neted_k_facility << 15 | 32 << 3 | neted_k_severity_error) /* Invalid code supplied for cycle checking flag */ #define NetedSCbadconrouting (neted_k_facility << 15 | 33 << 3 | neted_k_severity_error) /* Connection routing points are bad */ #define NetedSCbadpstyle (neted_k_facility << 15 | 34 << 3 | neted_k_severity_error) /* Connection routing points point style is invalid */ #define NetedSCbadoperation (neted_k_facility << 15 | 35 << 3 | neted_k_severity_error) /* Invalid operation */ #define NetedSCisimplicit (neted_k_facility << 15 | 36 << 3 | neted_k_severity_error) /* This is an implicit connection */ /******************************************************************************/ /* */ /* Informational status codes (severity = 3) */ /* */ /******************************************************************************/ #define NetedSCadjusted (neted_k_facility << 15 | 0 << 3 | neted_k_severity_info) /* Display window was adjusted to remain within the scroll region */ /******************************************************************************/ /* */ /* Prototypes for all Neted Entry points. */ /* */ /******************************************************************************/ /******************************************************************************/ /* */ /* pcc (default 'cc' on Ultrix) doesn't currently support function */ /* prototypes, whereas vcc (VAX C on VMS) does. Since Neted wants to use */ /* prototypes internally on VMS, and anyone using a C compiler which supports */ /* them likely will as well, we want to keep support generally available, */ /* without preventing use on compilers like pcc which don't support them. */ /* */ /* It should also be easy to specify prototype support for non-VAXC compilers */ /* in the future. Therefore, instead of making it conditional on "VAXC" */ /* directly, we'll define a new "NetedPROTOTYPE" symbol... which is by default*/ /* defined if VAXC is true, and undefined otherwise. */ /* */ /******************************************************************************/ #ifdef VAXC #define NetedPROTOTYPE 1 #endif /******************************************************************************/ /* */ /* Routine returns the value of a particular annotation field of an object. */ /* */ /******************************************************************************/ unsigned long NetedGetAnnotation( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long index, XmString *value, GobeTattrId *attributes #endif ); /******************************************************************************/ /* */ /* Routine returns the "draw connection points" attribute of specified node. */ /* */ /******************************************************************************/ unsigned long NetedGetConPointVisibility( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long *visible #endif ); /******************************************************************************/ /* */ /* Routine returns the specified objects selection mask -- an array of 4 */ /* longwords. */ /* */ /******************************************************************************/ unsigned long NetedGetSelect( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long select[4] #endif ); /******************************************************************************/ /* */ /* Routine determines if the specified object is visible. */ /* */ /******************************************************************************/ unsigned long NetedGetVisibility( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long *visible #endif ); /******************************************************************************/ /* */ /* Routine returns the user data associated with the specified node or */ /* connection. */ /* */ /******************************************************************************/ unsigned long NetedGetUserData( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long *user_data #endif ); /******************************************************************************/ /* */ /* Sets the value or attributes of a particular annotation field of the */ /* specified object. */ /* */ /******************************************************************************/ unsigned long NetedSetAnnotation( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long index, XmString value, GobeTattrId attributes #endif ); /******************************************************************************/ /* */ /* This routine measures the size of the given annotation field of the */ /* specified object. */ /* */ /******************************************************************************/ unsigned long NetedMeasureAnnotation( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long index, float *x, float *y, float *width, float *height #endif ); /******************************************************************************/ /* */ /* Routine set the "draw connection points" attribute of specified node. */ /* If visible is true, the connection points are drawn. If visible is false */ /* the connection points are erased and not drawn in subsequent refreshes. */ /* */ /******************************************************************************/ unsigned long NetedSetConPointVisibility( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long visible #endif ); /******************************************************************************/ /* */ /* The specified object is modified to use the new object type. */ /* */ /******************************************************************************/ unsigned long NetedSetObjectType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, NetedTtypeId object_type, unsigned long *restrict_mask, long mask_count #endif ); /******************************************************************************/ /* */ /* This routine sets the specified objects selection mask -- an array of 4 */ /* longwords. */ /* */ /******************************************************************************/ unsigned long NetedSetSelect( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long select[4] #endif ); /******************************************************************************/ /* */ /* This routine changes the specified objects user data. */ /* connection. */ /* */ /******************************************************************************/ unsigned long NetedSetUserData( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Changes the visibility state of the specified object. */ /* */ /******************************************************************************/ unsigned long NetedSetVisibility( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long visible #endif ); /******************************************************************************/ /* */ /* Creates a connection between two nodes using an existing connection type. */ /* from this node. */ /* */ /******************************************************************************/ unsigned long NetedCreateCon( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId source, unsigned long source_point, NetedTobjectId dest, unsigned long dest_point, XmString annotation[], unsigned long annotation_len, unsigned long user_data, NetedTtypeId con_type, NetedTobjectId *con_id #endif ); /******************************************************************************/ /* */ /* This routine deletes the specified connection. */ /* */ /******************************************************************************/ unsigned long NetedDeleteCon( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object #endif ); /******************************************************************************/ /* */ /* This routine causes a connection type to be created. */ /* */ /******************************************************************************/ unsigned long NetedCreateConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId source, unsigned long *mask, long mask_count, NetedConTypeValuesStruct *values, NetedTtypeId *con_type #endif ); /******************************************************************************/ /* */ /* This routine deletes an existing connection type. */ /* */ /******************************************************************************/ unsigned long NetedDeleteConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId con_type #endif ); /******************************************************************************/ /* */ /* This routine returns the attribute values of a connection type. */ /* */ /******************************************************************************/ unsigned long NetedGetConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId con_type, NetedConTypeValuesStruct *values, unsigned long size #endif ); /******************************************************************************/ /* */ /* This routine gets a predefined connection type. */ /* */ /******************************************************************************/ unsigned long NetedGetPredefConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int type_const, NetedTtypeId *con_type #endif ); /******************************************************************************/ /* */ /* This routine modifies fields of an existing connection type. */ /* */ /******************************************************************************/ unsigned long NetedModifyConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId con_type, unsigned long *mask, long mask_count, NetedConTypeValuesStruct *values #endif ); /******************************************************************************/ /* */ /* This routine copies a subnetwork to a new place in a network. */ /* */ /******************************************************************************/ unsigned long NetedCopySubnetwork( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_list[], unsigned long node_count, double x, double y, NetedTobjectId supernode, NetedTobjectId *new_node_list[], NetedTobjectId *new_con_list[], unsigned long *new_con_count #endif ); /******************************************************************************/ /* */ /* This routine creates a DDIF document describing the subnetwork consisting */ /* of all nodes in the specified node_list and all incident connections. */ /* */ /******************************************************************************/ unsigned long NetedExtractDDIFDocument( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_list[], unsigned long node_count, char *title, unsigned long *document_buffer, unsigned long *document_buffer_len #endif ); /******************************************************************************/ /* */ /* This routine creates Neted objects from a DDIF toolkit document that was */ /* created by NetedExtractDDIFDocument. */ /* */ /******************************************************************************/ unsigned long NetedPasteDDIFDocument( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long document_buffer, unsigned long document_buffer_len, double x, double y, NetedDDIFReturnInfo *return_info #endif ); /******************************************************************************/ /* */ /* This routine creates Neted objects from a DDIF file. */ /* */ /******************************************************************************/ unsigned long NetedReadDDIFFile( #ifdef NetedPROTOTYPE NetedTwidgetId widget, char *filename, double x, double y, NetedDDIFReturnInfo *return_info #endif ); /******************************************************************************/ /* */ /* This routine creates a DDIF file describing the subnetwork consisting of */ /* all nodes in node-list and all incident connections. */ /* */ /******************************************************************************/ unsigned long NetedWriteDDIFFile( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_list[], unsigned long node_count, char *filename, char *title #endif ); /******************************************************************************/ /* */ /* Enable a Neted event. */ /* */ /******************************************************************************/ unsigned long NetedEnableEvent( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int event, unsigned long criteria[4], int mode, unsigned long button #endif ); /******************************************************************************/ /* */ /* Disable a Neted event. */ /* */ /******************************************************************************/ unsigned long NetedDisableEvent( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int event, unsigned long button #endif ); /******************************************************************************/ /* */ /* Moves nodes of an assumed tree network into a tree layout starting with */ /* the node specified. (Vertically). */ /* */ /******************************************************************************/ unsigned long NetedLayoutTreeVertical( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node, double top_y, double top_x, double x_unit, double y_unit #endif ); /******************************************************************************/ /* */ /* Moves nodes of an assumed tree network into a tree layout starting with */ /* the node specified. (Horizontally) */ /* */ /******************************************************************************/ unsigned long NetedLayoutTreeHorizontal( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node, double left_x, double bottom_y, double x_unit, double y_unit #endif ); /******************************************************************************/ /* */ /* This routine changes the super node to which the specified node belongs. */ /* */ /******************************************************************************/ unsigned long NetedChangeMembership( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node, NetedTobjectId supernode #endif ); /******************************************************************************/ /* */ /* This routine returns the attribute of a supernode that specifies whether */ /* to represent it graphically as a single supernode or as its members. */ /* */ /******************************************************************************/ unsigned long NetedGetSuperExpansion( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId supernode, unsigned long *super_flag #endif ); /******************************************************************************/ /* */ /* This routine sets the attribute of a supernode that specifies whether */ /* to represent it graphically as a single supernode or as its members. */ /* */ /******************************************************************************/ unsigned long NetedSetSuperExpansion( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId supernode, unsigned long super_flag #endif ); /******************************************************************************/ /* */ /* Extract the members of a supernode in the form of a counted list of node */ /* ID's. */ /* */ /******************************************************************************/ unsigned long NetedGetMembersList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId supernode, NetedTobjectId *vect[], int *count #endif ); /******************************************************************************/ /* */ /* Allows the caller to traverse the members of a supernode applying the */ /* action routine to each member of the supernode. */ /* */ /******************************************************************************/ unsigned long NetedGetMembersAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId supernode, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Scroll the display window such that the object is centered within the */ /* display viewport. */ /* */ /******************************************************************************/ unsigned long NetedCenterObject( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object #endif ); /******************************************************************************/ /* */ /* Create new typed node using a predefined node type. */ /* */ /******************************************************************************/ unsigned long NetedCreateNode( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId supernode, double x, double y, XmString annotation[], long annotation_len, unsigned long user_data, unsigned long node_type, NetedTobjectId *node_id #endif ); /******************************************************************************/ /* */ /* Deletes the specified node. */ /* */ /******************************************************************************/ unsigned long NetedDeleteNode( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id #endif ); /******************************************************************************/ /* */ /* This routine allows the caller to determine the world coordinate size of */ /* a node. */ /* */ /******************************************************************************/ unsigned long NetedMeasureNode( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id, float *ll_x, float *ll_y, float *loc_x, float *loc_y, float *width, float *height #endif ); /******************************************************************************/ /* */ /* Moves given node to a new location. */ /* */ /******************************************************************************/ unsigned long NetedMoveNode( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id, double x, double y #endif ); /******************************************************************************/ /* */ /* Returns the kind of object that the specified object is... */ /* */ /******************************************************************************/ unsigned long NetedGetObjectKind( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id, unsigned long *object_kind #endif ); /******************************************************************************/ /* */ /* This routine causes a node type to be created. */ /* */ /******************************************************************************/ unsigned long NetedCreateNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId source, unsigned long *mask, long mask_count, NetedNodeTypeValuesStruct *values, NetedTtypeId *node_type #endif ); /******************************************************************************/ /* */ /* This routine deletes an existing node type. */ /* */ /******************************************************************************/ unsigned long NetedDeleteNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId node_type #endif ); /******************************************************************************/ /* */ /* This routine returns the attribute values of a node type. */ /* */ /******************************************************************************/ unsigned long NetedGetNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId node_type, NetedNodeTypeValuesStruct *values, unsigned long l_size #endif ); /******************************************************************************/ /* */ /* The routine gets a predefined node type. */ /* */ /******************************************************************************/ unsigned long NetedPredefNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long l_type_const, NetedTtypeId *node_type #endif ); /******************************************************************************/ /* */ /* This routine modifies fields of an existing node type. */ /* */ /******************************************************************************/ unsigned long NetedModifyNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId node_type, unsigned long *mask, long mask_count, NetedNodeTypeValuesStruct *values #endif ); /******************************************************************************/ /* */ /* This routine returns the default node type used to create nodes. */ /* */ /******************************************************************************/ unsigned long NetedGetDefaultNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId *node_type #endif ); /******************************************************************************/ /* */ /* This routine sets the default node type used to create nodes. */ /* */ /******************************************************************************/ unsigned long NetedSetDefaultNodeType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId node_type #endif ); /******************************************************************************/ /* */ /* This routine returns the default connection type used to create nodes. */ /* */ /******************************************************************************/ unsigned long NetedGetDefaultConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId *con_type #endif ); /******************************************************************************/ /* */ /* This routine sets the default connection type used to create nodes. */ /* */ /******************************************************************************/ unsigned long NetedSetDefaultConType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId con_type #endif ); /******************************************************************************/ /* */ /* Returns the address of a vector containing the connection_id's of all */ /* connections in the network, and its associated count. */ /* */ /******************************************************************************/ unsigned long NetedGetAllConsList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId **outvect, int *count #endif ); /******************************************************************************/ /* */ /* Allows the caller to traverse every connection known to Neted. */ /* */ /******************************************************************************/ unsigned long NetedGetAllConsAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Returns the address of a vector containing the node_id's of all nodes in */ /* the network, and its associated count. */ /* */ /******************************************************************************/ unsigned long NetedGetAllNodesList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId **outvect, int *count #endif ); /******************************************************************************/ /* */ /* Allows the caller to traverse every node known to Neted, independent of */ /* any connections. */ /* */ /******************************************************************************/ unsigned long NetedGetAllNodesAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Walks network to find immmediate sucessors or predecessors. */ /* */ /******************************************************************************/ unsigned long NetedGetNextNodesList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long direction, NetedTobjectId node_id, int *vector[], int *count #endif ); /******************************************************************************/ /* */ /* Walks the network starting at the object specified. */ /* */ /******************************************************************************/ unsigned long NetedGetNextNodesAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long direction, NetedTobjectId object, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Walks network to find all successors or predecessors */ /* */ /******************************************************************************/ unsigned long NetedTraverseList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long direction, unsigned long traversal_style, NetedTobjectId node_id, int *vector[], int *count #endif ); /******************************************************************************/ /* */ /* Walks the network starting at the object specified . */ /* any connections. */ /* */ /******************************************************************************/ unsigned long NetedTraverseAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, unsigned long direction, unsigned long traversal_style, NetedTobjectId node_id, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Walks a chain of input/output connections starting from a given node id. */ /* */ /******************************************************************************/ unsigned long NetedTraverseIncidentCon( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Returns the total number of nodes in the Neted network. */ /* */ /******************************************************************************/ unsigned long NetedGetTotalNodeCount( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int *num_entries #endif ); /******************************************************************************/ /* */ /* Returns the total number of connections in the Neted network. */ /* */ /******************************************************************************/ unsigned long NetedGetTotalConCount( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int *num_entries #endif ); /******************************************************************************/ /* */ /* This routine is used to check whether the network, as presently configured */ /* contains a cycle. */ /* */ /******************************************************************************/ unsigned long NetedCheckCycle( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id, unsigned long con_flag #endif ); /******************************************************************************/ /* */ /* User_defined initialization routine for MRM. This routine will register */ /* the Neted widget with MRM. */ /* */ /******************************************************************************/ unsigned long NetedInitializeForMrm(); /******************************************************************************/ /* */ /* Returns the weight of the specified connection. */ /* */ /******************************************************************************/ unsigned long NetedGetConWeight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId con_id, float *weight #endif ); /******************************************************************************/ /* */ /* Sets the weight of the specified connection. */ /* */ /******************************************************************************/ unsigned long NetedSetConWeight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId con_id, double weight #endif ); /******************************************************************************/ /* */ /* Low level routine to create a Neted Widget. */ /* */ /******************************************************************************/ Widget NetedCreateWidget( #ifdef NetedPROTOTYPE Widget parent, char *name, ArgList arglist, int argcount #endif ); /******************************************************************************/ /* */ /* High level routine to create a Neted Widget. */ /* */ /******************************************************************************/ Widget NetedWidget( #ifdef NetedPROTOTYPE Widget parent, char *name, unsigned long x, unsigned long y, unsigned long width, unsigned long height, GobeRectangleStruct *display_window, unsigned long scroll #endif ); /******************************************************************************/ /* */ /* Walks network to find the topological-ordered list, returning node-list */ /* to caller. */ /* */ /******************************************************************************/ unsigned long NetedTraverseTopoList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId *vector[], int *count #endif ); /******************************************************************************/ /* */ /* Walks network to find the topological-ordered list, invoking supplied */ /* action proc for each node. */ /* */ /******************************************************************************/ unsigned long NetedTraverseTopoAction( #ifdef NetedPROTOTYPE NetedTwidgetId widget, int (*action_proc)(), unsigned long user_data #endif ); /******************************************************************************/ /* */ /* Return ID of type associated with specified object. */ /* */ /******************************************************************************/ unsigned long NetedGetObjectType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, NetedTtypeId *object_type #endif ); /******************************************************************************/ /* */ /* Create a connection between two nodes using an existing connection type. */ /* */ /******************************************************************************/ unsigned long NetedCreateRoutedCon( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId source, unsigned long source_point, NetedTobjectId dest, unsigned long dest_point, XmString annotation[], unsigned long annotation_len, unsigned long user_data, NetedTtypeId con_type, NetedPointStruct con_routing[], unsigned long con_routing_len, unsigned long con_routing_pnt_style, NetedTobjectId *con_id #endif ); /******************************************************************************/ /* */ /* Returns the permanent highlight state of the object specified. */ /* */ /******************************************************************************/ unsigned long NetedGetPermHighlight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long *perm_highlight #endif ); /******************************************************************************/ /* */ /* Sets the permanent highlight state of the object specified. */ /* */ /******************************************************************************/ unsigned long NetedSetPermHighlight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long perm_highlight #endif ); /******************************************************************************/ /* */ /* Returns the supernode of a given node. */ /* */ /******************************************************************************/ unsigned long NetedGetSupernode( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId node_id, NetedTobjectId *supernode_id #endif ); /******************************************************************************/ /* */ /* Set the length of a side of the connection-points square. */ /* */ /******************************************************************************/ unsigned long NetedSetConPointSize( #ifdef NetedPROTOTYPE NetedTwidgetId widget, double size #endif ); /******************************************************************************/ /* */ /* Get the length of a side of the connection-points square. */ /* */ /******************************************************************************/ unsigned long int NetedGetConPointSize( #ifdef NetedPROTOTYPE NetedTwidgetId widget, float *size #endif ); /******************************************************************************/ /* */ /* Returns the address of a vector of connection Id's and the count of all */ /* connections that arrive at that specified object. */ /* */ /******************************************************************************/ unsigned long int NetedGetIncomingConList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, NetedTobjectId *vect[], int *count #endif ); /******************************************************************************/ /* */ /* Returns the address of a vector of connection Id's and the count of all */ /* connections that leave at that specified object. */ /* */ /******************************************************************************/ unsigned long int NetedGetOutgoingConList( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, NetedTobjectId *vect[], int *count #endif ); /******************************************************************************/ /* */ /* Returns the address of a vector of connection Id's and the count of all */ /* connections that connect the source object and the destination object. */ /* */ /******************************************************************************/ unsigned long int NetedGetConsBetween( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId src_object, NetedTobjectId dest_object, NetedTobjectId *vect[], int *count #endif ); /******************************************************************************/ /* */ /* Returns the object ID's of the objects at the ends of the given connection.*/ /* */ /******************************************************************************/ unsigned long int NetedGetObjectsAtEnds( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId con_id, NetedTobjectId *src_object, unsigned long *src_point, NetedTobjectId *dest_object, unsigned long *dest_point #endif ); /******************************************************************************/ /* */ /* Reroute a connection given a set of points. */ /* */ /******************************************************************************/ unsigned long int NetedRerouteCon( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId con_id, NetedPointStruct con_routing[], unsigned long con_routing_len, unsigned long con_routing_pnt_style #endif ); /******************************************************************************/ /* */ /* Returns the default connection type used to create implicit connections. */ /* */ /******************************************************************************/ unsigned long int NetedGetDefaultImpType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId *imp_type #endif ); /******************************************************************************/ /* */ /* Sets the default connection type used to create implicit connections. */ /* */ /******************************************************************************/ unsigned long int NetedSetDefaultImpType( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTtypeId imp_type #endif ); /******************************************************************************/ /* */ /* Sets the permanent highlight state of an annotation object. */ /* */ /******************************************************************************/ unsigned long int NetedSetAnnotPermHighlight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long index, unsigned long perm_highlight #endif ); /******************************************************************************/ /* */ /* Gets the permanent highlight state of an annotation object. */ /* */ /******************************************************************************/ unsigned long int NetedGetAnnotPermHighlight( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object, unsigned long index, unsigned long *perm_highlight #endif ); /******************************************************************************/ /* */ /* Layout a directed acyclic graph based on the graph origin, delta_x and */ /* delta_y. (Vertically). */ /* */ /******************************************************************************/ unsigned long NetedLayoutPrecedVertical( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId start_node, NetedTobjectId finish_node, double start_x, double start_y, double delta_x, double delta_y, NetedLayoutControlStruct *control_struct_pointer #endif ); /******************************************************************************/ /* */ /* Layout a directed acyclic graph based on the graph origin, delta_x and */ /* delta_y. (Horizontally) */ /* */ /******************************************************************************/ unsigned long NetedLayoutPrecedHorizontal( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId start_node, NetedTobjectId finish_node, double start_x, double start_y, double delta_x, double delta_y, NetedLayoutControlStruct *control_struct_pointer #endif ); /******************************************************************************/ /* */ /* This routine pushes the given object behind all the other objects visually.*/ /* */ /******************************************************************************/ unsigned long NetedPush( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object_id #endif ); /******************************************************************************/ /* */ /* This routine pops the given object ahead of all the other objects. */ /* */ /******************************************************************************/ unsigned long NetedPop( #ifdef NetedPROTOTYPE NetedTwidgetId widget, NetedTobjectId object_id #endif );