+
+ def OnTgenDetails(self, evt):
+ if 'nb' in dir(self.parent) :
+ activenotebook = self.parent.nb.GetSelection()
+ page = self.parent.nb.GetPage(activenotebook)
+ corpus = page.corpus
+ else :
+ corpus = self.parent.parent.parent.corpus
+ ira = wx.GetApp().GetTopWindow()
+ item=self.getColumnText(self.GetFirstSelected(), 0)
+ wordlist = [val for val in self.tgens[item] if val in corpus.lems]
+ wordlist = dict(list(zip(wordlist,wordlist)))
+ res = dict([[val, self.tgenlem[val]] for val in self.tgenlem if self.tgenlem[val][0] in wordlist])
+ win = ListLexFrame(self, ira, corpus, res, self.etoiles)
+ win.Show()
+
+ def OnMakeTgen(self, evt):
+ self.parent.tree.OnTgenEditor(self.getselectedwords())
+
+
+class ListLexFrame ( wx.Frame ):
+
+ def __init__( self, parent, ira, corpus, data, columns ):
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 500,300 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
+ self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
+ bSizer1 = wx.BoxSizer( wx.VERTICAL )
+ self.listlex = ListForSpec(self, ira, data, columns)
+ bSizer1.Add( self.listlex, 5, wx.ALL|wx.EXPAND, 5 )
+ m_sdbSizer1 = wx.StdDialogButtonSizer()
+ self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1OK )
+ self.m_sdbSizer1Cancel = wx.Button( self, wx.ID_CANCEL )
+ m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel )
+ m_sdbSizer1.Realize();
+ bSizer1.Add( m_sdbSizer1, 0, wx.EXPAND, 5 )
+ self.SetSizer( bSizer1 )
+ self.Layout()
+ self.Centre( wx.BOTH )
+
+ def __del__( self ):
+ pass