UNPKG

com.phloxui

Version:

PhloxUI Ng2+ Framework

29 lines (28 loc) 1.39 kB
import { MenuModel } from './model/MenuModel'; import { AbstractMenuItem } from '../component/AbstractMenuItem'; import { NeedFocusService } from '../service/NeedFocusService.service'; /** * <p style="text-indent: 2em;"> * An abstract base class for <code>menu</code> component. A <code>menu</code> might consist of one or more child <code>menu item</code>s. * You can see that this class extends [[AbstractMenuItem]] allowing itself to be able to be added into another parent <code>menu</code>. * It is not necessary that all child <code>menu item</code>s must be the same <code>type</code>. For example, a single <code>menu</code> * may consist of <code>checkable menu item</code>s or <code>sub menu</code>s etc. You can specify the type of each <code>menu item</code> * by using the model's field [[MenuItemModel.type]]. * </p> * * @author shiorin, tee4cute * @see [[AbstractMenuItem]] * @see [[MenuItemModel]] */ export declare abstract class AbstractMenu extends AbstractMenuItem { protected model: MenuModel; protected items: AbstractMenuItem[]; protected menuItemHandler: Function; constructor(needFocusService: NeedFocusService); protected addMenuItem(menuItem: AbstractMenuItem): void; getItems(): AbstractMenuItem[]; abstract doRenderMenu(): void; renderMenu(): void; getMenuItemHandler(): Function; getModel(): MenuModel; }