Blender V2.61 - r43446

file_intern.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version. 
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2008 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * 
00022  * Contributor(s): Blender Foundation
00023  *
00024  * ***** END GPL LICENSE BLOCK *****
00025  */
00026 
00031 #ifndef ED_FILE_INTERN_H
00032 #define ED_FILE_INTERN_H
00033 
00034 /* internal exports only */
00035 
00036 struct ARegion;
00037 struct ARegionType;
00038 struct SpaceFile;
00039 
00040 /* file_ops.c */
00041 struct ARegion *file_buttons_region(struct ScrArea *sa);
00042 
00043 /* file_draw.c */
00044 #define TILE_BORDER_X (UI_UNIT_X/4)
00045 #define TILE_BORDER_Y (UI_UNIT_Y/4)
00046 
00047 /* ui geometry */
00048 #define IMASEL_BUTTONS_HEIGHT (UI_UNIT_Y*2)
00049 #define IMASEL_BUTTONS_MARGIN (UI_UNIT_Y/6)
00050 
00051 void file_draw_buttons(const bContext *C, ARegion *ar);
00052 void file_calc_previews(const bContext *C, ARegion *ar);
00053 void file_draw_previews(const bContext *C, ARegion *ar);
00054 void file_draw_list(const bContext *C, ARegion *ar);
00055 
00056 void file_draw_check_cb(bContext *C, void *arg1, void *arg2);
00057 int file_draw_check_exists(SpaceFile *sfile);
00058 
00059 /* file_ops.h */
00060 struct wmOperatorType;
00061 struct wmOperator;
00062 struct wmEvent;
00063 void FILE_OT_highlight(struct wmOperatorType *ot);
00064 void FILE_OT_select(struct wmOperatorType *ot);
00065 void FILE_OT_select_all_toggle(struct wmOperatorType *ot);
00066 void FILE_OT_select_border(struct wmOperatorType *ot);
00067 void FILE_OT_select_bookmark(struct wmOperatorType *ot);
00068 void FILE_OT_bookmark_add(struct wmOperatorType *ot);
00069 void FILE_OT_delete_bookmark(struct wmOperatorType *ot);
00070 void FILE_OT_hidedot(struct wmOperatorType *ot);
00071 void FILE_OT_execute(struct wmOperatorType *ot);
00072 void FILE_OT_cancel(struct wmOperatorType *ot);
00073 void FILE_OT_parent(struct wmOperatorType *ot);
00074 void FILE_OT_directory_new(struct wmOperatorType *ot);
00075 void FILE_OT_filename(struct wmOperatorType *ot);
00076 void FILE_OT_directory(struct wmOperatorType *ot);
00077 void FILE_OT_previous(struct wmOperatorType *ot);
00078 void FILE_OT_next(struct wmOperatorType *ot);
00079 void FILE_OT_refresh(struct wmOperatorType *ot);
00080 void FILE_OT_bookmark_toggle(struct wmOperatorType *ot);
00081 void FILE_OT_filenum(struct wmOperatorType *ot);
00082 void FILE_OT_delete(struct wmOperatorType *ot);
00083 void FILE_OT_rename(struct wmOperatorType *ot);
00084 void FILE_OT_smoothscroll(struct wmOperatorType *ot);
00085 
00086 int file_exec(bContext *C, struct wmOperator *exec_op);
00087 int file_cancel_exec(bContext *C, struct wmOperator *unused);
00088 int file_parent_exec(bContext *C, struct wmOperator *unused);
00089 int file_previous_exec(bContext *C, struct wmOperator *unused);
00090 int file_next_exec(bContext *C, struct wmOperator *unused);
00091 int file_filename_exec(bContext *C, struct wmOperator *unused);
00092 int file_directory_exec(bContext *C, struct wmOperator *unused);
00093 int file_directory_new_exec(bContext *C,struct wmOperator *unused);
00094 int file_delete_exec(bContext *C, struct wmOperator *unused);
00095 
00096 int file_hilight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, int my);
00097 
00098 void file_sfile_to_operator(struct wmOperator *op, struct SpaceFile *sfile, char *filepath);
00099 void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
00100 
00101 
00102 /* filesel.c */
00103 float file_shorten_string(char* string, float w, int front);
00104 float file_string_width(const char* str);
00105 
00106 float file_font_pointsize(void);
00107 void file_change_dir(bContext *C, int checkdir);
00108 int file_select_match(struct SpaceFile *sfile, const char *pattern);
00109 void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
00110 void autocomplete_file(struct bContext *C, char *str, void *arg_v);
00111 
00112 /* file_panels.c */
00113 void file_panels_register(struct ARegionType *art);
00114 
00115 #endif /* ED_FILE_INTERN_H */
00116