local h,m="\083\105\109\112\108\101\071\114\111\117\112",20 local t=LibStub and LibStub("\065\099\101\071\085\073-\051\046\048",true)if not t or(t:GetWidgetVersion(h)or 0)>=m then return end local a=pairs local N,z=CreateFrame,UIParent local s={OnAcquire=function(h)h:SetWidth(300)h:SetHeight(100)end;LayoutFinished=function(h,m,t)if h.noAutoHeight then return end h:SetHeight(t or 0)end,OnWidthSet=function(h,m)local t=h.content t:SetWidth(m)t.width=m end;OnHeightSet=function(h,m)local t=h.content t:SetHeight(m)t.height=m end}local function S()local m=N("\070\114\097\109\101",nil,z)m:SetFrameStrata("\070\085\076\076\083\067\082\069\069\078\095\068\073\065\076\079\071")local S=N("\070\114\097\109\101",nil,m)S:SetPoint("\084\079\080\076\069\070\084")S:SetPoint("\066\079\084\084\079\077\082\073\071\072\084")local g={frame=m;content=S;type=h}for h,m in a(s)do g[h]=m end return t:RegisterAsContainer(g)end t:RegisterWidgetType(h,S,m)
--[[-----------------------------------------------------------------------------
SimpleGroup Container
Simple container widget that just groups widgets.
-------------------------------------------------------------------------------]]
local Type, Version = "SimpleGroup", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

-- Lua APIs
local pairs = pairs

-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent


--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
local methods = {
	["OnAcquire"] = function(self)
		self:SetWidth(300)
		self:SetHeight(100)
	end,

	-- ["OnRelease"] = nil,

	["LayoutFinished"] = function(self, width, height)
		if self.noAutoHeight then return end
		self:SetHeight(height or 0)
	end,

	["OnWidthSet"] = function(self, width)
		local content = self.content
		content:SetWidth(width)
		content.width = width
	end,

	["OnHeightSet"] = function(self, height)
		local content = self.content
		content:SetHeight(height)
		content.height = height
	end
}

--[[-----------------------------------------------------------------------------
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
	local frame = CreateFrame("Frame", nil, UIParent)
	frame:SetFrameStrata("FULLSCREEN_DIALOG")

	--Container Support
	local content = CreateFrame("Frame", nil, frame)
	content:SetPoint("TOPLEFT")
	content:SetPoint("BOTTOMRIGHT")

	local widget = {
		frame     = frame,
		content   = content,
		type      = Type
	}
	for method, func in pairs(methods) do
		widget[method] = func
	end

	return AceGUI:RegisterAsContainer(widget)
end

AceGUI:RegisterWidgetType(Type, Constructor, Version)
