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;


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.
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;
Preset parent menu IDs.

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 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 current tab; the current file is modified; the current 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 EnticePluginInfo;


const ubyte MAJOR_VERSION;
const ubyte MINOR_VERSION;



Page generated by Ddoc.