User Tools

Site Tools


en:app:photovision:plugins2x

PhotoVision 2+ Plugins

Plugins is an extension to use third party app from PhotoVision.

Basic Configuration

Plugins\[plugin_name].ini

All settings is stored in PhotoVision global config file

Example: MSPaint.ini

{File}     - selected file 
[Config]
;Plugin Name on PhotoVision plugins list
DisplayName=Microsoft Paint
;Name without extension
InternalName=MsPaint
;for future use
SupportedFiles=.BMP,.DIB,.JPG,.JPEG,.JPE,.JFIF,.GIF,.TIF,.TIFF,.PNG,.ICO,.HEIC,.WEBP
;0 - none, 
;1 - pascal script
;2 - python [not implemented, for future use] 
;3 - exe    [not implemented, for future use]
GUI=1
GUI_File=MSPaint.pas
;  	open with
;	hdr [not implemented, for future use]
;	batch
;     command bar
EngineType=1,0,0,1

;Open with dialog Window, file menu
[OpenWith]
1_Caption=Microsoft Paint
;2_Caption=Microsoft Paint
;3_Caption=Microsoft Paint
;4_Caption=Microsoft Paint
;5_Caption=Microsoft Paint
1_Exec=mspaint.exe
;2_Exec=mspaint.exe
;3_Exec=mspaint.exe
;4_Exec=mspaint.exe
;5_Exec=mspaint.exe
1_Params={FileName}
;5_Params=
 
[CommandBar]
1_Caption=Paint (mspaint.exe)
1_Exec=mspaint.exe
1_UseCMD=0

;See Translation section on PhotoVision documentation
[Translation_PLK]
;Path
ID_000=Ścieżka
;Version
ID_001=Wersja:
;Find
ID_002=Znajdź

Pascal Script UI

PascalScript functions and constants:

//Constants
CfgFile // Path to PhotoVision configuration file
CfgDir  // Path to configuration file directory
ExifToolPath // Path to ExifTool
CfgPanel     
 
//Dialogs
procedure ShowMessage(const aMsg:string);
 
//Strings
function StrReplace(const S:string; Const OldPattern:string; const NewPattern:string) :string;
function AnsiContainsStr(const AText: string;const ASubText: string ):Boolean;
 
//Plugin GUI
procedure PVP_SetTitle(ACaption: string);
function PVP_CreateGroupBox(ACaption, AName: string; ATop, ALeft, AWidth, AHeight: Integer; AParent: TWinControl):TWinControl;
function PVP_CreateLabel(ACaption: string; ATop, ALeft: Integer; AParent: TWinControl):TLabel;
procedure PVP_CreateButton(ACaption: string;AId: Integer;  AFlat: Boolean; ATop, ALeft, AWidth, AHeight: Integer; AParent: TWinControl);
 
//INI functions
function GetIniString(const Section, Key, Default, Filename: String): String;
procedure SetIniString(const Section, Key, Value, Filename: String);
function GetIniInt(const Section, Key: String; const Default: Integer; const Filename: String): Integer;
SetIniInt(const Section, Key: String; const Value: Integer; const Filename: String);
function GetIniBool(const Section, Key: string; const Default: boolean; const Filename: String): boolean; 
 
//Registry
function RegQueryStringValue(const RootKey: cardinal; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;
function RegQueryStringValueSearchKey(const RootKey: cardinal; const SubKeyName, KeyToSearch,  ValueName: String; var ResultStr: String): Boolean;
 
 
//File
function FileExists(const FileName: string):boolean;
function ExtractFilePath ( const FullFileName : String ) : String;
function GetAppDirectory():String;
//File Win32/64
function GetFileVersion(const FileName: string): String;
function GetSystemFolder:string;  
 
//UI
function TranslatePluginUI(const default_text:string;const id: string;const TranslateFile: String):string;
function SetScaledSize(AValue:integer):integer;
en/app/photovision/plugins2x.txt · Last modified: 2024/01/10 18:01 by sgj

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki