':param ui: UI
:type  ui: :class:`ajenti.ui.UI`
:param typeid: type ID
:type  typeid: str
:param children:
:type  children: list'

def __init__(self, ui, typeid=None, children=[], **kwargs):

    self.ui = ui
    self._prepare()
    if (typeid is not None):
        self.typeid = typeid
    for c in children:
        self.append(c)
    self.properties = {}
    self.properties_dirty = {}
    for prop in self._properties.values():
        self.properties[prop.name] = prop.default
        self.properties_dirty[prop.name] = False
    for key in kwargs:
        self.properties[key] = kwargs[key]
