Exemple #1
0
WAccelInfo *WAccelGetEInfo( WAccelHandle hndl, bool keep )
{
    WAccelEditInfo  *einfo;
    WAccelInfo      *info;
    bool            ok;

    info = NULL;

    einfo = (WAccelEditInfo *)WGetEditSessionInfo( hndl );

    ok = (einfo != NULL);

    if( ok ) {
        info = einfo->info;
        ok = (info != NULL);
    }

    if( ok ) {
        if( einfo->info->modified ) {
            if( info->data != NULL ) {
                WRMemFree( info->data );
            }
            info->data = NULL;
            info->data_size = 0;
            WMakeDataFromAccelTable( einfo->tbl, &info->data, &info->data_size );
        }
        if( !keep ) {
            WUnRegisterEditSession( hndl );
            WFreeAccelEInfo( einfo );
        }
    }

    return( info );
}
Exemple #2
0
WMenuInfo *WMenuGetEInfo( WMenuHandle hndl, Bool keep )
{
    WMenuEditInfo   *einfo;
    WMenuInfo       *info;
    int             ok;

    info = NULL;

    einfo = (WMenuEditInfo *)WGetEditSessionInfo( hndl );

    ok = (einfo != NULL);

    if( ok ) {
        info = einfo->info;
        ok = (info != NULL);
    }

    if( ok ) {
        if( einfo->info->modified ) {
            if( info->data != NULL ) {
                WMemFree( info->data );
                info->data = NULL;
            }
            info->data_size = 0;
            WMakeDataFromMenu( einfo->menu, &info->data, &info->data_size );
        }
        if( !keep ) {
            WUnRegisterEditSession( hndl );
            WFreeMenuEInfo( einfo );
        }
    }

    return( info );
}
Exemple #3
0
WStringInfo *WStringGetEInfo( WStringHandle hndl, bool keep )
{
    WStringEditInfo     *einfo;
    WStringInfo         *info;
    bool                ok;

    info = NULL;

    einfo = (WStringEditInfo *)WGetEditSessionInfo( hndl );

    ok = (einfo != NULL);

    if( ok ) {
        info = einfo->info;
        ok = (info != NULL);
    }

    if( ok ) {
        if( einfo->info->modified ) {
            WFreeStringNodes( info );
            info->tables = WMakeStringNodes( einfo->tbl );
        }
        if( !keep ) {
            WUnRegisterEditSession( hndl );
            WFreeStringEInfo( einfo );
        }
    }

    return( info );
}
Exemple #4
0
int WRESEAPI WMenuIsModified( WMenuHandle hndl )
{
    WMenuEditInfo *einfo;

    einfo = (WMenuEditInfo *)WGetEditSessionInfo( hndl );

    return( einfo->info->modified );
}
Exemple #5
0
int WRESEAPI WStringIsModified( WStringHandle hndl )
{
    WStringEditInfo *einfo;

    einfo = (WStringEditInfo *)WGetEditSessionInfo( hndl );

    return( einfo->info->modified );
}
Exemple #6
0
void WRESEAPI WMenuBringToFront( WMenuHandle hndl )
{
    WMenuEditInfo *einfo;

    einfo = (WMenuEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->win != (HWND)NULL ) {
        ShowWindow( einfo->win, SW_RESTORE );
        BringWindowToTop( einfo->win );
    }
}
Exemple #7
0
void WINEXPORT WAccelBringToFront( WAccelHandle hndl )
{
    WAccelEditInfo *einfo;

    einfo = (WAccelEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->win != (HWND)NULL ) {
        ShowWindow( einfo->win, SW_RESTORE );
        BringWindowToTop( einfo->win );
    }
}
Exemple #8
0
int WRESEAPI WMenuCloseSession( WMenuHandle hndl, int force_exit )
{
    WMenuEditInfo *einfo;

    einfo = (WMenuEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->info != NULL ) {
        if( SendMessage( einfo->win, WM_CLOSE, (WPARAM)force_exit, 0 ) != 0 ) {
            return( FALSE );
        }
    }

    return( TRUE );
}
Exemple #9
0
void WRESEAPI WMenuShowWindow( WMenuHandle hndl, int show )
{
    WMenuEditInfo *einfo;

    einfo = (WMenuEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->win != (HWND)NULL ) {
        if( show ) {
            ShowWindow( einfo->win, SW_SHOWNA );
        } else {
            ShowWindow( einfo->win, SW_HIDE );
        }
    }
}
Exemple #10
0
int WINEXPORT WAccelCloseSession( WAccelHandle hndl, int force_exit )
{
    WAccelEditInfo *einfo;

    einfo = (WAccelEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->info != NULL ) {
        if( SendMessage( einfo->win, WM_CLOSE, (WPARAM)force_exit, 0 ) != 0 ) {
            return( FALSE );
        }
    }

    return( TRUE );
}
Exemple #11
0
void WINEXPORT WAccelShowWindow( WAccelHandle hndl, int show )
{
    WAccelEditInfo *einfo;

    einfo = (WAccelEditInfo *)WGetEditSessionInfo( hndl );

    if( einfo != NULL && einfo->win != (HWND)NULL ) {
        if( show ) {
            ShowWindow( einfo->win, SW_SHOWNA );
        } else {
            ShowWindow( einfo->win, SW_HIDE );
        }
    }
}