local Prop = require("gfx.prop")
local Children = require("gfx.prop.children")
local Element = require("gfx.element")

local Container = Prop.attach(Element:new(), Children)

function Container:_reload()
  Element._reload(self)

  -- Reload child windows
  local win = self:_getWindow()
  for _,child in self:_iterateChildren() do
    if child:_getWindow() ~= win then
      child:setParent(win)
    end
  end
end

return Container