文件浏览器及数码相框 -2.3.2-freetype_arm-2

显示多行文字

两行文字左边对齐

简单使用两个循环显示两行字体

根据上一行字体的宽度来进行下一行左边的计算

#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <wchar.h>
#include <ft2build.h>
#include <stdlib.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H   

#include <linux/font.h>

    int fd_fb;
    struct fb_var_screeninfo var;    /* Current var */
    struct fb_fix_screeninfo fix;    /* Current fix */
    int screen_size;                    //空间大小
    unsigned char *fb_mem;                //framebaffer空间地址
    unsigned int line_width;
    unsigned int pixel_width;

void lcd_put_pixel(int x, int y, unsigned int color)
{
    unsigned char *pen_8 = fb_mem + y * line_width + x * pixel_width;     //当前像素对应内存位置
    unsigned short *pen_16;
    unsigned int *pen_32;

    unsigned int red, blue, green;

    pen_16 = (unsigned short *)pen_8;
    pen_32 = (unsigned int *)pen_8;

    switch(var.bits_per_pixel)
    {
        case 8:
        {
            *pen_8 = color;            //对应调色板颜色

            break;
        }
        case 16:
        {
            /* 5*6*5 */
            red   = (color >> 16) & 0xff;
            green = (color >> 8) & 0xff;
            blue  = (color >> 0) & 0xff;

            color = ((red >> 3 ) << 11) | ((green >> 2) << 5) | ( blue >> 3);

            /* 颜色数据为高位 */
            *pen_16 = color;

            break;
        }
        case 32:
        {
            *pen_32 = color;
            break;
        }

    }

}

void draw_bitmap( FT_Bitmap*  bitmap,
             FT_Int      x,
             FT_Int      y)
{
  FT_Int  i, j, p, q;
  FT_Int  x_max = x + bitmap->width;
  FT_Int  y_max = y + bitmap->rows;

    printf("x = %d, y = %d\n", x, y);

  for ( i = x, p = 0; i < x_max; i++, p++ )
  {
    for ( j = y, q = 0; j < y_max; j++, q++ )
    {
      if ( i < 0      || j < 0       ||
           i >= var.xres || j >= var.yres )
        continue; 

    //  image[j][i] |= bitmap->buffer[q * bitmap->width + p];

        lcd_put_pixel(i, j, bitmap->buffer[q * bitmap->width + p]);
    }
  }
}

