private void ZoomSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) { if (ScrollZoom != null) { ScrollZoom.ChangeView(null, null, (float)e.NewValue); } }
public static void DrawTextureInout(GeneratorsTester.TextureInout inout) { using (Cell.LineStd) { using (Cell.RowRel(1 - Cell.current.fieldWidth)) Draw.Label("Create New"); using (Cell.RowRel(Cell.current.fieldWidth)) if (Draw.Button("Create")) { //GeneratorTesterWindow window = (GeneratorTesterWindow)GetWindow(typeof (GeneratorTesterWindow)); inout.texture = TextureExtensions.ColorTexture(512, 512, new Color(0.2f, 0.2f, 0.2f, 1)); inout.texture.filterMode = FilterMode.Point; inout.texture.Apply(); } } using (Cell.LineStd) Draw.Toggle(ref inout.previewInScene, "Preview In Scene"); using (Cell.LineStd) Draw.Toggle(ref inout.preview, "Preview"); if (inout.preview && inout.texture != null) { using (Cell.LinePx(256)) { ScrollZoom scrollZoom = new ScrollZoom(); scrollZoom.scroll = inout.previewScroll; scrollZoom.zoom = inout.previewZoom; Draw.ScrollableTexture(inout.texture, scrollZoom); using (Cell.Custom(5, 5, 20, 20)) if (Draw.Button("Z")) { scrollZoom.scroll = Vector2.zero; scrollZoom.zoom = 1; } inout.previewScroll = scrollZoom.scroll; inout.previewZoom = scrollZoom.zoom; } } }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (StaticPlot != null) { hashCode = hashCode * 59 + StaticPlot.GetHashCode(); } if (PlotlyServerUrl != null) { hashCode = hashCode * 59 + PlotlyServerUrl.GetHashCode(); } if (Editable != null) { hashCode = hashCode * 59 + Editable.GetHashCode(); } if (Edits != null) { hashCode = hashCode * 59 + Edits.GetHashCode(); } if (AutoSizable != null) { hashCode = hashCode * 59 + AutoSizable.GetHashCode(); } if (Responsive != null) { hashCode = hashCode * 59 + Responsive.GetHashCode(); } if (FillFrame != null) { hashCode = hashCode * 59 + FillFrame.GetHashCode(); } if (FrameMargins != null) { hashCode = hashCode * 59 + FrameMargins.GetHashCode(); } if (ScrollZoom != null) { hashCode = hashCode * 59 + ScrollZoom.GetHashCode(); } if (DoubleClick != null) { hashCode = hashCode * 59 + DoubleClick.GetHashCode(); } if (DoubleClickDelay != null) { hashCode = hashCode * 59 + DoubleClickDelay.GetHashCode(); } if (ShowAxisDragHandles != null) { hashCode = hashCode * 59 + ShowAxisDragHandles.GetHashCode(); } if (ShowAxisRangeEntryBoxes != null) { hashCode = hashCode * 59 + ShowAxisRangeEntryBoxes.GetHashCode(); } if (ShowTips != null) { hashCode = hashCode * 59 + ShowTips.GetHashCode(); } if (ShowLink != null) { hashCode = hashCode * 59 + ShowLink.GetHashCode(); } if (LinkText != null) { hashCode = hashCode * 59 + LinkText.GetHashCode(); } if (SendData != null) { hashCode = hashCode * 59 + SendData.GetHashCode(); } if (ShowSources != null) { hashCode = hashCode * 59 + ShowSources.GetHashCode(); } if (DisplayModeBar != null) { hashCode = hashCode * 59 + DisplayModeBar.GetHashCode(); } if (ShowSendToCloud != null) { hashCode = hashCode * 59 + ShowSendToCloud.GetHashCode(); } if (ShowEditInChartStudio != null) { hashCode = hashCode * 59 + ShowEditInChartStudio.GetHashCode(); } if (ModeBarButtonsToRemove != null) { hashCode = hashCode * 59 + ModeBarButtonsToRemove.GetHashCode(); } if (ModeBarButtonsToAdd != null) { hashCode = hashCode * 59 + ModeBarButtonsToAdd.GetHashCode(); } if (ModeBarButtons != null) { hashCode = hashCode * 59 + ModeBarButtons.GetHashCode(); } if (ToImageButtonOptions != null) { hashCode = hashCode * 59 + ToImageButtonOptions.GetHashCode(); } if (DisplayLogo != null) { hashCode = hashCode * 59 + DisplayLogo.GetHashCode(); } if (Watermark != null) { hashCode = hashCode * 59 + Watermark.GetHashCode(); } if (PlotGlPixelRatio != null) { hashCode = hashCode * 59 + PlotGlPixelRatio.GetHashCode(); } if (SetBackground != null) { hashCode = hashCode * 59 + SetBackground.GetHashCode(); } if (TopoJsonUrl != null) { hashCode = hashCode * 59 + TopoJsonUrl.GetHashCode(); } if (MapboxAccessToken != null) { hashCode = hashCode * 59 + MapboxAccessToken.GetHashCode(); } if (Logging != null) { hashCode = hashCode * 59 + Logging.GetHashCode(); } if (NotifyOnLogging != null) { hashCode = hashCode * 59 + NotifyOnLogging.GetHashCode(); } if (QueueLength != null) { hashCode = hashCode * 59 + QueueLength.GetHashCode(); } if (GlobalTransforms != null) { hashCode = hashCode * 59 + GlobalTransforms.GetHashCode(); } if (Locale != null) { hashCode = hashCode * 59 + Locale.GetHashCode(); } if (Locales != null) { hashCode = hashCode * 59 + Locales.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Config other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((StaticPlot == other.StaticPlot && StaticPlot != null && other.StaticPlot != null && StaticPlot.Equals(other.StaticPlot)) && (PlotlyServerUrl == other.PlotlyServerUrl && PlotlyServerUrl != null && other.PlotlyServerUrl != null && PlotlyServerUrl.Equals(other.PlotlyServerUrl)) && (Editable == other.Editable && Editable != null && other.Editable != null && Editable.Equals(other.Editable)) && (Edits == other.Edits && Edits != null && other.Edits != null && Edits.Equals(other.Edits)) && (AutoSizable == other.AutoSizable && AutoSizable != null && other.AutoSizable != null && AutoSizable.Equals(other.AutoSizable)) && (Responsive == other.Responsive && Responsive != null && other.Responsive != null && Responsive.Equals(other.Responsive)) && (FillFrame == other.FillFrame && FillFrame != null && other.FillFrame != null && FillFrame.Equals(other.FillFrame)) && (FrameMargins == other.FrameMargins && FrameMargins != null && other.FrameMargins != null && FrameMargins.Equals(other.FrameMargins)) && (ScrollZoom == other.ScrollZoom && ScrollZoom != null && other.ScrollZoom != null && ScrollZoom.Equals(other.ScrollZoom)) && (DoubleClick == other.DoubleClick && DoubleClick != null && other.DoubleClick != null && DoubleClick.Equals(other.DoubleClick)) && (DoubleClickDelay == other.DoubleClickDelay && DoubleClickDelay != null && other.DoubleClickDelay != null && DoubleClickDelay.Equals(other.DoubleClickDelay)) && (ShowAxisDragHandles == other.ShowAxisDragHandles && ShowAxisDragHandles != null && other.ShowAxisDragHandles != null && ShowAxisDragHandles.Equals(other.ShowAxisDragHandles)) && (ShowAxisRangeEntryBoxes == other.ShowAxisRangeEntryBoxes && ShowAxisRangeEntryBoxes != null && other.ShowAxisRangeEntryBoxes != null && ShowAxisRangeEntryBoxes.Equals(other.ShowAxisRangeEntryBoxes)) && (ShowTips == other.ShowTips && ShowTips != null && other.ShowTips != null && ShowTips.Equals(other.ShowTips)) && (ShowLink == other.ShowLink && ShowLink != null && other.ShowLink != null && ShowLink.Equals(other.ShowLink)) && (LinkText == other.LinkText && LinkText != null && other.LinkText != null && LinkText.Equals(other.LinkText)) && (SendData == other.SendData && SendData != null && other.SendData != null && SendData.Equals(other.SendData)) && (ShowSources == other.ShowSources && ShowSources != null && other.ShowSources != null && ShowSources.Equals(other.ShowSources)) && (DisplayModeBar == other.DisplayModeBar && DisplayModeBar != null && other.DisplayModeBar != null && DisplayModeBar.Equals(other.DisplayModeBar)) && (ShowSendToCloud == other.ShowSendToCloud && ShowSendToCloud != null && other.ShowSendToCloud != null && ShowSendToCloud.Equals(other.ShowSendToCloud)) && (ShowEditInChartStudio == other.ShowEditInChartStudio && ShowEditInChartStudio != null && other.ShowEditInChartStudio != null && ShowEditInChartStudio.Equals(other.ShowEditInChartStudio)) && (ModeBarButtonsToRemove == other.ModeBarButtonsToRemove && ModeBarButtonsToRemove != null && other.ModeBarButtonsToRemove != null && ModeBarButtonsToRemove.Equals(other.ModeBarButtonsToRemove)) && (ModeBarButtonsToAdd == other.ModeBarButtonsToAdd && ModeBarButtonsToAdd != null && other.ModeBarButtonsToAdd != null && ModeBarButtonsToAdd.Equals(other.ModeBarButtonsToAdd)) && (ModeBarButtons == other.ModeBarButtons && ModeBarButtons != null && other.ModeBarButtons != null && ModeBarButtons.Equals(other.ModeBarButtons)) && (ToImageButtonOptions == other.ToImageButtonOptions && ToImageButtonOptions != null && other.ToImageButtonOptions != null && ToImageButtonOptions.Equals(other.ToImageButtonOptions)) && (DisplayLogo == other.DisplayLogo && DisplayLogo != null && other.DisplayLogo != null && DisplayLogo.Equals(other.DisplayLogo)) && (Watermark == other.Watermark && Watermark != null && other.Watermark != null && Watermark.Equals(other.Watermark)) && (PlotGlPixelRatio == other.PlotGlPixelRatio && PlotGlPixelRatio != null && other.PlotGlPixelRatio != null && PlotGlPixelRatio.Equals(other.PlotGlPixelRatio)) && (SetBackground == other.SetBackground && SetBackground != null && other.SetBackground != null && SetBackground.Equals(other.SetBackground)) && (TopoJsonUrl == other.TopoJsonUrl && TopoJsonUrl != null && other.TopoJsonUrl != null && TopoJsonUrl.Equals(other.TopoJsonUrl)) && (MapboxAccessToken == other.MapboxAccessToken && MapboxAccessToken != null && other.MapboxAccessToken != null && MapboxAccessToken.Equals(other.MapboxAccessToken)) && (Logging == other.Logging && Logging != null && other.Logging != null && Logging.Equals(other.Logging)) && (NotifyOnLogging == other.NotifyOnLogging && NotifyOnLogging != null && other.NotifyOnLogging != null && NotifyOnLogging.Equals(other.NotifyOnLogging)) && (QueueLength == other.QueueLength && QueueLength != null && other.QueueLength != null && QueueLength.Equals(other.QueueLength)) && (GlobalTransforms == other.GlobalTransforms && GlobalTransforms != null && other.GlobalTransforms != null && GlobalTransforms.Equals(other.GlobalTransforms)) && (Locale == other.Locale && Locale != null && other.Locale != null && Locale.Equals(other.Locale)) && (Locales == other.Locales && Locales != null && other.Locales != null && Locales.Equals(other.Locales))); }