Example #1
0
	def __init__(self, app):
		BasicWindow.__init__(self, None, 'PAGE Camera Editor', (1024, 384))
		# initialize menu
		fileMenu = wx.Menu()
		fileMenu.Append(wx.ID_NEW, '&New', 'Create a new scene')
		fileMenu.Append(wx.ID_OPEN, '&Open...', 'Open an existing scene')
		fileMenu.Append(wx.ID_SAVE, '&Save', 'Save the current scene and camera set')
		fileMenu.Append(wx.ID_SAVEAS, 'Save &As...', 'Save the current scene and camera set to the specified files')
		fileMenu.Append(wx.ID_REVERT, '&Revert', 'Reload the last saved copy of the current scene and camera set')
		fileMenu.AppendSeparator()
		fileMenu.Append(wx.ID_EXIT, 'E&xit', 'Quit the program')
		menuBar = wx.MenuBar()
		menuBar.Append(fileMenu, '&File')
		self.SetMenuBar(menuBar)
		# initialize controls
		self.CreateStatusBar()
		self.canvas = Canvas(self)
		self.Show()
		# initialize event handlers
		wx.EVT_ACTIVATE(self, self.OnActivate)
		wx.EVT_CLOSE(   self, self.OnClose)
		# initialize menu event handlers
		wx.EVT_MENU(self, wx.ID_NEW,    self.OnFileNew)
		wx.EVT_MENU(self, wx.ID_OPEN,   self.OnFileOpen)
		wx.EVT_MENU(self, wx.ID_SAVE,   self.OnFileSave)
		wx.EVT_MENU(self, wx.ID_SAVEAS, self.OnFileSaveAs)
		wx.EVT_MENU(self, wx.ID_REVERT, self.OnFileRevert)
		wx.EVT_MENU(self, wx.ID_EXIT,   self.OnFileExit)
		# initialize state
		self.app = app
		self.active = True
Example #2
0
	def __init__(self, app):
		BasicWindow.__init__(self, None, 'PAGE Scene Editor')
		# initialize menu
		fileMenu = wx.Menu()
		fileMenu.Append(wx.ID_NEW, '&New', 'Create a new scene')
		fileMenu.Append(wx.ID_OPEN, '&Open...', 'Open an existing scene')
		fileMenu.Append(wx.ID_SAVE, '&Save', 'Save the current scene')
		fileMenu.Append(wx.ID_SAVEAS, 'Save &As...', 'Save the current scene to a specified file')
		fileMenu.Append(wx.ID_REVERT, '&Revert', 'Reload the last saved copy of the current scene')
		fileMenu.AppendSeparator()
		fileMenu.Append(self.ID_ROOTDIR, 'Root &Directory...', 'Set the root directory for loading resources')
		fileMenu.Append(self.ID_PREFS, '&Preferences...', 'Change editor options')
		fileMenu.AppendSeparator()
		fileMenu.Append(wx.ID_EXIT, 'E&xit', 'Quit the program')
		menuBar = wx.MenuBar()
		menuBar.Append(fileMenu, '&File')
		self.SetMenuBar(menuBar)
		# initialize controls
		self.CreateStatusBar()
		self.canvas = Canvas(self)
		self.Show()
		# initialize event handlers
		wx.EVT_ACTIVATE(self, self.OnActivate)
		wx.EVT_CLOSE(   self, self.OnClose)
		# initialize menu event handlers
		wx.EVT_MENU(self,   wx.ID_NEW,     self.OnFileNew)
		wx.EVT_MENU(self,   wx.ID_OPEN,    self.OnFileOpen)
		wx.EVT_MENU(self,   wx.ID_SAVE,    self.OnFileSave)
		wx.EVT_MENU(self,   wx.ID_SAVEAS,  self.OnFileSaveAs)
		wx.EVT_MENU(self,   wx.ID_REVERT,  self.OnFileRevert)
		wx.EVT_MENU(self, self.ID_ROOTDIR, self.OnFileRootDir)
		wx.EVT_MENU(self, self.ID_PREFS,   self.OnFilePrefs)
		wx.EVT_MENU(self,   wx.ID_EXIT,    self.OnFileExit)
		# initialize state
		self.app = app
		self.active = True