Package Pmv :: Module guiTools :: Class MoleculeChooser
[hide private]
[frames] | no frames]

Class MoleculeChooser

source code

Known Subclasses:
AugmentedMoleculeChooser

presents user w/ a list of molecules currently loaded;
mode can be 'single', 'browse', 'multiple' or 'extended'.
Molecules can be selected from the list or by picking in the camera.

OK button returns a list of entries which have been selected.
Cancel returns an empty list. 
Typical usage is:
    ans = MoleculeChooser(self.vf).go()
    if ans !=[]:
        then get the value(s)
NB: this class doesn't grab the focus and binds picking w/
B1 to selecting the molecule in the MoleculeChooser. 



Instance Methods [hide private]
  __init__(self, viewer, mode='single', title='Choose Molecule')
  done_cb(self)
  go(self, modal=1, blocking=0, event="<ButtonRelease-1>")
Start the form
  getMolSet(self)
method to get currently selected molecules when the chooser is used in modal=0 and blocking=0 mode
  onPick(self, atoms)

Method Details [hide private]

__init__(self, viewer, mode='single', title='Choose Molecule')
(Constructor)

source code 
None

done_cb(self)

source code 
None

go(self, modal=1, blocking=0, event="<ButtonRelease-1>")

source code 
Start the form

getMolSet(self)

source code 
method to get currently selected molecules when the chooser is used in modal=0 and blocking=0 mode

onPick(self, atoms)

source code 
None