LISTWIDGET__DEFINE Name
LISTWIDGET Purpose
The purpose of this routine is to implement a list widget in an object
structure. This routine is a compound widget in order to give the list
more functionality than the current IDL list widget.
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
Compound object widgets. Syntax
aList = Obj_New("LISTWIDGET", theParent, VALUE=['pig', 'cow', coyote'], INDEX=2)
Superclasses
BASEWIDGET
WIDGETATOM
CATATOM
CATCONTAINER
IDL_CONTAINER
Class Structure
class = { LISTWIDGET, $ ; The LISTWIDGET object class definition.
_clicks: 0L, $ ; The number of clicks required to generate events.
_index: Ptr_New(), $ ; A pointer to the index or indices of the selections.
_listID:0L, $ ; The list widget identifier.
_listtitle: Obj_New(), $ ; The title object.
_listbutton: Obj_New(), $ ; The button object.
_multiple: 0L, $ ; A flag that indicates this list widget generates multiple selections.
_selection: Ptr_New(), $ ; A pointer to the selections.
_value: Ptr_New(), $ ; The values or selections on the list.
_event_handler: Obj_New(), $ ; The real (assigned) event handler object for this compound object.
_event_method_real: "", $ ; The event method assigned by the user to this object widget.
INHERITS BASEWIDGET $
}
Event Structure
This is the event structure sent from the LISTWIDGET to the event handler object.
event = { LISTWIDGET_EVENT, $
ID:Obj_New(), $ ; The widget object that caused the event.
TOP: Obj_New(), $ ; The object at the top of the object hierarchy.
HANDLER:Obj_New(), $ ; The event handler object.
EVENT_NAME: "", $ ; The name of the event, LISTWIDGET_EVENT.
NAME: "", $ ; The name of the object.
CLICKS: 0L, $ ; The number of clicks for selection. 1 or 2.
INDEX: Ptr_New(), $ ; The index (or indices) of the current selection.
NUM_SELECTED: 0L, $ ; The number of elements in the selection pointer.
SELECTION:Ptr_New() $ ; The current list selection (i.e., value[index]).
}
Modification History
Written by: David W.Fanning, 25 March 2003.
Fixed a problem with the EventHandler when using context sensitive menus with ListWidget. DWF. 15 May 2004.