1
0

fileview_columns.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "./fileview.h"
  2. #include "./fileview_internal.h"
  3. #include "./resource.h"
  4. #include "../nu/menushortcuts.h"
  5. #include <windowsx.h>
  6. #include <strsafe.h>
  7. #define COLUMN_WIDTH_MIN 16
  8. #define COLUMN_WIDTH_MAX 600
  9. #define COLUMN_WIDTH_MAX_LONG 2000
  10. const static FILEVIEWCOLUMN szRegisteredColumns[] =
  11. {
  12. { FVCOLUMN_NAME, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_NAME), -1, LVCFMT_LEFT, 0, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  13. { FVCOLUMN_SIZE, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_SIZE), 72, LVCFMT_RIGHT, 1, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  14. { FVCOLUMN_TYPE, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_TYPE), 80, LVCFMT_LEFT, 2, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  15. { FVCOLUMN_EXTENSION, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_EXTENSION), 60, LVCFMT_LEFT, 3, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  16. { FVCOLUMN_MODIFIED, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_MODIFIED), 132, LVCFMT_LEFT, 4, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  17. { FVCOLUMN_CREATED, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_CREATED), 132, LVCFMT_LEFT, 5, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  18. { FVCOLUMN_ATTRIBUTES, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_ATTRIBUTES), 60, LVCFMT_LEFT, 6, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  19. { FVCOLUMN_ARTIST, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_ARTIST), 140, LVCFMT_LEFT, 7, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  20. { FVCOLUMN_ALBUM, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_ALBUM), 140, LVCFMT_LEFT, 8, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  21. { FVCOLUMN_TITLE, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_TITLE), 140, LVCFMT_LEFT, 9, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  22. { FVCOLUMN_GENRE, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_GENRE), 64, LVCFMT_LEFT, 10, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  23. { FVCOLUMN_YEAR, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_YEAR), 48, LVCFMT_LEFT, 11, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  24. { FVCOLUMN_LENGTH, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_LENGTH), 48, LVCFMT_LEFT, 12, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  25. { FVCOLUMN_BITRATE, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_BITRATE), 48, LVCFMT_LEFT, 13, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  26. { FVCOLUMN_INMLDB, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_INMLDB), 40, LVCFMT_LEFT, 14, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  27. { FVCOLUMN_TRACK, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_TRACK), 48, LVCFMT_LEFT, 15, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  28. { FVCOLUMN_DISC, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_DISC), 48, LVCFMT_LEFT, 16, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX},
  29. { FVCOLUMN_COMMENT, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_COMMENT), 140, LVCFMT_LEFT, 17, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  30. { FVCOLUMN_PUBLISHER, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_PUBLISHER), 140, LVCFMT_LEFT, 18, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  31. { FVCOLUMN_COMPOSER, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_COMPOSER), 120, LVCFMT_LEFT, 19, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  32. { FVCOLUMN_ALBUMARTIST, MAKEINTRESOURCEW(IDS_FILEVIEW_COL_ALBUMARTIST), 120, LVCFMT_LEFT, 20, COLUMN_WIDTH_MIN, COLUMN_WIDTH_MAX_LONG},
  33. };
  34. const static INT RegisteredColumnsCount = sizeof(szRegisteredColumns)/sizeof(szRegisteredColumns[0]);