diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-06-06 09:00:40 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-06-06 09:00:40 +0400 |
commit | 964d44e6bcbc4f01e12de0ba097654564df252ab (patch) | |
tree | e751f993386f66069a7464f93ff11c619c507e89 /source/blender/editors/include | |
parent | 4e1bb5a806d65982320f89216b24ac7267f64f4a (diff) | |
parent | 880c43ad5a53203b64a6d6a51e239a4bfc6ed540 (diff) |
NLA SoC: Merge from 2.5
20571 to 20667
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_fileselect.h | 5 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 59 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 3 |
4 files changed, 44 insertions, 25 deletions
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 7cbef4984d7..34aefa91225 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -35,7 +35,6 @@ struct SpaceFile; #define FILE_IMGDISPLAY 3 typedef struct FileSelectParams { - int type; /* the mode of the filebrowser, FILE_BLENDER, FILE_SPECIAL, FILE_MAIN or FILE_LOADLIB */ char title[24]; /* title, also used for the text of the execute button */ char dir[240]; /* directory */ char file[80]; /* file */ @@ -96,8 +95,8 @@ typedef struct FileLayout FileSelectParams* ED_fileselect_get_params(struct SpaceFile *sfile); -short ED_fileselect_set_params(struct SpaceFile *sfile, int type, const char *title, const char *path, - short flag, short display, short filter); +short ED_fileselect_set_params(struct SpaceFile *sfile, const char *title, const char *path, + short flag, short display, short filter, short sort); void ED_fileselect_reset_params(struct SpaceFile *sfile); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 3d0de795778..bfa819632c9 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -56,7 +56,7 @@ void ED_base_object_free_and_unlink(struct Scene *scene, struct Base *base); void ED_object_apply_obmat(struct Object *ob); /* single object duplicate, if dupflag==0, fully linked, else it uses U.dupflag */ -Base *ED_object_add_duplicate(struct Scene *scene, struct Base *base, int usedupflag); +struct Base *ED_object_add_duplicate(struct Scene *scene, struct Base *base, int usedupflag); /* bitflags for enter/exit editmode */ diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 97c2da5297f..6511d4d91eb 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -52,6 +52,7 @@ struct rctf; struct uiStyle; struct uiFontStyle; struct ColorBand; +struct CurveMapping; typedef struct uiBut uiBut; typedef struct uiBlock uiBlock; @@ -177,20 +178,21 @@ typedef struct uiLayout uiLayout; #define INLINK (23<<9) #define KEYEVT (24<<9) #define ICONTEXTROW (25<<9) -#define HSVCUBE (26<<9) -#define PULLDOWN (27<<9) -#define ROUNDBOX (28<<9) -#define CHARTAB (29<<9) +#define HSVCUBE (26<<9) +#define PULLDOWN (27<<9) +#define ROUNDBOX (28<<9) +#define CHARTAB (29<<9) #define BUT_COLORBAND (30<<9) -#define BUT_NORMAL (31<<9) -#define BUT_CURVE (32<<9) +#define BUT_NORMAL (31<<9) +#define BUT_CURVE (32<<9) #define BUT_TOGDUAL (33<<9) -#define ICONTOGN (34<<9) -#define FTPREVIEW (35<<9) -#define NUMABS (36<<9) -#define TOGBUT (37<<9) -#define OPTION (38<<9) -#define OPTIONN (39<<9) +#define ICONTOGN (34<<9) +#define FTPREVIEW (35<<9) +#define NUMABS (36<<9) +#define TOGBUT (37<<9) +#define OPTION (38<<9) +#define OPTIONN (39<<9) +#define SEARCH_MENU (40<<9) #define BUTTYPE (63<<9) /* Drawing @@ -401,6 +403,8 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip); +uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, char *tip); + void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); void uiBlockColorbandButtons(struct uiBlock *block, struct ColorBand *coba, struct rctf *butr, int event); @@ -425,20 +429,34 @@ uiBut *uiFindInlink(uiBlock *block, void *poin); * * uiButSetCompleteFunc is for tab completion. * + * uiButSearchFunc is for name buttons, showing a popup with matches + * * uiBlockSetFunc and uiButSetFunc are callbacks run when a button is used, * in case events, operators or RNA are not sufficient to handle the button. * * uiButSetNFunc will free the argument with MEM_freeN. */ +typedef struct uiSearchItems uiSearchItems; + typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2); +typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr); typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2); typedef void (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg); +typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, char *str, uiSearchItems *items); typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event); + + /* use inside searchfunc to add items */ +int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin); + /* bfunc gets search item *poin as arg2, or if NULL the old string */ +void uiButSetSearchFunc (uiBut *but, uiButSearchFunc sfunc, void *arg1, uiButHandleFunc bfunc); + /* height in pixels, it's using hardcoded values still */ +int uiSearchBoxhHeight(void); void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg); void uiBlockSetButmFunc (uiBlock *block, uiMenuHandleFunc func, void *arg); void uiBlockSetFunc (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2); +void uiBlockSetRenameFunc(uiBlock *block, uiButHandleRenameFunc func, void *arg1); void uiButSetFunc (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2); void uiButSetNFunc (uiBut *but, uiButHandleNFunc func, void *argN, void *arg2); @@ -497,9 +515,9 @@ void test_imapoin_but(struct bContext *C, char *name, struct ID **idpp); void autocomplete_bone(struct bContext *C, char *str, void *arg_v); void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v); -struct CurveMapping; struct rctf; void curvemap_buttons(uiBlock *block, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect); +void colorband_buttons(uiBlock *block, struct ColorBand *coba, struct rctf *rect, int small); /* Module @@ -539,9 +557,10 @@ uiBut *uiDefMenuTogR(uiBlock *block, struct PointerRNA *ptr, char *propname, cha #define UI_UNIT_X 20 #define UI_UNIT_Y 20 -#define UI_LAYOUT_ALIGN_LEFT 0 -#define UI_LAYOUT_ALIGN_CENTER 1 -#define UI_LAYOUT_ALIGN_RIGHT 2 +#define UI_LAYOUT_ALIGN_EXPAND 0 +#define UI_LAYOUT_ALIGN_LEFT 1 +#define UI_LAYOUT_ALIGN_CENTER 2 +#define UI_LAYOUT_ALIGN_RIGHT 3 uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style); void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout); @@ -558,14 +577,16 @@ void uiLayoutSetEnabled(uiLayout *layout, int enabled); void uiLayoutSetRedAlert(uiLayout *layout, int redalert); void uiLayoutSetAlignment(uiLayout *layout, int alignment); void uiLayoutSetKeepAspect(uiLayout *layout, int keepaspect); -void uiLayoutSetScale(uiLayout *layout, float scale); +void uiLayoutSetScaleX(uiLayout *layout, float scale); +void uiLayoutSetScaleY(uiLayout *layout, float scale); int uiLayoutGetActive(uiLayout *layout); int uiLayoutGetEnabled(uiLayout *layout); int uiLayoutGetRedAlert(uiLayout *layout); int uiLayoutGetAlignment(uiLayout *layout); int uiLayoutGetKeepAspect(uiLayout *layout); -float uiLayoutGetScale(uiLayout *layout); +float uiLayoutGetScaleX(uiLayout *layout); +float uiLayoutGetScaleY(uiLayout *layout); /* layout specifiers */ uiLayout *uiLayoutRow(uiLayout *layout, int align); @@ -584,6 +605,8 @@ void uiTemplateHeaderID(uiLayout *layout, struct bContext *C, struct PointerRNA uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr); uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr); void uiTemplatePreview(uiLayout *layout, struct ID *id); +void uiTemplateColorRamp(uiLayout *layout, struct ColorBand *coba, int expand); +void uiTemplateCurveMapping(uiLayout *layout, struct CurveMapping *cumap, int type); /* items */ void uiItemO(uiLayout *layout, char *name, int icon, char *opname); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 84ce3762f86..5339a255dbc 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -1098,9 +1098,6 @@ void UI_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset); // get a 3 byte color, blended and shaded between two other char color pointers void UI_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset); -// get pointer from RNA pointer -int UI_GetIconRNA(struct PointerRNA *ptr); - // internal (blender) usage only, for init and set active void UI_SetTheme(int spacetype, int regionid); |