UNPKG

2.61 kBTypeScriptView Raw
1import { MarkdownString } from '../../common/markdown-rendering/markdown-string';
2import { AccessibilityInformation } from '../../common/accessibility';
3export interface StatusBarEntry {
4 /**
5 * For icons we use Codicons by default, and Font Awesome icons will also be respected.
6 * You can find Codicon classnames here: https://microsoft.github.io/vscode-codicons/dist/codicon.html
7 * You can find Font Awesome classnames here: http://fontawesome.io/icons/
8 *
9 *
10 * Codicon: $(<codiconClassName>) or $(codicon-<codiconClassName>)
11 *
12 * Font Awesome: $(fa-<fontAwesomeClassName>)
13 *
14 * To use animated icons use the following pattern:
15 * $(iconClassName~typeOfAnimation)
16 * Type of animation can be either spin or pulse.
17 * Look here for more information to animated icons:
18 * http://fontawesome.io/examples/#animated
19 */
20 text: string;
21 alignment: StatusBarAlignment;
22 name?: string;
23 color?: string;
24 backgroundColor?: string;
25 className?: string;
26 tooltip?: string | MarkdownString | HTMLElement;
27 command?: string;
28 arguments?: unknown[];
29 priority?: number;
30 accessibilityInformation?: AccessibilityInformation;
31 affinity?: StatusBarAffinity;
32 onclick?: (e: MouseEvent) => void;
33}
34export declare enum StatusBarAlignment {
35 LEFT = 0,
36 RIGHT = 1
37}
38export declare const STATUSBAR_WIDGET_FACTORY_ID = "statusBar";
39export declare const StatusBar: unique symbol;
40export interface StatusBar {
41 setBackgroundColor(color?: string): Promise<void>;
42 setColor(color?: string): Promise<void>;
43 setElement(id: string, entry: StatusBarEntry): Promise<void>;
44 removeElement(id: string): Promise<void>;
45}
46export interface StatusBarAffinity {
47 /**
48 * a reference to the {@link StatusBarEntry.id id} of another entry relative to which this item should be positioned.
49 */
50 id: string;
51 /**
52 * Where to position this entry relative to the entry referred to in the `id` field.
53 */
54 alignment: StatusBarAlignment;
55 /**
56 * Whether to treat this entry and the reference entry as a single entity for positioning and hover highlights
57 */
58 compact?: boolean;
59}
60export interface StatusBarViewModelEntry {
61 id: string;
62 leftChildren: StatusBarViewModelEntry[];
63 head: StatusBarEntry;
64 rightChildren: StatusBarViewModelEntry[];
65}
66export interface StatusBarViewEntry {
67 id: string;
68 entry: StatusBarEntry;
69 compact?: boolean;
70 /** Only present if compact = true */
71 alignment?: StatusBarAlignment;
72}
73//# sourceMappingURL=status-bar-types.d.ts.map
\No newline at end of file