Esempio n. 1
0
 def SetAMode(self):
     if self.rotmode:
         self.rotmode = False
         self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self.pbutton.SetStatus('Normal')
     self.abutton.SetStatus('Toggled')
     self.pbutton.SetToggled(False)
     self.abutton.SetToggled(True)
     self._set_bitmap2(self.p0, self.iabutton)
     for p in self.p2:
         p.SetToggled(False)
         p.SetStatus('Normal')
     for b in self.p0:
         self.AddButtonOrS(b)
     for b in self.p2:
         self.AddButtonOrS(b)
     self.AddSpacer()
     for b in self.p3:
         self.AddButtonOrS(b)
     self.DoLayout()
     self.ptype = 'amode'
     self.GetParent()._show_cursor = False
     sc = wxStockCursor(wx.CURSOR_DEFAULT)
     self.GetParent().canvas.SetCursor(sc)
Esempio n. 2
0
    def SetInsertMode(self, btask, btnl):
        for p in self.p2:
            if p != btnl: p.SetToggled(False)

        p = btnl
        sc = wxStockCursor(wx.CURSOR_WAIT)
        self.GetParent().canvas.SetCursor(p.custom_cursor)
Esempio n. 3
0
    def SetInsertMode(self, btask, btnl):
        for p in self.p2:
            if p != btnl: p.SetToggled(False)

        p = btnl
        sc = wxStockCursor(wx.CURSOR_WAIT)
        self.GetParent().canvas.SetCursor(p.custom_cursor)
Esempio n. 4
0
 def ExitInsertMode(self):
     #        print 'exiting insert mode'
     sc = wxStockCursor(wx.CURSOR_DEFAULT)
     self.GetParent().canvas.SetCursor(sc)
     self.mode = ''
     self.SetAMode()
     self._set_bitmap2(self.p2, -1)
     self.ptype = 'pmode'
Esempio n. 5
0
    def ExitInsertMode(self):
#        print 'exiting insert mode'
        sc = wxStockCursor(wx.CURSOR_DEFAULT)
        self.GetParent().canvas.SetCursor(sc)
        self.mode = ''
        self.SetAMode()
        self._set_bitmap2(self.p2, -1)
        self.ptype = 'pmode'
Esempio n. 6
0
 def SetCursor(self):
     if self.rotmode:
        self.rotmode = False
        self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self._set_bitmap2(self.p1, 3)
     self._set_toggle(3)
     for b in self.p0: self.AddButtonOrS(b)
     for b in self.p1: self.AddButtonOrS(b)
     self.AddSpacer()
     for b in self.p3: self.AddButtonOrS(b)
     self.DoLayout()
     self.mode = 'cursor'
     self.GetParent()._show_cursor = True
     sc = wxStockCursor(wx.CURSOR_DEFAULT)
     self.GetParent().canvas.SetCursor(sc)
     self.GetParent().exit_layout_mode() # just in case...
Esempio n. 7
0
 def SetSelect(self, skip_sc = False):
     if self.rotmode:
        self.rotmode = False
        self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self._set_bitmap2(self.p1, 0)
     self._set_toggle(0)
     for b in self.p0: self.AddButtonOrS(b)
     for b in self.p1: self.AddButtonOrS(b)                            
     self.AddSpacer()
     for b in self.p3: self.AddButtonOrS(b)
     self.DoLayout()
     self.mode = ''
     self.GetParent()._show_cursor = False
     if not skip_sc:
         sc = wxStockCursor(wx.CURSOR_DEFAULT)
         self.GetParent().canvas.SetCursor(sc)
Esempio n. 8
0
 def SetCursor(self):
     if self.rotmode:
         self.rotmode = False
         self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self._set_bitmap2(self.p1, 3)
     self._set_toggle(3)
     for b in self.p0:
         self.AddButtonOrS(b)
     for b in self.p1:
         self.AddButtonOrS(b)
     self.AddSpacer()
     for b in self.p3:
         self.AddButtonOrS(b)
     self.DoLayout()
     self.mode = 'cursor'
     self.GetParent()._show_cursor = True
     sc = wxStockCursor(wx.CURSOR_DEFAULT)
     self.GetParent().canvas.SetCursor(sc)
     self.GetParent().exit_layout_mode()  # just in case...
Esempio n. 9
0
 def SetSelect(self, skip_sc=False):
     if self.rotmode:
         self.rotmode = False
         self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self._set_bitmap2(self.p1, 0)
     self._set_toggle(0)
     for b in self.p0:
         self.AddButtonOrS(b)
     for b in self.p1:
         self.AddButtonOrS(b)
     self.AddSpacer()
     for b in self.p3:
         self.AddButtonOrS(b)
     self.DoLayout()
     self.mode = ''
     self.GetParent()._show_cursor = False
     if not skip_sc:
         sc = wxStockCursor(wx.CURSOR_DEFAULT)
         self.GetParent().canvas.SetCursor(sc)
Esempio n. 10
0
 def SetAMode(self):
     if self.rotmode:
         self.rotmode = False
         self.GetParent().set_3dzoom_mode(False)
     self.Clear()
     self.pbutton.SetStatus('Normal')
     self.abutton.SetStatus('Toggled')
     self.pbutton.SetToggled(False)
     self.abutton.SetToggled(True)
     self._set_bitmap2(self.p0, self.iabutton)
     for p in self.p2: 
        p.SetToggled(False)
        p.SetStatus('Normal')
     for b in self.p0: self.AddButtonOrS(b)
     for b in self.p2: self.AddButtonOrS(b)
     self.AddSpacer()
     for b in self.p3: self.AddButtonOrS(b)
     self.DoLayout()
     self.ptype = 'amode'
     self.GetParent()._show_cursor = False
     sc = wxStockCursor(wx.CURSOR_DEFAULT)
     self.GetParent().canvas.SetCursor(sc)