int main(int argc, char **argv)
{
    wchar_t * str1 = L"陈志朋gif";
    wchar_t * str2 = L"hello the world";
    FT_BBox bbox;
    FT_Glyph  glyph;

      FT_Library    library;
      FT_Face       face;
    FT_Vector     pen;                    /* untransformed origin  */
    FT_GlyphSlot  slot;
    FT_Matrix     matrix;                 /* transformation matrix */

    int error;
    double angle;
    int i;
    int line_box_ymin = 10000;
    int line_box_ymax = 0;

    if(argc != 2)
    {
        printf("Usage : %s <font_file> <angle>\n",argv[0]);
        return -1;
    }

    fd_fb = open("/dev/fb0",O_RDWR);
    if(fd_fb < 0)
    {
        printf("can‘t open /dev/fb0 \n");
        return -1;
    }
    if(ioctl(fd_fb, FBIOGET_VSCREENINFO, &var))
    {
        printf("can‘t get var \n");
        return -1;
    }
    if(ioctl(fd_fb, FBIOGET_FSCREENINFO, &fix))
    {
        printf("can‘t get fix \n");
        return -1;
    }
    screen_size = var.xres * var.yres * var.bits_per_pixel / 8;    //单位字节
    line_width = var.xres *  var.bits_per_pixel / 8;
    pixel_width =  var.bits_per_pixel / 8;

    fb_mem = (unsigned char *)mmap(NULL, screen_size,         PROT_READ | PROT_WRITE, MAP_SHARED, fd_fb, 0);
    if(fb_mem == (unsigned char *) -1)
    {
        printf("can‘t mmap \n");
        return -1;
    }
    memset(fb_mem, 0, screen_size);

    /* 显示矢量文字 */

  error = FT_Init_FreeType( &library );              /* initialize library */
  /* error handling omitted */

  error = FT_New_Face( library, argv[1], 0, &face ); /* create face object */
  /* error handling omitted */

 slot = face->glyph;

  FT_Set_Pixel_Sizes(face, 24, 0);

  /*确定坐标
  *lcd_x = 0
  *lcd_y = 24
  *笛卡尔坐标
  *x = lcd_x = 0
  *y = var.yres -  24
  */

  pen.x = ( 0 ) * 64;
  pen.y = ( var.yres -  24 ) * 64;

  for(i = 0; i < wcslen(str1); i++)
  {

      /* set transformation */
      FT_Set_Transform( face,0, &pen );

      /* load glyph image into the slot (erase previous one) */

      error = FT_Load_Char( face, str1[i], FT_LOAD_RENDER );
      if ( error )
      {
          printf("FT_Load_Char error\n");
        return -1;
      }

        error = FT_Get_Glyph( face->glyph, &glyph );
        if (error)
        {
            printf("FT_Get_Glyph error!\n");
            return -1;
        }

      FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_TRUNCATE, &bbox );

      if(line_box_ymin > bbox.yMin)
          line_box_ymin = bbox.yMin;
      if(line_box_ymax < bbox.yMax)
          line_box_ymax = bbox.yMax;

       /* now, draw to our target surface (convert position) */
       draw_bitmap( &slot->bitmap,
                     slot->bitmap_left,
                     var.yres - slot->bitmap_top );
      pen.x += slot->advance.x;

      }

  /*确定坐标
  *lcd_x = 0
  *lcd_y = 24
  *笛卡尔坐标
  *x = lcd_x = 0
  *y = var.yres -  24
  */

  pen.x = ( 0 ) * 64;
  pen.y = ( var.yres -  (line_box_ymax - line_box_ymin + 24)  ) * 64;

  for(i = 0; i < wcslen(str2); i++)
  {

      /* set transformation */
      FT_Set_Transform( face,0, &pen );

      /* load glyph image into the slot (erase previous one) */

      error = FT_Load_Char( face, str2[i], FT_LOAD_RENDER );
      if ( error )
      {
          printf("FT_Load_Char error\n");
        return -1;
      }

        error = FT_Get_Glyph( face->glyph, &glyph );
        if (error)
        {
            printf("FT_Get_Glyph error!\n");
            return -1;
        }

      FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_TRUNCATE, &bbox );

      if(line_box_ymin > bbox.yMin)
          line_box_ymin = bbox.yMin;
      if(line_box_ymax < bbox.yMax)
          line_box_ymax = bbox.yMax;

       /* now, draw to our target surface (convert position) */
       draw_bitmap( &slot->bitmap,
                     slot->bitmap_left,
                     var.yres - slot->bitmap_top );
      pen.x += slot->advance.x;

      }
}

使用freetpye中的函数实现一行文字居中

