EditObject Widget Class


Overview

The EditObject widget class provides support for displaying, editing, and storing/retrieving graphic objects based on the Graphic object class. Any widget class that is a subclass of the EditObject widget class inherits the ability to display, edit, and store/retrieve graphic objects.

The display and editing capabilities of the EditObject class are implemented through a comprehensive set of actions, callbacks and convenience functions. Editing capabilities include the ability to select one or more objects and to move, size or shape objects. A set of convenience functions is provided for saving and restoring objects to or from an ASCII file. A clipboard mechanism provides cut and paste functionality inside an application or between two different applications that use EditObject widgets (or widgets from a subclass of the EditObject widget class).


Coordinate System

The EditObject class defines a linear coordinate system that is between 0.0 and 100.0 both horizontally and vertically. You can use the functions provided in the CompBase widget class to do transformations between pixel values and the EditObject coordinate system.

Object Selection

Once an object is created, it can be selected using BSelect. Handles are displayed around the edges of a selected object (or group of objects) to indicate it has been selected. Multiple selection and grouping/ungrouping of objects is also supported.

Object Editing

Objects can be moved, sized and shaped interactively. Size and Shape operations are identical for all rectangular Graphic objects (such as Oval and Text). For objects instantiated using subclasses of the MultiPoint class (such as PolyLine and Wavelet), the Shape operation is equivalent to a Move point operation. The Move, Size and Shape operations are activated using BSelect Drag and terminated using BSelect Release. A special operation, called Adjust, combines the Shape and Move operations into one action. If the user performs BSelect Drag close to a handle, a Shape operation will be performed, otherwise a Move operation is performed. Finally, a specific set of actions is provided to interactively add or remove points for MultiPoint based objects.

Objects can also be edited from the program, just like any other Motif widget, using the XtSetValues or XtVaSetValues calls.


Object Display

Objects are displayed in the order they have been created. The object created first is drawn first, while the object created last is drawn last and thus will appear to be on top of the other objects. A set of convenience functions allows the application to move objects forward or backward in the display order.

Input/Output

The EditObject widget class provides a set of convenience functions to write a list of objects into a file and to retrieve them later on. The objects in an object description file can be read by any widget created from a subclass of the EditObject widget class.

Clipboard

A clipboard mechanism is implemented for Cut, Copy and Paste operations on Graphic objects. The clipboard mechanism provides cut/copy/paste operations among EditObject widgets inside the current application or between two different applications. For example, it is possible to Cut an object from an EditObject widget in one application and Paste it into an EditObject widget belonging to another application.

Locator

The EditObject provides a callback and a set of actions that allow the application to track the cursor location.

EditObject Widget Appearance

The EditObject widget appears as an empty rectangular window.

Inherited Behavior and Resources

The EditObject widget inherits behavior and resources from the Core, Composite, Constraint, Manager and CompBase classes.
The following resources are defined by the EditObject widget class:
NameTypeDefaultAccess
XmNallowDragBooleanFalseCSG
XmNallowDropBooleanFalseCSG
XmNareaSelectionCallbackXtCallbackListNULLC
XmNcopyCallbackXtCallbackListNULLC
XmNcursorTypeintXC_crosshairCSG
XmNcutCallbackXtCallbackListNULLC
XmNdragDropCallbackXtCallbackListNULLC
XmNeditObjectCallbackXtCallbackListNULLC
XmNflipBooleanFalseCSG
XmNhandleColorPixel"blue"CSG
XmNhandleSizeint4CSG
XmNinsertObjectCallbackXtCallbackListNULLC
XmNlocatorCallbackXtCallbackListNULLC
XmNobjectDeselectionCallbackXtCallbackListNULLC
XmNobjectEditModeintXintEDIT_NONECSG
XmNobjectSelectionCallbackXtCallbackListNULLC
XmNpasteCallbackXtCallbackListNULLC
XmNpointSelectionToleranceint4CSG
XmNresourceDialogCallbackXtCallbackListNULLC
XmNrubberbandCallbackXtCallbackListNULLC
XmNselectionCallbackXtCallbackListNULLC


XmNallowDrag

Specifies whether or not the widget can be used as a drag site for Motif drag and drop operations. See also callback XmNdragDropCallback for selectively allowing or disallowing drag operations.

XmNallowDrop

Specifies whether or not the widget can be used as a drop site for Motif drag and drop operations.See also callback XmNdragDropCallback for selectively allowing or disallowing drop operations.

XmNareaSelectionCallback

Specifies a list of callbacks that is called when a user has selected a rectangular area in the widget window. The callback list is called by the action EndAreaSelection. The coordinates of the selection are returned in the callback structure. Each subclass of the EditObject widget class inherits this resource, but returns a unique callback structure to the associated callback list. For the EditObject widget class, the callback structure returned is XintEditObjectAreaSelectionCallbackStruct.

XmNcopyCallback

Specifies a list of callbacks that is called when function XintEditObjectCopy is invoked. The list of selected objects is returned in the XintEditObjectCallbackStruct callback structure. The reason sent by the callback is XintCR_COPY.

XmNcursorType

Specifies the type of cursor to display in the EditObject widget window. Specify any valid cursor defined by the X Window System or specify XintCROSS_HAIR_CURSOR to obtain a drawn cross hair cursor. The cross hair cursor displays horizontal and vertical lines that intersect at the cursor location and which extend across the EditObject widget window.

XmNcutCallback

Specifies a list of callbacks that is called when function XintEditObjectCut is invoked. The list of selected objects is returned in the XintEditObjectCallbackStruct callback structure. The reason sent by the callback is XintCR_CUT.

XmNdragDropCallback

Specifies a list of callbacks that is called when the application initiates a Motif drag or drop operation. This callback will only be called if resource XmNallowDrag (for a drag) or XmNallowDrop (for a drop) are set to True. The action controlling the drag operation is MotifDragStart. There is no specific action for the drop operation.

XmNeditObjectCallback

Specifies a list of callbacks that are called when a graphic object is being edited interactively. Supported operations are object move and shape. The callback structure is XintEditObjectCallbackStruct. Reasons returned by the callback are XintCR_OBJECT_EDIT_START, XintCR_OBJECT_EDIT, and XintCR_OBJECT_EDIT_END.

XmNflip

Specifies how objects based on the Graphic class that have sampled data (such as Wavelet or LogCurve) are drawn. When this resource is set to True, the data samples are associated with the vertical axis. When the resource is False, the data samples are associated with the horizontal axis.

XmNhandleColor

Specifies the pixel colors used to draw the handle bars of an Graphic object when it is selected.

XmNhandleSize

Specifies the size in pixels of the handle bars drawn when an Graphic object is selected.

XmNinsertObjectCallback

Specifies a list of callbacks that is called after the completion of an object insert operation, initiated using function XintEditObjectInsert.

XmNlocatorCallback

Specifies a list of callbacks that is called by the Locator action. This action is typically connected to the cursor movement by the translation table. Every subclass of the EditObject widget class inherits this resource, but some subclasses return a unique callback structure to the associated callback list. For the EditObject widget class, the callback structure is XintEditObjectLocatorCallbackStruct.

XmNobjectDeselectionCallback

Specifies a list of callbacks that is called when the function XintEditObjectDeselectObject is called or when a Graphic object is deselected in the EditObject widget's window. Both the deselected object and the list of objects that remain selected are returned in the callback structure.

XmNobjectEditMode

Specifies the edit mode for the Graphic objects contained in the EditObject window. Most basic editing operations defined on Graphic objects are handled by the editing actions (ObjectEditStart, ObjectEdit and ObjectEditEnd). If the action ObjectEditStart has no argument specified, then the corresponding editing operation is defined using the resource XmNobjectEditMode. Two functions, XintEditObjectSetEditMode and XintEditObjectGetEditMode, set and get the value of this resource. You can specify one of the following constants for the value of this resource:

Resource ValueDescription
XintEDIT_NONEObjectEdit actions do nothing.
XintEDIT_MOVEObjectEdit actions implement a Move operation.
XintEDIT_SIZEObjectEdit actions implement a Size operation.
XintEDIT_SHAPEObjectEdit actions implement a Shape operation.
XintEDIT_ADJUSTObjectEdit actions implement an Adjust operation. Adjust is a Shape operation if the object selection is close to a handle bar or a Move operation if the object selection is anywhere else inside the object.
XintEDIT_RUBBERBANDObjectEdit actions implement a Rubberband operation. Callback XmNrubberbandCallback is invoked continuously as the pointer moves.


