Exemplo n.º 1
0
 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;
         }
     });
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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();
 }