4.6 高级文本渲染:变换 + 居中 + 字距调整
现在我们将修改我们的代码,以便可以容易地变换已渲染的字符串,例如旋转它。我们将以实行少许小
改进开始:
4.6.1 打包然后平移字形
我们先把与一个字形图像相关的信息打包到一个结构体,而不是并行的数组。因此我们定义下面的结构
体类型:
typedef struct TGlyph_
{
FT_UInt index; /* 字形索引 */
FT_Vector pos; /* 基线上面的字形原点 */
FT_Glyph image; /* 字形图像 */
} TGlyph, *PGlyph;
我们在装载每一个字形图像过程中,在把它装载它在基线所在位置后便直接平移它。我们将看到,这有若干
好处。我们的字形序列装载其因而变成:
FT_GlyphSlot slot = face->glyph; /* 一个小捷径 */
FT_UInt glyph_index;
FT_Bool use_kerning;
FT_UInt previous;
int pen_x, pen_y, n;
TGlyph glyphs[MAX_GLYPHS]; /* 字形表 */
PGlyph glyph; /* 表中的当前字形*/
FT_UInt num_glyphs;
... 初始化库 ...
... 创建 face 对象 ...
... 设置字符尺寸 ...
pen_x = 0; /* 以 (0,0) 开始 */
pen_y = 0;
num_glyphs = 0;
use_kerning = FT_HAS_KERNING( face );
previous = 0;
glyph = glyphs;
for ( n = 0; n < num_chars; n++ )
{
glyph->index = FT_Get_Char_Index( face, text[n] );
if ( use_kerning && previous && glyph->index )
{
FT_Vector delta;
FT_Get_Kerning( face, previous, glyph->index,
FT_KERNING_MODE_DEFAULT, &delta );
pen_x += delta.x >> 6;
}
/* 保存当前笔位置 */
glyph->pos.x = pen_x;
glyph->pos.y = pen_y;
error = FT_Load_Glyph(face,glyph_index,FT_LOAD_DEFAULT);
if ( error ) continue;
error = FT_Get_Glyph( face->glyph, &glyph->image );
if ( error ) continue;
/* 现在平移字形图像 */
FT_Glyph_Transform( glyph->image, 0, &glyph->pos );
pen_x += slot->advance.x >> 6;
previous = glyph->index;
/* 增加字形的数量 */
glyph++;
}
/* 计算已装载的字形的数量 */
num_glyphs = glyph - glyphs;
注意,这个时候平移字形有若干好处。第一是当我们计算字符串的边界框时不需要平移字形 bbox。代码将会
变成这样:
void compute_string_bbox( FT_BBox *abbox )
{
FT_BBox bbox;
bbox.xMin = bbox.yMin = 32000;
bbox.xMax = bbox.yMax = -32000;
for ( n = 0; n < num_glyphs; n++ )
{
FT_BBox glyph_bbox;
FT_Glyph_Get_CBox( glyphs[n], &glyph_bbox );
if (glyph_bbox.xMin < bbox.xMin)
bbox.xMin = glyph_bbox.xMin;
if (glyph_bbox.yMin < bbox.yMin)
bbox.yMin = glyph_bbox.yMin;
if (glyph_bbox.xMax > bbox.xMax)
bbox.xMax = glyph_bbox.xMax;
if (glyph_bbox.yMax > bbox.yMax)
bbox.yMax = glyph_bbox.yMax;
}
if ( bbox.xMin > bbox.xMax )
{
bbox.xMin = 0;
bbox.yMin = 0;
bbox.xMax = 0;
bbox.yMax = 0;
}
*abbox = bbox;
}
更详细描述: compute_string_bbox 函数现在可以计算一个已转换的字形字符串的边界框。例如,我们可以做
如下的事情:
FT_BBox bbox;
FT_Matrix matrix;
FT_Vector delta;
... 装载字形序列 ...
... 设置 "matrix" 和 "delta" ...
/* 变换字形 */
for ( n = 0; n < num_glyphs; n++ )
FT_Glyph_Transform( glyphs[n].image, &matrix, &delta );
/* 计算已变换字形的边界框 */
compute_string_bbox( &bbox );

#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <wchar.h>
#include <ft2build.h>
#include <stdlib.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include <linux/font.h>

#define MAX_GLYPHS 100

typedef struct TGlyph_
{
FT_UInt index; /* ???? */
FT_Vector pos; /* ????????? */
FT_Glyph image; /* ???? */
} TGlyph, *PGlyph;

    int fd_fb;
    struct fb_var_screeninfo var;    /* Current var */
    struct fb_fix_screeninfo fix;    /* Current fix */
    int screen_size;                    //空间大小
    unsigned char *fb_mem;                //framebaffer空间地址
    unsigned int line_width;
    unsigned int pixel_width;

void lcd_put_pixel(int x, int y, unsigned int color)
{
    unsigned char *pen_8 = fb_mem + y * line_width + x * pixel_width;     //当前像素对应内存位置
    unsigned short *pen_16;
    unsigned int *pen_32;

    unsigned int red, blue, green;

    pen_16 = (unsigned short *)pen_8;
    pen_32 = (unsigned int *)pen_8;

    switch(var.bits_per_pixel)
    {
        case 8:
        {
            *pen_8 = color;            //对应调色板颜色

            break;
        }
        case 16:
        {
            /* 5*6*5 */
            red   = (color >> 16) & 0xff;
            green = (color >> 8) & 0xff;
            blue  = (color >> 0) & 0xff;

            color = ((red >> 3 ) << 11) | ((green >> 2) << 5) | ( blue >> 3);

            /* 颜色数据为高位 */
            *pen_16 = color;

            break;
        }
        case 32:
        {
            *pen_32 = color;
            break;
        }

    }

}

void draw_bitmap( FT_Bitmap*  bitmap,
             FT_Int      x,
             FT_Int      y)
{
  FT_Int  i, j, p, q;
  FT_Int  x_max = x + bitmap->width;
  FT_Int  y_max = y + bitmap->rows;

    printf("x = %d, y = %d\n", x, y);

  for ( i = x, p = 0; i < x_max; i++, p++ )
  {
    for ( j = y, q = 0; j < y_max; j++, q++ )
    {
      if ( i < 0      || j < 0       ||
           i >= var.xres || j >= var.yres )
        continue; 

    //  image[j][i] |= bitmap->buffer[q * bitmap->width + p];

        lcd_put_pixel(i, j, bitmap->buffer[q * bitmap->width + p]);
    }
  }
}

int  Get_Glphs_Frm_Wstr(FT_Face face, wchar_t * wstr, TGlyph glyphs[])
{
    PGlyph glyph = glyphs;
    FT_GlyphSlot  slot = face->glyph;
    int n;
    int pen_x =0;
    int pen_y = 0;
    int error;

    for(n = 0; n < wcslen(wstr); n++ )
    {
        glyph->index = FT_Get_Char_Index( face, wstr[n] );
        /* 保存当前笔位置 */
        glyph->pos.x = pen_x;
        glyph->pos.y = pen_y;
        /* load 是把glyph 加载到face->glyph */
        error = FT_Load_Glyph(face, glyph->index, FT_LOAD_DEFAULT);
        if ( error )
            continue;

        error = FT_Get_Glyph( face->glyph, &glyph->image );
        if ( error )
            continue;    

        /* 现在平移字形图像 */
        /* 使得glyph->image里面有位置信息 */
        FT_Glyph_Transform( glyph->image, 0, &glyph->pos );

        pen_x += slot->advance.x;        /* 1 / 64 piont */

        /* 增加字形的数量 */
        glyph++;

    }
    /* 计算已装载的字形的数量 */

    return (glyph - glyphs);

}

void compute_string_bbox( TGlyph glyphs[], FT_UInt num_glyphs, FT_BBox *abbox )
{
    FT_BBox bbox;
    int n;

    bbox.xMin = bbox.yMin = 32000;
    bbox.xMax = bbox.yMax = -32000;

    for ( n = 0; n < num_glyphs; n++ )
    {
        FT_BBox glyph_bbox;
        FT_Glyph_Get_CBox( glyphs[n].image, FT_GLYPH_BBOX_TRUNCATE, &glyph_bbox );
        if (glyph_bbox.xMin < bbox.xMin)
            bbox.xMin = glyph_bbox.xMin;
        if (glyph_bbox.yMin < bbox.yMin)
            bbox.yMin = glyph_bbox.yMin;
        if (glyph_bbox.xMax > bbox.xMax)
            bbox.xMax = glyph_bbox.xMax;
        if (glyph_bbox.yMax > bbox.yMax)
            bbox.yMax = glyph_bbox.yMax;
    }
    *abbox = bbox;
}

