Search Results for

    Show / Hide Table of Contents

    Class VisjectSurfaceWindow<TAsset, TSurface, TPreview>

    The base class for editor windows that use FlaxEditor.Surface.VisjectSurface for content editing. Note: it uses ClonedAssetEditorWindowBase which is creating cloned asset to edit/preview.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.ScrollableControl
    Panel
    DockWindow
    EditorWindow
    AssetEditorWindow
    AssetEditorWindowBase<TAsset>
    ClonedAssetEditorWindowBase<TAsset>
    VisjectSurfaceWindow<TAsset, TSurface, TPreview>
    AnimationGraphWindow
    MaterialWindow
    ParticleEmitterWindow
    Implements
    System.IComparable
    IDrawable
    IEditable
    IVisjectSurfaceWindow
    Inherited Members
    ClonedAssetEditorWindowBase<TAsset>.SaveToOriginal()
    ClonedAssetEditorWindowBase<TAsset>.LoadAsset()
    ClonedAssetEditorWindowBase<TAsset>.OriginalAsset
    AssetEditorWindowBase<TAsset>._isWaitingForLoaded
    AssetEditorWindowBase<TAsset>._asset
    AssetEditorWindowBase<TAsset>.RefreshAsset()
    AssetEditorWindowBase<TAsset>.ReloadAsset()
    AssetEditorWindowBase<TAsset>.OnAssetLoaded()
    AssetEditorWindowBase<TAsset>.OnAssetLoadFailed()
    AssetEditorWindowBase<TAsset>.OnShow()
    AssetEditorWindowBase<TAsset>.OnItemReimported(ContentItem)
    AssetEditorWindowBase<TAsset>.Asset
    AssetEditorWindow._item
    AssetEditorWindow._toolstrip
    AssetEditorWindow.UpdateTitle()
    AssetEditorWindow.IsEditingItem(ContentItem)
    AssetEditorWindow.OnClosing(ClosingReason)
    AssetEditorWindow.OnClose()
    AssetEditorWindow.OnScriptsReloadBegin()
    AssetEditorWindow.MarkAsEdited()
    AssetEditorWindow.ClearEditedFlag()
    AssetEditorWindow.OnEditedState()
    AssetEditorWindow.OnEditedStateChanged()
    AssetEditorWindow.OnShowContextMenu(ContextMenu)
    AssetEditorWindow.OnItemDeleted(ContentItem)
    AssetEditorWindow.OnItemRenamed(ContentItem)
    AssetEditorWindow.OnItemDispose(ContentItem)
    AssetEditorWindow.Item
    AssetEditorWindow.ToolStrip
    AssetEditorWindow.SerializationTypename
    AssetEditorWindow.WindowTitleName
    AssetEditorWindow.IsEdited
    AssetEditorWindow.OnEdited
    EditorWindow.Editor
    EditorWindow.OnSceneSaving(Scene, Guid)
    EditorWindow.OnSceneSaved(Scene, Guid)
    EditorWindow.OnSceneSaveError(Scene, Guid)
    EditorWindow.OnSceneLoading(Scene, Guid)
    EditorWindow.OnSceneLoaded(Scene, Guid)
    EditorWindow.OnSceneLoadError(Scene, Guid)
    EditorWindow.OnSceneUnloading(Scene, Guid)
    EditorWindow.OnSceneUnloaded(Scene, Guid)
    EditorWindow.OnPlayBeginning()
    EditorWindow.OnPlayBegin()
    EditorWindow.OnPlayEnd()
    EditorWindow.OnInit()
    EditorWindow.OnUpdate()
    EditorWindow.OnExit()
    EditorWindow.OnEditorStateChanged()
    EditorWindow.OnKeyDown(KeyboardKeys)
    EditorWindow.CanOpenContentFinder
    EditorWindow.CanUseNavigation
    DockWindow._masterPanel
    DockWindow._dockedTo
    DockWindow.InputActions
    DockWindow.ShowFloating()
    DockWindow.ShowFloating(WindowStartPosition)
    DockWindow.ShowFloating(Float2, WindowStartPosition)
    DockWindow.ShowFloating(Float2, Float2, WindowStartPosition)
    DockWindow.Show(DockState, DockPanel, Boolean, Nullable<Single>)
    DockWindow.Show(DockState, DockWindow)
    DockWindow.FocusOrShow()
    DockWindow.FocusOrShow(DockState)
    DockWindow.Hide()
    DockWindow.Close(ClosingReason)
    DockWindow.SelectTab(Boolean)
    DockWindow.BringToFront()
    DockWindow.OnUnlink()
    DockWindow.Undock()
    DockWindow.LayoutSerializeSplitter(XmlWriter, String, SplitPanel)
    DockWindow.LayoutDeserializeSplitter(XmlElement, String, SplitPanel)
    DockWindow.Focus()
    DockWindow.PerformLayoutBeforeChildren()
    DockWindow.HideOnClose
    DockWindow.MasterPanel
    DockWindow.ParentDockPanel
    DockWindow.IsDocked
    DockWindow.IsSelected
    DockWindow.IsHidden
    DockWindow.DefaultSize
    DockWindow.Title
    DockWindow.Icon
    DockWindow.TitleSize
    Panel.SetViewOffset(Float2)
    Panel.FastScroll()
    Panel.ScrollViewTo(Control, Boolean)
    Panel.ScrollViewTo(Float2, Boolean)
    Panel.ScrollViewTo(Rectangle, Boolean)
    Panel.OnMouseDown(Float2, MouseButton)
    Panel.OnMouseWheel(Float2, Single)
    Panel.RemoveChildren()
    Panel.DisposeChildren()
    Panel.OnChildResized(Control)
    Panel.Draw()
    Panel.ContainsPoint(Float2, Boolean)
    Panel.IntersectsChildContent(Control, Float2, Float2)
    Panel.PerformLayout(Boolean)
    Panel.ArrangeAndGetBounds()
    Panel.Arrange()
    Panel.GetDesireClientArea(Rectangle)
    Panel.OnDragMove(Float2, DragData)
    Panel.ViewBottom
    Panel.ControlsBounds
    Panel.ScrollBars
    Panel.ScrollBarsSize
    Panel.AlwaysShowScrollbars
    Panel.ScrollMargin
    Panel.ScrollbarTrackColor
    Panel.ScrollbarThumbColor
    Panel.ScrollbarThumbSelectedColor
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildrenChanged()
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseMove(Float2)
    ContainerControl.OnMouseLeave()
    ContainerControl.OnMouseUp(Float2, MouseButton)
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    ContainerControl.OnSizeChanged()
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnLostFocus()
    Control.OnStartContainsFocus()
    Control.OnEndContainsFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.OnEndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEditor.Surface
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public abstract class VisjectSurfaceWindow<TAsset, TSurface, TPreview> : ClonedAssetEditorWindowBase<TAsset>, IComparable, IDrawable, IEditable, IContentItemOwner, IVisjectSurfaceWindow, IVisjectSurfaceOwner, ISurfaceContext where TAsset : Asset where TSurface : VisjectSurface where TPreview : AssetPreview
    Type Parameters
    TAsset

    TSurface

    TPreview

    Constructors

    VisjectSurfaceWindow(Editor, AssetItem, Boolean)

    Initializes a new instance of the VisjectSurfaceWindow<TAsset, TSurface, TPreview> class.

    Declaration
    protected VisjectSurfaceWindow(Editor editor, AssetItem item, bool useTabs = false)
    Parameters
    Editor editor

    The editor.

    FlaxEditor.Content.AssetItem item

    The item.

    System.Boolean useTabs

    if set to true [use tabs].

    Fields

    _isWaitingForSurfaceLoad

    True if window is waiting for asset load to load surface.

    Declaration
    protected bool _isWaitingForSurfaceLoad
    Field Value
    System.Boolean

    _paramValueChange

    True if parameter value has been changed (special path for handling modifying surface parameters in properties editor).

    Declaration
    protected bool _paramValueChange
    Field Value
    System.Boolean

    _preview

    The asset preview.

    Declaration
    protected TPreview _preview
    Field Value
    TPreview

    _propertiesEditor

    The properties editor.

    Declaration
    protected CustomEditorPresenter _propertiesEditor
    Field Value
    FlaxEditor.CustomEditors.CustomEditorPresenter

    _redoButton

    Redo button on a toolstrip.

    Declaration
    protected ToolStripButton _redoButton
    Field Value
    FlaxEditor.GUI.ToolStripButton

    _refreshPropertiesOnLoad

    True if window is waiting for asset load to refresh properties editor.

    Declaration
    protected bool _refreshPropertiesOnLoad
    Field Value
    System.Boolean

    _saveButton

    Save button on a toolstrip.

    Declaration
    protected ToolStripButton _saveButton
    Field Value
    FlaxEditor.GUI.ToolStripButton

    _split1

    The primary split panel.

    Declaration
    protected readonly SplitPanel _split1
    Field Value
    FlaxEngine.GUI.SplitPanel

    _split2

    The secondary split panel.

    Declaration
    protected readonly SplitPanel _split2
    Field Value
    FlaxEngine.GUI.SplitPanel

    _surface

    The surface.

    Declaration
    protected TSurface _surface
    Field Value
    TSurface

    _tabs

    The tabs control. Valid only if window is using tabs instead of just properties.

    Declaration
    protected Tabs _tabs
    Field Value
    FlaxEditor.GUI.Tabs.Tabs

    _tmpAssetIsDirty

    True if temporary asset is dirty, otherwise false.

    Declaration
    protected bool _tmpAssetIsDirty
    Field Value
    System.Boolean

    _undo

    The undo.

    Declaration
    protected Undo _undo
    Field Value
    Undo

    _undoButton

    Undo button on a toolstrip.

    Declaration
    protected ToolStripButton _undoButton
    Field Value
    FlaxEditor.GUI.ToolStripButton

    Properties

    CanEditSurfaceOnAssetLoadError

    Gets a value indicating whether this window can edit asset surface on asset load error (eg. to fix asset loading issue due to graph problem).

    Declaration
    protected virtual bool CanEditSurfaceOnAssetLoadError { get; }
    Property Value
    System.Boolean

    NewParameterTypes

    The new parameter types enum type to use. Null to disable adding new parameters.

    Declaration
    public abstract IEnumerable<ScriptType> NewParameterTypes { get; }
    Property Value
    System.Collections.Generic.IEnumerable<FlaxEditor.Scripting.ScriptType>

    Implements
    IVisjectSurfaceWindow.NewParameterTypes

    ParentContext

    Declaration
    public VisjectSurfaceContext ParentContext { get; }
    Property Value
    FlaxEditor.Surface.VisjectSurfaceContext

    Preview

    Gets the asset preview.

    Declaration
    public TPreview Preview { get; }
    Property Value
    TPreview

    Surface

    Gets the Visject Surface.

    Declaration
    public TSurface Surface { get; }
    Property Value
    TSurface

    SurfaceAsset

    Declaration
    public Asset SurfaceAsset { get; }
    Property Value
    Asset

    SurfaceData

    Declaration
    public abstract byte[] SurfaceData { get; set; }
    Property Value
    System.Byte[]

    SurfaceName

    Declaration
    public abstract string SurfaceName { get; }
    Property Value
    System.String

    Undo

    Gets the undo history context for this window.

    Declaration
    public Undo Undo { get; }
    Property Value
    Undo

    UseLayoutData

    Gets a value indicating whether window uses custom layout data.

    Declaration
    public override bool UseLayoutData { get; }
    Property Value
    System.Boolean

    Overrides
    DockWindow.UseLayoutData

    VisjectAsset

    Gets the asset edited by the window.

    Declaration
    public Asset VisjectAsset { get; }
    Property Value
    Asset

    Implements
    IVisjectSurfaceWindow.VisjectAsset

    VisjectSurface

    Gets the Visject surface editor.

    Declaration
    public VisjectSurface VisjectSurface { get; }
    Property Value
    FlaxEditor.Surface.VisjectSurface

    Implements
    IVisjectSurfaceWindow.VisjectSurface

    Methods

    GetParameter(Int32)

    Gets the asset parameter.

    Declaration
    public object GetParameter(int index)
    Parameters
    System.Int32 index

    The zero-based parameter index.

    Returns
    System.Object

    The value.

    Implements
    IVisjectSurfaceWindow.GetParameter(Int32)

    LoadSurface()

    Loads the surface from the asset. Called during Update(Single) when asset is loaded and surface is missing.

    Declaration
    protected abstract bool LoadSurface()
    Returns
    System.Boolean

    True if failed, otherwise false.

    OnAssetLinked()

    Called when asset gets linked and window can setup UI for it.

    Declaration
    protected override void OnAssetLinked()
    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<TAsset>.OnAssetLinked()

    OnContextCreated(VisjectSurfaceContext)

    Declaration
    public void OnContextCreated(VisjectSurfaceContext context)
    Parameters
    FlaxEditor.Surface.VisjectSurfaceContext context

    OnDestroy()

    Method called when managed instance should be destroyed

    Declaration
    public override void OnDestroy()
    Overrides
    AssetEditorWindow.OnDestroy()

    OnLayoutDeserialize()

    Called when during windows layout deserialization if window has no layout data to load. Can be used to restore default UI layout.

    Declaration
    public override void OnLayoutDeserialize()
    Overrides
    DockWindow.OnLayoutDeserialize()

    OnLayoutDeserialize(XmlElement)

    Called when during windows layout deserialization. Each window can use it to load custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutDeserialize(XmlElement node)
    Parameters
    System.Xml.XmlElement node

    The Xml document node.

    Overrides
    DockWindow.OnLayoutDeserialize(XmlElement)

    OnLayoutSerialize(XmlWriter)

    Called when during windows layout serialization. Each window can use it to store custom interface data (eg. splitter position).

    Declaration
    public override void OnLayoutSerialize(XmlWriter writer)
    Parameters
    System.Xml.XmlWriter writer

    The Xml writer.

    Overrides
    DockWindow.OnLayoutSerialize(XmlWriter)

    OnParamAddUndo()

    Called when parameter add undo action is performed.

    Declaration
    public virtual void OnParamAddUndo()
    Implements
    IVisjectSurfaceWindow.OnParamAddUndo()

    OnParamEditAttributesUndo()

    Called when parameter edit attributes undo action is performed.

    Declaration
    public virtual void OnParamEditAttributesUndo()
    Implements
    IVisjectSurfaceWindow.OnParamEditAttributesUndo()

    OnParamRemoveUndo()

    Called when parameter remove undo action is performed.

    Declaration
    public virtual void OnParamRemoveUndo()
    Implements
    IVisjectSurfaceWindow.OnParamRemoveUndo()

    OnParamRenameUndo()

    Called when parameter rename undo action is performed.

    Declaration
    public virtual void OnParamRenameUndo()
    Implements
    IVisjectSurfaceWindow.OnParamRenameUndo()

    OnPropertyEdited()

    Called when the asset properties proxy object gets edited.

    Declaration
    protected virtual void OnPropertyEdited()

    OnSurfaceClose()

    Declaration
    public void OnSurfaceClose()

    OnSurfaceEditedChanged()

    Declaration
    public void OnSurfaceEditedChanged()

    OnSurfaceEditingStart()

    Called when surface gets loaded and user can edit it.

    Declaration
    protected virtual void OnSurfaceEditingStart()

    OnSurfaceGraphEdited()

    Declaration
    public void OnSurfaceGraphEdited()

    RefreshTempAsset()

    Refreshes temporary asset to see changes live when editing the surface.

    Declaration
    public bool RefreshTempAsset()
    Returns
    System.Boolean

    True if cannot refresh it, otherwise false.

    Save()

    Tries to save asset changes if it has been edited.

    Declaration
    public override void Save()
    Overrides
    AssetEditorWindow.Save()

    SaveSurface()

    Saves the surface to the asset. Called during Update(Single) when asset is loaded and surface is missing.

    Declaration
    protected abstract bool SaveSurface()
    Returns
    System.Boolean

    True if failed, otherwise false.

    SetParameter(Int32, Object)

    Sets the asset parameter.

    Declaration
    public virtual void SetParameter(int index, object value)
    Parameters
    System.Int32 index

    The zero-based parameter index.

    System.Object value

    The value to set.

    Implements
    IVisjectSurfaceWindow.SetParameter(Int32, Object)

    ShowWholeGraph()

    Shows the whole surface graph.

    Declaration
    public void ShowWholeGraph()

    UnlinkItem()

    Unlinks the item. Removes reference to it and unbinds all events.

    Declaration
    protected override void UnlinkItem()
    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<TAsset>.UnlinkItem()

    Update(Single)

    Perform control update and all its children

    Declaration
    public override void Update(float deltaTime)
    Parameters
    System.Single deltaTime

    Delta time in seconds

    Overrides
    FlaxEditor.Windows.Assets.AssetEditorWindowBase<TAsset>.Update(System.Single)

    UpdateToolstrip()

    Updates the toolstrip buttons and other controls. Called after some window events.

    Declaration
    protected override void UpdateToolstrip()
    Overrides
    AssetEditorWindow.UpdateToolstrip()

    Events

    SurfaceLoaded

    Event called when surface gets loaded (eg. after opening the window).

    Declaration
    public event Action SurfaceLoaded
    Event Type
    System.Action

    Implements
    IVisjectSurfaceWindow.SurfaceLoaded

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    AssetEditorWindow
    FlaxEditor.Surface.IVisjectSurfaceOwner
    IVisjectSurfaceWindow
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat