The goog.tweak Namespace

The goog.tweak.BaseEntry Class

Base class for all Registry entries. … more

The goog.tweak.BasePrimitiveSetting Class

Base class for all settings that wrap primitive values. … more

The goog.tweak.BaseSetting Class

Base class for all tweak entries that are settings. Settings are entries that are associated with a query parameter. … more

The goog.tweak.BooleanGroup Class

A registry setting that contains a group of boolean subfield, where all entries modify the same query parameter. For example: ?foo=setting1,-setting2 … more

The goog.tweak.BooleanInGroupSetting Class

An entry in a BooleanGroup. … more

The goog.tweak.BooleanSetting Class

A registry setting that can be either true of false. … more

The goog.tweak.ButtonAction Class

A registry action (a button). … more

.ConfigParams

Type for configParams. TODO(agrieve): Remove |Object when optional fields in struct types are implemented.

@typedef
{{ label:(string|undefined), validValues:(!Array.<string>|!Array.<number>|undefined), paramName:(string|undefined), restartRequired:(boolean|undefined), callback:(Function|undefined), token:(string|undefined) }|!Object}

The goog.tweak.EntriesPanel Class

The body of the tweaks UI and also used for BooleanGroup. … more

The goog.tweak.NumericSetting Class

A registry setting for numeric values. … more

The goog.tweak.Registry Class

Singleton that manages all tweaks. This should be instantiated only from goog.tweak.getRegistry(). … more

The goog.tweak.StringSetting Class

A registry setting for string values. … more

The goog.tweak.TweakUi Class

A UI for editing tweak settings / clicking tweak actions. … more

.beginBooleanGroup(id, description, opt_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().

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.

.endBooleanGroup()

Stops adding boolean entries to the active boolean group.

.getBoolean(id)

Returns the value of the boolean setting with the given ID.

id {string}
The unique string that identifies this entry.
returns {boolean}
The value of the tweak.

.getNumber(id)

Returns the value of the numeric setting with the given ID.

id {string}
The unique string that identifies this entry.
returns {number}
The value of the tweak.

.getRegistry()

Returns/creates the registry singleton.

returns {!goog.tweak.Registry}
The tweak registry.

.getString(id)

Returns the value of the string setting with the given ID,

id {string}
The unique string that identifies this entry.
returns {string}
The value of the tweak.

.overrideDefaultValue(id, value)

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.

id {string}
The unique string that identifies the entry.
value {string|number|boolean}
The new default value for the tweak.

.registerBoolean(id, description, opt_defaultValue, opt_configParams)

Creates and registers a BooleanSetting.

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.

.registerButton(id, description, callback, opt_label)

Creates and registers a ButtonAction.

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).

.registerNumber(id, description, opt_defaultValue, opt_configParams)

Creates and registers a NumericSetting.

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.

.registerString(id, description, opt_defaultValue, opt_configParams)

Creates and registers a StringSetting.

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.

.testhelpers