Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     styles = kwargs.get('styles', {})
     self.update_draw_bullets_methods(styles)
     global map_types_item
     self.map_types_item = setup_map_types_item(item_types_map)
     Tree.__init__(self, *args, **kwargs)
     for t in self.item_types:
         if 'create_%s'%t.__name__ in globals().keys():
             setattr(self, 'create_%s'%t.__name__, globals()['create_%s'%t.__name__])
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     styles = kwargs.get('styles', {})
     self.update_draw_bullets_methods(styles)
     global map_types_item
     self.map_types_item = setup_map_types_item(item_types_map)
     Tree.__init__(self, *args, **kwargs)
     for t in self.item_types:
         if 'create_%s'%t.__name__ in globals().keys():
             setattr(self, 'create_%s'%t.__name__, globals()['create_%s'%t.__name__])
Exemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     if config.nbtTreeSettings.useBulletStyles.get() and bullet_styles.get(
             TAG_Compound, [''] * 4)[2] != '':
         self.draw_opened_bullet = self.draw_closed_bullet = self.draw_TAG_bullet
     styles = kwargs.get('styles', {})
     for key in styles.keys():
         if hasattr(key, '__name__'):
             name = key.__name__
         elif type(key) in (str, unicode):
             name = key
         else:
             name = repr(key)
         setattr(self, 'draw_%s_bullet' % name, self.draw_TAG_bullet)
     Tree.__init__(self, *args, **kwargs)