public Timeline(Panel panel) { RootWidget = new Widget(); FilesDropHandler = new FilesDropHandler(RootWidget); FilesDropHandler.Handling += FilesDropOnHandling; Panel = panel; PanelWidget = panel.ContentWidget; Toolbar = new Toolbar(); Ruler = new Rulerbar(); Overview = new OverviewPane(); Grid = new GridPane(this); CurveEditor = new CurveEditorPane(this); Roll = new RollPane(); CreateProcessors(); InitializeWidgets(); RootWidget.AddChangeWatcher(() => Document.Current.Container, (container) => { Offset = container.Components.GetOrAdd <TimelineOffset>().Offset; }); RootWidget.AddChangeWatcher(() => Offset, (value) => { var offset = Document.Current.Container.Components.Get <TimelineOffset>(); if (offset != null) { offset.Offset = value; } }); }
public Timeline(Panel panel) { RootWidget = new Widget(); Panel = panel; PanelWidget = panel.ContentWidget; Toolbar = new Toolbar(); Ruler = new Rulerbar(); Overview = new OverviewPane(); Grid = new GridPane(this); CurveEditor = new CurveEditorPane(this); Roll = new RollPane(); CreateProcessors(); InitializeWidgets(); WaveformCache = new WaveformCache(Project.Current.FileSystemWatcher); RootWidget.AddChangeWatcher(() => Document.Current.Container, container => { Offset = container.Components.GetOrAdd <TimelineOffset>().Offset; }); RootWidget.AddChangeWatcher(() => Offset, (value) => { var offset = Document.Current.Container.Components.Get <TimelineOffset>(); if (offset != null) { offset.Offset = value; } }); RootWidget.Gestures.Add(DropFilesGesture = new DropFilesGesture()); CreateFilesDropHandlers(); OnCreate?.Invoke(this); }
public Timeline(DockPanel panel) { Panel = panel; PanelWidget = panel.ContentWidget; Toolbar = new Toolbar(); Ruler = new Rulerbar(); Overview = new OverviewPane(); Grid = new GridPane(this); CurveEditor = new CurveEditorPane(this); Roll = new RollPane(); RootWidget = new Widget(); CreateProcessors(); InitializeWidgets(); }