mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-15 13:19:28 +00:00
31 lines
725 B
TypeScript
31 lines
725 B
TypeScript
import { injectable } from "inversify";
|
|
import { Emitter } from "@theia/core";
|
|
|
|
@injectable()
|
|
export class MonitorModel {
|
|
|
|
protected readonly onChangeEmitter = new Emitter<void>();
|
|
|
|
readonly onChange = this.onChangeEmitter.event;
|
|
|
|
protected _autoscroll: boolean = true;
|
|
protected _timestamp: boolean = false;
|
|
|
|
get autoscroll(): boolean {
|
|
return this._autoscroll;
|
|
}
|
|
|
|
get timestamp(): boolean {
|
|
return this._timestamp;
|
|
}
|
|
|
|
toggleAutoscroll(): void {
|
|
this._autoscroll = !this._autoscroll;
|
|
this.onChangeEmitter.fire(undefined);
|
|
}
|
|
|
|
toggleTimestamp(): void {
|
|
this._timestamp = !this._timestamp;
|
|
this.onChangeEmitter.fire(undefined);
|
|
}
|
|
} |