Interface IContentPlugInMetadata
Provides metadata for a plugin.
Namespace: Gorgon.Editor.PlugIns
Assembly: Gorgon.Editor.API.dll
Syntax
public interface IContentPlugInMetadata
Properties
| Edit this page View SourceCanCreateContent
Property to return whether content creation is possible.
Declaration
bool CanCreateContent { get; }
Property Value
Type | Description |
---|---|
bool |
ContentType
Property to return the friendly (i.e shown on the UI) name for the type of content.
Declaration
string ContentType { get; }
Property Value
Type | Description |
---|---|
string |
ContentTypeID
Property to return the ID for the type of content produced by this plug in.
Declaration
string ContentTypeID { get; }
Property Value
Type | Description |
---|---|
string |
Description
Property to return the user friendly description of the plug in.
Declaration
string Description { get; }
Property Value
Type | Description |
---|---|
string |
NewIconID
Property to return the ID of the new icon for this plug in.
Declaration
Guid NewIconID { get; }
Property Value
Type | Description |
---|---|
Guid |
PlugInName
Property to return the name of the plug in.
Declaration
string PlugInName { get; }
Property Value
Type | Description |
---|---|
string |
SmallIconID
Property to return the ID of the small icon for this plug in.
Declaration
Guid SmallIconID { get; }
Property Value
Type | Description |
---|---|
Guid |
Methods
| Edit this page View SourceCanOpenContent(string)
Function to determine if the content plugin can open the specified file.
Declaration
bool CanOpenContent(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path to the file to evaluate. |
Returns
Type | Description |
---|---|
bool | true if the plugin can open the file, or false if not. |
CanOpenInPlace(IContentFile, IEditorContent)
Function to determine if a file can be opened in place, instead of closing and reopening the content document.
Declaration
bool CanOpenInPlace(IContentFile file, IEditorContent currentContent)
Parameters
Type | Name | Description |
---|---|---|
IContentFile | file | The file containing the content to evaluate. |
IEditorContent | currentContent | The currently loaded content. |
Returns
Type | Description |
---|---|
bool | true if it can be opened in-place, false if not. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
GetNewIcon()
Function to retrieve the icon used for new content creation.
Declaration
Image GetNewIcon()
Returns
Type | Description |
---|---|
Image | An image for the icon. |
Remarks
This method is never called when CanCreateContent is false.
GetSmallIcon()
Function to retrieve the small icon for the content plug in.
Declaration
Image GetSmallIcon()
Returns
Type | Description |
---|---|
Image | An image for the small icon. |
GetThumbnailAsync(IContentFile, string, CancellationToken)
Function to retrieve a thumbnail for the content.
Declaration
Task<IGorgonImage> GetThumbnailAsync(IContentFile contentFile, string filePath, CancellationToken cancelToken)
Parameters
Type | Name | Description |
---|---|---|
IContentFile | contentFile | The content file used to retrieve the data to build the thumbnail with. |
string | filePath | The path to the thumbnail file to write. |
CancellationToken | cancelToken | The token used to cancel the thumbnail generation. |
Returns
Type | Description |
---|---|
Task<IGorgonImage> | A IGorgonImage containing the thumbnail image data. |