XmNobjectSelectionCallback

Specifies a list of callbacks that is called when function XintEditObjectSelectObject is called or when a Graphic object is selected in the widget window. Both the selected object and the list of currently selected objects are returned in the XintEditObjectSelectionCallbackStruct callback structure. The reason sent by the callback is XintCR_OBJECT_SELECTION.

XmNpasteCallback

Specifies a list of callbacks that is called when function XintEditObjectPaste is called. The list of selected objects is returned in the XintEditObjectEditCallbackStruct callback structure. The reason sent by the callback is XintCR_PASTE.

XmNpointSelectionTolerance

Specifies the margin of tolerance, in pixels, for selecting an object or an object's point.

XmNresourceDialogCallback

Specifies a list of callbacks that is called when action ResourceDialog is invoked. Some objects, such as Text, AxisObject or Chart have a built-in resource editor that is activated from action ResourceDialog. Callback XmNresourceDialogCallback can be used to prevent the built-in editor from being activated, so that the application can provide its own resource editor. This callback can also be used by the application to provide a resource editor for objects that don't have a built-in one.

XmNrubberbandCallback

Specifies a list of callbacks to be called by actions ObjectEditStart, ObjectEdit and ObjectEditMode, when the XmNobjectEditMode resource is set to XintEDIT_RUBBERBAND. If the XmNobjectEditMode resource is set to XintEDIT_RUBBERBAND then the corresponding action does not do anything but invoke this callback list. It is up to the application to implement rubberbanding.

XmNselectionCallback

Specifies a list of callbacks that is called when a user selects the EditObject widget. The coordinates of the selection are returned in the XintEditObjectCallbackStruct callback structure. The reason sent by the callback is XintCR_SELECTION.

Defined Actions

The following action procedures are defined by the EditObject widget and can be tied to user inputs via a translation table.

