unit uMessages;
{$INCLUDE 'FarCtags.inc'}

interface

type
  TMessages = (
    MNoLngStringDefined = -1,
    // MTitle: Plugin title
    MTitle = 0,
    // Buttons
    MOk,
    MCancel,
    MYes,
    MNo,
    //
    MExceptionOccurredIn,
    //
    MSavingFile,
    MFailedToSaveFile,
    MLoadingCtags,
    MFailedToRunCtags,
    MCtagsFailed,
    MResultCode,
    //
    MFunctionListDescription,
    // Options
    MCtagsFileName,
    MFunctionSearchDelayEnabled,
    MFunctionSearchDelayMilliseconds,
    // These must be at the end!! They are not expected to be translated
    MDummyLastLngString
  );

function GetMsg(ID: TMessages): string;

implementation

uses
  {$INCLUDE 'DelphiFarUnits.inc'} ;

function GetMsg(ID: TMessages): string;
begin
  if ID = MNoLngStringDefined then
    Result := ''
  else
    Result := TFarPlugin.Instance.GetLangString(TIntPtr(ID));
end;

end.
