Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | /**
|
---|
| 2 | * @license
|
---|
| 3 | * Copyright Google LLC All Rights Reserved.
|
---|
| 4 | *
|
---|
| 5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
| 6 | * found in the LICENSE file at https://angular.io/license
|
---|
| 7 | */
|
---|
| 8 | import { ListKeyManager, ListKeyManagerOption } from './list-key-manager';
|
---|
| 9 | /**
|
---|
| 10 | * This is the interface for highlightable items (used by the ActiveDescendantKeyManager).
|
---|
| 11 | * Each item must know how to style itself as active or inactive and whether or not it is
|
---|
| 12 | * currently disabled.
|
---|
| 13 | */
|
---|
| 14 | export interface Highlightable extends ListKeyManagerOption {
|
---|
| 15 | /** Applies the styles for an active item to this item. */
|
---|
| 16 | setActiveStyles(): void;
|
---|
| 17 | /** Applies the styles for an inactive item to this item. */
|
---|
| 18 | setInactiveStyles(): void;
|
---|
| 19 | }
|
---|
| 20 | export declare class ActiveDescendantKeyManager<T> extends ListKeyManager<Highlightable & T> {
|
---|
| 21 | /**
|
---|
| 22 | * Sets the active item to the item at the specified index and adds the
|
---|
| 23 | * active styles to the newly active item. Also removes active styles
|
---|
| 24 | * from the previously active item.
|
---|
| 25 | * @param index Index of the item to be set as active.
|
---|
| 26 | */
|
---|
| 27 | setActiveItem(index: number): void;
|
---|
| 28 | /**
|
---|
| 29 | * Sets the active item to the item to the specified one and adds the
|
---|
| 30 | * active styles to the it. Also removes active styles from the
|
---|
| 31 | * previously active item.
|
---|
| 32 | * @param item Item to be set as active.
|
---|
| 33 | */
|
---|
| 34 | setActiveItem(item: T): void;
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.