Search Results for

    Show / Hide Table of Contents

    Class ContentWindow

    One of the main editor windows used to present workspace content and user scripts. Provides various functionalities for asset operations.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.ScrollableControl
    Panel
    DockWindow
    EditorWindow
    ContentWindow
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    EditorWindow.Editor
    EditorWindow.IsEditingItem(ContentItem)
    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.OnUpdate()
    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.OnClosing(ClosingReason)
    DockWindow.OnClose()
    DockWindow.OnShow()
    DockWindow.LayoutSerializeSplitter(XmlWriter, String, SplitPanel)
    DockWindow.LayoutDeserializeSplitter(XmlElement, String, SplitPanel)
    DockWindow.Focus()
    DockWindow.OnShowContextMenu(ContextMenu)
    DockWindow.HideOnClose
    DockWindow.MasterPanel
    DockWindow.ParentDockPanel
    DockWindow.IsDocked
    DockWindow.IsSelected
    DockWindow.IsHidden
    DockWindow.DefaultSize
    DockWindow.SerializationTypename
    DockWindow.Title
    DockWindow.Icon
    DockWindow.TitleSize
    Panel.SetViewOffset(Float2)
    Panel.FastScroll()
    Panel.ScrollViewTo(Control, Boolean)
    Panel.ScrollViewTo(Float2, Boolean)
    Panel.ScrollViewTo(Rectangle, Boolean)
    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.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.Windows
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class ContentWindow : EditorWindow, IComparable, IDrawable

    Constructors

    ContentWindow(Editor)

    Initializes a new instance of the ContentWindow class.

    Declaration
    public ContentWindow(Editor editor)
    Parameters
    Editor editor

    The editor.

    Properties

    CurrentViewFolder

    Gets the current view folder.

    Declaration
    public ContentFolder CurrentViewFolder { get; }
    Property Value
    FlaxEditor.Content.ContentFolder

    SelectedNode

    Gets the selected tree node.

    Declaration
    public ContentTreeNode SelectedNode { get; }
    Property Value
    ContentTreeNode

    Toolstrip

    Gets the toolstrip.

    Declaration
    public ToolStrip Toolstrip { get; }
    Property Value
    ToolStrip

    UseLayoutData

    Gets a value indicating whether window uses custom layout data.

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

    Overrides
    DockWindow.UseLayoutData

    View

    Gets the assets view.

    Declaration
    public ContentView View { get; }
    Property Value
    FlaxEditor.Content.GUI.ContentView

    Methods

    ClearItemsSearch()

    Clears the items searching query text and filters.

    Declaration
    public void ClearItemsSearch()

    Delete(ContentItem)

    Deletes the specified item. Asks user first and uses some GUI.

    Declaration
    public void Delete(ContentItem item)
    Parameters
    FlaxEditor.Content.ContentItem item

    The item to delete.

    Delete(List<ContentItem>)

    Deletes the specified items. Asks user first and uses some GUI.

    Declaration
    public void Delete(List<ContentItem> items)
    Parameters
    System.Collections.Generic.List<FlaxEditor.Content.ContentItem> items

    The items to delete.

    Duplicate(ContentItem)

    Clones the specified item.

    Declaration
    public void Duplicate(ContentItem item)
    Parameters
    FlaxEditor.Content.ContentItem item

    The item.

    Duplicate(List<ContentItem>)

    Duplicates the specified items.

    Declaration
    public void Duplicate(List<ContentItem> items)
    Parameters
    System.Collections.Generic.List<FlaxEditor.Content.ContentItem> items

    The items.

    Navigate(ContentTreeNode)

    Navigates to the specified target content location.

    Declaration
    public void Navigate(ContentTreeNode target)
    Parameters
    ContentTreeNode target

    The target.

    NavigateBackward()

    Navigates backward.

    Declaration
    public void NavigateBackward()

    NavigateForward()

    Navigates forward.

    Declaration
    public void NavigateForward()

    NavigateUp()

    Navigates directory up.

    Declaration
    public void NavigateUp()

    NavigationClearHistory()

    Clears the navigation history.

    Declaration
    public void NavigationClearHistory()

    NewFolder()

    Starts creating the folder.

    Declaration
    public void NewFolder()

    NewItem(ContentProxy, Object, Action<ContentItem>, String, Boolean)

    Starts creating new item.

    Declaration
    public void NewItem(ContentProxy proxy, object argument = null, Action<ContentItem> created = null, string initialName = null, bool withRenaming = true)
    Parameters
    FlaxEditor.Content.ContentProxy proxy

    The new item proxy.

    System.Object argument

    The argument passed to the proxy for the item creation. In most cases it is null.

    System.Action<FlaxEditor.Content.ContentItem> created

    The event called when the item is crated by the user. The argument is the new item.

    System.String initialName

    The initial item name.

    System.Boolean withRenaming

    True if start initial item renaming by user, or tru to skip it.

    OnDestroy()

    Method called when managed instance should be destroyed

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

    OnExit()

    Called when editor is being closed and window should perform release data operations.

    Declaration
    public override void OnExit()
    Overrides
    EditorWindow.OnExit()

    OnInit()

    Called when window should be initialized. At this point, main window, content database, default editor windows are ready.

    Declaration
    public override void OnInit()
    Overrides
    EditorWindow.OnInit()

    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)

    OnMouseDown(Float2, MouseButton)

    When mouse goes down over control's area

    Declaration
    public override bool OnMouseDown(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    Panel.OnMouseDown(Float2, MouseButton)

    OnMouseUp(Float2, MouseButton)

    When mouse goes up over control's area

    Declaration
    public override bool OnMouseUp(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseUp(Float2, MouseButton)

    Open(ContentItem)

    Opens the specified content item.

    Declaration
    public void Open(ContentItem item)
    Parameters
    FlaxEditor.Content.ContentItem item

    The content item.

    Paste(String[], Boolean)

    Pastes the specified files.

    Declaration
    public void Paste(string[] files, bool isCutting)
    Parameters
    System.String[] files

    The files paths to import.

    System.Boolean isCutting

    Whether a cutting action is occuring.

    PerformLayoutBeforeChildren()

    Perform layout for that container control before performing it for child controls.

    Declaration
    protected override void PerformLayoutBeforeChildren()
    Overrides
    DockWindow.PerformLayoutBeforeChildren()

    RefreshView()

    Refreshes the current view items collection.

    Declaration
    public void RefreshView()

    RefreshView(ContentTreeNode)

    Refreshes the view.

    Declaration
    public void RefreshView(ContentTreeNode target)
    Parameters
    ContentTreeNode target

    The target location.

    Rename(ContentItem)

    Shows popup dialog with UI to rename content item.

    Declaration
    public void Rename(ContentItem item)
    Parameters
    FlaxEditor.Content.ContentItem item

    The item to rename.

    Rename(ContentItem, String)

    Renames the specified item.

    Declaration
    public void Rename(ContentItem item, string newShortName)
    Parameters
    FlaxEditor.Content.ContentItem item

    The item.

    System.String newShortName

    New name (without extension, just the filename).

    ScrollingOnContentView(Boolean)

    Enables or disables vertical and horizontal scrolling on the content view panel

    Declaration
    public void ScrollingOnContentView(bool enabled)
    Parameters
    System.Boolean enabled

    The state to set scrolling to

    ScrollingOnTreeView(Boolean)

    Enables or disables vertical and horizontal scrolling on the content tree panel

    Declaration
    public void ScrollingOnTreeView(bool enabled)
    Parameters
    System.Boolean enabled

    The state to set scrolling to

    Select(ContentItem, Boolean)

    Selects the specified item in the content view.

    Declaration
    public void Select(ContentItem item, bool fastScroll = false)
    Parameters
    FlaxEditor.Content.ContentItem item

    The item to select.

    System.Boolean fastScroll

    True of scroll to the item quickly without smoothing.

    Select(Asset)

    Selects the specified asset in the content view.

    Declaration
    public void Select(Asset asset)
    Parameters
    Asset asset

    The asset to select.

    ShowRoot()

    Shows the root folder.

    Declaration
    public void ShowRoot()

    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
    ContainerControl.Update(Single)

    Events

    ContextMenuShow

    Occurs when content window wants to show the context menu for the given content item. Allows to add custom options.

    Declaration
    public event Action<ContextMenu, ContentItem> ContextMenuShow
    Event Type
    System.Action<FlaxEditor.GUI.ContextMenu.ContextMenu, FlaxEditor.Content.ContentItem>

    Extension Methods

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

    See Also

    EditorWindow
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat