public DecoratedScrolledWindow (SourceEditorWidget parent) { this.parent = parent; this.strip = new QuickTaskStrip (); scrolledWindow = new CompactScrolledWindow (); scrolledWindow.ButtonPressEvent += PrepareEvent; PackStart (scrolledWindow, true, true, 0); strip.VAdjustment = scrolledWindow.Vadjustment; PackEnd (strip, false, true, 0); parent.quickTaskProvider.ForEach (AddQuickTaskProvider); QuickTaskStrip.EnableFancyFeatures.Changed += FancyFeaturesChanged; FancyFeaturesChanged (null, null); }
public DecoratedScrolledWindow (SourceEditorWidget parent) { this.parent = parent; this.strip = new QuickTaskStrip (); scrolledWindow = new CompactScrolledWindow (); scrolledWindow.ButtonPressEvent += PrepareEvent; PackStart (scrolledWindow, true, true, 0); strip.VAdjustment = scrolledWindow.Vadjustment; PackEnd (strip, false, true, 0); parent.quickTaskProvider.ForEach (p => AddQuickTaskProvider (p)); }
public DecoratedScrolledWindow (SourceEditorWidget parent) { this.parent = parent; this.strip = new QuickTaskStrip (); /* Border border = new Border (); border.HeightRequest = 1; PackStart (border, false, true, 0); HBox box = new HBox (); border = new Border (); border.WidthRequest = 1; box.PackStart (border, false, true, 0); scrolledWindow = new ScrolledWindow (); scrolledWindow.BorderWidth = 0; scrolledWindow.ShadowType = ShadowType.None; scrolledWindow.ButtonPressEvent += PrepareEvent; box.PackStart (scrolledWindow, true, true, 0); border = new Border (); border.WidthRequest = 1; box.PackStart (border, false, true, 0); PackStart (box, true, true, 0); border = new Border (); border.HeightRequest = 1; PackStart (border, false, true, 0);*/ scrolledWindow = new SmartScrolledWindow (); // scrolledWindow.BorderWidth = 0; // scrolledWindow.ShadowType = ShadowType.In; scrolledWindow.ButtonPressEvent += PrepareEvent; PackStart (scrolledWindow, true, true, 0); if (parent.quickTaskProvider.Count > 0) { strip.VAdjustment = scrolledWindow.Vadjustment; scrolledWindow.ReplaceVScrollBar (strip); } else { strip.Visible = false; } parent.quickTaskProvider.ForEach (p => AddQuickTaskProvider (p)); }
protected override void OnDestroyed () { if (scrolledWindow == null) return; if (scrolledWindow.Child != null) RemoveEvents (); SetSuppressScrollbar (false); QuickTaskStrip.EnableFancyFeatures.Changed -= FancyFeaturesChanged; scrolledWindow.ButtonPressEvent -= PrepareEvent; scrolledWindow.Vadjustment.Destroy (); scrolledWindow.Hadjustment.Destroy (); scrolledWindow.Destroy (); scrolledWindow = null; strip.Destroy (); strip = null; base.OnDestroyed (); }