Provides a base class for all clip plugins to inherit. Provides the functionality required to be a clip within Screen Monkey. The class you create from ClipMediaBase will be the main clip plugin and provide most of the functionality to display your media on the screen.

Namespace:  ScreenMonkey.Clips
Assembly:  ScreenMonkey.Clips (in ScreenMonkey.Clips.dll) Version: 3.2.0.0 (3.3.1.4)

Syntax

C#
public abstract class ClipMediaBase : IStandardRenderableClip
Visual Basic (Declaration)
Public MustInherit Class ClipMediaBase _
	Implements IStandardRenderableClip
Visual C++
public ref class ClipMediaBase abstract : IStandardRenderableClip

Remarks

When creating a new clip plugin, this is the main base class you should inherit from and produce your own implementation. The methods within this class are the minimum for a clip to be used within Screen Monkey. Before your clip can be used within Screen Monkey you must also create a class that inherits from ClipMediaProducerBase. You need to override the Create()()() method and return a new instance your clip which derives from ClipMediaBase. You also need to return the fully qualified type name in ClipMediaType.

Examples

This example shows you the absolute minimum to get your new clip plugin working in Screen Monkey. You first need to create a clip class which is the center of your new plugin. This needs to inherit from ClipMediaBase.
CopyC#
public class YourClip : ClipMediaBase
{
   private Label mainOutput = null;

   public override string TypeName
   {
       get { "Your Clip"; }
   }

   public override string Caption
   {
       get { return "This will be shown as my legend"; }
   }

   public override string Description
   {
       get { return "Gives a description of what this clip does. Displays 'Hello World' on the screen."; }
   }

   protected override void OnInitialiseShow()
   {
       mainOutput = new Label();
       mainOutput.Text = "Hello World";
   }

   public override void StopShow()
   {
       mainOutput = null;
   }

   public override Control MainOutput
   {
       get
       {
           return mainOutput;
       }
   }
}
We also need the create a producer class that inherits from ClipMediaProducerBase to create an instance of our new clip.
CopyC#
public class YourClipProducer : ClipMediaProducerBase
{

   public override string Name
   {
       get { return "Your Clip"; }
   }

   public override string Caption
   {
       get { return "Your Clip"; }
   }

   public override string Description
   {
       get { return "Gives a description of what this clip does. Displays 'Hello World' on the screen."; }
   }

   public override string ClipMediaType
   {
       get { return typeof(YourClip).FullName; }
   }

   public override ClipMediaBase Create()
   {
       YourClip newClip = new YourClip();
       return newClip;
   }
}
When you play the clip you should see 'Hello World' appear on the screen.

Inheritance Hierarchy

System..::.Object
  ScreenMonkey.Clips..::.ClipMediaBase

See Also