home *** CD-ROM | disk | FTP | other *** search
- /*
- Vdraft plugin support file - vplugin.h
- (C) Copyright 1997 by SoftSource. All rights reserved.
- Scott Sherman 1-97...
-
- A Vdraft plugin must export vfLoad.
- This file contains definitions of event information
- and prototypes for plugin functions that Vdraft can call.
- */
-
- #ifndef VPLUGIN_HPP
- #define VPLUGIN_HPP
-
- /*********************************/
- /* specific Vdraft plugin events */
-
- /* IPickEvents */
- enum vePickEvent
- {
- vePE_Point, /* a point has been picked */
- vePE_Cancel, /* pick was aborted */
- vePE_Done, /* Done chosen from popup */
- vePE_Properties, /* Properties chosen from popup */
- vePE_Undo, /* Undo chosen from popup */
- };
-
- /* IPickEvents */
- enum veDrawEvent
- {
- veDE_Done, /* drawing is completely done */
- veDE_Cancel, /* drawing has been aborted */
- veDE_Pick /* a point has been picked */
- };
-
- /* ISelectionEvents */
- enum veSelectEvent
- {
- veSE_Done, /* the user is done selecting objects */
- veSE_Cancel /* the user aborted the selection process */
- };
-
- /* the add-on id is a unique identifier created at run-time
- it should be passed to Vdraft when requesting events
- it is passed back to the plugin
- */
- typedef long vtAddOnID;
-
-
- /**************************************/
- /* Return values for plugin functions */
- enum veReturn
- {
- veR_OK, /* return to continue */
- veR_Unload, /* return if the plugin should be unloaded immediately */
- veR_DontUnload = veR_OK
- };
-
-
- /***************************/
- /* Vdraft plugin functions */
-
- /* vfLoad is the only function that is required to exist for the plugin to be loaded
- it is called when the plugin is first loaded - good time to add commands to Vdraft
- */
- veReturn vfLoad(vtAddOnID id);
-
- /* Vdraft is going to end - plugin should return veR_Unload if it isn't busy */
- veReturn vfQueryUnload(vtAddOnID id);
-
- /* Vdraft is ending - plugin should do final cleanup */
- veReturn vfUnload(vtAddOnID id);
-
- /* IApplicationEvents */
- /* the user has selected a plugin-defined command */
- veReturn vfCommand(vtAddOnID id, long eventid);
-
- /* IPickEvents::RequestPick */
- /* the user has picked a point or done something related to picking a point */
- veReturn vfPickEvent(vtAddOnID id, vePickEvent event, double* point, long info);
-
- /* IPickEvents::RequestDraw */
- /* the user has generated an event related to drawing an object */
- veReturn vfDrawEvent(vtAddOnID id, veDrawEvent event, double* point, short picknumber, long info);
-
- /* ISelectionEvents::RequestSelect or RequestSingleSelect */
- /* the user has finished selecting objects */
- veReturn vfSelectEvent(vtAddOnID id, veSelectEvent event, long info);
-
- /* the user has asked for help on something provided by the plugin */
- veReturn vfHelpEvent(vtAddOnID id, long helptoken);
-
- #endif /* VPLUGIN_HPP */
-