File RegisterControl.lua
Individual Option Registration Functions
Functions
Portfolio.InitDefaultValue (control) | Generic Saved Var Initialization. |
Portfolio.PopulateCommonControl (optionsFrame, option, optionType, control) | Control population called on all controls. |
Portfolio.PopulateValueControl (optionsFrame, option, control) | Additional control population for controls with values. |
Portfolio.RegisterControl (optionsFrame, option) | Register a new control and append it to the optionsFrame. |
Functions
- Portfolio.InitDefaultValue (control)
-
Generic Saved Var Initialization. Called on each control upon creation to initialize defaults with LibDefaults (or SetCVar).
Parameters
- control: control
Usage:
Portfolio.InitControlDefaultValue(control) - Portfolio.PopulateCommonControl (optionsFrame, option, optionType, control)
-
Control population called on all controls.
Parameters
- optionsFrame: (frame)
- option: (table)
- optionType: (number)
- control: (frame)
Usage:
Portfolio.PopulateCommonControl(optionsFrame, option , optionType, control) - Portfolio.PopulateValueControl (optionsFrame, option, control)
-
Additional control population for controls with values. (Not called on header, text or button)
Parameters
- optionsFrame: (frame)
- option: (table)
- control: (frame)
Usage:
Portfolio.PopulateValueControl(optionsFrame, option, control) - Portfolio.RegisterControl (optionsFrame, option)
-
Register a new control and append it to the optionsFrame. Can be used to create options once an option set has already been registered, but the preferred usage is just to register whole sets with RegisterOptionSet. New options will be appended to the end of the list. Using either method, many of the option attributes are copied to the control itself for easy access, since the option registration table itself is not saved.
Parameters
- optionsFrame: options panel frame
- option: (table) option registration table
Usage:
optionsFrame:RegisterControl(option)Return value:
new control frame