|
Blender
V2.59
|
00001 /* 00002 * $Id: ED_fileselect.h 35543 2011-03-14 19:56:13Z elubie $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2008 Blender Foundation. 00021 * All rights reserved. 00022 * 00023 * 00024 * Contributor(s): Blender Foundation 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 00033 #ifndef ED_FILES_H 00034 #define ED_FILES_H 00035 00036 struct SpaceFile; 00037 struct ARegion; 00038 struct FileSelectParams; 00039 struct bContext; 00040 00041 #define FILE_LAYOUT_HOR 1 00042 #define FILE_LAYOUT_VER 2 00043 00044 #define MAX_FILE_COLUMN 8 00045 00046 typedef enum FileListColumns { 00047 COLUMN_NAME = 0, 00048 COLUMN_DATE, 00049 COLUMN_TIME, 00050 COLUMN_SIZE, 00051 COLUMN_MODE1, 00052 COLUMN_MODE2, 00053 COLUMN_MODE3, 00054 COLUMN_OWNER 00055 } FileListColumns; 00056 00057 typedef struct FileLayout 00058 { 00059 /* view settings - XXX - move into own struct */ 00060 int prv_w; 00061 int prv_h; 00062 int tile_w; 00063 int tile_h; 00064 int tile_border_x; 00065 int tile_border_y; 00066 int prv_border_x; 00067 int prv_border_y; 00068 int rows; 00069 int columns; 00070 int width; 00071 int height; 00072 int flag; 00073 int dirty; 00074 int textheight; 00075 float column_widths[MAX_FILE_COLUMN]; 00076 } FileLayout; 00077 00078 typedef struct FileSelection { 00079 int first; 00080 int last; 00081 } FileSelection; 00082 00083 struct rcti; 00084 00085 struct FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile); 00086 00087 short ED_fileselect_set_params(struct SpaceFile *sfile); 00088 00089 void ED_fileselect_reset_params(struct SpaceFile *sfile); 00090 00091 00092 void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar); 00093 00094 00095 FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar); 00096 00097 int ED_fileselect_layout_numfiles(FileLayout* layout, struct ARegion *ar); 00098 int ED_fileselect_layout_offset(FileLayout* layout, int x, int y); 00099 FileSelection ED_fileselect_layout_offset_rect(FileLayout* layout, const struct rcti* rect); 00100 00101 void ED_fileselect_layout_tilepos(FileLayout* layout, int tile, int *x, int *y); 00102 00103 void ED_operatormacros_file(void); 00104 00105 void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile); 00106 00107 void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile); 00108 00109 int ED_file_extension_icon(char *relname); 00110 00111 #endif /* ED_FILES_H */ 00112