void Draw_Glyphs(TGlyph glyphs[], FT_UInt num_glyphs,    FT_Vector pen)
{
    int n;
    int error;

    for ( n = 0; n < num_glyphs; n++ )
    {
        FT_Glyph_Transform( glyphs[n].image, 0, &pen );
        error = FT_Glyph_To_Bitmap(&glyphs[n].image, FT_RENDER_MODE_NORMAL, 0, 1 ); /* 没有附加的平移*//* 销毁 "image" 指向的副本 */
        if ( !error )
        {
            FT_BitmapGlyph bit = (FT_BitmapGlyph)glyphs[n].image;
            draw_bitmap( &bit->bitmap, bit->left, var.yres - bit->top);
            FT_Done_Glyph( glyphs[n].image );
        }

    }
}

int main(int argc, char **argv)
{
    wchar_t * str1 = L"陈志朋gif";
    wchar_t * str2 = L"hello the world";
    FT_BBox bbox;
    FT_Glyph  glyph;

      FT_Library    library;
      FT_Face       face;
    FT_Vector     pen;                    /* untransformed origin  */
    FT_GlyphSlot  slot;
    FT_Matrix     matrix;                 /* transformation matrix */

    TGlyph glyphs[MAX_GLYPHS]; /* ??? */
    FT_UInt num_glyphs;

    int error;
    double angle;
    int i;
    int line_box_ymin = 10000;
    int line_box_ymax = 0;

    int line_box_width;
    int line_box_hight;

    if(argc != 2)
    {
        printf("Usage : %s <font_file> <angle>\n",argv[0]);
        return -1;
    }

    fd_fb = open("/dev/fb0",O_RDWR);
    if(fd_fb < 0)
    {
        printf("can‘t open /dev/fb0 \n");
        return -1;
    }
    if(ioctl(fd_fb, FBIOGET_VSCREENINFO, &var))
    {
        printf("can‘t get var \n");
        return -1;
    }
    if(ioctl(fd_fb, FBIOGET_FSCREENINFO, &fix))
    {
        printf("can‘t get fix \n");
        return -1;
    }

    screen_size = var.xres * var.yres * var.bits_per_pixel / 8;    //单位字节
    line_width = var.xres *  var.bits_per_pixel / 8;
    pixel_width =  var.bits_per_pixel / 8;

    fb_mem = (unsigned char *)mmap(NULL, screen_size,         PROT_READ | PROT_WRITE, MAP_SHARED, fd_fb, 0);
    if(fb_mem == (unsigned char *) -1)
    {
        printf("can‘t mmap \n");
        return -1;
    }
    memset(fb_mem, 0, screen_size);

    /* 显示矢量文字 */

    error = FT_Init_FreeType( &library );              /* initialize library */
    /* error handling omitted */

    error = FT_New_Face( library, argv[1], 0, &face ); /* create face object */
    /* error handling omitted */

    slot = face->glyph;

    FT_Set_Pixel_Sizes(face, 24, 0);

    num_glyphs =  Get_Glphs_Frm_Wstr(face, str1, glyphs);
    compute_string_bbox(glyphs, num_glyphs, &bbox);

    line_box_width = bbox.xMax - bbox.xMin;
    line_box_hight = bbox.yMax - bbox.yMin;

    pen.x = (var.xres - line_box_width) / 2 * 64;
    pen.y = (var.yres - line_box_hight) / 2 * 64;

    Draw_Glyphs(glyphs, num_glyphs, pen);

    num_glyphs =  Get_Glphs_Frm_Wstr(face, str2, glyphs);
    compute_string_bbox(glyphs, num_glyphs, &bbox);

    line_box_width = bbox.xMax - bbox.xMin;
    line_box_hight = bbox.yMax - bbox.yMin;

    pen.x = (var.xres - line_box_width) / 2 * 64;
    pen.y = pen.y - 24 * 64;

    Draw_Glyphs(glyphs, num_glyphs, pen);

}

中心双行输出

4.6.2 渲染一个已变换的字形序列
无论如何,如果我们想重用字形来以不同的角度或变换方式绘制字符串,直接变换序列中的字形都不是
一个好主意。更好的方法是在字形被渲染前执行放射变换,如下面的代码所示:
FT_Vector start;
FT_Matrix transform;
/* 获取原始字形序列的 bbox */
compute_string_bbox( &string_bbox );
/* 计算整数象素表示的字符串尺度 */
string_width = (string_bbox.xMax - string_bbox.xMin) / 64;
string_height = (string_bbox.yMax - string_bbox.yMin) / 64;
/* 设置 26.6 笛卡儿空间表示的笔起始位置 */
start.x = ( ( my_target_width - string_width ) / 2 ) * 64;
start.y = ( ( my_target_height - string_height ) / 2 ) * 64;
/* 设置变换(旋转) */
matrix.xx = (FT_Fixed)( cos( angle ) * 0x10000L );
matrix.xy = (FT_Fixed)(-sin( angle ) * 0x10000L );
matrix.yx = (FT_Fixed)( sin( angle ) * 0x10000L );
matrix.yy = (FT_Fixed)( cos( angle ) * 0x10000L );
for ( n = 0; n < num_glyphs; n++ )
{
FT_Glyph image;
FT_Vector pen;
FT_BBox bbox;
/* 创建原始字形的副本 */
error = FT_Glyph_Copy( glyphs[n].image, &image );
if ( error ) continue;
/* 变换副本(这将平移它到正确的位置) */
FT_Glyph_Transform( image, &matrix, &start );
/* 检查边界框;如果已变换的字形图像不在*/
/* 我们的目标表面中,我们可以避免渲染它 */
FT_Glyph_Get_CBox( image, ft_glyph_bbox_pixels, &bbox );
if ( bbox.xMax <= 0 || bbox.xMin >= my_target_width ||
bbox.yMax <= 0 || bbox.yMin >= my_target_height )
continue;
/* 把字形图像转换为位图(销毁字形的副本!) */
error = FT_Glyph_To_Bitmap(
&image,
FT_RENDER_MODE_NORMAL,
0, /* 没有附加的平移*/
1 ); /* 销毁 "image" 指向的副本 */
if ( !error )
{
FT_BitmapGlyph bit = (FT_BitmapGlyph)image;
my_draw_bitmap( bitmap->bitmap,
bitmap->left,
my_target_height - bitmap->top );
FT_Done_Glyph( image );
}
}
这份代码相对于原始版本有少许改变:
z 我们没改变原始的字形图像,而是变换该字形图像的拷贝。
z 我们执行“剪取”操作以处理渲染和绘制的字形不在我们的目标表面(surface)的情况。
z 当调用 FT_Glyhp_To_Bitmap 时,我们总是销毁字形图像的拷贝,这是为了销毁已变换的图像。注意,即
使当这个函数返回错误码,该图像依然会被销毁(这就是为什么 FT_Done_Glyph 只在复合语句中被调用
的原因)。
z 平移字形序列到起始笔位置集成到 FT_Glyph_Transform 函数,而不是 FT_Glyph_To_Bitmap 函数。
可以多次调用这个函数以渲染字符串到不同角度的,或者甚至改变计算 start 的方法以移动它到另外的地
方。无论如何,要注意通常的实现会使用一个字形缓冲以减少内存消耗。据个例子,让我们假定我们的字符

时间: 2024-07-28 19:36:16

文件浏览器及数码相框 -2.3.2-freetype_arm-2的相关文章

文件浏览器及数码相框 -2.3-freetype_arm

交叉编译:tar xjf freetype-2.4.10.tar.bz2 ./configure --host=arm-linuxmakemake DESTDIR=$PWD/tmp install find -name stdio.h 平时使用#include<stdio.h>路径    ./arm-linux/include/stdio.h 编译出来的头文件应该放入:/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include 编译出来的库文件应该放

简单文件浏览器--实现简易文件选取返回路径功能

因为今天学习Andorid Sample一个示例的时候需要使用一个选取图片的功能,示例中给的Intent没有办法用,因此,自己搜集资料来实现这个简单的文件浏览器,主要这两个文件就贴在下面了: 首先是模型层,定义显示的文件实体(保存文件对应的Icon和其简易名称与绝对路径) 1 public class DirEntry { 2 private int icon; 3 private String dirName; 4 private String path; 5 6 public String

【转】显示Ubuntu文件浏览器的地址栏--不错

原文网址:http://www.blogbus.com/anythingok-logs/144447448.html Ubuntu默认使用nautilus作为其可视化的文件浏览器,其默认值不显示地址栏,而是显示一些地址的按钮,你可以直接点这些按钮切换目录.这样的设计有的时候很方便,但是另一些时候就很不方便了,特别是当我们想要复制某个某个地址的时候.那么怎么让Ubuntu想Windows资源管理器一样显示地址栏呢? 首先,nautilus有一个快捷键——ctrl+L,可以用来显示当前所在的目录的地

推荐开发工具系列之--Clover(文件浏览器)

虽然我不是刻意要喷Windows自带的文件浏览器:但是为了突出赞美要推荐的Clover这款软件:只能委屈微软了: 重点要强调clover的两个特点:当然:除了这两个特点:也没啥圈点的了: 官网:http://cn.ejie.me/ 下载链接:http://pan.baidu.com/s/1mgqzuv2 1:书签.标签页:chrome重度用户的福音:没错:跟谷歌浏览器的标签页和书签一样:可以把常用的目录拉到标签处:以后就方便快速访问了:有了书签页就再也不用烦任务栏一堆的文件浏览状态了: 2: 双

Win 10 文件浏览器无法打开

今天遇到个很奇怪的问题,文件浏览器File Explorer无法正常显示,点击打开后任务栏上已经显示打开了,但是屏幕上却看不到任何窗口,开始以为机子中了恶意的木马,然后就疯狂的查毒,然而并没有解决问题,简直要抓狂了,差点就要重装系统了.最后终于发现了原因了,因为我用的是多屏幕显示,我当时没有打开右边的屏幕,但其实打开的窗口都在右边的屏幕上,简直要被自己蠢哭了,有木有~

【Qt5开发及实例】22、文件浏览器

文件浏览器 今天有点痿了,昨天晚上2点左右睡的,怪我太痴迷编程???? NO!NO!NO!  看网络小说到2点,= =.我也是醉了,不知道为什么昨天晚上就是睡不着,然后就掏出手机看起了小说,结果是TMD居然看到了精彩片段,呵呵,等我回过神来已经2点了,坑.... 今天就做了个简单的小程序,然后就看看书,也没怎么敲代码,我觉得还是蛮好的,有时候不能往死里敲代码,还是要休息一下,看看其他的,思考一下下一步怎么走. 恩!就是这样,好吧,前面的这些才是今天的主要收获!! 文件浏览模型 /** * 书本:

Android应用源码可以按音乐视频图片分类浏览的安卓文件浏览器

本项目是一个可按音乐.图片.视频分类浏览的安卓文件浏览器.具有多选.打开.复制.粘贴.删除.重命名.查看属性等功能,并且还可以切换列表显示效果和对文件分类浏览,比较遗憾的是源码注释不多,项目编码UTF-8编译版本2.3.3.MediaCenter是程序的主项目依赖moduleAboutus和moduleAnimtab两个项目,三个项目如果导入以后没有自动添加引用关系需要手动在Library里面添加引用关系. 代码截图: 运行效果截图: 源码包免费下载地址:[点击这里]

Android 文件浏览器总结

文件浏览器用来读取android系统中的所有文件和文件夹.具体说明如下: 最上面显示当前的文件路径.如果是根目录,则显示"根目录": 第二行是返回上一级按钮.如果当前处于根目录下,则该行不显示: 文件显示使用listView控件,所有文件一次性加载完毕:若当前是文件夹,则可点击,进入下一级目录,若是文件,则点击,默认为选中该文件.返回文件名,并关闭文件浏览器. 例: 文件浏览器Activity public class FileManagerActivity extends Activ

Android简单文件浏览器源代码 (转)

Android简单文件浏览器源代码 (转) activity_main .xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=&qu