diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2015-09-24 18:24:20 +0300 |
commit | 27b3ea622f8bd313a8e2827dfec752bf2125566c (patch) | |
tree | f212e49d224ce8e1cfc3b17a64ae524711494391 /source/blender/editors/interface/interface_intern.h | |
parent | 372dff8d1dc7e24d4b2cd37de245588ecfce8bfa (diff) | |
parent | de80e687689032cb85179a1f7e89750573631d5d (diff) |
Merge remote-tracking branch 'origin/master' into cycles_camera_nodescycles_camera_nodes
Note: the branch currently crashes in blender_camera_nodes.cpp:
BL::NodeTree b_ntree = b_data.node_groups[nodes_tree_name];
The crash was introduced in:
cb7cf523e5c000609f32a382e2c0fcc57f635a42
Conflicts:
intern/cycles/SConscript
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/camera.cpp
intern/cycles/render/camera.h
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 223 |
1 files changed, 137 insertions, 86 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 2f66c4a9900..032efad885e 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -36,14 +36,13 @@ #include "BLI_compiler_attrs.h" #include "UI_resources.h" #include "RNA_types.h" +#include "DNA_listBase.h" struct ARegion; struct bContext; -struct IDProperty; struct uiHandleButtonData; struct wmEvent; struct wmOperatorType; -struct wmWindow; struct wmTimer; struct uiStyle; struct uiWidgetColors; @@ -67,7 +66,7 @@ typedef enum { /* standard set */ UI_WTYPE_LABEL, UI_WTYPE_TOGGLE, - UI_WTYPE_OPTION, + UI_WTYPE_CHECKBOX, UI_WTYPE_RADIO, UI_WTYPE_NUMBER, UI_WTYPE_SLIDER, @@ -95,7 +94,7 @@ typedef enum { UI_WTYPE_ICON, UI_WTYPE_SWATCH, UI_WTYPE_RGB_PICKER, - UI_WTYPE_NORMAL, + UI_WTYPE_UNITVEC, UI_WTYPE_BOX, UI_WTYPE_SCROLL, UI_WTYPE_LISTITEM, @@ -122,6 +121,19 @@ enum { /* warn: rest of uiBut->flag in UI_interface.h */ }; +/* some buttons display icons only under special conditions + * (e.g. 'x' icon in search menu) - used with ui_but_icon_extra_get */ +typedef enum uiButExtraIconType { + UI_BUT_ICONEXTRA_NONE = 1, + UI_BUT_ICONEXTRA_UNLINK, + UI_BUT_ICONEXTRA_EYEDROPPER, +} uiButExtraIconType; + +/* uiBut->dragflag */ +enum { + UI_BUT_DRAGPOIN_FREE = (1 << 0), +}; + /* but->pie_dir */ typedef enum RadialDirection { UI_RADIAL_NONE = -1, @@ -157,7 +169,7 @@ extern const short ui_radial_dir_to_angle[8]; #define UI_BITBUT_SET(a, b) ( (a) | 1 << (b) ) #define UI_BITBUT_CLR(a, b) ( (a) & ~(1 << (b)) ) /* bit-row */ -#define UI_BITBUT_ROW(min, max) (((max) >= 31 ? 0xFFFFFFFF : (1 << (max + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0) ) +#define UI_BITBUT_ROW(min, max) (((max) >= 31 ? 0xFFFFFFFF : (1 << ((max) + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0) ) /* split numbuts by ':' and align l/r */ #define USE_NUMBUTS_LR_ALIGN @@ -168,9 +180,9 @@ enum { UI_PIE_INITIAL_DIRECTION = (1 << 1), /* use initial center of pie menu to calculate direction */ UI_PIE_DRAG_STYLE = (1 << 2), /* pie menu is drag style */ UI_PIE_INVALID_DIR = (1 << 3), /* mouse not far enough from center position */ - UI_PIE_FINISHED = (1 << 4), /* pie menu finished but we still wait for a release event */ - UI_PIE_CLICK_STYLE = (1 << 5), /* pie menu changed to click style, click to confirm */ - UI_PIE_ANIMATION_FINISHED = (1 << 6), /* pie animation finished, do not calculate any more motio */ + UI_PIE_CLICK_STYLE = (1 << 4), /* pie menu changed to click style, click to confirm */ + UI_PIE_ANIMATION_FINISHED = (1 << 5), /* pie animation finished, do not calculate any more motion */ + UI_PIE_GESTURE_END_WAIT = (1 << 6), /* pie gesture selection has been done, now wait for mouse motion to end */ }; #define PIE_CLICK_THRESHOLD_SQ 50.0f @@ -212,20 +224,20 @@ struct uiBut { /* both these values use depends on the button type * (polymorphic struct or union would be nicer for this stuff) */ - /* (type == HSVCUBE), Use UI_GRAD_* values. - * (type == NUM), Use to store RNA 'step' value, for dragging and click-step. - * (type == LABEL), Use (a1 == 1.0f) to use a2 as a blending factor (wow, this is imaginative!). - * (type == SCROLL) Use as scroll size. - * (type == SEARCH_MENU) Use as number or rows. - * (type == COLOR) Use as indication of color palette + /* (type == UI_BTYPE_HSVCUBE), Use UI_GRAD_* values. + * (type == UI_BTYPE_NUM), Use to store RNA 'step' value, for dragging and click-step. + * (type == UI_BTYPE_LABEL), Use (a1 == 1.0f) to use a2 as a blending factor (wow, this is imaginative!). + * (type == UI_BTYPE_SCROLL) Use as scroll size. + * (type == UI_BTYPE_SEARCH_MENU) Use as number or rows. + * (type == UI_BTYPE_COLOR) Use as indication of color palette */ float a1; - /* (type == HSVCIRCLE ), Use to store the luminosity. - * (type == NUM), Use to store RNA 'precision' value, for dragging and click-step. - * (type == LABEL), If (a1 == 1.0f) use a2 as a blending factor. - * (type == SEARCH_MENU) Use as number or columns. - * (type == COLOR) Use as index in palette (not so good, needs refactor) + /* (type == UI_BTYPE_HSVCIRCLE ), Use to store the luminosity. + * (type == UI_BTYPE_NUM), Use to store RNA 'precision' value, for dragging and click-step. + * (type == UI_BTYPE_LABEL), If (a1 == 1.0f) use a2 as a blending factor. + * (type == UI_BTYPE_SEARCH_MENU) Use as number or columns. + * (type == UI_BTYPE_COLOR) Use as index in palette (not so good, needs refactor) */ float a2; @@ -253,21 +265,25 @@ struct uiBut { uiLink *link; short linkto[2]; /* region relative coords */ - const char *tip, *lockstr; + const char *tip; + uiButToolTipFunc tip_func; + void *tip_argN; + + const char *lockstr; BIFIconID icon; bool lock; - char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied from the block */ + char dt; /* drawtype: UI_EMBOSS, UI_EMBOSS_NONE ... etc, copied from the block */ signed char pie_dir; /* direction in a pie menu, used for collision detection (RadialDirection) */ char changed; /* could be made into a single flag */ unsigned char unit_type; /* so buttons can support unit systems which are not RNA */ short modifier_key; short iconadd; - /* BLOCK data */ + /* UI_BTYPE_BLOCK data */ uiBlockCreateFunc block_create_func; - /* PULLDOWN/MENU data */ + /* UI_BTYPE_PULLDOWN/UI_BTYPE_MENU data */ uiMenuCreateFunc menu_create_func; /* RNA data */ @@ -286,6 +302,7 @@ struct uiBut { /* Draggable data, type is WM_DRAG_... */ char dragtype; + short dragflag; void *dragpoin; struct ImBuf *imb; float imb_scale; @@ -306,10 +323,22 @@ struct uiBut { uiBlock *block; }; +typedef struct ColorPicker { + struct ColorPicker *next, *prev; + float color_data[3]; /* colr data may be HSV or HSL for now */ + int representation; /* store hsv/hsl value */ +} ColorPicker; + +typedef struct ColorPickerData { + ListBase list; +} ColorPickerData; + struct PieMenuData { float pie_dir[2]; float pie_center_init[2]; float pie_center_spawned[2]; + float last_pos[2]; + double duration_gesture; int flags; int event; /* initial event used to fire the pie menu, store here so we can query for release */ float alphafac; @@ -363,7 +392,7 @@ struct uiBlock { short alignnr; char direction; - char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */ + char dt; /* drawtype: UI_EMBOSS, UI_EMBOSS_NONE ... etc, copied to buttons */ bool auto_open; char _pad[7]; double auto_open_last; @@ -373,7 +402,7 @@ struct uiBlock { char lock; char active; /* to keep blocks while drawing and free them afterwards */ char tooltipdisabled; /* to avoid tooltip after click */ - char endblock; /* uiEndBlock done? */ + char endblock; /* UI_block_end done? */ eBlockBoundsCalc bounds_type; /* for doing delayed */ int mx, my; @@ -390,7 +419,7 @@ struct uiBlock { void *evil_C; /* XXX hack for dynamic operator enums */ struct UnitSettings *unit; /* unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time. */ - float _hsv[3]; /* XXX, only access via ui_block_hsv_get() */ + ColorPickerData color_pickers; /* XXX, only accessed by color picker templates */ bool color_profile; /* color profile for correcting linear colors for display */ @@ -408,7 +437,7 @@ typedef struct uiSafetyRct { /* interface.c */ -extern void ui_delete_linkline(uiLinkLine *line, uiBut *but); +extern void ui_linkline_remove(uiLinkLine *line, uiBut *but); void ui_fontscale(short *points, float aspect); @@ -420,49 +449,56 @@ extern void ui_block_to_window_rctf(const struct ARegion *ar, uiBlock *block, rc extern void ui_window_to_block_fl(const struct ARegion *ar, uiBlock *block, float *x, float *y); extern void ui_window_to_block(const struct ARegion *ar, uiBlock *block, int *x, int *y); extern void ui_window_to_region(const ARegion *ar, int *x, int *y); - -extern double ui_get_but_val(uiBut *but); -extern void ui_set_but_val(uiBut *but, double value); -extern void ui_set_but_hsv(uiBut *but); -extern void ui_get_but_vectorf(uiBut *but, float vec[3]); -extern void ui_set_but_vectorf(uiBut *but, const float vec[3]); - -extern void ui_hsvcircle_vals_from_pos(float *val_rad, float *val_dist, const rcti *rect, - const float mx, const float my); +extern void ui_region_to_window(const struct ARegion *ar, int *x, int *y); +extern void ui_region_winrct_get_no_margin(const struct ARegion *ar, struct rcti *r_rect); + +extern double ui_but_value_get(uiBut *but); +extern void ui_but_value_set(uiBut *but, double value); +extern void ui_but_hsv_set(uiBut *but); +extern void ui_but_v3_get(uiBut *but, float vec[3]); +extern void ui_but_v3_set(uiBut *but, const float vec[3]); + +extern void ui_hsvcircle_vals_from_pos( + float *val_rad, float *val_dist, const rcti *rect, + const float mx, const float my); extern void ui_hsvcircle_pos_from_vals(struct uiBut *but, const rcti *rect, float *hsv, float *xpos, float *ypos); extern void ui_hsvcube_pos_from_vals(struct uiBut *but, const rcti *rect, float *hsv, float *xp, float *yp); -bool ui_color_picker_use_display_colorspace(struct uiBut *but); +bool ui_but_is_colorpicker_display_space(struct uiBut *but); + +extern void ui_but_string_get_ex(uiBut *but, char *str, const size_t maxlen, const int float_precision) ATTR_NONNULL(); +extern void ui_but_string_get(uiBut *but, char *str, const size_t maxlen) ATTR_NONNULL(); +extern void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL(); +extern bool ui_but_string_set(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL(); +extern bool ui_but_string_set_eval_num(struct bContext *C, uiBut *but, const char *str, double *value) ATTR_NONNULL(); +extern int ui_but_string_get_max_length(uiBut *but); +extern uiBut *ui_but_drag_multi_edit_get(uiBut *but); -extern void ui_get_but_string_ex(uiBut *but, char *str, const size_t maxlen, const int float_precision) ATTR_NONNULL(); -extern void ui_get_but_string(uiBut *but, char *str, const size_t maxlen) ATTR_NONNULL(); -extern void ui_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL(); -extern bool ui_set_but_string(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL(); -extern bool ui_set_but_string_eval_num(struct bContext *C, uiBut *but, const char *str, double *value) ATTR_NONNULL(); -extern int ui_get_but_string_max_length(uiBut *but); -extern uiBut *ui_get_but_drag_multi_edit(uiBut *but); +void ui_def_but_icon(uiBut *but, const int icon, const int flag); +extern uiButExtraIconType ui_but_icon_extra_get(uiBut *but); -extern void ui_set_but_default(struct bContext *C, const bool all, const bool use_afterfunc); +extern void ui_but_default_set(struct bContext *C, const bool all, const bool use_afterfunc); -extern void ui_check_but(uiBut *but); -extern bool ui_is_but_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_unit(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_rna_valid(uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_utf8(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern bool ui_is_but_search_unlink_visible(const uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern void ui_but_update(uiBut *but); +extern bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_is_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_is_unit(const uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_is_rna_valid(uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_is_utf8(const uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern bool ui_but_supports_cycling(const uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern int ui_is_but_push_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT; -extern int ui_is_but_push(uiBut *but) ATTR_WARN_UNUSED_RESULT; +extern int ui_but_is_pushed_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT; +extern int ui_but_is_pushed(uiBut *but) ATTR_WARN_UNUSED_RESULT; -extern void ui_bounds_block(uiBlock *block); +extern void ui_block_bounds_calc(uiBlock *block); extern void ui_block_translate(uiBlock *block, int x, int y); -extern void ui_block_do_align(uiBlock *block); +extern void ui_block_align_calc(uiBlock *block); -extern struct ColorManagedDisplay *ui_block_display_get(uiBlock *block); -void ui_block_to_display_space_v3(uiBlock *block, float pixel[3]); -void ui_block_to_scene_linear_v3(uiBlock *block, float pixel[3]); +extern struct ColorManagedDisplay *ui_block_cm_display_get(uiBlock *block); +void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]); +void ui_block_cm_to_scene_linear_v3(uiBlock *block, float pixel[3]); +void ui_block_cm_to_display_space_range(uiBlock *block, float *min, float *max); /* interface_regions.c */ @@ -538,7 +574,7 @@ void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but); void ui_popup_translate(struct bContext *C, struct ARegion *ar, const int mdiff[2]); -float *ui_block_hsv_get(struct uiBlock *block); +ColorPicker *ui_block_colorpicker_create(struct uiBlock *block); void ui_popup_block_scrolltest(struct uiBlock *block); void ui_rgb_to_color_picker_compat_v(const float rgb[3], float r_cp[3]); @@ -555,29 +591,34 @@ int ui_searchbox_autocomplete(struct bContext *C, struct ARegion *ar, uiBut *but void ui_searchbox_event(struct bContext *C, struct ARegion *ar, uiBut *but, const struct wmEvent *event); bool ui_searchbox_apply(uiBut *but, struct ARegion *ar); void ui_searchbox_free(struct bContext *C, struct ARegion *ar); -void ui_but_search_test(uiBut *but); +void ui_but_search_refresh(uiBut *but); -uiBlock *ui_popup_block_refresh(struct bContext *C, uiPopupBlockHandle *handle, - ARegion *butregion, uiBut *but); +uiBlock *ui_popup_block_refresh( + struct bContext *C, uiPopupBlockHandle *handle, + ARegion *butregion, uiBut *but); -uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, - uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, - void *arg); -uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but, - uiMenuCreateFunc create_func, void *arg); +uiPopupBlockHandle *ui_popup_block_create( + struct bContext *C, struct ARegion *butregion, uiBut *but, + uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, + void *arg); +uiPopupBlockHandle *ui_popup_menu_create( + struct bContext *C, struct ARegion *butregion, uiBut *but, + uiMenuCreateFunc create_func, void *arg); void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle); -int ui_step_name_menu(uiBut *but, int step); +int ui_but_menu_step(uiBut *but, int step); +bool ui_but_menu_step_poll(const uiBut *but); -struct AutoComplete; /* interface_panel.c */ -extern int ui_handler_panel_region(struct bContext *C, const struct wmEvent *event, struct ARegion *ar); +extern int ui_handler_panel_region( + struct bContext *C, const struct wmEvent *event, + struct ARegion *ar, const uiBut *active_but); extern void ui_draw_aligned_panel(struct uiStyle *style, uiBlock *block, const rcti *rect, const bool show_pin); /* interface_draw.c */ -extern void ui_dropshadow(const rctf *rct, float radius, float aspect, float alpha, int select); +extern void ui_draw_dropshadow(const rctf *rct, float radius, float aspect, float alpha, int select); void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, const float alpha); @@ -585,7 +626,7 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_COLORBAND(uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); -void ui_draw_but_NORMAL(uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); +void ui_draw_but_UNITVEC(uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_CURVE(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_IMAGE(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol, const rcti *rect); @@ -594,25 +635,32 @@ void ui_draw_but_NODESOCKET(ARegion *ar, uiBut *but, struct uiWidgetColors *wcol /* interface_handlers.c */ PointerRNA *ui_handle_afterfunc_add_operator(struct wmOperatorType *ot, int opcontext, bool create_props); extern void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val); -extern void ui_button_activate_do(struct bContext *C, struct ARegion *ar, uiBut *but); -extern void ui_button_activate_over(struct bContext *C, struct ARegion *ar, uiBut *but); -extern void ui_button_execute_begin(struct bContext *C, struct ARegion *ar, uiBut *but, void **active_back); -extern void ui_button_execute_end(struct bContext *C, struct ARegion *ar, uiBut *but, void *active_back); -extern void ui_button_active_free(const struct bContext *C, uiBut *but); -extern bool ui_button_is_active(struct ARegion *ar) ATTR_WARN_UNUSED_RESULT; -extern int ui_button_open_menu_direction(uiBut *but); -extern void ui_button_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but, const bool restore); -extern uiBut *ui_but_find_activated(struct ARegion *ar); +extern void ui_but_activate_event(struct bContext *C, struct ARegion *ar, uiBut *but); +extern void ui_but_activate_over(struct bContext *C, struct ARegion *ar, uiBut *but); +extern void ui_but_execute_begin(struct bContext *C, struct ARegion *ar, uiBut *but, void **active_back); +extern void ui_but_execute_end(struct bContext *C, struct ARegion *ar, uiBut *but, void *active_back); +extern void ui_but_active_free(const struct bContext *C, uiBut *but); +extern bool ui_but_is_active(struct ARegion *ar) ATTR_WARN_UNUSED_RESULT; +extern int ui_but_menu_direction(uiBut *but); +extern void ui_but_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but, const bool restore); +extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction); +extern uiBut *ui_but_find_active_in_region(struct ARegion *ar); bool ui_but_is_editable(const uiBut *but); +bool ui_but_is_editable_as_text(const uiBut *but); void ui_but_pie_dir_visual(RadialDirection dir, float vec[2]); void ui_but_pie_dir(RadialDirection dir, float vec[2]); -void ui_block_calculate_pie_segment(struct uiBlock *block, const float event_xy[2]); +float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]); -void ui_button_clipboard_free(void); +void ui_but_clipboard_free(void); void ui_panel_menu(struct bContext *C, ARegion *ar, Panel *pa); uiBut *ui_but_find_old(uiBlock *block_old, const uiBut *but_new); uiBut *ui_but_find_new(uiBlock *block_old, const uiBut *but_new); +#ifdef WITH_INPUT_IME +void ui_but_ime_reposition(uiBut *but, int x, int y, bool complete); +struct wmIMEData *ui_but_ime_data_get(uiBut *but); +#endif + /* interface_widgets.c */ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3); void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float maxy, float rad, bool use_alpha); @@ -633,12 +681,14 @@ void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, const char *name, void ui_draw_preview_item(struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state); #define UI_TEXT_MARGIN_X 0.4f +#define UI_POPUP_MARGIN (UI_DPI_FAC * 12) /* interface_style.c */ void uiStyleInit(void); /* interface_icons.c */ -int ui_id_icon_get(struct bContext *C, struct ID *id, const bool big); +void ui_icon_ensure_deferred(const struct bContext *C, const int icon_id, const bool big); +int ui_id_icon_get(const struct bContext *C, struct ID *id, const bool big); /* resources.c */ void init_userdef_do_versions(void); @@ -673,5 +723,6 @@ void ui_but_anim_autokey(struct bContext *C, uiBut *but, struct Scene *scene, fl /* interface_eyedropper.c */ void UI_OT_eyedropper_color(struct wmOperatorType *ot); void UI_OT_eyedropper_id(struct wmOperatorType *ot); +void UI_OT_eyedropper_depth(struct wmOperatorType *ot); #endif /* __INTERFACE_INTERN_H__ */ |