@eclipse-scout/core
Version:
Eclipse Scout runtime
36 lines • 1.5 kB
TypeScript
import { IconDesc, IconEventMap, IconModel, Image, InitModelOf, Widget } from '../index';
/**
* Widget representing an icon. It may be a font icon or an image icon. Depending on the type, either a span or an img tag will be rendered.
* <p>
* See also {@link JQuery.icon} and {@link JQuery.appendIcon}. Main difference to these implementations is that the image loading will invalidate the layout by using {@link Image}.
*/
export declare class Icon extends Widget implements IconModel {
model: IconModel;
eventMap: IconEventMap;
self: Icon;
autoFit: boolean;
iconDesc: IconDesc;
/**
* Is set if the icon is rendered and an image, it is not set if it is a font icon
*/
image: Image;
prepend: boolean;
constructor();
protected _init(model: InitModelOf<this>): void;
protected _render(): void;
/**
* Accepts either an iconId as string or an {@link IconDesc}.
*/
setIconDesc(iconDesc: IconDesc | string): void;
protected _setIconDesc(iconDesc: IconDesc | string): void;
protected _renderIconDesc(): void;
protected _renderFontIcon(): void;
protected _removeFontIcon(): void;
protected _renderImageIcon(): void;
protected _removeImageIcon(): void;
/**
* Delegates to {@link Image.setAutoFit}, but only if Icon is an image. Beside updating the autoFit property, this method has no effect if the icon is a font-icon.
*/
setAutoFit(autoFit: boolean): void;
}
//# sourceMappingURL=Icon.d.ts.map