Beispiel #1
0
bool FMEDITAPI Destroy( OBJPTR obj, bool first )
/**********************************************/
{
    /* destroy the object */
    ObjectDestroyed( obj );
    return( OBJ_DISPATCHER( obj )( DESTROY, obj, &first, NULL ) );
}
Beispiel #2
0
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 ) );
}
Beispiel #3
0
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 );
}
Beispiel #4
0
bool RequestScrollRect( RECT *r )
/*******************************/
{
    OBJPTR      obj;

    obj = GetMainObject();
    return( OBJ_DISPATCHER( obj )( GET_SCROLL_RECT, obj, r, NULL ) );
}
Beispiel #5
0
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 ) );
}
Beispiel #6
0
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 ) );
}
Beispiel #7
0
void FMEDITAPI ShowSelectBoxes( void )
{
    OBJPTR      currobj;
    bool        show;

    currobj = GetCurrObj();
    show = true;
    OBJ_DISPATCHER( currobj )( SHOW_SEL_BOXES, currobj, &show, NULL );
}
Beispiel #8
0
bool FMEDITAPI FindObjectsPt( POINT pt, LIST **list )
/***************************************************/
{
    OBJPTR      obj;

    obj = GetMainObject();
    *list = NULL;
    return( OBJ_DISPATCHER( obj )( FIND_OBJECTS_PT, obj, &pt, list ) );
}
Beispiel #9
0
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 );
}
Beispiel #10
0
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 );
}
Beispiel #11
0
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 );
}
Beispiel #12
0
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 );
}
Beispiel #13
0
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 );
}
Beispiel #14
0
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 );
}
Beispiel #15
0
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 );
}
Beispiel #16
0
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 );
}
Beispiel #17
0
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 );
}
Beispiel #18
0
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 );
    }
}
Beispiel #19
0
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 );
}
Beispiel #20
0
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 );
    }
}
Beispiel #21
0
bool FMEDITAPI PasteObject( OBJPTR obj, OBJPTR parent, POINT pt )
/***************************************************************/
{
    /* Paste object obj with parent parent */
    return( OBJ_DISPATCHER( obj )( PASTE, obj, parent, &pt ) );
}
Beispiel #22
0
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 ) );
}
Beispiel #23
0
bool GetAnchor( OBJPTR obj, POINT *p )
/************************************/
{
    return( OBJ_DISPATCHER( obj )( GET_ANCHOR, obj, p, NULL ) );
}
Beispiel #24
0
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 ) );
}
Beispiel #25
0
bool FMEDITAPI GetPriority( OBJPTR obj, int *pri )
/************************************************/
{
    return( OBJ_DISPATCHER( obj )( GET_PRIORITY, obj, pri, NULL ) );
}
Beispiel #26
0
void RemoveFromParent( OBJPTR obj )
/*********************************/
{
    OBJ_DISPATCHER( obj )( REMOVE_FROM_PARENT, obj, NULL, NULL );
}
Beispiel #27
0
void UndoMove( OBJPTR obj )
/*************************/
{
    OBJ_DISPATCHER( obj )( UNDO_MOVE, obj, NULL, NULL );
}
Beispiel #28
0
bool FMEDITAPI GetObjectParent( OBJPTR obj, OBJPTR *parent )
/**********************************************************/
{
    return( OBJ_DISPATCHER( obj )( GET_PARENT, obj, parent, NULL ) );
}
Beispiel #29
0
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 ) );
}
Beispiel #30
0
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 ) );
}