tweak.js

File Location

/goog/tweak/tweak.js


Public Protected Private

Global Functions

goog.tweak.applyConfigParams_(entryconfigParams)
Applies all extra configuration parameters in configParams.
Arguments:
entry : !goog.tweak.BaseEntry
The entry to apply them to.
configParams : !goog.tweak.ConfigParams
Extra configuration parameters.
code »
goog.tweak.beginBooleanGroup(iddescriptionopt_configParams)
Creates and registers a group of BooleanSettings that are all set by a single query parameter. A call to goog.tweak.endBooleanGroup() must be used to close this group. Only goog.tweak.registerBoolean() calls are allowed with the beginBooleanGroup()/endBooleanGroup().
Arguments:
id : string
The unique ID for the setting.
description : string
A description of what the setting does.
opt_configParams : goog.tweak.ConfigParams=
Extra configuration parameters.
code »
goog.tweak.doRegister_(entryopt_defaultValueopt_configParams)
Registers a tweak using the given factoryFunc.
Arguments:
entry : !goog.tweak.BaseEntry
The entry to register.
opt_defaultValue : boolean | string | number=
Default value.
opt_configParams : goog.tweak.ConfigParams=
Extra configuration parameters.
code »
goog.tweak.endBooleanGroup()
Stops adding boolean entries to the active boolean group.
code »
goog.tweak.getBoolean(id) boolean
Returns the value of the boolean setting with the given ID.
Arguments:
id : string
The unique string that identifies this entry.
Returns: boolean  The value of the tweak.
code »
goog.tweak.getCompilerOverrides_() !Object.<number | string | boolean>
Calls to this function are overridden by the compiler by the processTweaks pass. It returns the overrides to default values for tweaks set by compiler options.
Returns: !Object.<number | string | boolean>  A map of tweakId -> defaultValue.
code »
goog.tweak.getNumber(id) number
Returns the value of the numeric setting with the given ID.
Arguments:
id : string
The unique string that identifies this entry.
Returns: number  The value of the tweak.
code »
goog.tweak.getRegistry() !goog.tweak.Registry
Returns/creates the registry singleton.
Returns: !goog.tweak.Registry  The tweak registry.
code »
goog.tweak.getString(id) string
Returns the value of the string setting with the given ID,
Arguments:
id : string
The unique string that identifies this entry.
Returns: string  The value of the tweak.
code »
goog.tweak.overrideDefaultValue(idvalue)
Sets a default value to use for the given tweak instead of the one passed to the register* function. This function must be called before the tweak is registered.
Arguments:
id : string
The unique string that identifies the entry.
value : string | number | boolean
The new default value for the tweak.
code »
goog.tweak.registerBoolean(iddescriptionopt_defaultValueopt_configParams)
Creates and registers a BooleanSetting.
Arguments:
id : string
The unique ID for the setting.
description : string
A description of what the setting does.
opt_defaultValue : boolean=
The default value for the setting.
opt_configParams : goog.tweak.ConfigParams=
Extra configuration parameters.
code »
goog.tweak.registerButton(iddescriptioncallbackopt_label)
Creates and registers a ButtonAction.
Arguments:
id : string
The unique ID for the setting.
description : string
A description of what the action does.
callback : !Function
Function to call when the button is clicked.
opt_label : string=
The button text (instead of the ID).
code »
goog.tweak.registerNumber(iddescriptionopt_defaultValueopt_configParams)
Creates and registers a NumericSetting.
Arguments:
id : string
The unique ID for the setting.
description : string
A description of what the setting does.
opt_defaultValue : number=
The default value for the setting.
opt_configParams : goog.tweak.ConfigParams=
Extra configuration parameters.
code »
goog.tweak.registerString(iddescriptionopt_defaultValueopt_configParams)
Creates and registers a StringSetting.
Arguments:
id : string
The unique ID for the setting.
description : string
A description of what the setting does.
opt_defaultValue : string=
The default value for the setting.
opt_configParams : goog.tweak.ConfigParams=
Extra configuration parameters.
code »

Directory tweak

File Reference