mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-17 14:19:29 +00:00
Implemented the Widget
Re-introduced bottom panel tabs Signed-off-by: jbicker <jan.bicker@typefox.io>
This commit is contained in:
31
arduino-ide-extension/src/browser/monitor/monitor-model.ts
Normal file
31
arduino-ide-extension/src/browser/monitor/monitor-model.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user