Esempio n. 1
0
 def onChart(self, event):
     if self.selection != PDsInChartFrame.CHART:
         self.selection = PDsInChartFrame.CHART
         self.w.Destroy()
         if self.zod:
             self.w = transitwnd.TransitWnd(self, self.chart, self.radix,
                                            self.options, self.parent,
                                            False, -1, self.GetClientSize())
         else:
             self.w = mundanewnd.MundaneWnd(self, self.parent, self.options,
                                            self.chart, None, -1,
                                            self.GetClientSize())
Esempio n. 2
0
 def onComparison(self, event):
     if self.selection != PDsInChartFrame.COMPOUND:
         self.selection = PDsInChartFrame.COMPOUND
         self.w.Destroy()
         if self.zod:
             self.w = transitwnd.TransitWnd(self, self.chart, self.radix,
                                            self.options, self.parent, True,
                                            -1, self.GetClientSize())
         else:
             self.w = mundanewnd.MundaneWnd(self, self.parent, self.options,
                                            self.chart, self.radix, -1,
                                            self.GetClientSize())
Esempio n. 3
0
	def __init__(self, parent, title, opts, chrt, radix=None):
		wx.Frame.__init__(self, parent, -1, title, wx.DefaultPosition, wx.Size(640, 400))

		self.parent = parent
		self.title = title
		self.options = opts
		self.chart = chrt
		self.radix = radix
		self.selection = MundaneFrame.CHART

		self.pmenu = wx.Menu()
		self.ID_Selection = wx.NewId()
		self.ID_SaveAsBitmap = wx.NewId()
		self.ID_BlackAndWhite = wx.NewId()

		self.ID_Chart = wx.NewId()
		self.ID_Comparison = wx.NewId()
		self.ID_Positions = wx.NewId()
#		self.ID_Square = wx.NewId()

		self.selmenu = wx.Menu()
		self.chartmenu = self.selmenu.Append(self.ID_Chart, mtexts.txts['Chart'], '', wx.ITEM_RADIO)
		if self.radix != None:
			self.compoundmenu = self.selmenu.Append(self.ID_Comparison, mtexts.txts['Comparison'], '', wx.ITEM_RADIO)
		self.positionsmenu = self.selmenu.Append(self.ID_Positions, mtexts.txts['Positions'], '', wx.ITEM_RADIO)
#		self.squaremenu = self.selmenu.Append(self.ID_Square, mtexts.txts['Square'], '', wx.ITEM_RADIO)

		self.pmenu.AppendMenu(self.ID_Selection, mtexts.txts['Windows'], self.selmenu)

		self.pmenu.Append(self.ID_SaveAsBitmap, mtexts.txts['SaveAsBmp'], mtexts.txts['SaveChart'])
		self.mbw = self.pmenu.Append(self.ID_BlackAndWhite, mtexts.txts['BlackAndWhite'], mtexts.txts['ChartBW'], wx.ITEM_CHECK)
		
		self.SetMinSize((200,200))

		self.Bind(wx.EVT_RIGHT_UP, self.onPopupMenu)

		self.Bind(wx.EVT_MENU, self.onChart, id=self.ID_Chart)
		if self.radix != None:
			self.Bind(wx.EVT_MENU, self.onComparison, id=self.ID_Comparison)
		self.Bind(wx.EVT_MENU, self.onPositions, id=self.ID_Positions)
#		self.Bind(wx.EVT_MENU, self.onSquare, id=self.ID_Square)
		self.Bind(wx.EVT_MENU, self.onSaveAsBitmap, id=self.ID_SaveAsBitmap)
		self.Bind(wx.EVT_MENU, self.onBlackAndWhite, id=self.ID_BlackAndWhite)

		if self.options.bw:
			self.mbw.Check()

		self.w = mundanewnd.MundaneWnd(self, parent, self.options, self.chart, self.radix)
		self.chartmenu.Check()
Esempio n. 4
0
	def onComparison(self, event):
		if self.selection != MundaneFrame.COMPOUND:
			self.selection = MundaneFrame.COMPOUND
			self.w.Destroy()
			self.w = mundanewnd.MundaneWnd(self, self.parent, self.options, self.chart, self.radix, -1, self.GetClientSize())
Esempio n. 5
0
	def onChart(self, event):
		if self.selection != MundaneFrame.CHART:
			self.selection = MundaneFrame.CHART
			self.w.Destroy()
			self.w = mundanewnd.MundaneWnd(self, self.parent, self.options, self.chart, self.radix, -1, self.GetClientSize())