NameDescription
ChangeCursorMask()Changes the color of the cross hair cursor in increment.
DrawCursor()Draws the cross hair cursor at the location of the mouse pointer.
EndDrawCursor()Terminates the cross hair drawing operation.
InitDrawCursor()Initiates the cross hair drawing operation.
TraverseCurrent()Moves the focus to the current widget.
PreviousTabGroup()Move the focus to the previous tab group.
NextTabGroup()Moves the focus to the next tab group.
Increment(left)Scrolls left one increment (if implemented by subclass).
Increment(right)Scrolls right one increment (if implemented by subclass).
Increment(up)Scrolls up one increment (if implemented by subclass).
Increment(down)Scrolls down one increment (if implemented by subclass).
Locator()Whenever the cursor is moved inside the widget window, this action calls the list of procedures specified by XmNlocatorCallback.
MotifDragStart())Initiates a Motif drag operation and calls callback XmNdragDropCallback. Action is disabled if resource XmNallowDrag is False.
Page(left)Scrolls left one page (if implemented by subclass).
Page(right)Scrolls right one page (if implemented by subclass).
Page(up)Scrolls up one page (if implemented by subclass).
Page(down)Scrolls down one page (if implemented by subclass).
SelectionCallback()Whenever a Button is pressed inside the widget window, this action calls the list of procedures specified by resource XmNselectionCallback.
InitAreaSelection(callback)Initiates the selection of a rectangular area in the widget window. Callback XmNareaSelectionCallback will be called by action EndAreaSelection when the selection is terminated.
InitAreaSelection(single)Initiates the selection of a rectangular area within which all graphic objects included will be selected. Previously selected objects are deselected first.
InitAreaSelection(extend)Initiates the selection of a rectangular area within which all graphic objects included will be selected. The new selection will extend the current selection.
ExtendAreaSelection()Draws a rectangle bounding the area being selected.
EndAreaSelection()Terminates the area selection operation. Calls XmNareaSelectionCallback or selects the Graphic objects contained in the selection depending on the argument of the action InitAreaSelection.
ObjectSelect(single)Selects a Graphic object. Previously selected objects are deselected first.
ObjectSelect(extend)Selects a Graphic object and adds it to the list of selected objects.
ObjectEditStart()Initiates an editing operation on the selected Graphic object. The type of editing operation such as Move, Size, Shape, etc. is defined by resource XmNobjectEditMode. This action is also used internally by the widget for creating an object interactively.
ObjectEditStart(move)Initiates a Move operation on the selected Graphic object.
ObjectEditStart(shape)Initiates a Shape operation. Shape allows the user to move the points of MultiPoint based object. It is equivalent to a Size for all other objects.
ObjectEditStart(size)Initiates a Size operation on the selected Graphic object.
ObjectEditStart(adjust)Initiates an Adjust operation on the selected object. Adjust is a combination of Shape when the selection is close to a handle bar and Move otherwise.
ObjectEditStart (rubberband)Initiates a rubberband operation where callback XmNrubberbandCallback is called continuously as the pointer moves. It is up to the application to actually draw a rubberband shape.
ObjectEdit()Continues the editing operation initiated by action ObjectEditStart.
ObjectEditEnd()Terminates the editing operation initiated by action ObjectEditStart and calls callback XmNverifyCallback (callback is defined in Graphic class). When XmNobjectEditMode is set to XintEDIT_INSERT and the object being edited is not a MultiPoint object, terminates the insertion operation and calls the XmNinsertObjectCallback.
ObjectEditEnd(m)Terminates the editing operation initiated by action ObjectEditStart and calls callback XmNverifyCallback (callback is defined in Graphic class). When XmNobjectEditMode is set to XintEDIT_INSERT and the object being edited is a MultiPoint object, terminates the insertion operation initiated by action ObjectEditStart and calls callback XmNinsertObjectCallback.
ObjectPointAdd(b) Adds a point to a MultiPoint object. The point is inserted at the beginning of the list.
ObjectPointAdd(e)Adds a point to a MultiPoint object. The point is inserted at the end of the list.
ObjectPointAdd(x)Adds a point to a MultiPoint object. The point is inserted according to its horizontal coordinate.
ObjectPointAdd(y)Adds a point to a MultiPoint object. The point is inserted according to its vertical coordinate.
ObjectPointDelete()Deletes a point from a MultiPoint object.
ObjectCancel()Cancels an operation on an object.
ResourceDialog()Pops up a resource editor for the selected object (if the class defines one) or let the application provide its own. This action will only activate itself on a double click.
Transform3DStart(scale)Initiates the scaling of a 3D object.
Transform3DStart(shift)Initiates the translation of a 3D object.
Transform3DStart(rotate)Initiates the rotation of a 3D object.
Transform3D()Continues the 3D operation initiated by Transform3D.
Transform3DEnd()Terminates the 3D operation initiated by Transform3D.


Default Translations

The following translation table is used by an EditObject widget. These default translations can be overridden by the end user or application programmer.

Event SequenceActions Invoked
<EnterWindow>ManagerEnter() InitDrawCursor()
<LeaveWindow>ManagerFocus() EndDrawCursor()
<FocusIn>ManagerFocusIn()
<FocusOut>ManagerFocusOut()
Ctrl <Key> kChangeCursorMask()
!Shift <Key> TabPreviousTabGroup()
None <Key> TabNextTabGroup()
!Shift <Btn1Down>TraverseCurrent() SelectionCallback() InitAreaSelection(callback) ObjectEditEnd() Locator()
!Ctrl <Btn1Down>TraverseCurrent() SelectionCallback() InitAreaSelection(extend) ObjectSelect(extend) Locator()
None <Btn1Down>TraverseCurrent() ObjectSelect(single) ObjectEditStart() Locator() SelectionCallback() InitAreaSelection(single) ResourceDialog()
<Btn2Down>ObjectEditEnd(m) SelectionCallback() MotifDragStart()
<Btn1Up>EndAreaSelection() ObjectEditEnd()
None <Btn3Down>SelectionCallback() Transform3DStart(rotate)
Ctrl <Btn3Down>Transform3DStart(scale)
Shift <Btn3Down>Transform3DStart(shift)
<Btn3Motion>Transform3D()
None <Btn3Down> SelectionCallback() Transform3DStart(rotate)
<PtrMoved> DrawCursor() ExtendAreaSelection() ObjectEdit() Locator()


Defined Callbacks

The following callbacks are defined by the EditObject widget class.

