" Module : XW-LIST-DEFS.ST (XWST-LIST-BOX) Date : 30-Jan-1991 Version : 1.00-00 Modified : 03-Apr-1991 This module provides an X-Window List Box. " " | Change Log |==================================================================== | Author Date Change | | KAREN 03-Apr-1991 Changed class definition to inherit from | general class XWindow | | KAREN 15-Mar-1991 Added link to list box controller,methods for | returning list box id and controller | " XWindow subclass: #XListBox instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'X-Windows'. ! !XListBox class methodsFor: 'creation'! new: aTitle with: someItems | newBox newId newController| newBox := super new. newId := newBox newListBox: aTitle with: someItems. newBox setId: newId. newController := XListBoxController newControllerFor: newBox. newBox setController: newController. ^newBox !! !XListBox methodsFor: 'using'! hasFocus ^true ! getSelection ^self getSelection: wId ! newListBox: aTitle with: someItems self newListBox: aTitle with: someItems. ^self !! | dynfun | dynfun := VmsDynamicFunction new. dynfun addLibrary: 'XWST_SHR'. dynfun defineExternFunc: 'create_list_box' withSelectorArgs: 'newListBox: aTitle with: someItems' forClass: XListBox returning: #int args: #(string string). dynfun defineExternFunc: 'get_list_box_selection' withSelectorArgs: 'getSelection: aListBox' forClass: XListBox returning: #string args: #(int). !