Esempio n. 1
0
    def compute_bmap(self, name, x, bric_id):
        if (name == "new_event"):
            bmap = bric_data.get_new_bmap(False)
        elif (name == 'If'):
            if_var = win_data.program().get_bric_if_variant(bric_id)
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_if_bmap(if_var, True)
            else:
                bmap = bric_data.get_if_bmap(if_var, False)

        else:
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_SELECTED)
            else:
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_NORMAL)

        x += bmap.GetWidth()
        return x
Esempio n. 2
0
    def compute_bmap(self, name, x, bric_id):
        if (name == "new_event"):
            bmap = bric_data.get_new_bmap(False)
        elif (name == 'If'):
            if_var = win_data.program().get_bric_if_variant(bric_id)
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_if_bmap(if_var, True)
            else:
                bmap = bric_data.get_if_bmap(if_var, False)
            
        else:
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_SELECTED)
            else:
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_NORMAL)

        x += bmap.GetWidth()
        return x
Esempio n. 3
0
    def draw_bmap(self, dc, name, x, cl, bric_id):
        # **BED** scale bitmap if needed
        #print "Drawing:", name, "x:",x, "cl:", cl, "bric_id:", bric_id

        if (name == "new_event"):
            bmap = bric_data.get_new_bmap(False)
        elif (name == 'If'):
            if_var = win_data.program().get_bric_if_variant(bric_id)
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_if_bmap(if_var, True)
            else:
                bmap = bric_data.get_if_bmap(if_var, False)

        else:
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_SELECTED)
            else:
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_NORMAL)

        y = cl - bmap.GetHeight() / 2

        dc.DrawBitmap(bmap, x, y, True)
        x += bmap.GetWidth()
        return (x, bmap.GetSize())
Esempio n. 4
0
    def draw_bmap(self, dc, name, x, cl, bric_id):
        # **BED** scale bitmap if needed
        #print "Drawing:", name, "x:",x, "cl:", cl, "bric_id:", bric_id
        
        if (name == "new_event"):
            bmap = bric_data.get_new_bmap(False)
        elif (name == 'If'):
            if_var = win_data.program().get_bric_if_variant(bric_id)
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_if_bmap(if_var, True)
            else:
                bmap = bric_data.get_if_bmap(if_var, False)
            
        else:
            if (win_data.selection_check('pwork', None, bric_id)):
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_SELECTED)
            else:
                bmap = bric_data.get_bric_bmap(name, bric_data.BRIC_NORMAL)

        y = cl - bmap.GetHeight()/2
            
        dc.DrawBitmap(bmap, x, y, True)
        x += bmap.GetWidth()
        return (x, bmap.GetSize())