NameStructureReason
XmNareaSelectionCallbackXintEditObjectArea-
SelectionCallbackStruct
XintCR_AREA_SELECTION
XmNselectionCallbackXintEditObject-
CallbackStruct
XintCR_SELECTION
XmNcopyCallbackXintEditObjectEdit-
CallbackStruct
XintCR_COPY
XmNcutCallbackXintEditObjectEdit-
CallbackStruct
XintCR_CUT
XmNdragDropCallbackXintEditObjectDragDrop-
CallbackStruct
XintCR_DRAG XintCR_DROP
XmNinsertObjectCallbackXintEditObjectInsert-
CallbackStruct
XintCR_INSERT_OBJECT
XmNlocatorCallbackXintEditObjectLocator-
CallbackStruct
XintCR_LOCATOR
XmNobjectDeselection-
Callback
XintEditObjectSelection-
CallbackStruct
XintCR_OBJECT_DESELECTION
XmNobjectSelectionCallbackXintEditObject-
SelectionCallbackStruct
XintCR_OBJECT_SELECTION
XmNpasteCallbackXintEditObjectEdit-
CallbackStruct
XintCR_PASTE
XmNresourceDialogCallbackXintEditObjectResource-
DialogCallbackStruct
XintCR_MANAGE_RESOURCE-
_DIALOG
XmNrubberbandCallbackXintEditObjectRubberband-
CallbackStruct
XintCR_RUBBERBAND_START XintCR_RUBBERBAND XintCR_RUBBERBAND_END


XintEditObjectAreaSelectionCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectAreaSelectionCallbackStruct, returned to each procedure in the callback list specified by the resource XmNareaSelectionCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
intxX pixel coordinate of the upper left corner of the selected rectangle.
intyY pixel coordinate of the upper left corner of the selected rectangle.
intwidthWidth in pixels of the selected rectangle.
intheightHeight in pixels of the selected rectangle.

Each subclass of the EditObject widget class defines its own callback structure for the callback list specified as the value of the XmNareaSelectionCallback resource. Only instances of the EditObject widget class use the area selection callback structure described above.


XintEditObjectCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectCallbackStruct, returned to each procedure in the callback list specified by the resource XmNselectionCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
floatuser_xX user coordinate of the selected location.
floatuser_yY user coordinate of the selected location.
floatpixel_xX pixel coordinate of the selected location.
floatpixel_yY pixel coordinate of the selected location.
ObjectobjectID of object being edited (for XmNeditObjectCallback only).


XintEditObjectDragDropCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectDragDropCallbackStruct, returned to each procedure in the callback list specified by the resource XmNdragDropCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
ObjectobjectGraphic object being dragged or dropped to. This field is NULL if drag or drop is not from or to a graphic object.
intoperationThis field is 0 on a drag. On a drop, it can be set to XintDROP_COPY, XintDROP_MOVE or XintDROP_LINK. You can modify this field on a drop to change the operation.
Atom *atomsArray of source or destination atoms supported.
intatom_countSize of array atoms.
intx,yLocation of the pointer when drag/drop started.
BooleandoitSet to False to cancel the drag or drop operation.


XintEditObjectEditCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectEditCallbackStruct, returned to each procedure in the callback list specified by resources XmNcopyCallback, XmNcutCallback and XmNpasteCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
ObjectlistList of objects to be edited.
intcountNumber of objects to be edited.


XintEditObjectSelectionCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectSelectionCallbackStruct, returned to each procedure in the callback list specified by resources XmNobjectSelectionCallback and XmNobjectDeselectionCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
ObjectobjectThe ID of the object selected or deselected. If multiple objects have been selected/deselected, it contains the ID of the first object in the list. See select_list to access all the selected/deselected objects.
Object *select_listPoints to the list of objects selected/deselected in this operation.
intselect_countThe number of selected/deselected objects.


XintEditObjectInsertCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectInsertCallbackStruct, returned to each procedure in the callback list specified by resource XmNinsertObjectCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
ObjectobjectThe ID of the new object.
BooleandoitSet to False if you don't want the object to be created.


XintEditObjectLocatorCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectLocatorCallbackStruct, returned to each procedure in the callback list specified by resource XmNlocatorCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback. Contains the window coordinates of the cursor.
floatuser_xThe X location of the cursor hot spot in the user coordinate system.
floatuser_yThe Y location of the cursor hot spot in the user coordinate system.

