[Bio] / PyGUI / Catalogpanel.py Repository:
ViewVC logotype

View of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Fri Aug 1 15:33:39 2003 UTC (16 years, 4 months ago) by hwang
Branch: MAIN
Changes since 1.2: +7 -4 lines
*** empty log message ***

from wxPython.wx import *
from FaST.BssFactory import BssFactory
from FaST.RecoElem import RecoElem
from RecoElempanel import RecoElemWindow

class CatalogWindow:
    def __init__(self, parent):
        self.parent = parent
        self.to_re = parent.re 
        self.selected = None       #remember last selected catalog entry
                                   #..is used when LOAD button is hit.
        button1= self.parent.OK_button
        EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),
                   self.onLoadBtnPress)

        return
        
    def InitLsCat(self):
        b=BssFactory()
        cpanel_list = b.getLsCat()
        
       ##  for x in cpanel_list:
##             self.parent.catalog_listbox.Append(x[0], x[1])
                      
##         EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)
        #return

        self.parent.rootId = self.parent.catalog_tree.AddRoot("catalog item")
        

    def onLeftClick(self,event):
        pt=self.parent.catalog_listbox.GetSelection()
        self.selected =int (self.parent.catalog_listbox.GetClientData(pt))
        return

        
    def onLoadBtnPress(self, event):
        wxBeginBusyCursor()
        b=BssFactory()
        top= b.getRecoElemById( self.selected )
        self.to_re.AddRecoElemTree(self.parent.rootId, top)
        wxEndBusyCursor()
        return
    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3