procedure RemovePlugins;
Clears internal plugins list.
|
function AddPlugin(const AFilename: TWlxFilename; const ADetectStr: string): Boolean;
Adds plugin record (file name and detect-string) to internal plugins list.
Result is True if record was added.
Notes:
|
function GetPlugin(AIndex: word; var AFilename: TWlxFilename; var ADetectStr: string): Boolean;
Returns plugin record (file name and detect-string) from internal list.
Result is True if record with index AIndex exists and was returned.
Note:
- To get all plugin records, call this function in cycle with AIndex := 1 to WlxPluginsMaxCount,
until it returns False.
|
procedure InitPluginsParams(AParent: TWinControl; const AIniFilename: string);
Initializes plugins' parent control and path to default .ini file.
Must be called before first Open / OpenFolder methods call.
Notes:
- AParent may be any windowed control, it will be used by plugins as their "parent", they will send
some messages to this parent. You may set this parent to ATViewer object
or other Panel object, but it's not quite recommended because some (not all) plugins prefer
that parent is Form object. For example: xBaseView plugin modifies its parent's main menu, and Imagine/SynPlus
plugins modify their parent's caption. Additionally, Form object is preferred because in the case you are
going to create fully-functional Viewer that can get current position in percents,
you need to handle some messages that plugins are sending to the parent,
and redirect them back to plugins (see PluginsSendMessage method).
- If AParent is Form object, it must have the correct OnResize event handler,
which is automatically called after plugin window displaying.
In that handler you must call ResizeActivePlugin method to reposition plugin window.
|
procedure ResizeActivePlugin(const Rect: TRect);
Resizes the active plugin's window to a given rectangle.
Note:
- It must be called in OnResize event handler of your form or parent control.
|
procedure PluginsSendMessage(const AMessage: TMessage);
Sends plugin-related message to ATViewer object.
Note:
|