Some subclasses of the EditObject widget class define their own callback structures for the callback list specified as the value of the XmNlocatorCallback resource. Instances of the EditObject widget class use the locator callback structure described above.


XintEditObjectResourceDialogCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectResourceDialogCallbackStruct, returned to each procedure in the callback list specified by resource XmNresourceDialogCallback.

Data TypeMemberDescription
intreasonIndicates why the calback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback. Contains the window coordinates of the cursor.
ObjectobjectID of the selected object.
BooleandoitSet to False to prevent the built-in resource editor from being activated.


XintEditObjectRubberbandCallbackStruct

The following ordered table lists the members of the callback structure, XintEditObjectRubberbandCallbackStruct, returned to each procedure in the callback list specified by resource XmNrubberbandCallback.

Data TypeMemberDescription
intreasonIndicates why the calback was invoked.
XEvent *eventPoints to the XEvent that triggered the callback.
intstart_xThe X location of the cursor when the rubberband operation started.
intstart_yThe Y location of the cursor when the rubberband operation started.
intx_offsetThe offset between the current location of the pointer and the original X location.
inty_offsetThe offset between the current location of the pointer and the original Y location.


Defined Functions

The following functions are defined for creating and manipulating an EditObject widget.

Function NameDescription
XintCreateEditObjectCreates an EditObject widget.
XintDrawCursorFromDataCauses a cross hair cursor to be drawn at a specified location in the EditObject's window.
XintEditObjectBackMoves the current object behind all other objects in the widget.
XintEditObjectCopyCopies the selected objects into the clipboard.
XintEditObjectCurrentReturns the last object selected.
XintEditObjectCutCopies all selected objects into the clipboard and destroys them.
XintEditObjectDeselectAllDeselects all currently selected objects.
XintEditObjectDeselectObjectRemoves the specified object from the selected list.
XintEditObjectDestroyObjectFast destroy function for objects.
XintEditObjectFreezeControls the update of an EditObject display.
XintEditObjectFrontMoves the current object in front of all other objects in the widget.
XintEditObjectGetIntersectListReturns a list containing all of the objects that are children of the EditObject widget and intersect a specified rectangle.
XintEditObjectGetListReturns a list containing all of the objects that are children of the specified EditObject widget.
XintEditObjectGroupGroups the selected objects.
XintEditObjectInsertCreates and inserts an object interactively.
XintEditObjectLowerMoves the current object one place down in the stacking order.
XintEditObjectManageResourceDialogManages the resource editor panel of the specific object, if one is available.
XintEditObjectMoveAllows interactive movement of the selected object.
XintEditObjectNewDestroys all objects belonging the EditObject widget.
XintEditObjectOpenManages a dialog that allows the loading of an ASCII object description file.
XintEditObjectPastePastes the objects in the clipboard into the EditObject widget.
XintEditObjectRaiseMoves the current object one place up in the stacking order.
XintEditObjectReadFileReads an ASCII file containing a description of objects and places them into the EditObject widget.
XintEditObjectSaveSaves all the objects of and EditObject widget into an ASCII file.
XintEditObjectSaveAsManages a dialog box that prompts for the name of a file to store an ASCII description of the objects of an EditObject widget.
XintEditObjectSelectAllSelects all the Graphic objects of an EditObject widget.
XintEditObjectSelectListReturns the list of the selected objects.
XintEditObjectSelectObjectAdds an object to the list of selected objects.
XintEditObjectSetEditModeSets the value of resource XmNobjectEditMode.
XintEditObjectSizeAllows the interactive sizing of the currently selected object.
XintEditObjectUngroupUngroups the currently selected group object.
XintEditObjectWriteFileSaves all the objects of an EditObject widget into an ASCII file.


XintCreateEditObject

XintCreateEditObject creates an unmanaged EditObject widget.

     Widget XintCreateEditObject (...)

WidgetparentParent of new EditObject widget.
char *nameName of new EditObject widget.
ArgListarglistList of resource/value items.
CardinalargcountNumber of items in arglist.


XintDrawCursorFromData

Causes the cross hair cursor to be drawn at a specified location in an EditObject widget. This function has an effect only when the value of resource XmNcursorType is XintCROSS_HAIR_CURSOR.

     void XintDrawCursorFromData (...)

