bool FMEDITAPI Destroy( OBJPTR obj, bool first ) /**********************************************/ { /* destroy the object */ ObjectDestroyed( obj ); return( OBJ_DISPATCHER( obj )( DESTROY, obj, &first, NULL ) ); }
bool DeleteCurrItem( OBJPTR obj ) /*******************************/ { /* Delete the current item obj. That is, destroy the current object window * but don't destroy the object associated with that current object */ return( OBJ_DISPATCHER( obj )( DELETE_OBJECT, obj, NULL, NULL ) ); }
bool FMEDITAPI ResizeIncrements( OBJPTR obj, POINT *pt ) /******************************************************/ { if( ValidateAction( obj, GET_RESIZE_INC, pt ) ) { return( OBJ_DISPATCHER( obj )( GET_RESIZE_INC, obj, pt, NULL ) ); } return( false ); }
bool RequestScrollRect( RECT *r ) /*******************************/ { OBJPTR obj; obj = GetMainObject(); return( OBJ_DISPATCHER( obj )( GET_SCROLL_RECT, obj, r, NULL ) ); }
bool FMEDITAPI FindObjList( OBJPTR obj, SUBOBJ_REQUEST *req, LIST **lst ) /***********************************************************************/ { /* Find the list of objects within the parent object contained within the * passed rect. */ return( OBJ_DISPATCHER( obj )( FIND_SUBOBJECTS, obj, req, lst ) ); }
bool FMEDITAPI Define( OBJPTR obj, POINT *pt, void *init ) /********************************************************/ { /* define the characeristics of the object */ SetState( EDITING ); SetBaseState( EDITING ); return( OBJ_DISPATCHER( obj )( DEFINE, obj, pt, init ) ); }
void FMEDITAPI ShowSelectBoxes( void ) { OBJPTR currobj; bool show; currobj = GetCurrObj(); show = true; OBJ_DISPATCHER( currobj )( SHOW_SEL_BOXES, currobj, &show, NULL ); }
bool FMEDITAPI FindObjectsPt( POINT pt, LIST **list ) /***************************************************/ { OBJPTR obj; obj = GetMainObject(); *list = NULL; return( OBJ_DISPATCHER( obj )( FIND_OBJECTS_PT, obj, &pt, list ) ); }
OBJPTR GetObjptr( OBJPTR obj ) /****************************/ { /* Get a pointer to the object associated with the current object obj */ OBJPTR newobj; newobj = NULL; OBJ_DISPATCHER( obj )( GET_OBJPTR, obj, &newobj, NULL ); return( newobj ); }
void SetCurrObject( OBJPTR obj ) /******************************/ { /* make obj the only current object */ bool reset; OBJPTR currobj; reset = true; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( ADD_OBJECT, currobj, obj, &reset ); }
OBJPTR GetNextEditCurrObject( OBJPTR obj ) /****************************************/ { /* return pointer to the next current object in the list, after obj */ OBJPTR newobj; OBJPTR currobj; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( GET_OBJECT, currobj, &newobj, obj ); return( newobj ); }
OBJPTR GetEditCurrObject( void ) /******************************/ { /* return pointer to the current object */ OBJPTR obj; OBJPTR currobj; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( GET_OBJECT, currobj, &obj, NULL ); return( obj ); }
bool IsMarkValid( OBJPTR obj ) /****************************/ { bool isvalid; isvalid = true; if( ValidateAction( obj, IS_MARK_VALID, NULL ) ) { OBJ_DISPATCHER( obj )( IS_MARK_VALID, obj, &isvalid, NULL ); } return( isvalid ); }
void DeleteCurrObject( OBJPTR obj ) /*********************************/ { /* remove obj from the list of current objects */ OBJPTR currobj; bool curritem; curritem = true; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( DELETE_OBJECT, currobj, obj, &curritem ); }
void SetPrimaryObject( OBJPTR obj ) /*********************************/ { /* return a pointer to the primary object */ OBJPTR currobj; bool flag; currobj = GetCurrObj(); flag = false; OBJ_DISPATCHER( currobj )( GET_PRIMARY, currobj, &obj, &flag ); }
OBJPTR GetPrimaryObject( void ) /*****************************/ { /* return a pointer to the primary object */ OBJPTR primary; OBJPTR currobj; bool flag; currobj = GetCurrObj(); flag = true; OBJ_DISPATCHER( currobj )( GET_PRIMARY, currobj, &primary, &flag ); return( primary ); }
OBJPTR FMEDITAPI GetCurrObject( void ) /************************************/ { /* return pointer to the current object */ OBJPTR obj; OBJPTR userobj; obj = GetPrimaryObject(); userobj = NULL; if( obj != NULL ) { OBJ_DISPATCHER( obj )( GET_OBJPTR, obj, &userobj, NULL ); } return( userobj ); }
void DeleteCurrObjptr( OBJPTR obj ) /*********************************/ { /* Delete the current object associated with obj from the list of current * objects */ OBJPTR currobj; bool curritem; curritem = false; currobj = GetCurrObj(); if( currobj != NULL ) { OBJ_DISPATCHER( currobj )( DELETE_OBJECT, currobj, obj, &curritem ); } }
LIST *FMEDITAPI GetCurrObjectList( void ) /***************************************/ { /* return pointer to the current object */ OBJPTR currobj; OBJPTR userobj; LIST *objlist; objlist = NULL; for( currobj = GetEditCurrObject(); currobj != NULL; currobj = GetNextEditCurrObject( currobj ) ) { userobj = NULL; OBJ_DISPATCHER( currobj )( GET_OBJPTR, currobj, &userobj, NULL ); if( userobj != NULL ) { ListAddElt( &objlist, userobj ); } } return( objlist ); }
void AddCurrObject( OBJPTR obj ) /******************************/ { /* add obj to the list of current objects */ bool reset; OBJPTR currobj; OBJPTR main_currobj; reset = false; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( ADD_OBJECT, currobj, obj, &reset ); /* if the main object is in the list, remove it */ /* so the main object can't be part of a multiple selection */ main_currobj = GetCurrObjptr( GetMainObject() ); if( main_currobj != NULL ) { DeleteCurrObject( main_currobj ); } }
bool FMEDITAPI PasteObject( OBJPTR obj, OBJPTR parent, POINT pt ) /***************************************************************/ { /* Paste object obj with parent parent */ return( OBJ_DISPATCHER( obj )( PASTE, obj, parent, &pt ) ); }
bool FMEDITAPI ValidateAction( OBJPTR obj, ACTION_ID id, void *p2 ) /*****************************************************************/ { /* find out if action id is valid for object obj */ return( OBJ_DISPATCHER( obj )( VALIDATE_ACTION, obj, &id, p2 ) ); }
bool GetAnchor( OBJPTR obj, POINT *p ) /************************************/ { return( OBJ_DISPATCHER( obj )( GET_ANCHOR, obj, p, NULL ) ); }
bool FMEDITAPI GetResizeInfo( OBJPTR obj, RESIZE_ID *info ) /*********************************************************/ { /* Get information about what types of resizing are valid for the object */ return( OBJ_DISPATCHER( obj )( RESIZE_INFO, obj, info, NULL ) ); }
bool FMEDITAPI GetPriority( OBJPTR obj, int *pri ) /************************************************/ { return( OBJ_DISPATCHER( obj )( GET_PRIORITY, obj, pri, NULL ) ); }
void RemoveFromParent( OBJPTR obj ) /*********************************/ { OBJ_DISPATCHER( obj )( REMOVE_FROM_PARENT, obj, NULL, NULL ); }
void UndoMove( OBJPTR obj ) /*************************/ { OBJ_DISPATCHER( obj )( UNDO_MOVE, obj, NULL, NULL ); }
bool FMEDITAPI GetObjectParent( OBJPTR obj, OBJPTR *parent ) /**********************************************************/ { return( OBJ_DISPATCHER( obj )( GET_PARENT, obj, parent, NULL ) ); }
bool FMEDITAPI CutObject( OBJPTR obj, OBJPTR *copy ) /**************************************************/ { /* Ask the application to cut obj and supply a copy of obj at address copy */ return( OBJ_DISPATCHER( obj )( CUT, obj, copy, NULL ) ); }
bool FMEDITAPI CopyObject( OBJPTR obj, OBJPTR *copy, OBJPTR handle ) /******************************************************************/ { /* Ask the application to supply a copy of obj at address copy */ return( OBJ_DISPATCHER( obj )( COPY, obj, copy, handle ) ); }