#!/usr/bin/env python
#-*- coding: UTF-8 -*-

import wx

try:
    import treemixin 
except ImportError:
    from wx.lib.mixins import treemixin
    
from stomamisc import *

class TreeCtrlWithMixin(wx.TreeCtrl, treemixin.ExpansionState):
    def __init__(self, *args, **kwargs):
        super(TreeCtrlWithMixin, self).__init__(*args, **kwargs)
        self.CreateImageList()
    #-------------------------------------------------------------------------------------------

    def CreateImageList(self):
        imglist = wx.ImageList(16, 16, True, 2)
        imglist.Add(wx.ArtProvider.GetBitmap(wx.ART_FOLDER, wx.ART_OTHER, wx.Size(16, 16)))
        imglist.Add(wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_OTHER, wx.Size(16, 16)))       
        self.AssignImageList(imglist)
# - class TreeCtrlWithMixin(wx.TreeCtrl, treemixin.ExpansionState):-----------------------------
        
