public void handleScrolled(DimensionChangedEventArgs args) { if (args.Type == DimensionType.ScrollAmount) { ScrollChanged?.Invoke(this, args); } }
public override void Draw() { if (this.Style == null) { this.Style = UnityEngine.GUI.skin.scrollView; } if (this.Visible) { GroupDepth++; UnityEngine.Vector2 pos = UnityEngine.GUILayout.BeginScrollView(ScrollPosition, AlwaysShowHorizontal, AlwaysShowVertical, UnityEngine.GUI.skin.horizontalScrollbar, UnityEngine.GUI.skin.verticalScrollbar, Style, Options); if (pos != ScrollPosition) { ScrollChanged?.Invoke(this); } ScrollPosition = pos; foreach (GUIItem item in Items) { if (item.Visible) { item.Draw(); } } UnityEngine.GUILayout.EndScrollView(); GroupDepth--; } }
private void OnScrollBarChange(object sender, ScrollEventArgs e) { // Update with the new scroll value _scrollBar.Value = e.NewValue; ScrollChanged?.Invoke(this, EventArgs.Empty); }
public void DispatchScrollChanged(int position) { if (ScrollChanged != null) { ScrollChanged.Invoke(null, new PositionEventArgs { Position = position }); } }
public void BoundsDidChangeNotification(NSObject o) { var notification = o as NSNotification; var view = notification.Object as NSView; var position = view.Bounds.Location; Console.WriteLine("Scroll position: " + position.ToString()); ScrollChanged?.Invoke(this, new ScrollChangedEventArgs(position.X, position.Y)); }
private void AdaptiveGridView_Loaded(object sender, RoutedEventArgs e) { var ScrollViewer = this.FindScrollViewer(); ScrollChanged?.Invoke(this, ScrollViewer); if (ItemsPanelRoot != null) { InvalidateMeasure(); } }
private void ScrollContent_ScrollChanged(object sender, ScrollChangedEventArgs e) { SetValue(HorizontalOffsetProperty, e.HorizontalOffset); SetValue(VerticalOffsetProperty, e.VerticalOffset); SetValue(ViewportHeightProperty, e.ViewportHeight); SetValue(ViewportWidthProperty, e.ViewportWidth); DrawScrollBar(); if (ScrollChanged != null) { ScrollChanged.Invoke(this, e); } }
private void Table_MouseWheel(object sender, MouseEventArgs e) { this.TopListRow -= e.Delta * System.Windows.Forms.SystemInformation.MouseWheelScrollLines / 120; if (TopListRow < 0) { TopListRow = 0; } if (TopListRow > RowList.Count - 1) { TopListRow = RowList.Count - 1; } ScrollChanged?.Invoke(this, e); this.Invalidate(); }
protected override void OnMouseMove(MouseEventArgs e) { Rectangle Rect = new Rectangle(0, BarY, Width, BarHeight); if (Rect.Contains(e.Location)) { if (CurrBarColor != BarColorHover) { CurrBarColor = BarColorHover; Invalidate(); } } else if (!MouseDrag) { if (CurrBarColor != BarColor) { CurrBarColor = BarColor; Invalidate(); } } if (e.Button == MouseButtons.Left && MouseDrag) { BarY = Math.Max(Math.Min(e.Y - Scroll, Height - BarHeight), 0); ScrollY = (int)(((float)BarY / Math.Max(Height - BarHeight, 1)) * Max); ScrollChanged?.Invoke(this, EventArgs.Empty); Invalidate(); } base.OnMouseMove(e); }
private void ScrollViewerOnScrollChanged(object sender, ScrollChangedEventArgs ea) => ScrollChanged?.Invoke(this, ea);
private void DataGrid_ScrollChanged(object sender, ScrollChangedEventArgs e) { ScrollChanged?.Invoke(this, e); }
public void OnScrollEffect(object sender, ScrolledEventArgs e) { ScrollChanged?.Invoke(sender, e); }
private void OnDocumentScrollChanged(object sender, ScrollChangedEventArgs e) { ScrollChanged?.Invoke(this, e); }
private void OnScrollChanged(object sender, ScrollChangedEventArgs e) { leftNumbersBox.ScrollToVerticalOffset(e.VerticalOffset); rightNumbersBox.ScrollToVerticalOffset(e.VerticalOffset); ScrollChanged?.Invoke(this, e); }
internal static void Update() { #if OnUnity bool isCapturedFrame = capturedFrame == Time.frameCount; capturedFrame = Time.frameCount; ScreenPos = Input.mousePosition; // Scroll ScrollDelta = Input.mouseScrollDelta; if (scrollCaptured && isCapturedFrame) { ScrollDelta = Vector2.zero; } if (!isCapturedFrame) { scrollCaptured = false; } if (ScrollDelta != Vector2.zero) { ScrollChanged?.Invoke(ScrollDelta); scrollCaptured = true; } #else UpdateNativePosition(); #endif bool current; // Left #if OnUnity current = Input.GetMouseButton((int)MouseButton.Left); #elif OnWPF current = Mouse.LeftButton == MouseButtonState.Pressed; #else current = KeyInput.GetKeyHold(WinKey.MouseLeft); #endif Left.UpdateState(current); // Right #if OnUnity current = Input.GetMouseButton((int)MouseButton.Right); #elif OnWPF current = Mouse.RightButton == MouseButtonState.Pressed; #else current = KeyInput.GetKeyHold(WinKey.MouseRight); #endif Right.UpdateState(current); // Middle #if OnUnity current = Input.GetMouseButton((int)MouseButton.Middle); #elif OnWPF current = Mouse.MiddleButton == MouseButtonState.Pressed; #else current = KeyInput.GetKeyHold(WinKey.MouseMiddle); #endif Middle.UpdateState(current); }
private void MyClockGroupListView_ScrollChanged(object sender, ScrollChangedEventArgs e) { ScrollChanged?.Invoke(sender, e); }
public void RaiseScrollChanged(Point scrollOffSet) { ScrollChanged?.Invoke(this, scrollOffSet); }
private void ScrollViewerOnScrollChanged(object sender, ScrollChangedEventArgs scrollChangedEventArgs) { ScrollChanged?.Invoke(this, scrollChangedEventArgs); }
private void MyScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) { ScrollChanged?.Invoke(sender, e); }
public void RaiseScrollChanged(double scroll) { ScrollChanged?.Invoke(this, scroll); }
public void OnScrollChanged(Object sender, ScrollEventArgs e) { ScrollChanged?.Invoke(sender, e); }