local x,w="\083\105\109\112\108\101\071\114\111\117\112",20 local v=LibStub and LibStub("\065\099\101\071\085\073-\051\046\048",true)if not v or(v:GetWidgetVersion(x)or 0)>=w then return end local N=pairs local l,e=CreateFrame,UIParent local z={OnAcquire=function(x)x:SetWidth(300)x:SetHeight(100)end,LayoutFinished=function(x,w,v)if x.noAutoHeight then return end x:SetHeight(v or 0)end;OnWidthSet=function(x,w)local v=x.content v:SetWidth(w)v.width=w end;OnHeightSet=function(x,w)local v=x.content v:SetHeight(w)v.height=w end}local function i()local w=l("\070\114\097\109\101",nil,e)w:SetFrameStrata("\070\085\076\076\083\067\082\069\069\078\095\068\073\065\076\079\071")local i=l("\070\114\097\109\101",nil,w)i:SetPoint("\084\079\080\076\069\070\084")i:SetPoint("\066\079\084\084\079\077\082\073\071\072\084")local A={frame=w,content=i,type=x}for x,w in N(z)do A[x]=w end return v:RegisterAsContainer(A)end v:RegisterWidgetType(x,i,w)
--[[-----------------------------------------------------------------------------
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)
