enticeplugin

Plugins for Entice Designer

See readme.txt

struct EnticeFunctions;
Functions provided to the plugin by Entice Designer.

int id;
This plugin ID.

int more;
Reserved.

int(* showMsg)(int pluginid, char* msg, int msglen, int msgtype);
Show a message: int showMsg(int pluginid, char* msg, int msglen, int msgtype);

Params:
pluginid this plugin ID.
msg pointer to the message.
msglen length of bytes at msg.
msgtype one of SHOW_MSG_* constants.

int(* registerMenuItem)(int pluginid, char* name, int namelen, int menuid, int tomenuid, void(* callback)(EnticeFunctions * efuncs, int id));
Interface with menus: int registerMenuItem(int pluginid, char* name, int namelen, int menuid, int tomenuid, EnticeIdCallback callback);

Params:
pluginid this plugin ID.
name pointer to the name displayed on the menu item, or a single dash for a menu separator.
namelen length of bytes at name.
menuid menu ID unique to this plugin. Must be positive. May include menu options with eidOptions().
tomenuid the parent menu to add to, -1 to remove, or one of EMENU_* constants.
callback called back on click: menuCallback(EnticeFunctions* efuncs, int menuid);

Returns:
0 on failure.

int(* registerShortcut)(int pluginid, int keys, int shortcutid, void(* callback)(EnticeFunctions * efuncs, int id));
Interface with shortcut keys: int registerShortcut(int pluginid, int keys, int shortcutid, EnticeIdCallback callback);

Params:
pluginid this plugin ID.
keys key code.
shortcutid shortcut ID unique to this plugin. Must be positive.
callback called back upon user pressing the shortcut: shortcutCallback(EnticeFunctions* efuncs, int shortcutid);

Returns:
0 on failure.

int(* getFeature)(int pluginid, int featureid, void* getinfo, uint getinfosize);
Access a feature: int getFeature(int pluginid, int featureid, void* getinfo, size_t getinfosize);

Params:
pluginid this plugin ID.
featureid feature ID; one of EFID_* constants.
getinfo pointer to a buffer used by the feature, which may or may not be written to.
getinfosize number of bytes at getinfo for use by the feature.

Returns:
defined by the feature; typically 0 on failure.

const int SHOW_MSG_BOX;
const int SHOW_MSG_BOX_INFO;
const int SHOW_MSG_BOX_ERROR;
const int SHOW_MSG_BOX_CONFIRM;
const int SHOW_MSG_OUTPUT;
const int SHOW_MSG_INPUT;
How a message will be shown.

const int EMENU_DEFAULT;
const int EMENU_EDIT;
const int EMENU_SEARCH;
const int EMENU_PROJECT;
Preset menu IDs. The default is currently "Tools".

const int EFID_CONFIG;
getFeature, get configuration functions: getinfo is pointer to EF_Config; returns size of structure.

const int EFID_CURFILE;
getFeature, get current file name: getinfo is pointer to buffer; returns number of bytes the string occupies.

const int EFID_CMDEXEC;
getFeature, execute a command in a command window: getinfo is pointer to command string; returns 0 on failure.

const int EFID_EDITORGETSELTEXT;
getFeature, get editor selected text: getinfo is pointer to buffer; returns number of bytes the string occupies.

const int EFID_EDITORSETSELTEXT;
getFeature, replace editor selected text: getinfo is pointer to string; returns 0 on failure.

const int EFID_EXIT;
getFeature, exit the program; unsaved file confirmations are displaed as necessary.

const int EFID_CURTABTYPE;
getFeaure, get current tab type: returns one of ETAB_* or -1.

const int EFID_TABANDSTATE;
getFeature, get current tab type and state: returns one of ETAB_* combined with zero or more ESTATE_*, or -1.

const int EFID_EDITORGETSELPOS;
getFeature, get editor selection position: returns the selection starting position or -1 on failure.

const int EFID_EDITORGETSELRANGE;
getFeature, get editor selection range: getinfo is pointer to 2 ints, set with starting and ending positions; returns -1 on failure.

