////////////////////////////////////////////////////////////////////////////////
// CM2EditorSupportInterface.pas
// -----------------------------
// This unit contains the interfaces for editor support.
//
// Last Edit: June, 20th 2006
// Certified: NA
//
// This unit is coded in : Delphi 7
//
// Unit is copyright (c) 2004 - 2006, The CoolMon Project
////////////////////////////////////////////////////////////////////////////////
//
// NOTE:
//  This unit will allow you to ease the work for the user when setting up
//  your plugin in the editor (Outlaw Ed).
//  Such as Object inspector support and adding menu items to the plugin objects
//  You should use ICM2EditorSupport20 (For general plugins) and
//  ICM2EditorSupportVis20 (for visual plugins). The 10 versions are for the old
//  editor and are outdated.
//
////////////////////////////////////////////////////////////////////////////////
unit CM2EditorSupportInterface;

interface

Type
 ICM2EditorSupport10 = Interface
  ['{A8C505F5-6812-4EB8-9319-71A3B9DC6E2F}']
  Function ShowSensor(Index: Integer; OUT ShowAt: Byte): HResult; stdcall;
  Function ObjIns(SensorIndex: Integer; ParameterName: PChar; OUT ValueType: Byte; OUT ValueRange: PChar): HResult; stdcall;
 End;
 ICM2EditorSupport20 = Interface {RCV Min 0.8.0.0}
  ['{EF00F780-B86D-4037-B194-7C05B33C6F0D}']
  Function ObjIns(SensorIndex: Integer; ParameterName: PChar; OUT ValueType: Byte; OUT ValueRange: PChar): HResult; stdcall;
  Function OnEditor(SensorIndex: Integer; ParameterName: PChar; FullParameterValues: PChar; OUT Value: PChar): HResult; stdcall;
  Function GetMenuCount(SensorIndex: Integer; OUT MenuCount: Byte): HResult; stdcall;
  Function GetMenuItem(SensorIndex: Integer; Index: Byte; OUT MenuTitle: PChar; OUT MenuHint: PChar): HResult; stdcall;
  Function OnMenu(SensorIndex: Integer; Index: Byte; OUT ResultString: PChar): HResult; stdcall;
  Function ShowSensor(Index: Integer; OUT ShowAt: Byte): HResult; stdcall;
 end;
 ICM2EditorSupportVis10 = Interface
  ['{7A17F3E7-64F5-43AB-BF77-B4278D74653B}']
  Function ObjIns(ParameterName: PChar; OUT ValueType: Byte; OUT ValueRange: PChar): HResult; stdcall;
 End;
 ICM2EditorSupportVis20 = Interface
  ['{E6E6880F-5779-4205-91AB-1D247F551944}'] {RCV Min 0.8.0.0}
  Function ObjIns(ParameterName: PChar; OUT ValueType: Byte; OUT ValueRange: PChar): HResult; stdcall;
  Function OnEditor(ParameterName: PChar; FullParameterValues: PChar; OUT Value: PChar): HResult; stdcall;
  Function GetMenuCount(OUT MenuCount: Byte): HResult; stdcall;
  Function GetMenuItem(Index: Byte; OUT MenuTitle: PChar; OUT MenuHint: PChar): HResult; stdcall;
  Function OnMenu(Index: Byte; OUT ResultString: PChar): HResult; stdcall;
 end;

Const
 // ShowAt
 saDesignTime = 0;
 saRuntimeOnly = 1;
 // ValueType
 vtUnknown = 0; // ValueRange = '';
 vtFixed = 1; // ValueRange = 'fixedItem|...|...|...|...';
 vtRange = 2; // ValueRange = 'Min|Max';
 vtColor = 3; // ValueRange = ''; // Value must be able to be converted to TColor
 vtFont = 4; // Valuerange = ''; // Editor will display a dropdown box of installed fonts
 vtFile = 5; // Valuerange = 'jpg|bmp|gif|txt'; // "|" seperated supported files list
 vtFontEx = 6; // ValueRange = '';
 vtEditor = 7; // ValueRange = '';

implementation

end.
 