+
+class SashList(wx.Panel) :
+ def __init__(self, parent) :
+ wx.Panel.__init__(self, parent, -1)
+ self.parent=parent
+ winids = []
+ #self.gparent=gparent
+ #self.dlist=dlist
+ #self.first = first
+ #self.menu = menu
+ # A window to the left of the client window
+ #self.listlex = listlex
+ self.leftwin1 = wx.SashLayoutWindow(
+ self, -1, wx.DefaultPosition, (200, 300),
+ wx.NO_BORDER|wx.SW_3D
+ )
+
+ self.leftwin1.SetDefaultSize((120, 1000))
+ self.leftwin1.SetOrientation(wx.LAYOUT_VERTICAL)
+ self.leftwin1.SetAlignment(wx.LAYOUT_LEFT)
+ self.leftwin1.SetBackgroundColour(wx.Colour(0, 255, 0))
+ self.leftwin1.SetSashVisible(wx.SASH_RIGHT, True)
+ self.leftwin1.SetExtraBorderSize(10)
+
+ #textWindow = wx.TextCtrl(
+ # leftwin1, -1, "", wx.DefaultPosition, wx.DefaultSize,
+ # wx.TE_MULTILINE|wx.SUNKEN_BORDER
+ # )
+
+ #textWindow.SetValue("A sub window")
+
+ self.leftWindow1 = self.leftwin1
+ winids.append(self.leftwin1.GetId())
+
+ rightwin1 = wx.SashLayoutWindow(
+ self, -1, wx.DefaultPosition, (200, 300),
+ wx.NO_BORDER|wx.SW_3D
+ )
+
+ rightwin1.SetDefaultSize((120, 1000))
+ rightwin1.SetOrientation(wx.LAYOUT_VERTICAL)
+ rightwin1.SetAlignment(wx.LAYOUT_LEFT)
+ rightwin1.SetBackgroundColour(wx.Colour(0, 255, 0))
+ rightwin1.SetSashVisible(wx.SASH_RIGHT, True)
+ rightwin1.SetExtraBorderSize(10)
+ #textWindow = wx.TextCtrl(
+ # leftwin1, -1, "", wx.DefaultPosition, wx.DefaultSize,
+ # wx.TE_MULTILINE|wx.SUNKEN_BORDER
+ # )
+
+ #textWindow.SetValue("A sub window")
+
+ self.rightwin1 = rightwin1
+ winids.append(rightwin1.GetId())
+
+class TgenLayout :
+ def __init__(self, page):
+ self.page = page
+ parametres = self.page.parametres
+ ira = wx.GetApp().GetTopWindow()
+ tgenpath = os.path.join(parametres['pathout'], 'tgen.csv')
+ self.page.tgens, etoiles = ReadList(parametres['tgenspec'], ira.syscoding, sep="\t")
+ tgen = TGen(path = tgenpath, encoding = parametres['encoding'])
+ tgen.read()
+ tgenlempath = os.path.join(parametres['pathout'], 'tgenlemchi2.csv')
+ if os.path.exists(tgenlempath) :
+ self.page.parametres['tgenlemspec'] = tgenlempath
+ self.page.tgenlem, etoiles = ReadList(self.page.parametres['tgenlemspec'], ira.syscoding, sep="\t")
+ tgentab = False
+ gparent = None
+ if 'TabChdSim' in dir(page) :
+ page = page.TabChdSim
+ for i in range(page.GetPageCount()) :
+ tab = page.GetPage(i)
+ if 'gparent' in dir(tab) :
+ if tab.gparent is not None :
+ gparent = tab.gparent
+ if 'tgen' in dir(tab) :
+ if tab.tgen :
+ tgentab = tab
+ break
+
+ if tgentab :
+ self.page.tgentab.RefreshData(self.page.tgens)
+ self.page.tgentab.tgens = tgen.tgen
+ self.page.tgentab.tgenlem = self.page.tgenlem
+ page.SetSelection(i)
+ else :
+ self.page.tgentab = ListForSpec(ira, gparent, self.page.tgens, etoiles[1:])
+ self.page.tgentab.tgen = True
+ self.page.tgentab.tgens = tgen.tgen
+ if os.path.exists(tgenlempath) :
+ self.page.tgentab.tgenlem = self.page.tgenlem
+ page.AddPage(self.page.tgentab, _(u'Tgens Specificities').decode('utf8'))
+ page.SetSelection(page.GetPageCount() - 1)
+