Blender  V2.59
file_intern.h
Go to the documentation of this file.
00001 /*
00002  * $Id: file_intern.h 37204 2011-06-05 10:05:13Z campbellbarton $
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_FILE_INTERN_H
00034 #define ED_FILE_INTERN_H
00035 
00036 /* internal exports only */
00037 
00038 struct ARegion;
00039 struct ARegionType;
00040 struct SpaceFile;
00041 
00042 /* file_ops.c */
00043 struct ARegion *file_buttons_region(struct ScrArea *sa);
00044 
00045 /* file_draw.c */
00046 #define TILE_BORDER_X (UI_UNIT_X/4)
00047 #define TILE_BORDER_Y (UI_UNIT_Y/4)
00048 
00049 /* ui geometry */
00050 #define IMASEL_BUTTONS_HEIGHT (UI_UNIT_Y*2)
00051 #define IMASEL_BUTTONS_MARGIN (UI_UNIT_Y/6)
00052 
00053 void file_draw_buttons(const bContext *C, ARegion *ar);
00054 void file_calc_previews(const bContext *C, ARegion *ar);
00055 void file_draw_previews(const bContext *C, ARegion *ar);
00056 void file_draw_list(const bContext *C, ARegion *ar);
00057 
00058 void file_draw_check_cb(bContext *C, void *arg1, void *arg2);
00059 int file_draw_check_exists(SpaceFile *sfile);
00060 
00061 /* file_ops.h */
00062 struct wmOperatorType;
00063 struct wmOperator;
00064 struct wmEvent;
00065 void FILE_OT_highlight(struct wmOperatorType *ot);
00066 void FILE_OT_select(struct wmOperatorType *ot);
00067 void FILE_OT_select_all_toggle(struct wmOperatorType *ot);
00068 void FILE_OT_select_border(struct wmOperatorType *ot);
00069 void FILE_OT_select_bookmark(struct wmOperatorType *ot);
00070 void FILE_OT_bookmark_add(struct wmOperatorType *ot);
00071 void FILE_OT_delete_bookmark(struct wmOperatorType *ot);
00072 void FILE_OT_hidedot(struct wmOperatorType *ot);
00073 void FILE_OT_execute(struct wmOperatorType *ot);
00074 void FILE_OT_cancel(struct wmOperatorType *ot);
00075 void FILE_OT_parent(struct wmOperatorType *ot);
00076 void FILE_OT_directory_new(struct wmOperatorType *ot);
00077 void FILE_OT_filename(struct wmOperatorType *ot);
00078 void FILE_OT_directory(struct wmOperatorType *ot);
00079 void FILE_OT_previous(struct wmOperatorType *ot);
00080 void FILE_OT_next(struct wmOperatorType *ot);
00081 void FILE_OT_refresh(struct wmOperatorType *ot);
00082 void FILE_OT_bookmark_toggle(struct wmOperatorType *ot);
00083 void FILE_OT_filenum(struct wmOperatorType *ot);
00084 void FILE_OT_delete(struct wmOperatorType *ot);
00085 void FILE_OT_rename(struct wmOperatorType *ot);
00086 void FILE_OT_smoothscroll(struct wmOperatorType *ot);
00087 
00088 int file_exec(bContext *C, struct wmOperator *exec_op);
00089 int file_cancel_exec(bContext *C, struct wmOperator *unused);
00090 int file_parent_exec(bContext *C, struct wmOperator *unused);
00091 int file_previous_exec(bContext *C, struct wmOperator *unused);
00092 int file_next_exec(bContext *C, struct wmOperator *unused);
00093 int file_filename_exec(bContext *C, struct wmOperator *unused);
00094 int file_directory_exec(bContext *C, struct wmOperator *unused);
00095 int file_directory_new_exec(bContext *C,struct wmOperator *unused);
00096 int file_delete_exec(bContext *C, struct wmOperator *unused);
00097 
00098 int file_hilight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, int my);
00099 
00100 void file_sfile_to_operator(struct wmOperator *op, struct SpaceFile *sfile, char *filepath);
00101 void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
00102 
00103 
00104 /* filesel.c */
00105 float file_shorten_string(char* string, float w, int front);
00106 float file_string_width(const char* str);
00107 
00108 float file_font_pointsize(void);
00109 void file_change_dir(bContext *C, int checkdir);
00110 int file_select_match(struct SpaceFile *sfile, const char *pattern);
00111 void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
00112 void autocomplete_file(struct bContext *C, char *str, void *arg_v);
00113 
00114 /* file_panels.c */
00115 void file_panels_register(struct ARegionType *art);
00116 
00117 #endif /* ED_FILE_INTERN_H */
00118