WidgetwidgetEditObject widget ID.
floatuser_xThe horizontal location of where the cursor is to be drawn.
floatuser_yThe vertical location of where the cursor is to be drawn.


XintEditObjectBack

This function changes the stacking order of a widget so that the specified object becomes last in the display list. If argument object is NULL, the function will be applied to the currently selected object.

     void XintEditObjectBack (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to move to the back.


XintEditObjectCopy

This function places all the selected Graphic objects of an EditObject widget into the clipboard. Objects on the clipboard can be pasted back into any EditObject widget using function XintEditObjectPaste.

     void XintEditObjectCopy (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectCurrent

This function returns the currently selected object of an EditObject widget.

     Object XintEditObjectCurrent (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectCut

This function places the selected objects into the clipboard and then destroys them. Objects on the clipboard may be pasted into any EditObject widget using function XintEditObjectPaste.

     void XintEditObjectCut (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectDeselectAll

This function deselects all the selected objects of an EditObject widget.

     void XintEditObjectDeselectAll (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectDeselectObject

This function allows the application programmer to remove a Graphic object from the list of selected objects.

     void XintEditObjectDeselectObject (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to remove from the selected list.


XintEditObjectDestroyObject

This function destroys an object. It is identical functionally to XtDestroyWidget except that it is faster.

     void XintEditObjectDestroyObject (Object object)

where object is the ID of the object to destroy.


XintEditObjectFreeze

This function controls the update of an EditObject display. When this function is called with argument state set to True, the display will not be updated until the function is called again with state set to False. This function is typically used when changes are made to multiple objects to minimize flashing on the screen.

     void XintEditObjectFreeze (...)

WidgetwidgetEditObject widget ID.
BooleanstateTrue to freeze, False to update the display.


XintEditObjectFront

This function changes the stacking order of a widget so that the specified object becomes first in the display list. If argument object is NULL, the function will be applied to the currently selected object.

     void XintEditObjectFront (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to move to the front.


XintEditObjectGetIntersectList

This function returns a list of all of the objects within the specified rectangle that are children of an EditObject widget. This includes objects that are only partially inside the defined area.

     Object* XintEditObjectGetIntersectList (...)

Widgetedit_objectEditObject widget ID.
intxX value of upper left corner of the intersection rectangle, in pixels.
intyY value of upper left corner of the intersection rectangle, in pixels.
intwidthWidth of the intersection rectangle, in pixels.
intheightHeight of the intersection rectangle, in pixels.
int *countReturned count of objects in the list.

If the specified EditObject widget has no Graphic objects as children or if the intersection of the specified rectangle and the EditObject widget is empty, then NULL is returned. The list returned must be freed by the application when it has finished with it.


XintEditObjectGetList

This function returns a list of all of the objects that are children of an EditObject widget.

     Object* XintEditObjectGetList (...)

WidgetwidgetEditObject widget ID.
int *countReturned count of objects in the list.

If the specified EditObject widget has no Graphic objects as children, then NULL is returned. The list returned must be freed by the application when it has finished with it.


XintEditObjectGroup

This function groups selected objects into a Group object. Attributes set on a group propagate to the group children. Groups can be nested without limit.

     Object XintEditObjectGroup (Widget widget)

where widget is the ID of an EditObject widget. The function returns the ID of the new Group object.


XintEditObjectInsert

This function allows the interactive insertion of a Graphic object into a widget whose class is based on EditObject. This function sets the resource XmNobjectEditMode to XintEDIT_INSERT and uses actions ObjectEditStart, ObjectEdit and ObjectEditEnd. When using the default translation table, an object is inserted interactively using BSelect Click and BSelect Drag. MultiPoint based objects are inserted using BSelect Click and BTransfer Click for the last point. Once the object is inserted, the original value of resource XmNobjectEditMode is restored.

     void XintEditObjectInsert (...)

WidgetwidgetSpecifies the ID of the EditObject widget.
ObjectClassclassSpecifies the class of the Graphic object to be created.
ArgListarglistList of resources to be applied to Graphic object created.
CardinalargcountNumber of items in arglist.

Do not specify resources in arglist that have to do with the location and size of the object to be created since those will be set by the end user. Note: The creation of a Graphic object does not take place until the user has specified the object interactively. Resources which are specified using an address must remain allocated until the object is created. For example, all float values which are specified should be declared static. For the same reason, the ID of the new object is not returned by function XintEditObjectInsert. Callback XmNinsertObjectCallback will return the ID of the object when it is created.


XintEditObjectLower

This function changes the display order of the specified object by moving it behind the object that it was immediately in front of. If object is NULL, the function will be applied to the currently selected object.

     void XintEditObjectLower (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to lower.


XintEditObjectManageResourceDialog

This function manages the resource editor panel of the specific object if there is one available. Examples of objects that have a built-in resource editor are: Text, Chart, AxisObject, Symbol.

     void XintEditObjectManageResourceDialog (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object for which to manage the dialog panel.


XintEditObjectMove

This function allows the end-user to move a selected object from a Move menu item. When this function is called, the pointer is warped to the center of the selected object. As the end-user performs Drag, the object outline moves along with the pointer. A BSelect will place the object at the current location and terminate the move operation.

     void XintEditObjectMove (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectNew

This function destroys all Graphic objects belonging to an EditObject widget.

     void XintEditObjectNew (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectOpen

This function manages a dialog box that allows the selection of a object description file. After the file is selected, the objects will be created inside the EditObject widget specified as argument.

     void XintEditObjectOpen (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectPaste

This function pastes all Graphic objects saved in the clipboard into the specified EditObject widget.

     void XintEditObjectPaste (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectRaise

This function changes the stacking order of the specified object by moving it one place up in the display list. If argument object is set to NULL, the function will be applied to the currently selected object.

     void XintEditObjectRaise (...)

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to raise.


XintEditObjectReadFile

This function reads an object description file and creates the objects in the specified EditObject widget.

     Boolean XintEditObjectReadFile (...)

WidgetwidgetEditObject widget ID.
char *filenameName of the file containing the object description.

The function returns False if it cannot open filename or if filename does not contain a valid object description.


XintEditObjectSave

This function saves the Graphic objects contained in the specified EditObject widget into a file that was previously specified in XintEditObjectOpen. Use function XintEditObjectSaveAs or function XintEditObjectWriteFile if you want to specify a different filename.

     void XintEditObjectSave (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectSaveAs

This function manages a dialog box that prompts for the name of a file where the Graphic objects contained in the specified EditObject widget are saved.

     void XintEditObjectSaveAs (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectSelectAll

This function selects all the objects defined in the specified EditObject widget.

     void XintEditObjectSelectAll (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectSelectList

This function returns the list of selected Graphic objects in the specified EditObject widget.

     Object * XintEditObjectSelectList (...) 

WidgetwidgetEditObject widget ID.
int *count Number of objects returned in the list.

The application should free the returned list using function XtFree, after it is no longer needed, if the number of selected objects was not zero.


XintEditObjectSelectObject

This function adds the specified object to the list of selected objects of an EditObject widget.

     void XintEditObjectSelectObject (...) 

WidgetwidgetEditObject widget ID.
ObjectobjectID of the object to select.


XintEditObjectSetEditMode

This function sets the value of resource XmNobjectEditMode.

     void XintEditObjectSetEditMode (...) 

WidgetwidgetEditObject widget ID.
intedit_modeNew value of resource XmNobjectEditMode.


XintEditObjectSize

This function allows the end user to size a selected object from a Size menu item. When this function is called, the pointer is warped to the center of the selected object. As the end user moves the pointer, the new shape of the object is outlined. A BSelect Drag will size the object as specified and a BSelect Up will terminate the operation.

     void XintEditObjectSize (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectUngroup

This function ungroups the currently selected group object in the specified EditObject widget.

     void XintEditObjectUngroup (Widget widget)

where widget is the ID of an EditObject widget.


XintEditObjectWriteFile

This function saves the Graphic object belonging to the specified EditObject widget into a file. The object description file can later be read back using function XintEditObjectReadFile.

     Boolean XintEditObjectWriteFile (...)

WidgetwidgetThe ID of the EditObject widget.
char *filenameThe name of the file where the Graphic object description is saved.
char *modeThe fopen style mode indicating how to open the file.

The function returns False if it failed to open the specified file.