1 --[[-----------------------------------------------------------------------------
3 Simple container widget that just groups widgets.
4 -------------------------------------------------------------------------------]]
5 local Type, Version = "SimpleGroup", 20
6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
13 local CreateFrame, UIParent = CreateFrame, UIParent
16 --[[-----------------------------------------------------------------------------
18 -------------------------------------------------------------------------------]]
20 ["OnAcquire"] = function(self)
25 -- ["OnRelease"] = nil,
27 ["LayoutFinished"] = function(self, width, height)
28 if self.noAutoHeight then return end
29 self:SetHeight(height or 0)
32 ["OnWidthSet"] = function(self, width)
33 local content = self.content
34 content:SetWidth(width)
38 ["OnHeightSet"] = function(self, height)
39 local content = self.content
40 content:SetHeight(height)
41 content.height = height
45 --[[-----------------------------------------------------------------------------
47 -------------------------------------------------------------------------------]]
48 local function Constructor()
49 local frame = CreateFrame("Frame", nil, UIParent)
50 frame:SetFrameStrata("FULLSCREEN_DIALOG")
53 local content = CreateFrame("Frame", nil, frame)
54 content:SetPoint("TOPLEFT")
55 content:SetPoint("BOTTOMRIGHT")
62 for method, func in pairs(methods) do
66 return AceGUI:RegisterAsContainer(widget)
69 AceGUI:RegisterWidgetType(Type, Constructor, Version)