Home

# Class goog.ui.style.app.MenuButtonRenderer

Renderer for {@link goog.ui.style.app.MenuButton}s. This implementation overrides {@link goog.ui.style.app.ButtonRenderer#createButton} to insert a dropdown element into the content element after the specified content.

extends goog.ui.style.app.ButtonRenderer

Instance Method Summary
| `createButton(?goog.ui.ControlContent content, ?goog.dom.DomHelper dom) ⇒ ?Element` 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: Contents...
| `createContentWithDropdown(?goog.ui.ControlContent content, ?goog.dom.DomHelper dom) ⇒ ?Array` Inserts dropdown element as last child of existing content.
| `createDropdown(?goog.dom.DomHelper dom) ⇒ ?Element` Returns an appropriately-styled DIV containing a dropdown arrow. Creates the following DOM structure:
| `decorate(?goog.ui.MenuButton button, ?Element element) ⇒ ?Element` Takes an element, decorates it with the menu button control, and returns the element. Overrides {@link goog.ui.style.app.ButtonRenderer#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.
| `getAriaRole() ⇒ (goog.dom.a11y.Role|null|undefined)` Returns the ARIA role to be applied to menu buttons, which have a menu attached to them.
| `getContentElement(?Element element) ⇒ ?Element` 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.
| `getCssClass() ⇒ string` Returns the CSS class to be applied to the root element of components rendered using this renderer.
| `getIe6ClassCombinations() ⇒ ?Array.<(Array.<string>|null)>` Returns an array of combinations of classes to apply combined class names for in IE6 and below. See {@link IE6_CLASS_COMBINATIONS} for more detail. This method doesn't reference {@link IE6_CLASS_COMBINATIONS} so that it can be compiled out, but subclasses should return their IE6_CLASS_COMBINATIONS static constant instead.
| `setContent(?Element element, ?goog.ui.ControlContent content)` Takes a control's root element, and sets its content to the given text caption or DOM structure. The default implementation replaces the children of the given element. Renderers that create more complex DOM structures must override this method accordingly.