Example #1
0
    def parent_on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()

        pt = self.CalcUnscrolledPosition(event.GetPosition())
        self.drag_name, self.drag_bmap = self.hit_test(pt)
        if (self.drag_bmap):
            self.drag_start_pos = pt

            # select it too - other selections need to be removed
            win_data.selection_take(self.name, self.drag_name, -1)
Example #2
0
    def parent_on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()

        pt = self.CalcUnscrolledPosition(event.GetPosition())
        self.drag_name, self.drag_bmap = self.hit_test(pt)
        if (self.drag_bmap):
            self.drag_start_pos = pt

            # select it too - other selections need to be removed
            win_data.selection_take(self.name, self.drag_name, -1)
Example #3
0
    def on_left_up(self, event):
        # do parent processing
        prev_id, bric_name, which_id = self.parent_on_left_up(event)
        if prev_id >= 0:
            # it is a valid drop!
            new_id = win_data.program().add_new_bric(prev_id, which_id, bric_name)
            # set the selection
            win_data.selection_take("pwork", bric_name, new_id)

        # force the work area to redraw
        win_data.force_redraw("pwork")
Example #4
0
    def on_left_up(self, event):
        # do parent processing
        prev_id, bric_name, which_id = self.parent_on_left_up(event)
        if (prev_id >= 0):
            # it is a valid drop!
            new_id = win_data.program().add_new_bric(prev_id, which_id,
                                                     bric_name)
            # set the selection
            win_data.selection_take('pwork', bric_name, new_id)

        # force the work area to redraw
        win_data.force_redraw('pwork')
Example #5
0
    def on_left_up(self, event):
        # do parent processing
        loc, name, dummy = self.parent_on_left_up(event)
        if (loc >= 0):
            # it is a valid drop!
            win_data.config_add(loc, name)
            win_data.selection_take('cwork', name, loc)
            win_data.click_sound()

        # force the work area to redraw
        win_data.force_redraw('cwork')
        win_data.force_redraw('config')
Example #6
0
    def on_left_up(self, event):
        # do parent processing
        loc,name,dummy = self.parent_on_left_up(event)
        if (loc >= 0):
            # it is a valid drop!
            win_data.config_add(loc, name)
            win_data.selection_take('cwork', name, loc)
            win_data.click_sound()


        # force the work area to redraw
        win_data.force_redraw('cwork')
        win_data.force_redraw('config')
Example #7
0
    def on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()

        pt = self.CalcUnscrolledPosition(event.GetPosition())

        # BED zooming support
        if (self.zoom != 1.0):
            pt.Set(pt.x / self.zoom, pt.y / self.zoom)

        #print "Left-down:", pt

        self.drag_id, self.drag_name, self.drag_which = self.hit_test(pt)
        if (self.drag_id >= 0):
            self.drag_start_pos = pt
            # also set the selection and update the help window
            win_data.selection_take('pwork', self.drag_name, self.drag_id)
Example #8
0
    def on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()
        
        pt = self.CalcUnscrolledPosition(event.GetPosition())

        # BED zooming support
        if (self.zoom != 1.0):
            pt.Set(pt.x/self.zoom, pt.y/self.zoom)

        #print "Left-down:", pt
        
        self.drag_id, self.drag_name, self.drag_which = self.hit_test(pt)
        if (self.drag_id >= 0):
            self.drag_start_pos = pt
            # also set the selection and update the help window
            win_data.selection_take('pwork', self.drag_name, self.drag_id)
Example #9
0
    def on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()

        pt = self.CalcUnscrolledPosition(event.GetPosition())
        # BED zooming support
        if (self.zoom != 1.0):
            pt.Set(pt.x/self.zoom, pt.y/self.zoom)

        self.drag_loc, self.drag_name = self.hit_test(pt)

        if (self.drag_loc >= 0):
            self.drag_start_pos = pt
            # also set the selection and update the help window
            win_data.selection_take('cwork', self.drag_name, self.drag_loc)

        # Don't allow movements in basic mode
        if (not win_data.get_adv_mode()):
            self.drag_loc = -1
            self.drag_name = None
            self.drag_start_pos = None
Example #10
0
    def on_left_down(self, event):
        # Make sure that we have the focus
        #self.SetFocus()

        pt = self.CalcUnscrolledPosition(event.GetPosition())
        # BED zooming support
        if (self.zoom != 1.0):
            pt.Set(pt.x / self.zoom, pt.y / self.zoom)

        self.drag_loc, self.drag_name = self.hit_test(pt)

        if (self.drag_loc >= 0):
            self.drag_start_pos = pt
            # also set the selection and update the help window
            win_data.selection_take('cwork', self.drag_name, self.drag_loc)

        # Don't allow movements in basic mode
        if (not win_data.get_adv_mode()):
            self.drag_loc = -1
            self.drag_name = None
            self.drag_start_pos = None