function ipos = handleInteriorSize( h )
    switch get( h, 'Type' )
        case { 'uipanel', 'figure' }
            hh = uipanel( 'Parent', h, 'Units', 'pixels', 'Visible', 'off' );
            ipos = get( hh, 'Position' );
            delete(hh);
        otherwise
            p = get( h, 'Position' );
            ipos = p;
    end
end
