Class Folder
Represents a folder in a Profile
Inherited Members
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public sealed class Folder : RenderProfileElement, IBreakableModel, IDisposable
Constructors
Folder(Profile, ProfileElement, FolderEntity)
Creates a new instance of the Folder class based on the provided folder entity
Declaration
public Folder(Profile profile, ProfileElement parent, FolderEntity folderEntity)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile the folder belongs to |
ProfileElement | parent | The parent of the folder |
FolderEntity | folderEntity | The 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
Declaration
public Folder(ProfileElement parent, string name)
Parameters
Type | Name | Description |
---|---|---|
ProfileElement | parent | The parent of the folder |
string | name | The name of the folder |
Properties
FolderEntity
Gets the folder entity this folder uses for persistent storage
Declaration
public FolderEntity FolderEntity { get; }
Property Value
Type | Description |
---|---|
FolderEntity |
IsExpanded
Gets or sets a boolean indicating whether this folder is expanded
Declaration
public bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsRootFolder
Gets a boolean indicating whether this folder is at the root of the profile tree
Declaration
public bool IsRootFolder { get; }
Property Value
Type | Description |
---|---|
bool |
ShouldBeEnabled
Gets a boolean indicating whether this render element and its layers/brushes should be enabled
Declaration
public override bool ShouldBeEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
AddChild(ProfileElement, int?)
Adds a profile element to the Children collection, optionally at the given position (0-based)
Declaration
public override void AddChild(ProfileElement child, int? order = null)
Parameters
Type | Name | Description |
---|---|---|
ProfileElement | child | The profile element to add |
int? | order | The order where to place the child (0-based), defaults to the end of the collection |
Overrides
CreateCopy()
Creates a deep copy of the folder
Declaration
public Folder CreateCopy()
Returns
Type | Description |
---|---|
Folder | The newly created copy |
Disable()
Enables the render element and its brushes and effects
Declaration
public override void Disable()
Overrides
Dispose(bool)
Disposes the profile element
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
Enable()
Disables the render element and its brushes and effects
Declaration
public override void Enable()
Overrides
GetAllLayerProperties()
Creates a list of all layer properties present on this render element
Declaration
public override List<ILayerProperty> GetAllLayerProperties()
Returns
Type | Description |
---|---|
List<ILayerProperty> | A list of all layer properties present on this render element |
Overrides
GetBrokenHierarchy()
Returns a list containing all broken models, including self and any children
Declaration
public override IEnumerable<IBreakableModel> GetBrokenHierarchy()
Returns
Type | Description |
---|---|
IEnumerable<IBreakableModel> |
Overrides
OverrideTimelineAndApply(TimeSpan)
Overrides the main timeline to the specified time and clears any extra time lines
Declaration
public override void OverrideTimelineAndApply(TimeSpan position)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | position | The position to set the timeline to |
Overrides
RemoveChild(ProfileElement)
Removes a profile element from the Children collection
Declaration
public override void RemoveChild(ProfileElement child)
Parameters
Type | Name | Description |
---|---|---|
ProfileElement | child | The profile element to remove |
Overrides
Render(SKCanvas, SKPointI, ProfileElement?)
Renders the element
Declaration
public override void Render(SKCanvas canvas, SKPointI basePosition, ProfileElement? editorFocus)
Parameters
Type | Name | Description |
---|---|---|
SKCanvas | canvas | The canvas to render upon. |
SKPointI | basePosition | The base position to use to translate relative positions to absolute positions. |
ProfileElement | editorFocus | An optional element to focus on while rendering (other elements will not render). |
Overrides
Reset()
Resets the internal state of the element
Declaration
public override void Reset()
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Update(double)
Updates the element
Declaration
public override void Update(double deltaTime)
Parameters
Type | Name | Description |
---|---|---|
double | deltaTime |
Overrides
Events
RenderPropertiesUpdated
Occurs when a property affecting the rendering properties of this folder has been updated
Declaration
public event EventHandler? RenderPropertiesUpdated
Event Type
Type | Description |
---|---|
EventHandler |