Class type Goog.​Ui.​menuButtonRenderer

class type [#button]menuButtonRenderer = object..end

Inherits


method createButton : 
controlContent ->
Goog.Gdom.domHelper Js.t -> Dom_html.element Js.t Js.meth

Takes a text caption or existing DOM structure, and returns the content and a dropdown arrow element wrapped in a pseudo-rounded-corner box. Creates the following DOM structure: <div class="goog-inline-block goog-menu-button-outer-box"> <div class="goog-inline-block goog-menu-button-inner-box"> <div class="goog-inline-block goog-menu-button-caption"> Contents... </div> <div class="goog-inline-block goog-menu-button-dropdown"> &nbsp; </div> </div> </div> Returns Pseudo-rounded-corner box containing the content.

method createCaption : 
controlContent ->
Goog.Gdom.domHelper Js.t -> Dom_html.element Js.t Js.meth

Takes a text caption or existing DOM structure, and returns it wrapped in an appropriately-styled DIV. Creates the following DOM structure: <div class="goog-inline-block goog-menu-button-caption"> Contents... </div> Returns Caption element.

method createDropdown : 
Goog.Gdom.domHelper Js.t -> Dom_html.element Js.t Js.meth

Returns an appropriately-styled DIV containing a dropdown arrow element. Creates the following DOM structure: <div class="goog-inline-block goog-menu-button-dropdown"> &nbsp; </div> Returns Dropdown element.

method decorate : 
'a.
(#button as 'b) Js.t ->
(#Dom_html.element as 'a) Js.t -> Dom_html.element Js.t Js.meth

Takes an element, decorates it with the menu button control, and returns the element. Overrides goog.ui.CustomButtonRenderer#decorate by looking for a child element that can be decorated by a menu, and if it finds one, decorates it and attaches it to the menu button. Returns Decorated element.

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

Takes the button's root element and returns the parent element of the button's contents. Overrides the superclass implementation by taking the nested DIV structure of menu buttons into account. Returns The button's content element.

method getCssClass : Js.js_string Js.t Js.meth

Returns the CSS class to be applied to the root element of components rendered using this renderer. Returns Renderer-specific CSS class.

method setContent : 
'd.
(#Dom_html.element as 'd) Js.t -> controlContent -> unit Js.meth

Takes the menubutton's root element, and sets its content to the given text caption or DOM structure. Because the DOM structure of this button is conditional based on whether we need to work around FF2/RTL bugs, we override the default implementation to take this into account.