annotate Libs/AceGUI-3.0/widgets/AceGUIContainer-SimpleGroup.lua @ 3:c6f0976069c7

Default value for the welcome / bye notification is now set to false The mailframe checkbox now primarily toggles the mail opening, however if you hold shift you can still disable the entire addon Now properly removes QuickAuction?s mail count Now tracks when a mail lost all attachments rather than it being deleted in order to continue processing the next item (mail sent by players containing text should now work properly). This should also be good for a nice speed increase. Added a variable called ?busy? to the MailOpener object indicating whether or not Mail Opener is currently working. Other addons (or macros) can retrieve it with ?LibStub("AceAddon-3.0"):GetAddon("MailOpener").busy? A mail refresh from the Postal service should no longer occur while mail is being opened but will happen instantly afterwards. Postal?s module toggling will now be handled by Postal itself. Added a short summary to the top of all modules for other developers. The time remaining until next mail box refresh should be displayed for as long as Mail Opener can be sure.
author Zerotorescue
date Tue, 07 Sep 2010 17:46:27 +0200
parents 823e33465b6e
children
rev   line source
Zerotorescue@0 1 --[[-----------------------------------------------------------------------------
Zerotorescue@0 2 SimpleGroup Container
Zerotorescue@0 3 Simple container widget that just groups widgets.
Zerotorescue@0 4 -------------------------------------------------------------------------------]]
Zerotorescue@0 5 local Type, Version = "SimpleGroup", 20
Zerotorescue@0 6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
Zerotorescue@0 7 if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
Zerotorescue@0 8
Zerotorescue@0 9 -- Lua APIs
Zerotorescue@0 10 local pairs = pairs
Zerotorescue@0 11
Zerotorescue@0 12 -- WoW APIs
Zerotorescue@0 13 local CreateFrame, UIParent = CreateFrame, UIParent
Zerotorescue@0 14
Zerotorescue@0 15
Zerotorescue@0 16 --[[-----------------------------------------------------------------------------
Zerotorescue@0 17 Methods
Zerotorescue@0 18 -------------------------------------------------------------------------------]]
Zerotorescue@0 19 local methods = {
Zerotorescue@0 20 ["OnAcquire"] = function(self)
Zerotorescue@0 21 self:SetWidth(300)
Zerotorescue@0 22 self:SetHeight(100)
Zerotorescue@0 23 end,
Zerotorescue@0 24
Zerotorescue@0 25 -- ["OnRelease"] = nil,
Zerotorescue@0 26
Zerotorescue@0 27 ["LayoutFinished"] = function(self, width, height)
Zerotorescue@0 28 if self.noAutoHeight then return end
Zerotorescue@0 29 self:SetHeight(height or 0)
Zerotorescue@0 30 end,
Zerotorescue@0 31
Zerotorescue@0 32 ["OnWidthSet"] = function(self, width)
Zerotorescue@0 33 local content = self.content
Zerotorescue@0 34 content:SetWidth(width)
Zerotorescue@0 35 content.width = width
Zerotorescue@0 36 end,
Zerotorescue@0 37
Zerotorescue@0 38 ["OnHeightSet"] = function(self, height)
Zerotorescue@0 39 local content = self.content
Zerotorescue@0 40 content:SetHeight(height)
Zerotorescue@0 41 content.height = height
Zerotorescue@0 42 end
Zerotorescue@0 43 }
Zerotorescue@0 44
Zerotorescue@0 45 --[[-----------------------------------------------------------------------------
Zerotorescue@0 46 Constructor
Zerotorescue@0 47 -------------------------------------------------------------------------------]]
Zerotorescue@0 48 local function Constructor()
Zerotorescue@0 49 local frame = CreateFrame("Frame", nil, UIParent)
Zerotorescue@0 50 frame:SetFrameStrata("FULLSCREEN_DIALOG")
Zerotorescue@0 51
Zerotorescue@0 52 --Container Support
Zerotorescue@0 53 local content = CreateFrame("Frame", nil, frame)
Zerotorescue@0 54 content:SetPoint("TOPLEFT")
Zerotorescue@0 55 content:SetPoint("BOTTOMRIGHT")
Zerotorescue@0 56
Zerotorescue@0 57 local widget = {
Zerotorescue@0 58 frame = frame,
Zerotorescue@0 59 content = content,
Zerotorescue@0 60 type = Type
Zerotorescue@0 61 }
Zerotorescue@0 62 for method, func in pairs(methods) do
Zerotorescue@0 63 widget[method] = func
Zerotorescue@0 64 end
Zerotorescue@0 65
Zerotorescue@0 66 return AceGUI:RegisterAsContainer(widget)
Zerotorescue@0 67 end
Zerotorescue@0 68
Zerotorescue@0 69 AceGUI:RegisterWidgetType(Type, Constructor, Version)