Class Folder
Represents a folder in a Profile
public sealed class Folder : RenderProfileElement, IBreakableModel, IDisposable, IPluginFeatureDependent
- Inheritance
-
objectCorePropertyChangedFolder
- Implements
- Inherited Members
Constructors
Folder(Profile, ProfileElement, FolderEntity)
Creates a new instance of the Folder class based on the provided folder entity
public Folder(Profile profile, ProfileElement parent, FolderEntity folderEntity)
Parameters
profileProfileThe profile the folder belongs to
parentProfileElementThe parent of the folder
folderEntityFolderEntityThe entity of the folder
Folder(ProfileElement, string)
Creates a new instance of the Folder class and adds itself to the child collection of the provided
parent
public Folder(ProfileElement parent, string name)
Parameters
parentProfileElementThe parent of the folder
namestringThe name of the folder
Properties
FolderEntity
Gets the folder entity this folder uses for persistent storage
public FolderEntity FolderEntity { get; }
Property Value
- FolderEntity
IsExpanded
Gets or sets a boolean indicating whether this folder is expanded
public bool IsExpanded { get; set; }
Property Value
IsRootFolder
Gets a boolean indicating whether this folder is at the root of the profile tree
public bool IsRootFolder { get; }
Property Value
ShouldBeEnabled
Gets a boolean indicating whether this render element and its layers/brushes should be enabled
public override bool ShouldBeEnabled { get; }
Property Value
Methods
AddChild(ProfileElement, int?)
Adds a profile element to the Children collection, optionally at the given position (0-based)
public override void AddChild(ProfileElement child, int? order = null)
Parameters
childProfileElementThe profile element to add
orderint?The order where to place the child (0-based), defaults to the end of the collection
CreateCopy()
Creates a deep copy of the folder
public Folder CreateCopy()
Returns
- Folder
The newly created copy
Disable()
Enables the render element and its brushes and effects
public override void Disable()
Dispose(bool)
Disposes the profile element
protected override void Dispose(bool disposing)
Parameters
disposingbool
Enable()
Disables the render element and its brushes and effects
public override void Enable()
GetAllLayerProperties()
Creates a list of all layer properties present on this render element
public override List<ILayerProperty> GetAllLayerProperties()
Returns
- List<ILayerProperty>
A list of all layer properties present on this render element
GetBrokenHierarchy()
Returns a list containing all broken models, including self and any children
public override IEnumerable<IBreakableModel> GetBrokenHierarchy()
Returns
GetFeatureDependencies()
Gets the plugin features this class depends on, may contain the same plugin feature twice if depending on it in multiple ways.
public override IEnumerable<PluginFeature> GetFeatureDependencies()
Returns
- IEnumerable<PluginFeature>
A List<T> of PluginFeature this class depends on.
OverrideTimelineAndApply(TimeSpan)
Overrides the main timeline to the specified time and clears any extra time lines
public override void OverrideTimelineAndApply(TimeSpan position)
Parameters
positionTimeSpanThe position to set the timeline to
RemoveChild(ProfileElement)
Removes a profile element from the Children collection
public override void RemoveChild(ProfileElement child)
Parameters
childProfileElementThe profile element to remove
Render(SKCanvas, SKPointI, ProfileElement?)
Renders the element
public override void Render(SKCanvas canvas, SKPointI basePosition, ProfileElement? editorFocus)
Parameters
canvasSKCanvasThe canvas to render upon.
basePositionSKPointIThe base position to use to translate relative positions to absolute positions.
editorFocusProfileElementAn optional element to focus on while rendering (other elements will not render).
Reset()
Resets the internal state of the element
public override void Reset()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Update(double)
Updates the element
public override void Update(double deltaTime)
Parameters
deltaTimedouble
Events
RenderPropertiesUpdated
Occurs when a property affecting the rendering properties of this folder has been updated
public event EventHandler? RenderPropertiesUpdated