Пример #1
0
	def __init__(self, parent):
		BasicCanvas.__init__(self, parent)
		# initialize event handlers
		wx.EVT_ENTER_WINDOW(self, self.OnEnterWindow)
		wx.EVT_KEY_DOWN(    self, self.OnKeyDown)
		wx.EVT_LEFT_DOWN(   self, self.OnLeftDown)
		wx.EVT_MOTION(      self, self.OnMotion)
		wx.EVT_MOUSEWHEEL(  self, self.OnMousewheel)
		wx.EVT_RIGHT_DOWN(  self, self.OnRightDown)
		# initialize menu event handlers
		wx.EVT_MENU(self, self.ID_ADD,            self.OnAdd)
		wx.EVT_MENU(self, self.ID_MOVE,           self.OnMove)
		wx.EVT_MENU(self, self.ID_MOVE_X,         self.OnMoveX)
		wx.EVT_MENU(self, self.ID_MOVE_Y,         self.OnMoveY)
		wx.EVT_MENU(self, self.ID_MOVE_Z,         self.OnMoveZ)
		wx.EVT_MENU(self, self.ID_ROTATE_X,       self.OnRotateX)
		wx.EVT_MENU(self, self.ID_ROTATE_Y,       self.OnRotateY)
		wx.EVT_MENU(self, self.ID_ROTATE_Z,       self.OnRotateZ)
		wx.EVT_MENU(self, self.ID_SCALE,          self.OnScale)
		wx.EVT_MENU(self, self.ID_SCALE_X,        self.OnScaleX)
		wx.EVT_MENU(self, self.ID_SCALE_Y,        self.OnScaleY)
		wx.EVT_MENU(self, self.ID_SCALE_Z,        self.OnScaleZ)
		wx.EVT_MENU(self, self.ID_SCALE_RADIAL_X, self.OnScaleRadialX)
		wx.EVT_MENU(self, self.ID_SCALE_RADIAL_Y, self.OnScaleRadialY)
		wx.EVT_MENU(self, self.ID_SCALE_RADIAL_Z, self.OnScaleRadialZ)
		wx.EVT_MENU(self, self.ID_PUT_ON_TRACK,   self.OnPutOnTrack)
		wx.EVT_MENU(self, self.ID_PUT_ON_GROUND,  self.OnPutOnGround)
		wx.EVT_MENU(self, self.ID_DELETE,         self.OnDelete)
Пример #2
0
	def __init__(self, parent):
		BasicCanvas.__init__(self, parent)
		# initialize event handlers
		wx.EVT_ENTER_WINDOW(self, self.OnEnterWindow)
		wx.EVT_KEY_DOWN(   self, self.OnKeyDown)
		wx.EVT_LEFT_DOWN(  self, self.OnLeftDown)
		wx.EVT_LEFT_UP(    self, self.OnLeftUp)
		wx.EVT_MIDDLE_DOWN(self, self.OnMiddleDown)
		wx.EVT_MOTION(     self, self.OnMotion)
		wx.EVT_RIGHT_DOWN( self, self.OnRightDown)
		wx.EVT_RIGHT_UP(   self, self.OnRightUp)
		# initialize menu event handlers
		wx.EVT_MENU(self, self.ID_NEW_CAMERA,        self.OnNewCamera)
		wx.EVT_MENU(self, self.ID_CAMERA_PROPERTIES, self.OnCameraProperties)
		wx.EVT_MENU(self, self.ID_MOVE_CAMERA,       self.OnMoveCamera)
		wx.EVT_MENU(self, self.ID_CLEAR_CAMERA,      self.OnClearCamera)
		wx.EVT_MENU(self, self.ID_DELETE_CAMERA,     self.OnDeleteCamera)