2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-12-14 12:16:55 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-14 12:16:55 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
2011-02-27 20:29:51 +00:00
|
|
|
|
|
|
|
/** \file blender/editors/space_file/file_intern.h
|
|
|
|
* \ingroup spfile
|
|
|
|
*/
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __FILE_INTERN_H__
|
|
|
|
#define __FILE_INTERN_H__
|
2008-12-14 12:16:55 +00:00
|
|
|
|
|
|
|
/* internal exports only */
|
|
|
|
|
2009-06-29 20:23:40 +00:00
|
|
|
struct ARegion;
|
|
|
|
struct ARegionType;
|
|
|
|
struct SpaceFile;
|
2008-12-14 12:16:55 +00:00
|
|
|
|
2009-03-08 13:14:12 +00:00
|
|
|
/* file_ops.c */
|
|
|
|
struct ARegion *file_buttons_region(struct ScrArea *sa);
|
2008-12-14 12:16:55 +00:00
|
|
|
|
2009-01-06 14:42:54 +00:00
|
|
|
/* file_draw.c */
|
2012-06-18 13:01:24 +00:00
|
|
|
#define TILE_BORDER_X (UI_UNIT_X / 4)
|
|
|
|
#define TILE_BORDER_Y (UI_UNIT_Y / 4)
|
2011-06-05 10:05:13 +00:00
|
|
|
|
|
|
|
/* ui geometry */
|
2012-06-18 13:01:24 +00:00
|
|
|
#define IMASEL_BUTTONS_HEIGHT (UI_UNIT_Y * 2)
|
|
|
|
#define IMASEL_BUTTONS_MARGIN (UI_UNIT_Y / 6)
|
2008-12-14 12:16:55 +00:00
|
|
|
|
2009-01-06 14:42:54 +00:00
|
|
|
void file_draw_buttons(const bContext *C, ARegion *ar);
|
|
|
|
void file_calc_previews(const bContext *C, ARegion *ar);
|
|
|
|
void file_draw_list(const bContext *C, ARegion *ar);
|
|
|
|
|
2010-09-17 09:27:31 +00:00
|
|
|
void file_draw_check_cb(bContext *C, void *arg1, void *arg2);
|
|
|
|
int file_draw_check_exists(SpaceFile *sfile);
|
|
|
|
|
2009-01-06 14:42:54 +00:00
|
|
|
/* file_ops.h */
|
|
|
|
struct wmOperatorType;
|
2009-01-28 11:27:25 +00:00
|
|
|
struct wmOperator;
|
|
|
|
struct wmEvent;
|
2009-02-14 14:25:48 +00:00
|
|
|
void FILE_OT_highlight(struct wmOperatorType *ot);
|
|
|
|
void FILE_OT_select(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void FILE_OT_select_all_toggle(struct wmOperatorType *ot);
|
|
|
|
void FILE_OT_select_border(struct wmOperatorType *ot);
|
2009-02-14 14:25:48 +00:00
|
|
|
void FILE_OT_select_bookmark(struct wmOperatorType *ot);
|
2009-11-28 14:37:21 +00:00
|
|
|
void FILE_OT_bookmark_add(struct wmOperatorType *ot);
|
2013-10-08 13:16:14 +00:00
|
|
|
void FILE_OT_bookmark_delete(struct wmOperatorType *ot);
|
2012-09-17 21:38:04 +00:00
|
|
|
void FILE_OT_reset_recent(wmOperatorType *ot);
|
2009-06-30 18:29:30 +00:00
|
|
|
void FILE_OT_hidedot(struct wmOperatorType *ot);
|
2009-09-04 04:29:54 +00:00
|
|
|
void FILE_OT_execute(struct wmOperatorType *ot);
|
2009-02-14 14:25:48 +00:00
|
|
|
void FILE_OT_cancel(struct wmOperatorType *ot);
|
|
|
|
void FILE_OT_parent(struct wmOperatorType *ot);
|
2009-07-10 17:05:04 +00:00
|
|
|
void FILE_OT_directory_new(struct wmOperatorType *ot);
|
2010-11-06 16:09:12 +00:00
|
|
|
void FILE_OT_directory(struct wmOperatorType *ot);
|
2013-11-22 14:35:34 +01:00
|
|
|
void FILE_OT_filename(struct wmOperatorType *ot);
|
2009-07-07 07:25:44 +00:00
|
|
|
void FILE_OT_previous(struct wmOperatorType *ot);
|
|
|
|
void FILE_OT_next(struct wmOperatorType *ot);
|
2009-03-12 06:40:03 +00:00
|
|
|
void FILE_OT_refresh(struct wmOperatorType *ot);
|
2009-03-08 13:14:12 +00:00
|
|
|
void FILE_OT_bookmark_toggle(struct wmOperatorType *ot);
|
2009-07-05 22:26:43 +00:00
|
|
|
void FILE_OT_filenum(struct wmOperatorType *ot);
|
2009-07-10 17:05:04 +00:00
|
|
|
void FILE_OT_delete(struct wmOperatorType *ot);
|
2009-07-26 18:52:27 +00:00
|
|
|
void FILE_OT_rename(struct wmOperatorType *ot);
|
2010-05-08 21:02:22 +00:00
|
|
|
void FILE_OT_smoothscroll(struct wmOperatorType *ot);
|
2009-01-28 11:27:25 +00:00
|
|
|
|
2010-01-20 12:28:33 +00:00
|
|
|
int file_exec(bContext *C, struct wmOperator *exec_op);
|
2009-01-28 11:27:25 +00:00
|
|
|
int file_cancel_exec(bContext *C, struct wmOperator *unused);
|
2009-02-10 17:53:10 +00:00
|
|
|
int file_parent_exec(bContext *C, struct wmOperator *unused);
|
2009-07-07 07:25:44 +00:00
|
|
|
int file_previous_exec(bContext *C, struct wmOperator *unused);
|
|
|
|
int file_next_exec(bContext *C, struct wmOperator *unused);
|
2009-07-10 17:05:04 +00:00
|
|
|
int file_filename_exec(bContext *C, struct wmOperator *unused);
|
|
|
|
int file_directory_exec(bContext *C, struct wmOperator *unused);
|
2012-04-29 15:47:02 +00:00
|
|
|
int file_directory_new_exec(bContext *C, struct wmOperator *unused);
|
2009-07-10 17:05:04 +00:00
|
|
|
int file_delete_exec(bContext *C, struct wmOperator *unused);
|
|
|
|
|
2012-07-04 15:04:38 +00:00
|
|
|
int file_highlight_set(struct SpaceFile *sfile, struct ARegion *ar, int mx, int my);
|
2009-01-18 18:24:11 +00:00
|
|
|
|
2010-09-17 09:27:31 +00:00
|
|
|
void file_sfile_to_operator(struct wmOperator *op, struct SpaceFile *sfile, char *filepath);
|
|
|
|
void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
|
|
|
|
|
2009-07-10 17:05:04 +00:00
|
|
|
|
2009-05-14 18:08:14 +00:00
|
|
|
/* filesel.c */
|
2012-06-18 13:01:24 +00:00
|
|
|
float file_shorten_string(char *string, float w, int front);
|
|
|
|
float file_string_width(const char *str);
|
2010-11-06 17:03:11 +00:00
|
|
|
|
2010-12-03 12:30:59 +00:00
|
|
|
float file_font_pointsize(void);
|
2010-03-10 19:30:20 +00:00
|
|
|
void file_change_dir(bContext *C, int checkdir);
|
2012-06-17 14:16:26 +00:00
|
|
|
int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matched_file);
|
2013-06-19 11:53:48 +00:00
|
|
|
bool autocomplete_directory(struct bContext *C, char *str, void *arg_v);
|
|
|
|
bool autocomplete_file(struct bContext *C, char *str, void *arg_v);
|
2009-05-14 18:08:14 +00:00
|
|
|
|
2009-06-29 20:23:40 +00:00
|
|
|
/* file_panels.c */
|
|
|
|
void file_panels_register(struct ARegionType *art);
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __FILE_INTERN_H__ */
|
2008-12-14 12:16:55 +00:00
|
|
|
|