WoWInterface SVN KnowItAll

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/libs
    from Rev 64 to Rev 66
    Reverse comparison

Rev 64 → Rev 66

AceDB-3.0/AceDB-3.0.lua
20,6 → 20,9
-- the profile related APIs are not available. Only `:RegisterDefaults` and `:ResetProfile` are available on child-databases.
--
-- For more details on how to use AceDB-3.0, see the [[AceDB-3.0 Tutorial]].
--
-- You may also be interested in [[libdualspec-1-0|LibDualSpec-1.0]] to do profile switching automatically when switching specs.
--
-- @usage
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("DBExample")
--
36,12 → 39,14
-- end
-- @class file
-- @name AceDB-3.0.lua
-- @release $Id: AceDB-3.0.lua 799 2009-04-09 05:00:05Z kaelten $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 13
-- @release $Id: AceDB-3.0.lua 813 2009-07-06 21:36:37Z kaelten $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 15
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
 
if not AceDB then return end -- No upgrade needed
 
local _G = getfenv(0)
 
local type = type
local pairs, next = pairs, next
local rawget, rawset = rawget, rawset
648,7 → 653,7
function AceDB:New(tbl, defaults, defaultProfile)
if type(tbl) == "string" then
local name = tbl
tbl = getglobal(name)
tbl = _G[name]
if not tbl then
tbl = {}
setglobal(name, tbl)
AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 793 2009-04-07 09:26:44Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 815 2009-07-08 20:58:17Z nevcairiel $ ]]--
local min, max, floor = math.min, math.max, math.floor
 
local AceGUI = LibStub("AceGUI-3.0")
342,9 → 342,9
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
end
 
do
do
local widgetType = "Dropdown"
local widgetVersion = 19
local widgetVersion = 20
 
--[[ Static data ]]--
 
455,6 → 455,7
self.pullout:Close()
end
AceGUI:Release(self.pullout)
self.pullout = nil
 
self:SetText("")
self:SetLabel("")
462,12 → 463,12
self:SetMultiselect(false)
 
self.value = nil
self.list = nil
self.list = nil
self.open = nil
self.hasClose = nil
 
self.frame:ClearAllPoints()
self.frame:Hide()
self.frame:Hide()
end
 
-- exported
555,7 → 556,7
local close = AceGUI:Create("Dropdown-Item-Execute")
close:SetText(CLOSE)
self.pullout:AddItem(close)
self.hasClose = true
self.hasClose = true
end
end
 
AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 656 2008-05-31 11:47:08Z nargiddley $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 808 2009-05-07 14:45:15Z ammo $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
365,7 → 365,7
-- Does not close the pullout on click
do
local widgetType = "Dropdown-Item-Menu"
local widgetVersion = 1
local widgetVersion = 2
 
local function OnEnter(this)
local self = this.obj
390,13 → 390,13
end
 
-- exported
function SetMenu(self, menu)
local function SetMenu(self, menu)
assert(menu.type == "Dropdown-Pullout")
self.submenu = menu
end
 
-- exported
function CloseMenu(self)
local function CloseMenu(self)
self.submenu:Close()
end
 
AceGUI-3.0/widgets/AceGUIWidget-Button.lua
5,7 → 5,7
--------------------------
do
local Type = "Button"
local Version = 10
local Version = 11
 
local function OnAcquire(self)
-- restore default values
58,14 → 58,14
local right = _G[name .. "Right"]
local middle = _G[name .. "Middle"]
 
left:SetPoint("TOP", frame, "TOP", 0, -1)
left:SetPoint("BOTTOM", frame, "BOTTOM", 0, 1)
left:SetPoint("TOP", frame, "TOP", 0, 0)
left:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
 
right:SetPoint("TOP", frame, "TOP", 0, -1)
right:SetPoint("BOTTOM", frame, "BOTTOM", 0, 1)
right:SetPoint("TOP", frame, "TOP", 0, 0)
right:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
 
