Mercurial > wow > hansgar_and_franzok_assist
comparison Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua @ 51:dbf04157d63e v7.3.0.051
- ToC Update.
| author | Tercio |
|---|---|
| date | Sat, 02 Sep 2017 12:42:52 -0300 |
| parents | 52973d00a183 |
| children | 0682d738499b |
comparison
equal
deleted
inserted
replaced
| 50:e33a1e89084c | 51:dbf04157d63e |
|---|---|
| 6 -- * The **appName** field is the options table name as given at registration time \\ | 6 -- * The **appName** field is the options table name as given at registration time \\ |
| 7 -- | 7 -- |
| 8 -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". | 8 -- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName". |
| 9 -- @class file | 9 -- @class file |
| 10 -- @name AceConfigRegistry-3.0 | 10 -- @name AceConfigRegistry-3.0 |
| 11 -- @release $Id: AceConfigRegistry-3.0.lua 1105 2013-12-08 22:11:58Z nevcairiel $ | 11 -- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ |
| 12 local MAJOR, MINOR = "AceConfigRegistry-3.0", 15 | 12 local CallbackHandler = LibStub("CallbackHandler-1.0") |
| 13 | |
| 14 local MAJOR, MINOR = "AceConfigRegistry-3.0", 17 | |
| 13 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) | 15 local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR) |
| 14 | 16 |
| 15 if not AceConfigRegistry then return end | 17 if not AceConfigRegistry then return end |
| 16 | 18 |
| 17 AceConfigRegistry.tables = AceConfigRegistry.tables or {} | 19 AceConfigRegistry.tables = AceConfigRegistry.tables or {} |
| 18 | |
| 19 local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") | |
| 20 | 20 |
| 21 if not AceConfigRegistry.callbacks then | 21 if not AceConfigRegistry.callbacks then |
| 22 AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry) | 22 AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry) |
| 23 end | 23 end |
| 24 | 24 |
| 55 local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"} | 55 local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"} |
| 56 local istable={["table"]=true, _="table"} | 56 local istable={["table"]=true, _="table"} |
| 57 local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"} | 57 local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"} |
| 58 local optstring={["nil"]=true,["string"]=true, _="string"} | 58 local optstring={["nil"]=true,["string"]=true, _="string"} |
| 59 local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"} | 59 local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"} |
| 60 local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"} | |
| 60 local optnumber={["nil"]=true,["number"]=true, _="number"} | 61 local optnumber={["nil"]=true,["number"]=true, _="number"} |
| 61 local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"} | 62 local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"} |
| 62 local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"} | 63 local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"} |
| 63 local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"} | 64 local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"} |
| 64 local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"} | 65 local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"} |
| 80 hidden=optmethodbool, | 81 hidden=optmethodbool, |
| 81 guiHidden=optmethodbool, | 82 guiHidden=optmethodbool, |
| 82 dialogHidden=optmethodbool, | 83 dialogHidden=optmethodbool, |
| 83 dropdownHidden=optmethodbool, | 84 dropdownHidden=optmethodbool, |
| 84 cmdHidden=optmethodbool, | 85 cmdHidden=optmethodbool, |
| 85 icon=optstringfunc, | 86 icon=optstringnumberfunc, |
| 86 iconCoords=optmethodtable, | 87 iconCoords=optmethodtable, |
| 87 handler=opttable, | 88 handler=opttable, |
| 88 get=optmethodfalse, | 89 get=optmethodfalse, |
| 89 set=optmethodfalse, | 90 set=optmethodfalse, |
| 90 func=optmethodfalse, | 91 func=optmethodfalse, |
| 93 } | 94 } |
| 94 | 95 |
| 95 local typedkeys={ | 96 local typedkeys={ |
| 96 header={}, | 97 header={}, |
| 97 description={ | 98 description={ |
| 98 image=optstringfunc, | 99 image=optstringnumberfunc, |
| 99 imageCoords=optmethodtable, | 100 imageCoords=optmethodtable, |
| 100 imageHeight=optnumber, | 101 imageHeight=optnumber, |
| 101 imageWidth=optnumber, | 102 imageWidth=optnumber, |
| 102 fontSize=optstringfunc, | 103 fontSize=optstringfunc, |
| 103 }, | 104 }, |
| 110 dropdownInline=optbool, | 111 dropdownInline=optbool, |
| 111 dialogInline=optbool, | 112 dialogInline=optbool, |
| 112 childGroups=optstring, | 113 childGroups=optstring, |
| 113 }, | 114 }, |
| 114 execute={ | 115 execute={ |
| 115 image=optstringfunc, | 116 image=optstringnumberfunc, |
| 116 imageCoords=optmethodtable, | 117 imageCoords=optmethodtable, |
| 117 imageHeight=optnumber, | 118 imageHeight=optnumber, |
| 118 imageWidth=optnumber, | 119 imageWidth=optnumber, |
| 119 }, | 120 }, |
| 120 input={ | 121 input={ |
| 125 dropdownControl=optstring, | 126 dropdownControl=optstring, |
| 126 multiline=optboolnumber, | 127 multiline=optboolnumber, |
| 127 }, | 128 }, |
| 128 toggle={ | 129 toggle={ |
| 129 tristate=optbool, | 130 tristate=optbool, |
| 130 image=optstringfunc, | 131 image=optstringnumberfunc, |
| 131 imageCoords=optmethodtable, | 132 imageCoords=optmethodtable, |
| 132 }, | 133 }, |
| 133 tristate={ | 134 tristate={ |
| 134 }, | 135 }, |
| 135 range={ | 136 range={ |
