Blender V2.61 - r43446
Enumerations | Functions

file_draw.c File Reference

#include <math.h>
#include <string.h>
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BLF_api.h"
#include "BLF_translation.h"
#include "IMB_imbuf_types.h"
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "RNA_access.h"
#include "ED_fileselect.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "WM_types.h"
#include "fsmenu.h"
#include "filelist.h"
#include "file_intern.h"

Go to the source code of this file.

Enumerations

enum  { B_FS_DIRNAME, B_FS_FILENAME }

Functions

static void do_file_buttons (bContext *C, void *UNUSED(arg), int event)
void file_draw_buttons (const bContext *C, ARegion *ar)
static void draw_tile (int sx, int sy, int width, int height, int colorid, int shade)
static int get_file_icon (struct direntry *file)
static void file_draw_icon (uiBlock *block, char *path, int sx, int sy, int icon, int width, int height)
static void file_draw_string (int sx, int sy, const char *string, float width, int height, short align)
void file_calc_previews (const bContext *C, ARegion *ar)
static void file_draw_preview (uiBlock *block, struct direntry *file, int sx, int sy, ImBuf *imb, FileLayout *layout, short dropshadow)
static void renamebutton_cb (bContext *C, void *UNUSED(arg1), char *oldname)
static void draw_background (FileLayout *layout, View2D *v2d)
static void draw_dividers (FileLayout *layout, View2D *v2d)
void file_draw_list (const bContext *C, ARegion *ar)

Detailed Description

Definition in file file_draw.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
B_FS_DIRNAME 
B_FS_FILENAME 

Definition at line 76 of file file_draw.c.


Function Documentation

static void do_file_buttons ( bContext C,
void *  UNUSEDarg,
int  event 
) [static]

Definition at line 82 of file file_draw.c.

References B_FS_DIRNAME, B_FS_FILENAME, file_directory_exec(), file_filename_exec(), and NULL.

Referenced by file_draw_buttons().

static void draw_background ( FileLayout layout,
View2D v2d 
) [static]
static void draw_dividers ( FileLayout layout,
View2D v2d 
) [static]
static void draw_tile ( int  sx,
int  sy,
int  width,
int  height,
int  colorid,
int  shade 
) [static]

Definition at line 237 of file file_draw.c.

References UI_CNR_ALL, UI_ThemeColorShade(), uiRoundBox(), and uiSetRoundBox().

Referenced by file_draw_list().

void file_calc_previews ( const bContext C,
ARegion ar 
)
void file_draw_buttons ( const bContext C,
ARegion ar 
)
static void file_draw_icon ( uiBlock block,
char *  path,
int  sx,
int  sy,
int  icon,
int  width,
int  height 
) [static]

Definition at line 278 of file file_draw.c.

References LABEL, NULL, uiButSetDragPath(), and uiDefIconBut().

Referenced by file_draw_list().

void file_draw_list ( const bContext C,
ARegion ar 
)

Definition at line 444 of file file_draw.c.

References FileSelectParams::active_file, COLUMN_DATE, COLUMN_MODE1, COLUMN_MODE2, COLUMN_MODE3, COLUMN_NAME, COLUMN_OWNER, COLUMN_SIZE, COLUMN_TIME, FileLayout::column_widths, FileLayout::columns, CTX_wm_space_file(), View2D::cur, direntry::date, FileSelectParams::display, draw_background(), draw_dividers(), draw_tile(), ED_fileselect_get_layout(), ED_fileselect_get_params(), ED_fileselect_layout_numfiles(), ED_fileselect_layout_offset(), ED_fileselect_layout_tilepos(), EDITING_FILE, file_draw_icon(), file_draw_preview(), file_draw_string(), FILE_IMGDISPLAY, FILE_LAYOUT_HOR, FILE_LONGDISPLAY, FILE_SHORTDISPLAY, filelist_file(), filelist_geticon(), filelist_getimage(), filelist_numfiles(), SpaceFile::files, files, FileLayout::flag, direntry::flags, get_file_icon(), HILITED_FILE, i, ICON_DEFAULT_HEIGHT_SCALE, ICON_DEFAULT_WIDTH_SCALE, if(), IMAGEFILE, SpaceFile::layout, direntry::mode1, direntry::mode2, direntry::mode3, direntry::owner, SpaceFile::params, direntry::path, direntry::relname, renamebutton_cb(), FileSelectParams::renameedit, FileLayout::rows, SELECTED_FILE, direntry::selflag, direntry::size, TEX, FileLayout::textheight, TH_BACK, TH_HILITE, TH_TEXT, FileLayout::tile_border_y, FileLayout::tile_h, FileLayout::tile_w, direntry::time, View2D::tot, direntry::type, UI_BUT_NO_UTF8, UI_CNR_NONE, UI_EMBOSS, UI_STYLE_TEXT_CENTER, UI_STYLE_TEXT_LEFT, UI_ThemeColor4(), UI_UNIT_Y, uiBeginBlock(), uiButActiveOnly(), uiButSetFlag(), uiButSetRenameFunc(), uiDefBut(), uiDrawBlock(), uiEndBlock(), uiSetRoundBox(), ARegion::v2d, rctf::xmin, and rctf::ymax.

Referenced by file_main_area_draw().

static void file_draw_preview ( uiBlock block,
struct direntry file,
int  sx,
int  sy,
ImBuf imb,
FileLayout layout,
short  dropshadow 
) [static]
static void file_draw_string ( int  sx,
int  sy,
const char *  string,
float  width,
int  height,
short  align 
) [static]
static int get_file_icon ( struct direntry file) [static]
static void renamebutton_cb ( bContext C,
void *  UNUSEDarg1,
char *  oldname 
) [static]