middle:SetPoint("TOP", frame, "TOP", 0, -1)
middle:SetPoint("BOTTOM", frame, "BOTTOM", 0, 1)
middle:SetPoint("TOP", frame, "TOP", 0, 0)
middle:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
 
local text = frame:GetFontString()
self.text = text
97,4 → 97,4
end
 
AceGUI:RegisterWidgetType(Type,Constructor,Version)
end
end
\ No newline at end of file
AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
5,7 → 5,7
--------------------------
do
local Type = "ColorPicker"
local Version = 10
local Version = 11
 
local function OnAcquire(self)
self.HasAlpha = false
96,8 → 96,10
local function SetDisabled(self, disabled)
self.disabled = disabled
if self.disabled then
self.frame:Disable()
self.text:SetTextColor(0.5,0.5,0.5)
else
self.frame:Enable()
self.text:SetTextColor(1,1,1)
end
end
AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua
5,7 → 5,7
--------------------------
do
local Type = "InteractiveLabel"
local Version = 3
local Version = 5
 
local function OnAcquire(self)
self:SetHeight(18)
19,6 → 19,7
end
 
local function OnRelease(self)
self:SetDisabled(false)
self.frame:ClearAllPoints()
self.frame:Hide()
end
121,6 → 122,17
end
end
 
local function SetDisabled(self,disabled)
self.disabled = disabled
if disabled then
self.frame:EnableMouse(false)
self.label:SetTextColor(0.5, 0.5, 0.5)
else
self.frame:EnableMouse(true)
self.label:SetTextColor(1, 1, 1)
end
end
 
local function OnEnter(this)
this.obj.highlight:Show()
this.obj:Fire("OnEnter")
158,6 → 170,7
self.SetFontObject = SetFontObject
self.SetHighlight = SetHighlight
self.SetHighlightTexCoord = SetHighlightTexCoord
self.SetDisabled = SetDisabled
frame.obj = self
 
frame:SetHeight(18)
AceGUI-3.0/widgets/AceGUIWidget-TabGroup.lua
30,7 → 30,7
 
do
local Type = "TabGroup"
local Version = 19
local Version = 20
 
local PaneBackdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
51,6 → 51,9
self.localstatus[k] = nil
end
self.tablist = nil
for _, tab in pairs(self.tabs) do
tab:Hide()
end
end
 
local function Tab_SetText(self, text)
142,7 → 145,7
v:SetSelected(true)
found = true
else
v:SetSelected(false)
v:SetSelected(false)
end
end
status.selected = value
159,18 → 162,13
 
local widths = {}
local rowwidths = {}
local rowends = {}
local rowends = {}
local function BuildTabs(self)
local status = self.status or self.localstatus
local tablist = self.tablist
 
local tabs = self.tabs
 
for i, v in ipairs(tabs) do
v:Hide()
end
if not tablist then return end
 
 
local width = self.frame.width or self.frame:GetWidth() or 0
 
191,7 → 189,7
tab = self:CreateTab(i)
tabs[i] = tab
end
 
 
tab:Show()
tab:SetText(v.text)
tab:SetDisabled(v.disabled)
200,6 → 198,10
widths[i] = tab:GetWidth() - 6 --tabs are anchored 10 pixels from the right side of the previous one to reduce spacing, but add a fixed 4px padding for the text
end
 
for i = (#tablist)+1, #tabs, 1 do
tabs[i]:Hide()
end
 
--First pass, find the minimum number of rows needed to hold all tabs and the initial tab layout
local numtabs = #tablist
local numrows = 1
334,7 → 336,7
titletext:SetJustifyH("LEFT")
titletext:SetHeight(18)
 
self.titletext = titletext
self.titletext = titletext
 
local border = CreateFrame("Frame",nil,frame)
self.border = border
AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
6,7 → 6,7
 
do
local Type = "Keybinding"
local Version = 12
local Version = 13
 
local ControlBackdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
111,6 → 111,7
self.frame:Hide()
self.waitingForKey = nil
self.msgframe:Hide()
self:SetDisabled(false)
end
 
local function SetDisabled(self, disabled)
AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
10,7 → 10,7
]]
do
local Type = "CheckBox"
local Version = 5
local Version = 7
 
local function OnAcquire(self)
self:SetValue(false)
32,17 → 32,13
 
local function CheckBox_OnEnter(this)
local self = this.obj
if not self.disabled then
self.highlight:Show()
end
self.highlight:Show()
self:Fire("OnEnter")
end
 
local function CheckBox_OnLeave(this)
local self = this.obj
if not self.down then
self.highlight:Hide()
end
self.highlight:Hide()
self:Fire("OnLeave")
end
 
68,9 → 64,11
local function SetDisabled(self,disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
self.text:SetTextColor(0.5,0.5,0.5)
SetDesaturation(self.check, true)
else
self.frame:Enable()
self.text:SetTextColor(1,1,1)
if self.tristate and self.checked == nil then
SetDesaturation(self.check, true)
92,8 → 90,8
--Nil is the unknown tristate value
if self.tristate and value == nil then
SetDesaturation(self.check, true)
check:SetWidth(20)
check:SetHeight(20)
check:SetWidth(24)
check:SetHeight(24)
self.check:Show()
else
SetDesaturation(self.check, false)
AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
5,7 → 5,7
--------------------------
do
local Type = "Icon"
local Version = 9
local Version = 10
 
local function OnAcquire(self)
self:SetHeight(110)
18,6 → 18,7
local function OnRelease(self)
self.frame:ClearAllPoints()
self.frame:Hide()
self:SetDisabled(false)
end
 
local function SetLabel(self, text)
57,6 → 58,19
end
end
 
local function SetDisabled(self, disabled)
self.disabled = disabled
if disabled then
self.frame:Disable()
self.label:SetTextColor(0.5,0.5,0.5)
self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
else
self.frame:Enable()
self.label:SetTextColor(1,1,1)
self.image:SetVertexColor(1, 1, 1)
end
end
 
local function OnClick(this, button)
this.obj:Fire("OnClick", button)
AceGUI:ClearFocus()
86,6 → 100,7
 
-- SetText should be deprecated along the way
self.SetText = SetLabel
self.SetDisabled = SetDisabled
 
frame.obj = self
 
AceGUI-3.0/widgets/AceGUIWidget-Frame.lua
10,7 → 10,7
]]
do
local Type = "Frame"
local Version = 7
local Version = 8
 
local FrameBackdrop = {
bgFile="Interface\\DialogFrame\\UI-DialogBox-Background",
183,7 → 183,7
closebutton:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-27,17)
closebutton:SetHeight(20)
closebutton:SetWidth(100)
closebutton:SetText("Close")
closebutton:SetText(CLOSE)
 
self.closebutton = closebutton
closebutton.obj = self
AceGUI-3.0/AceGUI-3.0.lua
24,8 → 24,8
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 803 2009-04-14 12:37:54Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 23
-- @release $Id: AceGUI-3.0.lua 815 2009-07-08 20:58:17Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 25
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
205,7 → 205,7
widget.noAutoHeight = nil
widget.frame:ClearAllPoints()
widget.frame:Hide()
widget.frame:SetParent(nil)
widget.frame:SetParent(UIParent)
widget.frame.width = nil
widget.frame.height = nil
if widget.content then
465,7 → 465,7
 
WidgetContainerBase.ReleaseChildren = function(self)
local children = self.children
for i in ipairs(children) do
for i = 1,#children do
AceGUI:Release(children[i])
children[i] = nil
end
739,7 → 739,7
frame:ClearAllPoints()
if i == 1 then
-- anchor the first control to the top left
--frame:SetPoint("TOPLEFT",content,"TOPLEFT",0,0)
frame:SetPoint("TOPLEFT",content,"TOPLEFT",0,0)
rowheight = frameheight
rowoffset = frameoffset
rowstart = frame