Class type Goog.​Ui.​popupColorPicker

class type popupColorPicker = object..end

Inherits


method addColors : Js.js_string Js.t Js.js_array Js.t -> unit Js.meth

Add an array of colors to the colors displayed by the color picker. Does not add duplicated colors.

method attach : 'a. (#Dom_html.element as 'a) Js.t -> unit Js.meth

Attaches the popup color picker to an element.

method canDecorate : 
'b. (#Dom_html.element as 'b) Js.t -> bool Js.t Js.meth

ColorPickers cannot be used to decorate pre-existing html, since the structure they build is fairly complicated. Returns Returns always false.

method clearColors : unit Js.meth

Clear the colors displayed by the color picker.

method createDom : unit Js.meth
method detach : 'c. (#Dom_html.element as 'c) Js.t -> unit Js.meth

Detatches the popup color picker from an element.

method disposeInternal : unit Js.meth
method getAllowAutoFocus : bool Js.t Js.meth

Returns Whether the color picker can automatically move focus to its key event target when it is set to visible.

method getAutoHide : bool Js.t Js.meth

Returns whether the Popup dismisses itself when the user clicks outside of it. Returns Whether the Popup autohides on an external click.

method getAutoHideRegion : Dom_html.element Js.t Js.meth

Returns the region inside which the Popup dismisses itself when the user clicks, or null if it was not set. Null indicates the entire document is the autohide region. Returns The DOM element for autohide, or null if it hasn't been set.

method getColorPicker : colorPicker Js.t Js.meth

Returns The color picker instance.

method getLastTarget : 'd. (#Dom_html.element as 'd) Js.t Js.meth

Returns The last element that triggered the popup.

method getPopup : popupBase Js.t Js.opt Js.meth

Returns the goog.ui.PopupBase from this picker. Returns null if the popup has not yet been created. NOTE: This should *ONLY* be called from tests. If called before createDom(), this should return null. Returns The popup or null if it hasn't been created.

method getRememberSelection : bool Js.t Js.meth

Returns Whether the picker remembers the last selected color between popups.

method getSelectedColor : Js.js_string Js.t Js.opt Js.meth

Gets the color that is currently selected in this color picker. Returns The hex string of the color selected, or null if no color is selected.

method getToggleMode : bool Js.t Js.meth

Gets whether the colorpicker is in toggle mode Returns toggle.

method setAllowAutoFocus : bool Js.t -> unit Js.meth

Sets whether the color picker can automatically move focus to its key event target when it is set to visible.

method setAutoHide : bool Js.t -> unit Js.meth

Sets whether the Popup dismisses itself when the user clicks outside of it - must be called after the Popup has been created (in createDom()), otherwise it does nothing.

method setAutoHideRegion : 
'e. (#Dom_html.element as 'e) Js.t -> unit Js.meth

Sets the region inside which the Popup dismisses itself when the user clicks - must be called after the Popup has been created (in createDom()), otherwise it does nothing.

method setFocusable : bool Js.t -> unit Js.meth

Sets whether the color picker can accept focus.

method setPinnedCorner : Goog.Positioning.corner -> unit Js.meth

Set the pinned corner of the popup.

method setPopupCorner : Goog.Positioning.corner -> unit Js.meth

Sets which corner of the attaching element this popup shows up.

method setRememberSelection : bool Js.t -> unit Js.meth

Sets whether the picker remembers the last selected color between popups.

method setToggleMode : bool Js.t -> unit Js.meth

Sets whether the color picker should toggle off if it is already open.