Gorgon
Show / Hide Table of Contents

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 Source

CanCreateContent

Property to return whether content creation is possible.

Declaration
bool CanCreateContent { get; }
Property Value
Type Description
bool
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

Description

Property to return the user friendly description of the plug in.

Declaration
string Description { get; }
Property Value
Type Description
string
| Edit this page View Source

NewIconID

Property to return the ID of the new icon for this plug in.

Declaration
Guid NewIconID { get; }
Property Value
Type Description
Guid
| Edit this page View Source

PlugInName

Property to return the name of the plug in.

Declaration
string PlugInName { get; }
Property Value
Type Description
string
| Edit this page View Source

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 Source

CanOpenContent(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.

| Edit this page View Source

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 file parameter is null.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author