Class AssetEditorWindow
Base class for assets editing/viewing windows.
Inheritance
Namespace: FlaxEditor.Windows.Assets
Assembly: FlaxEngine.CSharp.dll
Syntax
public abstract class AssetEditorWindow : EditorWindow, IComparable, IDrawable, IEditable, IContentItemOwnerConstructors
AssetEditorWindow(Editor, AssetItem)
Initializes a new instance of the AssetEditorWindow class.
Declaration
protected AssetEditorWindow(Editor editor, AssetItem item)Parameters
| Editor
        editor The editor. | 
| FlaxEditor.Content.AssetItem
        item The item. | 
Fields
_item
The item.
Declaration
protected AssetItem _itemField Value
| FlaxEditor.Content.AssetItem 
 | 
_toolstrip
Properties
IsEdited
Gets a value indicating whether this object is edited (dirty state).
Declaration
public bool IsEdited { get; protected set; }Property Value
| System.Boolean 
 | 
Implements
Item
Gets the item.
Declaration
public AssetItem Item { get; }Property Value
| FlaxEditor.Content.AssetItem 
 | 
SerializationTypename
Gets the serialization typename.
Declaration
public override string SerializationTypename { get; }Property Value
| System.String 
 | 
Overrides
ToolStrip
WindowTitleName
Gets the name of the window title format text ({0} to insert asset short name).
Declaration
protected virtual string WindowTitleName { get; }Property Value
| System.String 
 | 
Methods
ClearEditedFlag()
Clears the edited flag.
Declaration
protected void ClearEditedFlag()IsEditingItem(ContentItem)
Determines whether this window is holding reference to the specified item.
Declaration
public override bool IsEditingItem(ContentItem item)Parameters
| FlaxEditor.Content.ContentItem
        item The item. | 
Returns
| System.Boolean 
 | 
Overrides
MarkAsEdited()
Marks object as edited (sets dirty flag).
Declaration
public void MarkAsEdited()Implements
OnClose()
Called when window is closed.
Declaration
protected override void OnClose()Overrides
OnClosing(ClosingReason)
Called when window is closing. Operation can be cancelled.
Declaration
protected override bool OnClosing(ClosingReason reason)Parameters
| ClosingReason
        reason The reason. | 
Returns
| System.Boolean True if cancel, otherwise false to allow. | 
Overrides
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()Overrides
OnEditedState()
Action fired when object gets edited.
Declaration
protected virtual void OnEditedState()OnEditedStateChanged()
Action fired when object edited state gets changed.
Declaration
protected virtual void OnEditedStateChanged()OnItemDeleted(ContentItem)
Declaration
public void OnItemDeleted(ContentItem item)Parameters
| FlaxEditor.Content.ContentItem
        item 
 | 
OnItemDispose(ContentItem)
Declaration
public void OnItemDispose(ContentItem item)Parameters
| FlaxEditor.Content.ContentItem
        item 
 | 
OnItemReimported(ContentItem)
Declaration
public virtual void OnItemReimported(ContentItem item)Parameters
| FlaxEditor.Content.ContentItem
        item 
 | 
OnItemRenamed(ContentItem)
Declaration
public void OnItemRenamed(ContentItem item)Parameters
| FlaxEditor.Content.ContentItem
        item 
 | 
OnScriptsReloadBegin()
Declaration
protected virtual void OnScriptsReloadBegin()OnShowContextMenu(ContextMenu)
Called when dock panel wants to show the context menu for this window. Can be used to inject custom buttons and items to the context menu (on top).
Declaration
public override void OnShowContextMenu(ContextMenu menu)Parameters
| FlaxEditor.GUI.ContextMenu.ContextMenu
        menu The menu. | 
Overrides
Save()
Tries to save asset changes if it has been edited.
Declaration
public virtual void Save()UnlinkItem()
Unlinks the item. Removes reference to it and unbinds all events.
Declaration
protected virtual void UnlinkItem()UpdateTitle()
Updates the window title text.
Declaration
protected void UpdateTitle()UpdateToolstrip()
Updates the toolstrip buttons and other controls. Called after some window events.
Declaration
protected virtual void UpdateToolstrip()Events
OnEdited
Occurs when object gets edited.
Declaration
public event Action OnEditedEvent Type
| System.Action 
 |