INTERACTION__DEFINE Name
INTERACTION__DEFINE
Purpose
The purpose of this routine is to implement the most basic of interactions.
An "interaction" is an operation that takes over control of a draw widget and
allows the user to interact with the draw widget in some way. For example,
drawing ROI's on a draw widget is a good example of an interaction. Most interactions
will be subclassed from this INTERACTION object. We have spent an inordinate amount
of time on interactions, but in the end they are *extremely* complicated to program.
I am of the mind now that users should program their own functionality and not
rely on interactions, since the programming effort to create interactions seems
disproportional to the results. I'm saying that most of the time, interactive functionality
can be programmed as normal event handler procedures, rather than relying on interactions.
That said, the interactions we have programmed do work, and they have been instrumental
in producing some very nice functionality in Catalyst applications. Ideas for simplifying
interactions are especially needed.
Authors
FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
1645 Sheely Drive 18 The Green South
Fort Collins Warborough, Oxon
CO 80526 USA OX10 7DN, ENGLAND
Phone: 970-221-0438 Phone: +44 (0)1865 858279
E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk
Category
Objects. Syntax
theObject = Obj_New("INTERACTION")
Superclasses
CATATOM
CATCONTAINER IDLITCOMPONENT
IDL_CONTAINER
Class Structure
class = { INTERACTION, $
_ask_on_up: 0B, $ ; Flag for UP button dialog widget.
_drawID: Obj_New(), $ ; The draw widget whose events are being hijacked.
_drawID_events: IntArr(7), $ ; Storage for the draw widget event types.
_drawID_excl_event_obj: Obj_New(), $ ; The old exclusive event (if there is one).
_drawID_pixmap: Obj_New(), $ ; A pixmap for storing the drawID picture.
_drawID_event_objects: Ptr_New(), $ ; The event objects for the draw widget.
_click_x: 0L, $ ; The X location of button down event.
_click_y: 0L, $ ; The Y location of button down event.
_contextmenu: Obj_New(), $ ; The context menu.
_mode: "", $ ; The "mode" of the interaction: eg., MOVE or DRAW.
_noPicture: 0L, $ ; A flag: Should picture be restored at end of interaction?
_roi_color: "", $ ; The color of the roi.
_selectedObject: Obj_New(), $ ; A selectable interaction object that can be moved.
_statusbar: Obj_New(), $ ; A statusbar object. Can be passed messages, etc.
INHERITS CATATOM $
}
Messages
None.
Modification History
Written by: David W. Fanning, 10 February 2004.
Added DRAW_REALIZE keyword. 14 February 2005.