Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/times.h>
#include <dirent.h>
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BLF_api.h"
#include "ED_fileselect.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "file_intern.h"
#include "filelist.h"
#include <fnmatch.h>
Go to the source code of this file.
Definition in file filesel.c.
void autocomplete_directory | ( | struct bContext * | C, |
char * | str, | ||
void * | UNUSEDarg_v | ||
) |
Definition at line 601 of file filesel.c.
References autocomplete_begin(), autocomplete_do_name(), autocomplete_end(), BLI_add_slash(), BLI_exists(), BLI_join_dirfile(), BLI_split_dir_part(), BLI_strncpy(), CTX_wm_space_file(), FileSelectParams::dir, FILE_MAX, SpaceFile::files, NULL, and SpaceFile::params.
void autocomplete_file | ( | struct bContext * | C, |
char * | str, | ||
void * | UNUSEDarg_v | ||
) |
Definition at line 648 of file filesel.c.
References autocomplete_begin(), autocomplete_do_name(), autocomplete_end(), CTX_wm_space_file(), FILE_MAX, filelist_file(), filelist_numfiles(), SpaceFile::files, i, direntry::relname, and direntry::type.
static void column_widths | ( | struct FileList * | files, |
struct FileLayout * | layout | ||
) | [static] |
Definition at line 434 of file filesel.c.
References COLUMN_DATE, COLUMN_MODE1, COLUMN_MODE2, COLUMN_MODE3, COLUMN_NAME, COLUMN_OWNER, COLUMN_SIZE, COLUMN_TIME, FileLayout::column_widths, direntry::date, file_string_width(), filelist_file(), filelist_numfiles(), i, len(), MAX_FILE_COLUMN, direntry::mode1, direntry::mode2, direntry::mode3, direntry::owner, direntry::relname, direntry::size, and direntry::time.
Referenced by ED_fileselect_init_layout().
Definition at line 668 of file filesel.c.
References FileSelectParams::active_file, filelist_free(), filelist_freelib(), SpaceFile::files, NC_SPACE, ND_SPACE_FILE_LIST, NULL, SpaceFile::params, thumbnails_stop(), and WM_event_add_notifier().
Referenced by ED_fileselect_exit(), file_change_dir(), file_delete_exec(), file_directory_new_exec(), file_hidedot_exec(), file_refresh_exec(), and renamebutton_cb().
Definition at line 681 of file filesel.c.
References ED_fileselect_clear(), EVT_FILESELECT_EXTERNAL_CANCEL, SpaceFile::files, folderlist_free(), SpaceFile::folders_next, SpaceFile::folders_prev, MEM_freeN(), NULL, SpaceFile::op, and WM_event_fileselect_event().
Referenced by ED_area_exit().
FileLayout* ED_fileselect_get_layout | ( | struct SpaceFile * | sfile, |
struct ARegion * | ar | ||
) |
Definition at line 552 of file filesel.c.
References ED_fileselect_init_layout(), and SpaceFile::layout.
Referenced by file_draw_list(), and file_main_area_draw().
FileSelectParams* ED_fileselect_get_params | ( | struct SpaceFile * | sfile | ) | [read] |
Definition at line 95 of file filesel.c.
References ED_fileselect_set_params(), and SpaceFile::params.
Referenced by bookmark_add_exec(), ED_fileselect_init_layout(), file_border_select_modal(), file_draw_buttons(), file_draw_list(), file_hilight_set(), file_main_area_draw(), file_refresh(), and file_select_do().
Definition at line 468 of file filesel.c.
References COLUMN_DATE, COLUMN_MODE1, COLUMN_MODE2, COLUMN_MODE3, COLUMN_NAME, COLUMN_OWNER, COLUMN_SIZE, COLUMN_TIME, column_widths(), FileLayout::column_widths, FileLayout::columns, View2D::cur, FileLayout::dirty, FileSelectParams::display, ED_fileselect_get_params(), FALSE, file_font_pointsize(), FILE_IMGDISPLAY, FILE_LAYOUT_HOR, FILE_LAYOUT_VER, FILE_SHORTDISPLAY, filelist_numfiles(), SpaceFile::files, FileLayout::flag, FileLayout::height, ICON_DEFAULT_WIDTH_SCALE, SpaceFile::layout, MEM_callocN(), NULL, FileLayout::prv_border_x, FileLayout::prv_border_y, FileLayout::prv_h, FileLayout::prv_w, FileLayout::rows, FileLayout::textheight, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, TRUE, ARegion::v2d, FileLayout::width, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ED_fileselect_get_layout(), and file_calc_previews().
int ED_fileselect_layout_numfiles | ( | FileLayout * | layout, |
struct ARegion * | ar | ||
) |
Definition at line 266 of file filesel.c.
References FileLayout::columns, View2D::cur, FILE_LAYOUT_HOR, FileLayout::flag, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, ARegion::v2d, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by file_draw_list(), and file_smoothscroll_invoke().
int ED_fileselect_layout_offset | ( | FileLayout * | layout, |
int | x, | ||
int | y | ||
) |
Definition at line 328 of file filesel.c.
References FileLayout::columns, FILE_LAYOUT_HOR, FileLayout::flag, NULL, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, and FileLayout::tile_w.
Referenced by file_draw_list(), file_hilight_set(), and file_smoothscroll_invoke().
FileSelection ED_fileselect_layout_offset_rect | ( | FileLayout * | layout, |
const rcti * | rect | ||
) |
Definition at line 286 of file filesel.c.
References CLAMP(), FileLayout::columns, FILE_LAYOUT_HOR, FileSelection::first, FileLayout::flag, is_inside(), FileSelection::last, NULL, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
void ED_fileselect_layout_tilepos | ( | FileLayout * | layout, |
int | tile, | ||
int * | x, | ||
int * | y | ||
) |
Definition at line 349 of file filesel.c.
References FileLayout::columns, FILE_LAYOUT_HOR, FileLayout::flag, FileLayout::rows, FileLayout::tile_border_x, FileLayout::tile_border_y, FileLayout::tile_h, and FileLayout::tile_w.
Referenced by file_draw_list().
void ED_fileselect_reset_params | ( | SpaceFile * | sfile | ) |
Definition at line 259 of file filesel.c.
References FILE_UNIX, FileSelectParams::flag, SpaceFile::params, FileSelectParams::title, and FileSelectParams::type.
short ED_fileselect_set_params | ( | SpaceFile * | sfile | ) |
Definition at line 103 of file filesel.c.
References BLENDERFILE, BLI_cleanup_dir(), BLI_path_abs(), BLI_split_dirfile(), BLI_strncpy(), BTXFILE, COLLADAFILE, FileSelectParams::dir, FileLayout::dirty, FileSelectParams::display, FALSE, FileSelectParams::file, FILE_ACTIVELAY, FILE_AUTOSELECT, FILE_DIRSEL_ONLY, FILE_FILTER, FILE_HIDE_DOT, FILE_IMGDISPLAY, FILE_LINK, FILE_LOADLIB, FILE_MAX, FILE_SHORTDISPLAY, FILE_SORT_ALPHA, FILE_SPECIAL, FILE_UNIX, FileSelectParams::filter, FileSelectParams::filter_glob, FileSelectParams::flag, UserDef::flag, FOLDERFILE, folderlist_new(), folderlist_pushdir(), SpaceFile::folders_prev, FTFONTFILE, G, IMAGEFILE, SpaceFile::layout, MEM_callocN(), MOVIEFILE, wmOperatorType::name, NULL, SpaceFile::op, OPERATORFILE, SpaceFile::params, wmOperator::ptr, PYSCRIPTFILE, RNA_boolean_get(), RNA_boolean_set(), RNA_int_get(), RNA_string_get(), RNA_struct_find_property(), RNA_struct_property_is_set(), FileSelectParams::sort, SOUNDFILE, TEXTFILE, FileSelectParams::title, TRUE, wmOperator::type, FileSelectParams::type, U, UserDef::uiflag, USER_FILTERFILEEXTS, USER_HIDE_DOT, USER_RELPATHS, and USER_SHOW_THUMBNAILS.
Referenced by ED_fileselect_get_params(), and wm_handler_fileselect_call().
void file_change_dir | ( | bContext * | C, |
int | checkdir | ||
) |
Definition at line 560 of file filesel.c.
References BLI_is_dir(), BLI_strncpy(), CTX_wm_space_file(), FileSelectParams::dir, ED_fileselect_clear(), filelist_dir(), filelist_setdir(), SpaceFile::files, folderlist_clear_next(), folderlist_free(), folderlist_pushdir(), SpaceFile::folders_next, SpaceFile::folders_prev, and SpaceFile::params.
Referenced by bookmark_select_exec(), file_directory_exec(), file_next_exec(), file_parent_exec(), file_previous_exec(), and file_select_do().
float file_font_pointsize | ( | void | ) |
Definition at line 418 of file filesel.c.
References BLF_height(), uiFontStyle::points, UI_DPI_FAC, UI_GetStyle(), uiFontStyle::uifont_id, uiStyleFontSet(), and uiStyle::widget.
Referenced by ED_fileselect_init_layout().
int file_select_match | ( | struct SpaceFile * | sfile, |
const char * | pattern | ||
) |
Definition at line 582 of file filesel.c.
References filelist_file(), filelist_numfiles(), SpaceFile::files, i, direntry::relname, SELECTED_FILE, and direntry::selflag.
Referenced by file_filename_exec().
float file_shorten_string | ( | char * | string, |
float | w, | ||
int | front | ||
) |
Definition at line 363 of file filesel.c.
References BLI_strncpy(), FILE_MAX, file_string_width(), and strlen().
Referenced by file_draw_string().
float file_string_width | ( | const char * | str | ) |
Definition at line 411 of file filesel.c.
References BLF_width(), UI_GetStyle(), uiFontStyle::uifont_id, uiStyleFontSet(), and uiStyle::widget.
Referenced by column_widths(), and file_shorten_string().
static int is_inside | ( | int | x, |
int | y, | ||
int | cols, | ||
int | rows | ||
) | [static] |
Definition at line 281 of file filesel.c.
Referenced by ED_fileselect_layout_offset_rect().