Blender V2.61 - r43446
Defines | Typedefs | Enumerations | Functions

file_ops.c File Reference

#include "BKE_context.h"
#include "BKE_screen.h"
#include "BKE_global.h"
#include "BKE_report.h"
#include "BKE_main.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "ED_screen.h"
#include "ED_fileselect.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_view2d.h"
#include "WM_api.h"
#include "WM_types.h"
#include "file_intern.h"
#include "filelist.h"
#include "fsmenu.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>

Go to the source code of this file.

Defines

#define NOTACTIVEFILE   0
#define ACTIVATE   1
#define INACTIVATE   2

Typedefs

typedef enum FileSelect FileSelect

Enumerations

enum  FileSelect { FILE_SELECT_NOTHING = 0, FILE_SELECT_DIR = 1, FILE_SELECT_FILE = 2 }

Functions

static FileSelection find_file_mouse_rect (SpaceFile *sfile, struct ARegion *ar, const rcti *rect)
static void file_deselect_all (SpaceFile *sfile, unsigned int flag)
static void clamp_to_filelist (int numfiles, FileSelection *sel)
static FileSelection file_selection_get (bContext *C, const rcti *rect, short fill)
static FileSelect file_select_do (bContext *C, int selected_idx)
static FileSelect file_select (bContext *C, const rcti *rect, FileSelType select, short fill)
static int file_border_select_modal (bContext *C, wmOperator *op, wmEvent *event)
static int file_border_select_exec (bContext *C, wmOperator *op)
void FILE_OT_select_border (wmOperatorType *ot)
static int file_select_invoke (bContext *C, wmOperator *op, wmEvent *event)
void FILE_OT_select (wmOperatorType *ot)
static int file_select_all_exec (bContext *C, wmOperator *UNUSED(op))
void FILE_OT_select_all_toggle (wmOperatorType *ot)
static int bookmark_select_exec (bContext *C, wmOperator *op)
void FILE_OT_select_bookmark (wmOperatorType *ot)
static int bookmark_add_exec (bContext *C, wmOperator *UNUSED(op))
void FILE_OT_bookmark_add (wmOperatorType *ot)
static int bookmark_delete_exec (bContext *C, wmOperator *op)
void FILE_OT_delete_bookmark (wmOperatorType *ot)
int file_hilight_set (SpaceFile *sfile, ARegion *ar, int mx, int my)
static int file_highlight_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void FILE_OT_highlight (struct wmOperatorType *ot)
int file_cancel_exec (bContext *C, wmOperator *UNUSED(unused))
static int file_operator_poll (bContext *C)
void FILE_OT_cancel (struct wmOperatorType *ot)
void file_sfile_to_operator (wmOperator *op, SpaceFile *sfile, char *filepath)
void file_operator_to_sfile (SpaceFile *sfile, wmOperator *op)
void file_draw_check_cb (bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
int file_draw_check_exists (SpaceFile *sfile)
int file_exec (bContext *C, wmOperator *exec_op)
void FILE_OT_execute (struct wmOperatorType *ot)
int file_parent_exec (bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_parent (struct wmOperatorType *ot)
static int file_refresh_exec (bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_previous (struct wmOperatorType *ot)
int file_previous_exec (bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_next (struct wmOperatorType *ot)
int file_next_exec (bContext *C, wmOperator *UNUSED(unused))
static int file_smoothscroll_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void FILE_OT_smoothscroll (wmOperatorType *ot)
static int new_folder_path (const char *parent, char *folder, char *name)
int file_directory_new_exec (bContext *C, wmOperator *op)
void FILE_OT_directory_new (struct wmOperatorType *ot)
static void file_expand_directory (bContext *C)
static int file_directory_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
int file_directory_exec (bContext *C, wmOperator *UNUSED(unused))
int file_filename_exec (bContext *C, wmOperator *UNUSED(unused))
static int file_directory_poll (bContext *C)
void FILE_OT_directory (struct wmOperatorType *ot)
void FILE_OT_refresh (struct wmOperatorType *ot)
static int file_hidedot_exec (bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_hidedot (struct wmOperatorType *ot)
struct ARegionfile_buttons_region (struct ScrArea *sa)
static int file_bookmark_toggle_exec (bContext *C, wmOperator *UNUSED(unused))
void FILE_OT_bookmark_toggle (struct wmOperatorType *ot)
static int file_filenum_exec (bContext *C, wmOperator *op)
void FILE_OT_filenum (struct wmOperatorType *ot)
static int file_rename_exec (bContext *C, wmOperator *UNUSED(op))
static int file_rename_poll (bContext *C)
void FILE_OT_rename (struct wmOperatorType *ot)
static int file_delete_poll (bContext *C)
int file_delete_exec (bContext *C, wmOperator *UNUSED(op))
void FILE_OT_delete (struct wmOperatorType *ot)
void ED_operatormacros_file (void)

Detailed Description

Definition in file file_ops.c.


Define Documentation

#define ACTIVATE   1

Definition at line 68 of file file_ops.c.

#define INACTIVATE   2

Definition at line 69 of file file_ops.c.

#define NOTACTIVEFILE   0

Definition at line 67 of file file_ops.c.


Typedef Documentation

typedef enum FileSelect FileSelect

Enumeration Type Documentation

enum FileSelect
Enumerator:
FILE_SELECT_NOTHING 
FILE_SELECT_DIR 
FILE_SELECT_FILE 

Definition at line 99 of file file_ops.c.


Function Documentation

static int bookmark_add_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int bookmark_delete_exec ( bContext C,
wmOperator op 
) [static]
static int bookmark_select_exec ( bContext C,
wmOperator op 
) [static]
static void clamp_to_filelist ( int  numfiles,
FileSelection sel 
) [static]

Definition at line 105 of file file_ops.c.

References FileSelection::first, and FileSelection::last.

Referenced by file_selection_get().

void ED_operatormacros_file ( void  )

Definition at line 1427 of file file_ops.c.

Referenced by ED_spacetypes_init().

static int file_bookmark_toggle_exec ( bContext C,
wmOperator UNUSEDunused 
) [static]
static int file_border_select_exec ( bContext C,
wmOperator op 
) [static]
static int file_border_select_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
struct ARegion* file_buttons_region ( struct ScrArea sa) [read]
int file_cancel_exec ( bContext C,
wmOperator UNUSEDunused 
)
int file_delete_exec ( bContext C,
wmOperator UNUSEDop 
)
static int file_delete_poll ( bContext C) [static]
static void file_deselect_all ( SpaceFile sfile,
unsigned int  flag 
) [static]
int file_directory_exec ( bContext C,
wmOperator UNUSEDunused 
)
static int file_directory_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
int file_directory_new_exec ( bContext C,
wmOperator op 
)
static int file_directory_poll ( bContext C) [static]
void file_draw_check_cb ( bContext C,
void *  UNUSEDarg1,
void *  UNUSEDarg2 
)
int file_draw_check_exists ( SpaceFile sfile)
int file_exec ( bContext C,
wmOperator exec_op 
)
static void file_expand_directory ( bContext C) [static]
int file_filename_exec ( bContext C,
wmOperator UNUSEDunused 
)
static int file_filenum_exec ( bContext C,
wmOperator op 
) [static]
static int file_hidedot_exec ( bContext C,
wmOperator UNUSEDunused 
) [static]
static int file_highlight_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
int file_hilight_set ( SpaceFile sfile,
ARegion ar,
int  mx,
int  my 
)
int file_next_exec ( bContext C,
wmOperator UNUSEDunused 
)
static int file_operator_poll ( bContext C) [static]

Definition at line 588 of file file_ops.c.

References CTX_wm_space_file(), ED_operator_file_active(), and SpaceFile::op.

Referenced by FILE_OT_cancel(), and FILE_OT_execute().

void file_operator_to_sfile ( SpaceFile sfile,
wmOperator op 
)
void FILE_OT_bookmark_add ( wmOperatorType ot)
void FILE_OT_bookmark_toggle ( struct wmOperatorType ot)
void FILE_OT_cancel ( struct wmOperatorType ot)
void FILE_OT_delete ( struct wmOperatorType ot)
void FILE_OT_delete_bookmark ( wmOperatorType ot)
void FILE_OT_directory ( struct wmOperatorType ot)
void FILE_OT_directory_new ( struct wmOperatorType ot)
void FILE_OT_execute ( struct wmOperatorType ot)
void FILE_OT_filenum ( struct wmOperatorType ot)
void FILE_OT_hidedot ( struct wmOperatorType ot)
void FILE_OT_highlight ( struct wmOperatorType ot)
void FILE_OT_next ( struct wmOperatorType ot)
void FILE_OT_parent ( struct wmOperatorType ot)
void FILE_OT_previous ( struct wmOperatorType ot)
void FILE_OT_refresh ( struct wmOperatorType ot)
void FILE_OT_rename ( struct wmOperatorType ot)
void FILE_OT_select ( wmOperatorType ot)
void FILE_OT_select_all_toggle ( wmOperatorType ot)
void FILE_OT_select_bookmark ( wmOperatorType ot)
void FILE_OT_select_border ( wmOperatorType ot)
void FILE_OT_smoothscroll ( wmOperatorType ot)
int file_parent_exec ( bContext C,
wmOperator UNUSEDunused 
)
int file_previous_exec ( bContext C,
wmOperator UNUSEDunused 
)
static int file_refresh_exec ( bContext C,
wmOperator UNUSEDunused 
) [static]
static int file_rename_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int file_rename_poll ( bContext C) [static]
static FileSelect file_select ( bContext C,
const rcti rect,
FileSelType  select,
short  fill 
) [static]
static int file_select_all_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static FileSelect file_select_do ( bContext C,
int  selected_idx 
) [static]
static int file_select_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static FileSelection file_selection_get ( bContext C,
const rcti rect,
short  fill 
) [static]
void file_sfile_to_operator ( wmOperator op,
SpaceFile sfile,
char *  filepath 
)
static int file_smoothscroll_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
static FileSelection find_file_mouse_rect ( SpaceFile sfile,
struct ARegion ar,
const rcti rect 
) [static]
static int new_folder_path ( const char *  parent,
char *  folder,
char *  name 
) [static]