diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-01-06 17:42:54 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-01-06 17:42:54 +0300 |
commit | b1cb844e0539376cb41cd15bf802aea62848b90a (patch) | |
tree | 5e67be9915d4a76afd9e894cc2e0783d439c41be /source/blender/makesdna | |
parent | 10e6566aebec1c1c623cd88c3887db7c113d5af9 (diff) |
2.5 - Start of filebrowser.
- basic drawing of list and thumbnail view (switchable through 'favourits' icon in header)
- selection of files and directories (bookmarks) works with the RMB (right mouse button)
- load operator for files still unstable (no check for correct file type) and incomplete. (WM_operator_free missing)
immediate TODOS:
- fix load file operator
- finish drawing of buttons in header
- drawing of detailed list with all file info.
- finish selection and execute operators (LMB and MMB execute)
later todos:
- parent dir
- keymap for all the shortcuts
- append/link and databrowse
- ...
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 44 |
2 files changed, 20 insertions, 25 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 353bacf7a43..454ebd4873e 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -194,6 +194,7 @@ typedef struct ARegion { #define RGN_TYPE_HEADER 1 #define RGN_TYPE_CHANNELS 2 #define RGN_TYPE_TEMPORARY 3 +#define RGN_TYPE_UI 4 /* region alignment */ #define RGN_ALIGN_NONE 0 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 170542ab530..3943d552d41 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -51,6 +51,8 @@ struct bNodeTree; struct uiBlock; struct FileList; struct bGPdata; +struct FileSelectParams; +struct wmOperator; /** * The base structure all the other spaces @@ -160,35 +162,27 @@ typedef struct SpaceFile { SpaceLink *next, *prev; ListBase regionbase; /* storage of regions for inactive spaces */ int spacetype; - float blockscale; - - short blockhandler[8]; - struct direntry *filelist; - int totfile; - - char title[24]; - char dir[240]; - char file[80]; + struct FileSelectParams* params; /* config and input for file select */ - short type, ofs, flag, sort; - short maxnamelen, collums, f_fp, pad1; - int pad2; - char fp_str[8]; + /* operator that is invoking fileselect + op->exec() will be called on the 'Load' button. + if operator provides op->cancel(), then this will be invoked + on the cancel button. + */ + struct wmOperator *op; + + /* view settings - XXX - move into own struct */ + short prv_w; + short prv_h; + short tile_w; + short tile_h; + short tile_border_x; + short tile_border_y; + short prv_border_x; + short prv_border_y; - struct BlendHandle *libfiledata; - - unsigned short retval; /* event */ - short menu, act, ipotype; - - /* one day we'll add unions to dna */ - void (*returnfunc)(char *); - void (*returnfunc_event)(unsigned short); - void (*returnfunc_args)(char *, void *, void *); - void *arg1, *arg2; - short *menup; /* pointer to menu result or ID browsing */ - char *pupmenu; /* optional menu in header */ } SpaceFile; typedef struct SpaceOops { |