const int EFID_EDITORSETSELRANGE;
getFeature, set editor selection range: getinfo is pointer to 2 ints, used to set the starting and ending positions in the editor; returns 0 on failure.

const int EFID_FILEOPEN;
getFeature, open a file: getinfo is pointer to file name string; or getinfo is empty to open the open file dialog; returns 0 on failure.

const int EFID_FILENEW;
getFeature, new file: getinfo is empty for untitled; returns 0 on failure.

const int EFID_EDITORGOTO;
getFeature, go to a line: getinfo is pointer to uint, used to set the 1-based line number, or getinfo is empty to open the go to line dialog; returns 0 on failure.

const int EFID_FINDTAB;
getFeature, find a tab by type, state and name: getinfo is pointer to EF_FindTab; returns 0-based index, or -1 if not found.

const int EFID_FILESAVE;
getFeature, save a file: getinfo is a pointer to integer containing 0-based tab index, or empty for current tab; returns 0 on failure, 1 if saved, or one of the 'save as' returns.

const int EFID_FILESAVEAS;
getFeature, save a file using 'save as' dialog: getinfo is a pointer to integer containing 0-based tab index, or empty for current tab; returns 0 on failure, 2 if saved-as, or -2 if canceled by user.

const int EFID_SWITCHTOTAB;
getFeature, switch to a tab: getinfo is a pointer to integer containing 0-based tab index; returns 0 on failure.

const int EFID_SENDEDITOR;
getFeature, send a message to the current tab's editor.

const int EFID_CMDEXECNOPAUSE;
getFeature, same as EFID_CMDEXEC but does not wait for the user to press a key.

const int EFID_MAINWINDOW;
getFeature, get window handle of main program.

const int ETAB_NONE;
const int ETAB_EDITOR;
const int ETAB_DESIGN;
Tab types.

const int ESTATE_NONE;
const int ESTATE_SELECTION;
const int ESTATE_MODIFIED;
const int ESTATE_NOTMODIFIED;
const int ESTATE_FILE;
The state of the program: if there is a selection in the tab; the file is modified; the tab represents a file.

int eidOptions(int id, int options);
Allows ETAB_* and ESTATE_* options to be specified for an ID when registering. The id must be positive and less than 65536. The options determine when the registered item is enabled or disabled. Only supported by Entice Designer version 0.8.3 and above.

const int EF_CONFIG_PLUGIN;
const int EF_CONFIG_CURDIR;


struct EF_Config;


int(* getConfig)(int pluginid, int configtype, char* name, int namelen, char* value, int valuelen);


int(* setConfig)(int pluginid, int configtype, char* name, int namelen, char* value, int valuelen);


struct EF_FindTab;


int type;
Tab type: one or more ETAB_* to find any of these tab types, or -1 to match with any.

int state;
Tab type: ESTATE_* specifying all the state flags that must be present in the found tab.

char* name;
Name of tab, or null to match with any name. Case-insensitive comparison. If it starts with *, leading characters are ignored; if it ends with *, trailing characters are ignored.

int namelen;
Length of name.

struct EnticePluginInfo;


const ubyte MAJOR_VERSION;
const ubyte MINOR_VERSION;


const uint EPF_LOADING;
EnticePluginInfo flag: Entice Designer is starting up.

const uint EPF_DESC;
EnticePluginInfo flag: Supports the desc (description) member of EnticePluginInfo.

const uint EPF_PLUGIN_DEFAULT;
EnticePluginInfo flag: A plugin sets this if it only provides default features that can be overridden.

const uint EPF_PLUGIN_PROJECT_COMPILE;
EnticePluginInfo flag: A plugin sets this if it manages compiling projects.

const uint EPF_PLUGIN_PROJECT_LIST;
EnticePluginInfo flag: A plugin sets this if it manages project file listings.

const uint EPF_PLUGIN_CODECOMPLETION;
EnticePluginInfo flag: A plugin sets this if it provides code autocompletion.

HANDLE pluginInstance;
The win32 instance handle of the plugin DLL.


Page generated by Ddoc.