|
Blender V4.5
|
#include <algorithm>#include <cctype>#include <cfloat>#include <climits>#include <cmath>#include <cstddef>#include <cstring>#include <fmt/format.h>#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "BLI_listbase.h"#include "BLI_rect.h"#include "BLI_set.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_vector.hh"#include "BLI_utildefines.h"#include "BKE_animsys.h"#include "BKE_context.hh"#include "BKE_idprop.hh"#include "BKE_report.hh"#include "BKE_scene.hh"#include "BKE_screen.hh"#include "BKE_unit.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "BLF_api.hh"#include "BLT_translation.hh"#include "UI_abstract_view.hh"#include "UI_interface.hh"#include "UI_interface_icons.hh"#include "UI_string_search.hh"#include "UI_view2d.hh"#include "IMB_imbuf.hh"#include "WM_api.hh"#include "WM_message.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_enum_types.hh"#include "ED_numinput.hh"#include "ED_screen.hh"#include "IMB_colormanagement.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | AutoComplete |
Macros | |
| #define | UI_BUT_VALUE_UNSET DBL_MAX |
| #define | UI_GET_BUT_VALUE_INIT(_but, _value) |
| #define | B_NOP -1 |
| #define | UI_NUMBER_EVAL_ERROR_PREFIX RPT_("Error evaluating number, see Info editor for details") |
| #define | PREVIEW_TILE_PAD (0.225f * UI_UNIT_X) |
Functions | |
| static void | ui_def_but_rna__menu (bContext *C, uiLayout *layout, void *but_p) |
| static void | ui_def_but_rna__panel_type (bContext *, uiLayout *layout, void *arg) |
| static void | ui_def_but_rna__menu_type (bContext *, uiLayout *layout, void *but_p) |
| static void | ui_but_free (const bContext *C, uiBut *but) |
| static bool | ui_but_is_unit_radians_ex (const UnitSettings *unit, const int unit_type) |
| static bool | ui_but_is_unit_radians (const uiBut *but) |
| void | ui_block_to_region_fl (const ARegion *region, const uiBlock *block, float *x, float *y) |
| void | ui_block_to_window_fl (const ARegion *region, const uiBlock *block, float *x, float *y) |
| void | ui_block_to_window (const ARegion *region, const uiBlock *block, int *x, int *y) |
| void | ui_block_to_region_rctf (const ARegion *region, const uiBlock *block, rctf *rct_dst, const rctf *rct_src) |
| void | ui_block_to_window_rctf (const ARegion *region, const uiBlock *block, rctf *rct_dst, const rctf *rct_src) |
| float | ui_block_to_window_scale (const ARegion *region, const uiBlock *block) |
| void | ui_window_to_block_fl (const ARegion *region, const uiBlock *block, float *x, float *y) |
| void | ui_window_to_block_rctf (const ARegion *region, const uiBlock *block, rctf *rct_dst, const rctf *rct_src) |
| void | ui_window_to_block (const ARegion *region, const uiBlock *block, int *x, int *y) |
| void | ui_window_to_region (const ARegion *region, int *x, int *y) |
| void | ui_window_to_region_rcti (const ARegion *region, rcti *rect_dst, const rcti *rct_src) |
| void | ui_window_to_region_rctf (const ARegion *region, rctf *rect_dst, const rctf *rct_src) |
| void | ui_region_to_window (const ARegion *region, int *x, int *y) |
| static void | ui_update_flexible_spacing (const ARegion *region, uiBlock *block) |
| static void | ui_update_window_matrix (const wmWindow *window, const ARegion *region, uiBlock *block) |
| void | ui_region_winrct_get_no_margin (const ARegion *region, rcti *r_rect) |
| void | UI_block_translate (uiBlock *block, float x, float y) |
| static bool | ui_but_is_row_alignment_group (const uiBut *left, const uiBut *right) |
| static void | ui_block_bounds_calc_text (uiBlock *block, float offset) |
| void | ui_block_bounds_calc (uiBlock *block) |
| static void | ui_block_bounds_calc_centered (wmWindow *window, uiBlock *block) |
| static void | ui_block_bounds_calc_post_centered (uiBlock *block) |
| static void | ui_block_bounds_calc_centered_pie (uiBlock *block) |
| static void | ui_block_bounds_calc_popup (wmWindow *window, uiBlock *block, eBlockBoundsCalc bounds_calc, const int xy[2], int r_xy[2]) |
| void | UI_block_bounds_set_normal (uiBlock *block, int addval) |
| void | UI_block_bounds_set_text (uiBlock *block, int addval) |
| void | UI_block_bounds_set_popup (uiBlock *block, int addval, const int bounds_offset[2]) |
| void | UI_block_bounds_set_menu (uiBlock *block, int addval, const int bounds_offset[2]) |
| void | UI_block_bounds_set_centered (uiBlock *block, int addval) |
| void | UI_block_bounds_set_explicit (uiBlock *block, int minx, int miny, int maxx, int maxy) |
| static float | ui_but_get_float_precision (uiBut *but) |
| static float | ui_but_get_float_step_size (uiBut *but) |
| static bool | ui_but_hide_fraction (uiBut *but, double value) |
| static int | ui_but_calc_float_precision (uiBut *but, double value) |
| bool | ui_but_rna_equals (const uiBut *a, const uiBut *b) |
| bool | ui_but_rna_equals_ex (const uiBut *but, const PointerRNA *ptr, const PropertyRNA *prop, int index) |
| static bool | ui_but_equals_old (const uiBut *but, const uiBut *oldbut) |
| static uiBut * | ui_but_find_old (uiBlock *block_old, const uiBut *but_new, const blender::Set< const uiBut * > &ignore_old_buttons) |
| uiBut * | ui_but_find_old (uiBlock *block_old, const uiBut *but_new) |
| static std::optional< int64_t > | ui_but_find_old_idx (uiBlock *block_old, const uiBut *but_new, const blender::Set< const uiBut * > &ignore_old_buttons={}) |
| uiBut * | ui_but_find_new (uiBlock *block_new, const uiBut *but_old) |
| static bool | ui_but_extra_icons_equals_old (const uiButExtraOpIcon *new_extra_icon, const uiButExtraOpIcon *old_extra_icon) |
| static uiButExtraOpIcon * | ui_but_extra_icon_find_old (const uiButExtraOpIcon *new_extra_icon, const uiBut *old_but) |
| static void | ui_but_extra_icons_update_from_old_but (const uiBut *new_but, const uiBut *old_but) |
| static void | ui_but_update_old_active_from_new (uiBut *oldbut, uiBut *but) |
| static bool | ui_but_update_from_old_block (uiBlock *block, blender::Set< const uiBut * > &matched_old_buttons, std::unique_ptr< uiBut > *but_uptr, std::optional< int64_t > *but_old_idx) |
| bool | UI_but_active_only_ex (const bContext *C, ARegion *region, uiBlock *block, uiBut *but, const bool remove_on_failure) |
| bool | UI_but_active_only (const bContext *C, ARegion *region, uiBlock *block, uiBut *but) |
| bool | UI_block_active_only_flagged_buttons (const bContext *C, ARegion *region, uiBlock *block) |
| void | UI_but_execute (const bContext *C, ARegion *region, uiBut *but) |
| static bool | ui_but_is_rna_undo (const uiBut *but) |
| static void | ui_menu_block_set_keyaccels (uiBlock *block) |
| void | ui_but_add_shortcut (uiBut *but, const char *shortcut_str, const bool do_strip) |
| static void | ui_menu_block_set_keymaps (const bContext *C, uiBlock *block) |
| void | ui_but_override_flag (Main *bmain, uiBut *but) |
| void | UI_block_update_from_old (const bContext *C, uiBlock *block) |
| static void | ui_but_validate (const uiBut *but) |
| bool | ui_but_context_poll_operator_ex (bContext *C, const uiBut *but, const wmOperatorCallParams *optype_params) |
| bool | ui_but_context_poll_operator (bContext *C, wmOperatorType *ot, const uiBut *but) |
| void | UI_block_end_ex (const bContext *C, Main *bmain, wmWindow *window, Scene *scene, ARegion *region, Depsgraph *depsgraph, uiBlock *block, const int xy[2], int r_xy[2]) |
| void | UI_block_end (const bContext *C, uiBlock *block) |
| void | ui_fontscale (float *points, float aspect) |
| void | ui_but_to_pixelrect (rcti *rect, const ARegion *region, const uiBlock *block, const uiBut *but) |
| rcti | ui_to_pixelrect (const ARegion *region, const uiBlock *block, const rctf *src_rect) |
| static bool | ui_but_pixelrect_in_view (const ARegion *region, const rcti *rect) |
| void | UI_block_draw (const bContext *C, uiBlock *block) |
| static void | ui_block_message_subscribe (ARegion *region, wmMsgBus *mbus, uiBlock *block) |
| void | UI_region_message_subscribe (ARegion *region, wmMsgBus *mbus) |
| int | ui_but_is_pushed_ex (uiBut *but, double *value) |
| int | ui_but_is_pushed (uiBut *but) |
| static void | ui_but_update_select_flag (uiBut *but, double *value) |
| void | UI_block_lock_set (uiBlock *block, bool val, const char *lockstr) |
| void | UI_block_lock_clear (uiBlock *block) |
| void | ui_but_v3_get (uiBut *but, float vec[3]) |
| void | ui_but_v3_set (uiBut *but, const float vec[3]) |
| void | ui_but_v4_get (uiBut *but, float vec[4]) |
| void | ui_but_v4_set (uiBut *but, const float vec[4]) |
| bool | ui_but_is_float (const uiBut *but) |
| PropertyScaleType | ui_but_scale_type (const uiBut *but) |
| bool | ui_but_is_bool (const uiBut *but) |
| bool | ui_but_is_unit (const uiBut *but) |
| bool | ui_but_is_compatible (const uiBut *but_a, const uiBut *but_b) |
| bool | ui_but_is_rna_valid (uiBut *but) |
| bool | ui_but_supports_cycling (const uiBut *but) |
| double | ui_but_value_get (uiBut *but) |
| void | ui_but_value_set (uiBut *but, double value) |
| int | ui_but_string_get_maxncpy (uiBut *but) |
| uiBut * | ui_but_drag_multi_edit_get (uiBut *but) |
| static double | ui_get_but_scale_unit (uiBut *but, double value) |
| void | ui_but_convert_to_unit_alt_name (uiBut *but, char *str, size_t str_maxncpy) |
| static void | ui_get_but_string_unit (uiBut *but, char *str, int str_maxncpy, double value, bool pad, int float_precision) |
| static float | ui_get_but_step_unit (uiBut *but, float step_default) |
| void | ui_but_string_get_ex (uiBut *but, char *str, const size_t str_maxncpy, const int float_precision, const bool use_exp_float, bool *r_use_exp_float) |
| void | ui_but_string_get (uiBut *but, char *str, const size_t str_maxncpy) |
| char * | ui_but_string_get_dynamic (uiBut *but, int *r_str_size) |
| static bool | ui_number_from_string_units (bContext *C, const char *str, const int unit_type, const UnitSettings *unit, double *r_value) |
| static bool | ui_number_from_string_units_with_but (bContext *C, const char *str, const uiBut *but, double *r_value) |
| static bool | ui_number_from_string (bContext *C, const char *str, double *r_value) |
| static bool | ui_number_from_string_factor (bContext *C, const char *str, double *r_value) |
| static bool | ui_number_from_string_percentage (bContext *C, const char *str, double *r_value) |
| bool | ui_but_string_eval_number (bContext *C, const uiBut *but, const char *str, double *r_value) |
| bool | ui_but_string_set (bContext *C, uiBut *but, const char *str) |
| static double | soft_range_round_up (double value, double max) |
| static double | soft_range_round_down (double value, double max) |
| void | ui_but_range_set_hard (uiBut *but) |
| void | ui_but_range_set_soft (uiBut *but) |
| static void | ui_but_free_type_specific (uiBut *but) |
| static void | ui_block_free_active_operator (uiBlock *block) |
| void | UI_block_set_active_operator (uiBlock *block, wmOperator *op, const bool free) |
| void | UI_block_free (const bContext *C, uiBlock *block) |
| void | UI_block_listen (const uiBlock *block, const wmRegionListenerParams *listener_params) |
| void | UI_blocklist_update_window_matrix (const bContext *C, const ListBase *lb) |
| void | UI_blocklist_update_view_for_buttons (const bContext *C, const ListBase *lb) |
| void | UI_blocklist_draw (const bContext *C, const ListBase *lb) |
| void | UI_blocklist_free (const bContext *C, ARegion *region) |
| void | UI_blocklist_free_inactive (const bContext *C, ARegion *region) |
| void | UI_block_region_set (uiBlock *block, ARegion *region) |
| uiBlock * | UI_block_begin (const bContext *C, Scene *scene, wmWindow *window, ARegion *region, std::string name, blender::ui::EmbossType emboss) |
| uiBlock * | UI_block_begin (const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss) |
| void | ui_block_add_dynamic_listener (uiBlock *block, void(*listener_func)(const wmRegionListenerParams *params)) |
| blender::ui::EmbossType | UI_block_emboss_get (uiBlock *block) |
| void | UI_block_emboss_set (uiBlock *block, blender::ui::EmbossType emboss) |
| void | UI_block_theme_style_set (uiBlock *block, char theme_style) |
| bool | UI_block_is_search_only (const uiBlock *block) |
| void | UI_block_set_search_only (uiBlock *block, bool search_only) |
| static void | ui_but_build_drawstr_float (uiBut *but, double value) |
| static void | ui_but_build_drawstr_int (uiBut *but, int value) |
| static void | ui_but_update_ex (uiBut *but, const bool validate) |
| void | ui_but_update (uiBut *but) |
| void | ui_but_update_edited (uiBut *but) |
| void | UI_block_align_begin (uiBlock *block) |
| void | UI_block_align_end (uiBlock *block) |
| const ColorManagedDisplay * | ui_block_cm_display_get (uiBlock *block) |
| void | ui_block_cm_to_display_space_v3 (uiBlock *block, float pixel[3]) |
| static std::unique_ptr< uiBut > | ui_but_new (const eButType type) |
| uiBut * | ui_but_change_type (uiBut *but, eButType new_type) |
| static uiBut * | ui_def_but (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| void | ui_def_but_icon (uiBut *but, const int icon, const int flag) |
| void | ui_def_but_icon_clear (uiBut *but) |
| void | ui_but_rna_menu_convert_to_panel_type (uiBut *but, const char *panel_type) |
| bool | ui_but_menu_draw_as_popover (const uiBut *but) |
| void | ui_but_rna_menu_convert_to_menu_type (uiBut *but, const char *menu_type) |
| static void | ui_but_submenu_enable (uiBlock *block, uiBut *but) |
| static uiBut * | ui_def_but_rna (uiBlock *block, int type, int retval, std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< StringRef > tip) |
| static uiBut * | ui_def_but_rna_propname (uiBlock *block, int type, int retval, std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, const StringRefNull propname, int index, float min, float max, const std::optional< StringRef > tip) |
| static uiBut * | ui_def_but_operator_ptr (uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, const StringRef str, int x, int y, short width, short height, std::optional< StringRef > tip) |
| uiBut * | uiDefBut (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButImage (uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]) |
| uiBut * | uiDefButAlert (uiBlock *block, int icon, int x, int y, short width, short) |
| static int | findBitIndex (uint x) |
| AutoComplete * | UI_autocomplete_begin (const char *startname, size_t maxncpy) |
| void | UI_autocomplete_update_name (AutoComplete *autocpl, const StringRef name) |
| int | UI_autocomplete_end (AutoComplete *autocpl, char *autoname) |
| int | UI_preview_tile_size_x (const int size_px) |
| int | UI_preview_tile_size_y (const int size_px) |
| int | UI_preview_tile_size_y_no_label (const int size_px) |
| static void | ui_but_update_and_icon_set (uiBut *but, int icon) |
| static uiBut * | uiDefButBit (uiBlock *block, int type, int bit, int retval, const StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButF (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, float *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButI (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, int *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButBitI (uiBlock *block, int type, int bit, int retval, const StringRef str, int x, int y, short width, short height, int *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButS (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, short *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButBitS (uiBlock *block, int type, int bit, int retval, const StringRef str, int x, int y, short width, short height, short *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButC (uiBlock *block, int type, int retval, const StringRef str, int x, int y, short width, short height, char *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButBitC (uiBlock *block, int type, int bit, int retval, const StringRef str, int x, int y, short width, short height, char *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButR (uiBlock *block, int type, int retval, const std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, const StringRefNull propname, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButR_prop (uiBlock *block, int type, int retval, const std::optional< StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefButO_ptr (uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefButO (uiBlock *block, int type, const StringRefNull opname, wmOperatorCallContext opcontext, std::optional< StringRef > str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconBut (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconPreviewBut (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| static uiBut * | uiDefIconButBit (uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButI (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButBitI (uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButS (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButBitS (uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButBitC (uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, char *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButR (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, const StringRefNull propname, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButR_prop (uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButO_ptr (uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconButO (uiBlock *block, int type, const StringRefNull opname, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextBut (uiBlock *block, int type, int retval, int icon, const StringRef str, int x, int y, short width, short height, void *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButI (uiBlock *block, int type, int retval, int icon, const StringRef str, int x, int y, short width, short height, int *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButS (uiBlock *block, int type, int retval, int icon, const StringRef str, int x, int y, short width, short height, short *poin, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButR (uiBlock *block, int type, int retval, int icon, const std::optional< StringRefNull > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButR_prop (uiBlock *block, int type, int retval, int icon, const std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButO_ptr (uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextButO (uiBlock *block, int type, const StringRefNull opname, wmOperatorCallContext opcontext, int icon, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| void | UI_but_operator_set (uiBut *but, wmOperatorType *optype, wmOperatorCallContext opcontext, const PointerRNA *opptr) |
| void | UI_but_operator_set_never_call (uiBut *but) |
| int | UI_blocklist_min_y_get (ListBase *lb) |
| void | UI_block_direction_set (uiBlock *block, char direction) |
| void | UI_block_flag_enable (uiBlock *block, int flag) |
| void | UI_block_flag_disable (uiBlock *block, int flag) |
| void | UI_but_flag_enable (uiBut *but, int flag) |
| void | UI_but_flag2_enable (uiBut *but, int flag) |
| void | UI_but_flag_disable (uiBut *but, int flag) |
| bool | UI_but_flag_is_set (uiBut *but, int flag) |
| void | UI_but_drawflag_enable (uiBut *but, int flag) |
| void | UI_but_drawflag_disable (uiBut *but, int flag) |
| void | UI_but_dragflag_enable (uiBut *but, int flag) |
| void | UI_but_dragflag_disable (uiBut *but, int flag) |
| void | UI_but_disable (uiBut *but, const char *disabled_hint) |
| void | UI_but_color_set (uiBut *but, const uchar color[4]) |
| void | UI_but_placeholder_set (uiBut *but, const StringRef placeholder_text) |
| const char * | ui_but_placeholder_get (uiBut *but) |
| void | UI_but_type_set_menu_from_pulldown (uiBut *but) |
| int | UI_but_return_value_get (uiBut *but) |
| PointerRNA * | UI_but_operator_ptr_ensure (uiBut *but) |
| void | UI_but_context_ptr_set (uiBlock *block, uiBut *but, const StringRef name, const PointerRNA *ptr) |
| void | UI_but_context_int_set (uiBlock *block, uiBut *but, const StringRef name, const int64_t value) |
| const PointerRNA * | UI_but_context_ptr_get (const uiBut *but, const StringRef name, const StructRNA *type) |
| std::optional< blender::StringRefNull > | UI_but_context_string_get (const uiBut *but, const StringRef name) |
| std::optional< int64_t > | UI_but_context_int_get (const uiBut *but, const StringRef name) |
| const bContextStore * | UI_but_context_get (const uiBut *but) |
| void | UI_but_unit_type_set (uiBut *but, const int unit_type) |
| int | UI_but_unit_type_get (const uiBut *but) |
| void | UI_block_func_handle_set (uiBlock *block, uiBlockHandleFunc func, void *arg) |
| void | UI_block_func_set (uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2) |
| void | UI_block_funcN_set (uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn) |
| void | UI_but_func_rename_set (uiBut *but, uiButHandleRenameFunc func, void *arg1) |
| void | UI_but_func_rename_full_set (uiBut *but, std::function< void(std::string &new_name)> rename_full_func) |
| void | UI_but_func_drawextra_set (uiBlock *block, std::function< void(const bContext *C, rcti *rect)> func) |
| void | UI_but_func_set (uiBut *but, uiButHandleFunc func, void *arg1, void *arg2) |
| void | UI_but_func_set (uiBut *but, std::function< void(bContext &)> func) |
| void | UI_but_funcN_set (uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn) |
| void | UI_but_func_complete_set (uiBut *but, uiButCompleteFunc func, void *arg) |
| void | UI_but_func_menu_step_set (uiBut *but, uiMenuStepFunc func) |
| void | UI_but_menu_disable_hover_open (uiBut *but) |
| void | UI_but_func_quick_tooltip_set (uiBut *but, std::function< std::string(const uiBut *but)> func) |
| void | UI_but_func_tooltip_set (uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg) |
| void | UI_but_func_tooltip_custom_set (uiBut *but, uiButToolTipCustomFunc func, void *arg, uiFreeArgFunc free_arg) |
| void | UI_but_func_pushed_state_set (uiBut *but, std::function< bool(const uiBut &)> func) |
| uiBut * | uiDefBlockBut (uiBlock *block, uiBlockCreateFunc func, void *arg, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefBlockButN (uiBlock *block, uiBlockCreateFunc func, void *argN, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip, uiButArgNFree func_argN_free_fn, uiButArgNCopy func_argN_copy_fn) |
| uiBut * | uiDefMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconTextMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const StringRef str, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconMenuBut (uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefIconBlockBut (uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| uiBut * | uiDefSearchBut (uiBlock *block, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| void | UI_but_func_search_set (uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, const bool free_arg, uiFreeArgFunc search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active) |
| void | UI_but_func_search_set_context_menu (uiBut *but, uiButSearchContextMenuFn context_menu_fn) |
| void | UI_but_func_search_set_sep_string (uiBut *but, const char *search_sep_string) |
| void | UI_but_func_search_set_tooltip (uiBut *but, uiButSearchTooltipFn tooltip_fn) |
| void | UI_but_func_search_set_listen (uiBut *but, uiButSearchListenFn listen_fn) |
| void | UI_but_func_search_set_results_are_suggestions (uiBut *but, const bool value) |
| static void | operator_enum_search_update_fn (const bContext *C, void *but, const char *str, uiSearchItems *items, const bool) |
| static void | operator_enum_search_exec_fn (bContext *, void *but, void *arg2) |
| uiBut * | uiDefSearchButO_ptr (uiBlock *block, wmOperatorType *ot, IDProperty *properties, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, const std::optional< StringRef > tip) |
| void | UI_but_hint_drawstr_set (uiBut *but, const char *string) |
| void | UI_but_icon_indicator_number_set (uiBut *but, const int indicator_number) |
| void | UI_but_icon_indicator_set (uiBut *but, const char *string) |
| void | UI_but_icon_indicator_color_set (uiBut *but, const uchar color[4]) |
| void | UI_but_node_link_set (uiBut *but, bNodeSocket *socket, const float draw_color[4]) |
| void | UI_but_number_step_size_set (uiBut *but, float step_size) |
| void | UI_but_number_precision_set (uiBut *but, float precision) |
| void | UI_but_number_slider_step_size_set (uiBut *but, float step_size) |
| void | UI_but_number_slider_precision_set (uiBut *but, float precision) |
| void | UI_but_label_alpha_factor_set (uiBut *but, const float alpha_factor) |
| void | UI_but_search_preview_grid_size_set (uiBut *but, int rows, int cols) |
| void | UI_but_view_item_draw_size_set (uiBut *but, const std::optional< int > draw_width, const std::optional< int > draw_height) |
| void | UI_but_focus_on_enter_event (wmWindow *win, uiBut *but) |
| void | UI_but_func_hold_set (uiBut *but, uiButHandleHoldFunc func, void *argN) |
| std::optional< EnumPropertyItem > | UI_but_rna_enum_item_get (bContext &C, uiBut &but) |
| std::string | UI_but_string_get_rna_property_identifier (const uiBut &but) |
| std::string | UI_but_string_get_rna_struct_identifier (const uiBut &but) |
| std::string | UI_but_string_get_label (uiBut &but) |
| std::string | UI_but_context_menu_title_from_button (uiBut &but) |
| std::string | UI_but_string_get_tooltip_label (const uiBut &but) |
| std::string | UI_but_string_get_rna_label (uiBut &but) |
| std::string | UI_but_string_get_rna_label_context (const uiBut &but) |
| std::string | UI_but_string_get_tooltip (bContext &C, uiBut &but) |
| std::string | UI_but_string_get_rna_tooltip (bContext &C, uiBut &but) |
| std::string | UI_but_string_get_operator_keymap (bContext &C, uiBut &but) |
| std::string | UI_but_string_get_property_keymap (bContext &C, uiBut &but) |
| std::string | UI_but_extra_icon_string_get_label (const uiButExtraOpIcon &extra_icon) |
| std::string | UI_but_extra_icon_string_get_tooltip (bContext &C, const uiButExtraOpIcon &extra_icon) |
| std::string | UI_but_extra_icon_string_get_operator_keymap (const bContext &C, const uiButExtraOpIcon &extra_icon) |
| void | UI_init () |
| void | UI_init_userdef () |
| void | UI_reinit_font () |
| void | UI_update_text_styles () |
| void | UI_exit () |
| void | UI_interface_tag_script_reload () |
Find Key Shortcut for Button | |
| static std::optional< std::string > | ui_but_event_operator_string_from_operator (const bContext *C, wmOperatorCallParams *op_call_params) |
| static std::optional< std::string > | ui_but_event_operator_string_from_menu (const bContext *C, uiBut *but) |
| static std::optional< std::string > | ui_but_event_operator_string_from_panel (const bContext *C, uiBut *but) |
| static std::optional< std::string > | ui_but_event_operator_string (const bContext *C, uiBut *but) |
| static std::optional< std::string > | ui_but_extra_icon_event_operator_string (const bContext *C, const uiButExtraOpIcon *extra_icon) |
| static std::optional< std::string > | ui_but_event_property_operator_string (const bContext *C, uiBut *but) |
Pie Menu Direction | |
This goes in a seemingly weird pattern:
4
5 6
1 2
7 8
3
but it's actually quite logical. It's designed to be 'upwards compatible' for muscle memory so that the menu item locations are fixed and don't move as new items are added to the menu later on. It also optimizes efficiency - a radial menu is best kept symmetrical, with as large an angle between items as possible, so that the gestural mouse movements can be fast and inexact. It starts off with two opposite sides for the first two items then joined by the one below for the third (this way, even with three items, the menu seems to still be 'in order' reading left to right). Then the fourth is added to complete the compass directions. From here, it's just a matter of subdividing the rest of the angles for the last 4 items. –Matt 07/2006 | |
| const char | ui_radial_dir_order [8] |
| const char | ui_radial_dir_to_numpad [8] = {8, 9, 6, 3, 2, 1, 4, 7} |
| const short | ui_radial_dir_to_angle [8] = {90, 45, 0, 315, 270, 225, 180, 135} |
| static std::string | ui_but_pie_direction_string (const uiBut *but) |
| #define B_NOP -1 |
Definition at line 92 of file interface.cc.
Referenced by ui_def_but_rna__menu(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_slot_menu(), ui_imageuser_view_menu_multiview(), and ui_imageuser_view_menu_rr().
| #define PREVIEW_TILE_PAD (0.225f * UI_UNIT_X) |
Definition at line 5206 of file interface.cc.
Referenced by UI_preview_tile_size_x(), UI_preview_tile_size_y(), and UI_preview_tile_size_y_no_label().
| #define UI_BUT_VALUE_UNSET DBL_MAX |
Definition at line 85 of file interface.cc.
Referenced by ui_but_is_pushed(), ui_but_update_ex(), and ui_but_value_set().
| #define UI_GET_BUT_VALUE_INIT | ( | _but, | |
| _value ) |
Definition at line 86 of file interface.cc.
Referenced by ui_but_is_pushed_ex(), and ui_but_update_ex().
Report a generic error prefix when evaluating a string with BPY_run_string_as_number as the Python error on its own doesn't provide enough context.
Definition at line 3204 of file interface.cc.
Referenced by ui_number_from_string(), and ui_number_from_string_units().
Predefined types for generic extra operator icons (uiButExtraOpIcon).
| Enumerator | |
|---|---|
| PREDEFINED_EXTRA_OP_ICON_NONE | |
| PREDEFINED_EXTRA_OP_ICON_CLEAR | |
| PREDEFINED_EXTRA_OP_ICON_EYEDROPPER | |
| PREDEFINED_EXTRA_OP_ICON_BONE_EYEDROPPER | |
Definition at line 1743 of file interface.cc.
|
static |
if _x_ is a power of two (only one bit) return the power, otherwise return -1.
for powers of two:
Definition at line 5098 of file interface.cc.
References is_power_of_2_i(), and x.
Referenced by uiDefButBit(), and uiDefIconButBit().
|
static |
Definition at line 6630 of file interface.cc.
References ot, POINTER_AS_INT, printf, RNA_property_enum_set(), and UI_but_operator_ptr_ensure().
Referenced by uiDefSearchButO_ptr().
|
static |
Definition at line 6585 of file interface.cc.
References blender::string_search::StringSearch< T >::add(), C, EnumPropertyItem::identifier, MEM_freeN(), ot, POINTER_FROM_INT, printf, PROP_ENUM, ptr, blender::string_search::StringSearch< T >::query(), RNA_property_enum_items_gettexted(), RNA_property_identifier(), RNA_property_type(), str, UI_but_operator_ptr_ensure(), and UI_search_item_add().
Referenced by uiDefSearchButO_ptr().
|
static |
Definition at line 3456 of file interface.cc.
References floor, log, M_LN10, max, and pow.
Referenced by ui_but_range_set_soft().
|
static |
Definition at line 3441 of file interface.cc.
References ceil, log, M_LN10, max, and pow.
Referenced by ui_but_range_set_soft().
| AutoComplete * UI_autocomplete_begin | ( | const char * | startname, |
| size_t | maxncpy ) |
Definition at line 5136 of file interface.cc.
References AutoComplete::matches, AutoComplete::maxncpy, MEM_calloc_arrayN(), MEM_callocN(), AutoComplete::startname, and AutoComplete::truncate.
Referenced by autocomplete_directory(), autocomplete_file(), and ui_searchbox_autocomplete().
| int UI_autocomplete_end | ( | AutoComplete * | autocpl, |
| char * | autoname ) |
Definition at line 5183 of file interface.cc.
References AUTOCOMPLETE_FULL_MATCH, AUTOCOMPLETE_NO_MATCH, AUTOCOMPLETE_PARTIAL_MATCH, BLI_strncpy(), AutoComplete::matches, AutoComplete::maxncpy, MEM_freeN(), AutoComplete::startname, and AutoComplete::truncate.
Referenced by autocomplete_directory(), autocomplete_file(), and ui_searchbox_autocomplete().
| void UI_autocomplete_update_name | ( | AutoComplete * | autocpl, |
| const StringRef | name ) |
Definition at line 5149 of file interface.cc.
References blender::StringRefBase::copy_utf8_truncated(), AutoComplete::matches, AutoComplete::maxncpy, blender::StringRefBase::size(), AutoComplete::startname, and AutoComplete::truncate.
Referenced by autocomplete_directory(), autocomplete_file(), and UI_search_item_add().
Definition at line 1188 of file interface.cc.
References BLI_assert, uiBlock::buttons, C, uiBlock::endblock, UI_BUT_ACTIVATE_ON_INIT, UI_but_active_only_ex(), and ui_but_is_editable().
Referenced by UI_popover_panel_invoke(), UI_popup_block_ex(), and UI_popup_block_invoke_ex().
| void ui_block_add_dynamic_listener | ( | uiBlock * | block, |
| void(* | listener_func )(const wmRegionListenerParams *params) ) |
Register a listener callback to this block to tag the area/region for redraw.
Definition at line 3886 of file interface.cc.
References BLI_addtail(), uiBlock::dynamic_listeners, uiBlockDynamicListener::listener_func, MEM_mallocN(), and params.
Referenced by UI_menutype_draw(), and ui_paneltype_draw_impl().
| void UI_block_align_begin | ( | uiBlock * | block | ) |
Automatic aligning, horizontal or vertical.
Definition at line 4160 of file interface.cc.
References uiBlock::alignnr, uiBlock::flag, UI_block_align_end(), UI_BUT_ALIGN, and UI_BUT_ALIGN_DOWN.
Referenced by colorband_buttons_layout(), curvemap_clipping_func(), ED_time_scrub_channel_search_draw(), envelope_panel_draw(), template_ID(), template_search_buttons(), ui_block_colorpicker(), ui_item_array(), uiDefAutoButsArrayR(), uiTemplateComponentMenu(), uiTemplateMarker(), uiTemplateNodeSocket(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), uvedit_vertex_buttons(), v3d_editvertex_buts(), and v3d_object_dimension_buts().
| void UI_block_align_end | ( | uiBlock * | block | ) |
Definition at line 4173 of file interface.cc.
References uiBlock::flag, and UI_BUT_ALIGN.
Referenced by colorband_buttons_layout(), ED_time_scrub_channel_search_draw(), blender::ed::space_node::node_update_basis_buttons(), blender::ed::space_node::node_update_basis_from_declaration(), blender::ed::space_node::node_update_basis_socket(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), template_ID(), template_search_buttons(), UI_block_align_begin(), ui_block_colorpicker(), UI_block_end_ex(), ui_item_array(), uiDefAutoButsArrayR(), uiTemplateComponentMenu(), uiTemplateMarker(), uiTemplateNodeSocket(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), uvedit_vertex_buttons(), v3d_editvertex_buts(), and v3d_object_dimension_buts().
| uiBlock * UI_block_begin | ( | const bContext * | C, |
| ARegion * | region, | ||
| std::string | name, | ||
| blender::ui::EmbossType | emboss ) |
Definition at line 3878 of file interface.cc.
References C, CTX_data_scene(), CTX_wm_window(), and UI_block_begin().
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_gpu_backend_fallback(), block_create_opengl_usage_warning(), block_create_save_file_overwrite_dialog(), clip_draw_dopesheet_channels(), colorband_tools_fn(), component_menu(), blender::ed::space_node::create_search_popup_block(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_clipping_func(), curvemap_tools_func(), blender::ed::spreadsheet::draw_cell_contents(), blender::ed::vse::draw_channel_headers(), draw_channel_names(), blender::ed::spreadsheet::draw_left_column_content(), draw_nla_track_list(), blender::ed::outliner::draw_outliner(), blender::ed::spreadsheet::draw_top_row_content(), blender::ed::space_node::draw_tree_path(), ed_panel_draw(), ED_region_header_layout(), ED_time_scrub_channel_search_draw(), file_draw_invalid_asset_library_hint(), file_draw_list(), graph_draw_channel_names(), blender::ed::space_node::invalid_links_uiblock_init(), menu_add_shortcut(), menu_change_shortcut(), menu_items_from_ui_create(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_uiblocks_init(), panel_property_search(), blender::ed::asset::shelf::region_layout(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), template_common_search_menu(), ui_block_func_COLOR(), ui_icon_view_menu_cb(), UI_pie_menu_begin(), ui_popover_create_block(), ui_popup_menu_create_block(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_create(), wm_enum_search_menu(), and wm_operator_ui_create().
| uiBlock * UI_block_begin | ( | const bContext * | C, |
| Scene * | scene, | ||
| wmWindow * | window, | ||
| ARegion * | region, | ||
| std::string | name, | ||
| blender::ui::EmbossType | emboss ) |
Definition at line 3826 of file interface.cc.
References uiBlock::active, uiBlock::auto_open, uiBlock::buttons, C, ColorManagedDisplaySettings::display_device, uiBlock::display_device, Scene::display_settings, uiBlock::emboss, uiBlock::evil_C, uiBlock::flag, IMB_colormanagement_display_get_default_name(), MEM_callocN(), uiBlock::name, uiBlock::oldblock, Vector< T, InlineBufferCapacity, Allocator >::reserve(), ARegion::runtime, Vector< T, InlineBufferCapacity, Allocator >::size(), STRNCPY(), UI_BLOCK_LOOP, UI_block_region_set(), ui_update_window_matrix(), Scene::unit, and uiBlock::unit.
Referenced by UI_block_begin().
| void ui_block_bounds_calc | ( | uiBlock * | block | ) |
Definition at line 478 of file interface.cc.
References BLI_rctf_init_minmax(), BLI_rctf_size_x(), BLI_rctf_union(), uiBlock::bounds, uiBlock::buttons, uiBlock::first_but(), Vector< T, InlineBufferCapacity, Allocator >::is_empty(), max_ff(), uiBlock::minbounds, uiBlock::panel, uiBlock::rect, uiBlock::safety, Panel::sizex, Panel::sizey, uiBut::str, STRPREFIX, UI_SCALE_FAC, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_block_bounds_calc_centered(), ui_block_bounds_calc_centered_pie(), ui_block_bounds_calc_popup(), ui_block_bounds_calc_post_centered(), UI_block_end_ex(), ui_offset_panel_block(), and ui_update_flexible_spacing().
Definition at line 514 of file interface.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), uiBlock::rect, ui_block_bounds_calc(), UI_block_translate(), WM_window_native_pixel_size(), rctf::xmin, and rctf::ymin.
Referenced by UI_block_end_ex().
|
static |
Definition at line 545 of file interface.cc.
References PieMenuData::pie_center_spawned, uiBlock::pie_data, ui_block_bounds_calc(), UI_block_translate(), and xy.
Referenced by UI_block_end_ex().
|
static |
Definition at line 558 of file interface.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_clamp(), uiBlock::bounds, uiBlock::bounds_offset, uiBlock::flag, uiBlock::rect, ui_block_bounds_calc(), ui_block_bounds_calc_text(), UI_BLOCK_BOUNDS_POPUP_MENU, UI_BLOCK_LOOP, UI_block_translate(), UI_POPUP_MENU_TOP, UI_SCREEN_MARGIN, UI_UNIT_X, WM_window_native_pixel_size(), rcti::xmax, rctf::xmin, rcti::xmin, xy, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by UI_block_end_ex().
|
static |
Definition at line 536 of file interface.cc.
References uiBlock::handle, uiBlock::rect, uiPopupBlockHandle::region, ui_block_bounds_calc(), UI_block_translate(), UI_SCALE_FAC, ARegion::winrct, rctf::xmin, rcti::xmin, xy, rctf::ymin, and rcti::ymin.
Referenced by UI_block_end_ex().
|
static |
Definition at line 405 of file interface.cc.
References Vector< T, InlineBufferCapacity, Allocator >::begin(), BLF_width(), BLI_rctf_size_x(), uiBlock::bounds, uiBlock::buttons, ELEM, Vector< T, InlineBufferCapacity, Allocator >::end(), i, Vector< T, InlineBufferCapacity, Allocator >::is_empty(), max_ff(), uiBlock::minbounds, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER, ui_but_is_row_alignment_group(), ui_but_update(), UI_fontstyle_set(), UI_style_get(), uiFontStyle::uifont_id, and uiStyle::widget.
Referenced by ui_block_bounds_calc_popup(), and UI_block_end_ex().
| void UI_block_bounds_set_centered | ( | uiBlock * | block, |
| int | addval ) |
Used for centered popups, i.e. splash.
Definition at line 667 of file interface.cc.
References uiBlock::bounds, uiBlock::bounds_type, and UI_BLOCK_BOUNDS_POPUP_CENTER.
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_gpu_backend_fallback(), block_create_opengl_usage_warning(), block_create_save_file_overwrite_dialog(), wm_block_about_create(), wm_block_dialog_create(), and wm_block_splash_create().
| void UI_block_bounds_set_explicit | ( | uiBlock * | block, |
| int | minx, | ||
| int | miny, | ||
| int | maxx, | ||
| int | maxy ) |
Definition at line 673 of file interface.cc.
References uiBlock::bounds_type, uiBlock::rect, UI_BLOCK_BOUNDS_NONE, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::node_update_basis(), and blender::ed::space_node::node_update_hidden().
| void UI_block_bounds_set_menu | ( | uiBlock * | block, |
| int | addval, | ||
| const int | bounds_offset[2] ) |
Used for menu popups.
Definition at line 655 of file interface.cc.
References uiBlock::bounds, uiBlock::bounds_offset, uiBlock::bounds_type, copy_v2_v2_int(), UI_BLOCK_BOUNDS_POPUP_MENU, and zero_v2_int().
Referenced by ui_block_func_POPUP().
| void UI_block_bounds_set_normal | ( | uiBlock * | block, |
| int | addval ) |
Used for various cases.
Definition at line 625 of file interface.cc.
References uiBlock::bounds, uiBlock::bounds_type, and UI_BLOCK_BOUNDS.
Referenced by component_menu(), curvemap_clipping_func(), ED_time_scrub_channel_search_draw(), template_common_search_menu(), UI_block_end_ex(), ui_block_func_COLOR(), ui_block_func_POPOVER(), and ui_icon_view_menu_cb().
| void UI_block_bounds_set_popup | ( | uiBlock * | block, |
| int | addval, | ||
| const int | bounds_offset[2] ) |
Used for block popups.
Definition at line 641 of file interface.cc.
References uiBlock::bounds, uiBlock::bounds_offset, uiBlock::bounds_type, and UI_BLOCK_BOUNDS_POPUP_MOUSE.
Referenced by blender::ed::space_node::create_search_popup_block(), menu_add_shortcut(), menu_change_shortcut(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), ui_block_func_POPOVER(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_enum_search_menu(), and wm_operator_ui_create().
| void UI_block_bounds_set_text | ( | uiBlock * | block, |
| int | addval ) |
Used for pull-downs.
Definition at line 635 of file interface.cc.
References uiBlock::bounds, uiBlock::bounds_type, and UI_BLOCK_BOUNDS_TEXT.
Referenced by colorband_tools_fn(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_tools_func(), and ui_block_func_POPUP().
| const ColorManagedDisplay * ui_block_cm_display_get | ( | uiBlock * | block | ) |
Definition at line 4178 of file interface.cc.
References uiBlock::display_device, and IMB_colormanagement_display_get_named().
Referenced by ui_block_cm_to_display_space_v3(), ui_draw_but_COLORBAND(), and ui_tooltip_data_from_button_or_extra_icon().
| void ui_block_cm_to_display_space_v3 | ( | uiBlock * | block, |
| float | pixel[3] ) |
Definition at line 4183 of file interface.cc.
References IMB_colormanagement_scene_linear_to_display_v3(), and ui_block_cm_display_get().
Referenced by ui_draw_but_HSVCIRCLE(), ui_tooltip_data_from_button_or_extra_icon(), and widget_swatch().
| void UI_block_direction_set | ( | uiBlock * | block, |
| char | direction ) |
Definition at line 6010 of file interface.cc.
References uiBlock::direction.
Referenced by colorband_tools_fn(), component_menu(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_clipping_func(), curvemap_tools_func(), menu_add_shortcut(), menu_change_shortcut(), menu_item_enum_opname_menu(), template_common_search_menu(), ui_block_func_POPOVER(), ui_block_func_POPUP(), ui_icon_view_menu_cb(), and ui_item_menu_hold().
Uses local copy of style, to scale things down, and allow widgets to change stuff.
Definition at line 2212 of file interface.cc.
References uiBlock::aspect, BLF_batch_draw_begin(), BLF_batch_draw_end(), Panel_Runtime::block, uiBlock::buttons, C, CTX_wm_region(), CTX_wm_region_popup(), ELEM, uiBlock::endblock, ARegion::flag, uiBlock::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), uiStyle::grouplabel, uiBlock::panel, ThemeUI::panel_roundness, uiStyle::paneltitle, uiFontStyle::points, ARegion::regiontype, RGN_FLAG_SEARCH_FILTER_ACTIVE, RGN_TYPE_HUD, RGN_TYPE_TEMPORARY, Panel::runtime, uiStyle::tooltip, bTheme::tui, Panel::type, U, UI_block_end(), UI_BLOCK_LOOP, UI_BLOCK_PIE_MENU, UI_BLOCK_POPOVER, ui_block_views_draw_overlays(), ui_but_pixelrect_in_view(), ui_but_to_pixelrect(), ui_draw_aligned_panel(), ui_draw_but(), ui_draw_layout_panels_backdrop(), ui_draw_menu_back(), ui_draw_pie_center(), ui_draw_popover_back(), ui_fontscale(), UI_GetTheme(), UI_HIDDEN, UI_panel_category_is_visible(), UI_panel_should_show_background(), UI_SCROLLED, UI_style_get_dpi(), UI_widgetbase_draw_cache_begin(), UI_widgetbase_draw_cache_end(), uiStyle::widget, wmOrtho2_region_pixelspace(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by clip_draw_dopesheet_channels(), blender::ed::spreadsheet::draw_cell_contents(), blender::ed::vse::draw_channel_headers(), draw_channel_names(), blender::ed::spreadsheet::draw_left_column_content(), draw_nla_track_list(), blender::ed::outliner::draw_outliner(), blender::ed::spreadsheet::draw_top_row_content(), blender::ed::space_node::draw_tree_path(), ED_time_scrub_channel_search_draw(), file_draw_invalid_asset_library_hint(), file_draw_list(), blender::ed::space_node::frame_node_draw_overlay(), graph_draw_channel_names(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_nodetree(), blender::ed::space_node::reroute_node_draw(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), ui_block_region_draw(), UI_blocklist_draw(), and UI_panels_draw().
| blender::ui::EmbossType UI_block_emboss_get | ( | uiBlock * | block | ) |
Definition at line 3895 of file interface.cc.
References uiBlock::emboss.
Referenced by blender::ui::TreeViewLayoutBuilder::build_row(), uiTemplateReportsBanner(), and uiTemplateStatusInfo().
| void UI_block_emboss_set | ( | uiBlock * | block, |
| blender::ui::EmbossType | emboss ) |
Definition at line 3900 of file interface.cc.
References uiBlock::emboss.
Referenced by ANIM_channel_draw_widgets(), blender::ed::asset::shelf::asset_shelf_header_draw(), block_create_autorun_warning(), block_create_gpu_backend_fallback(), block_create_opengl_usage_warning(), blender::ui::TreeViewLayoutBuilder::build_row(), clip_draw_dopesheet_channels(), colorband_buttons_layout(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), blender::ed::vse::draw_channel_labels(), blender::ed::vse::draw_channel_widget_lock(), blender::ed::vse::draw_channel_widget_mute(), draw_constraint_header(), draw_grease_pencil_layer_widgets(), blender::ed::space_node::draw_link_errors(), blender::ed::outliner::draw_outliner(), graph_draw_driver_settings_panel(), nla_panel_stripname(), blender::ed::space_node::node_add_error_message_button(), blender::ed::space_node::node_add_unsupported_compositor_operation_error_message_button(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_file_output_socket_draw(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_warning_tree_element(), template_keymap_item_properties(), blender::ed::space_node::ui_node_draw_input(), ui_template_list_layout_draw(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), and wm_block_splash_add_label().
Definition at line 2168 of file interface.cc.
References C, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_region(), CTX_wm_window(), wmWindow::eventstate, UI_block_end_ex(), and wmEvent::xy.
Referenced by clip_draw_dopesheet_channels(), blender::ed::spreadsheet::draw_cell_contents(), blender::ed::vse::draw_channel_headers(), draw_channel_names(), blender::ed::spreadsheet::draw_left_column_content(), draw_nla_track_list(), blender::ed::outliner::draw_outliner(), blender::ed::spreadsheet::draw_top_row_content(), blender::ed::space_node::draw_tree_path(), ed_panel_draw(), ED_region_header_layout(), ED_time_scrub_channel_search_draw(), file_draw_invalid_asset_library_hint(), file_draw_list(), graph_draw_channel_names(), menu_items_from_ui_create(), blender::ed::space_node::node_draw_nodetree(), blender::ed::asset::shelf::region_layout(), blender::ed::spreadsheet::spreadsheet_footer_region_draw(), and UI_block_draw().
| void UI_block_end_ex | ( | const bContext * | C, |
| Main * | bmain, | ||
| wmWindow * | window, | ||
| Scene * | scene, | ||
| ARegion * | region, | ||
| Depsgraph * | depsgraph, | ||
| uiBlock * | block, | ||
| const int | xy[2], | ||
| int | r_xy[2] ) |
Definition at line 2054 of file interface.cc.
References uiBlock::active, BKE_animsys_eval_context_construct(), BKE_scene_frame_get(), BLI_assert, uiBlock::bounds_type, uiBlock::buttons, C, depsgraph, uiBlock::endblock, ListBase::first, uiBlock::flag, uiPopupBlockHandle::grab_xy_prev, uiBlock::handle, uiBlock::layouts, LISTBASE_FOREACH, ot, uiBlock::panel, uiBlock::rect, ui_block_align_calc(), UI_block_align_end(), UI_BLOCK_BOUNDS, ui_block_bounds_calc(), ui_block_bounds_calc_centered(), ui_block_bounds_calc_centered_pie(), ui_block_bounds_calc_popup(), ui_block_bounds_calc_post_centered(), ui_block_bounds_calc_text(), UI_BLOCK_BOUNDS_NONE, UI_BLOCK_BOUNDS_PIE_CENTER, UI_BLOCK_BOUNDS_POPUP_CENTER, UI_BLOCK_BOUNDS_POPUP_MENU, UI_BLOCK_BOUNDS_POPUP_MOUSE, UI_block_bounds_set_normal(), UI_BLOCK_BOUNDS_TEXT, UI_block_layout_resolve(), UI_BLOCK_LOOP, UI_BLOCK_NO_ACCELERATOR_KEYS, UI_BLOCK_NUMSELECT, UI_BLOCK_SHOW_SHORTCUT_ALWAYS, UI_block_update_from_old(), ui_block_views_end(), UI_BUT_ALIGN, ui_but_anim_decorate_update_from_flag(), ui_but_anim_flag(), ui_but_context_poll_operator(), ui_but_context_poll_operator_ex(), UI_BUT_DISABLED, UI_but_is_decorator, ui_but_override_flag(), ui_but_predefined_extra_operator_icons_add(), ui_but_validate(), ui_menu_block_set_keyaccels(), ui_menu_block_set_keymaps(), ui_update_flexible_spacing(), rctf::xmax, rctf::xmin, and xy.
Referenced by blender::ed::space_node::frame_node_draw_overlay(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::reroute_node_draw(), UI_block_end(), and ui_popup_block_refresh().
| void UI_block_flag_disable | ( | uiBlock * | block, |
| int | flag ) |
Definition at line 6020 of file interface.cc.
References flag, and uiBlock::flag.
Referenced by blender::ui::TreeViewBuilder::build_tree_view(), UI_popover_end(), ui_template_list_layout_draw(), wm_block_create_redo(), wm_block_dialog_create(), and wm_operator_ui_create().
| void UI_block_flag_enable | ( | uiBlock * | block, |
| int | flag ) |
This call escapes if there's alignment flags.
Definition at line 6015 of file interface.cc.
References flag, and uiBlock::flag.
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_save_file_overwrite_dialog(), blender::ui::TreeViewBuilder::build_tree_view(), component_menu(), blender::ed::space_node::create_search_popup_block(), curvemap_clipping_func(), blender::ed::outliner::draw_outliner(), ED_time_scrub_channel_search_draw(), menu_change_shortcut(), menu_items_from_ui_create(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_uiblocks_init(), template_common_search_menu(), ui_block_func_PIE(), ui_block_func_POPOVER(), ui_block_func_POPUP(), ui_def_but_rna__menu(), ui_icon_view_menu_cb(), UI_menutype_draw(), ui_popover_create_block(), UI_popover_end(), ui_template_list_layout_draw(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_create(), wm_enum_search_menu(), and wm_operator_ui_create().
Can be called with C==NULL.
Definition at line 3703 of file interface.cc.
References BLI_freelistN(), uiBlock::buttons, C, Vector< T, InlineBufferCapacity, Allocator >::clear(), uiBlock::color_pickers, uiBlock::dynamic_listeners, uiBlock::func_argN, uiBlock::func_argN_free_fn, ColorPickerData::list, MEM_freeN(), uiBlock::saferct, ui_block_free_active_operator(), ui_block_free_views(), ui_but_free(), UI_butstore_clear(), and uiBlock::unit.
Referenced by menu_items_from_ui_create(), UI_blocklist_free(), UI_blocklist_free_inactive(), and UI_popup_menu_end_or_cancel().
|
static |
Definition at line 3680 of file interface.cc.
References MEM_freeN(), wmOperator::ptr, uiBlock::ui_operator, and uiBlock::ui_operator_free.
Referenced by UI_block_free(), and UI_block_set_active_operator().
| void UI_block_func_handle_set | ( | uiBlock * | block, |
| uiBlockHandleFunc | func, | ||
| void * | arg ) |
Definition at line 6205 of file interface.cc.
References uiBlock::handle_func, and uiBlock::handle_func_arg.
Referenced by graph_draw_driver_settings_panel(), graph_panel_modifiers(), image_panel_uv(), menu_add_shortcut(), menu_change_shortcut(), nla_panel_actclip(), nla_panel_animated_influence_header(), nla_panel_animated_strip_time(), nla_panel_animated_strip_time_header(), nla_panel_animdata(), nla_panel_evaluation(), nla_panel_modifiers(), nla_panel_properties(), nla_panel_stripname(), ui_layout_end(), uiTemplateMarker(), uiTemplateOperatorRedoProperties(), uiTemplatePreview(), uiTemplateRunningJobs(), view3d_panel_transform(), view3d_panel_vgroup(), and wm_block_create_redo().
| void UI_block_func_set | ( | uiBlock * | block, |
| uiButHandleFunc | func, | ||
| void * | arg1, | ||
| void * | arg2 ) |
Definition at line 6211 of file interface.cc.
References uiBlock::func, uiBlock::func_arg1, and uiBlock::func_arg2.
Referenced by draw_constraint_header(), ED_file_path_button(), file_panel_execution_buttons_draw(), file_panel_operator(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_splash_create(), and wm_operator_ui_create().
| void UI_block_funcN_set | ( | uiBlock * | block, |
| uiButHandleNFunc | funcN, | ||
| void * | argN, | ||
| void * | arg2, | ||
| uiButArgNFree | func_argN_free_fn, | ||
| uiButArgNCopy | func_argN_copy_fn ) |
Definition at line 6218 of file interface.cc.
References uiBlock::func_arg2, uiBlock::func_argN, uiBlock::func_argN_copy_fn, uiBlock::func_argN_free_fn, and uiBlock::funcN.
Referenced by curvemap_buttons_layout(), CurveProfile_buttons_layout(), uiTemplateImage(), and uiTemplateMarker().
| bool UI_block_is_search_only | ( | const uiBlock * | block | ) |
Definition at line 3910 of file interface.cc.
References uiBlock::flag, and UI_BLOCK_SEARCH_ONLY.
Referenced by UI_panels_draw().
| void UI_block_listen | ( | const uiBlock * | block, |
| const wmRegionListenerParams * | listener_params ) |
Definition at line 3731 of file interface.cc.
References uiBlock::dynamic_listeners, LISTBASE_FOREACH, and ui_block_views_listen().
Referenced by ED_region_do_listen().
| void UI_block_lock_clear | ( | uiBlock * | block | ) |
Definition at line 2465 of file interface.cc.
References uiBlock::lock, and uiBlock::lockstr.
Referenced by draw_constraint_header(), panel_draw(), template_operator_property_buts_draw_single(), uiTemplateColorRamp(), uiTemplateCurveMapping(), and uiTemplateCurveProfile().
| void UI_block_lock_set | ( | uiBlock * | block, |
| bool | val, | ||
| const char * | lockstr ) |
Definition at line 2457 of file interface.cc.
References uiBlock::lock, and uiBlock::lockstr.
Referenced by modifier_panel_get_property_pointers(), panel_draw(), shaderfx_panel_header(), template_operator_property_buts_draw_single(), uiTemplateColorRamp(), uiTemplateConstraintHeader(), uiTemplateCurveMapping(), and uiTemplateCurveProfile().
Definition at line 2307 of file interface.cc.
References uiBlock::buttons, PointerRNA::data, ED_region_do_msg_notify_tag_redraw(), wmMsgSubscribeValue::notify, wmMsgSubscribeValue::owner, PointerRNA::owner_id, uiBut::rnapoin, uiBut::rnaprop, PointerRNA::type, wmMsgSubscribeValue::user_data, and WM_msg_subscribe_rna().
Referenced by UI_region_message_subscribe().
Definition at line 3802 of file interface.cc.
References uiBlock::active, BLI_addhead(), uiBlock::handle, uiBlock::name, uiBlock::oldblock, uiBlock::panel, and ARegion::runtime.
Referenced by UI_block_begin(), ui_block_func_PIE(), ui_block_func_POPOVER(), and ui_block_func_POPUP().
| void UI_block_set_active_operator | ( | uiBlock * | block, |
| wmOperator * | op, | ||
| const bool | free ) |
Used for operator presets.
Definition at line 3693 of file interface.cc.
References free(), ui_block_free_active_operator(), uiBlock::ui_operator, and uiBlock::ui_operator_free.
Referenced by template_operator_property_buts_draw_single(), and uiTemplateCollectionExporters().
| void UI_block_set_search_only | ( | uiBlock * | block, |
| bool | search_only ) |
Use when a block must be searched to give accurate results for the whole region but shouldn't be displayed.
Definition at line 3915 of file interface.cc.
References uiBlock::flag, SET_FLAG_FROM_TEST, and UI_BLOCK_SEARCH_ONLY.
Referenced by panel_property_search(), and panel_remove_invisible_layouts_recursive().
| void UI_block_theme_style_set | ( | uiBlock * | block, |
| char | theme_style ) |
Definition at line 3905 of file interface.cc.
References uiBlock::theme_style.
Referenced by block_create__close_file_dialog(), block_create_autorun_warning(), block_create_gpu_backend_fallback(), block_create_opengl_usage_warning(), block_create_save_file_overwrite_dialog(), blender::ed::space_node::create_search_popup_block(), curvemap_clipping_func(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), template_common_search_menu(), ui_block_func_COLOR(), ui_block_func_PIE(), ui_block_func_POPOVER(), ui_block_func_POPUP(), ui_icon_view_menu_cb(), UI_panel_begin(), ui_popup_block_refresh(), wm_block_about_create(), wm_block_create_redo(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_create(), wm_enum_search_menu(), and wm_operator_ui_create().
Definition at line 118 of file interface.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), Panel::ofsx, Panel::ofsy, uiBlock::panel, uiBlock::winmat, ARegion::winrct, x, and y.
Referenced by ui_block_to_region_rctf(), and ui_block_to_window_fl().
| void ui_block_to_region_rctf | ( | const ARegion * | region, |
| const uiBlock * | block, | ||
| rctf * | rct_dst, | ||
| const rctf * | rct_src ) |
Definition at line 155 of file interface.cc.
References ui_block_to_region_fl(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_but_rect_to_view().
Definition at line 144 of file interface.cc.
References ui_block_to_window_fl(), x, and y.
Definition at line 137 of file interface.cc.
References ui_block_to_region_fl(), ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by button_activate_state(), ui_block_func_POPOVER(), ui_block_to_window(), ui_block_to_window_rctf(), ui_block_to_window_scale(), ui_textedit_set_cursor_pos(), and UI_tooltip_create_from_button_or_extra_icon().
| void ui_block_to_window_rctf | ( | const ARegion * | region, |
| const uiBlock * | block, | ||
| rctf * | rct_dst, | ||
| const rctf * | rct_src ) |
Definition at line 165 of file interface.cc.
References ui_block_to_window_fl(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by button_activate_state(), blender::ui::AbstractTreeViewItem::get_win_rect(), ui_mouse_motion_towards_check(), ui_popup_block_position(), ui_to_pixelrect(), and UI_tooltip_create_from_button_or_extra_icon().
Definition at line 175 of file interface.cc.
References ui_block_to_window_fl().
Referenced by ui_but_drag_init().
| void UI_block_translate | ( | uiBlock * | block, |
| float | x, | ||
| float | y ) |
Definition at line 390 of file interface.cc.
References BLI_rctf_translate(), uiBlock::buttons, uiBlock::rect, x, and y.
Referenced by ed_panel_draw(), ui_block_bounds_calc_centered(), ui_block_bounds_calc_centered_pie(), ui_block_bounds_calc_popup(), ui_block_bounds_calc_post_centered(), and ui_popup_block_refresh().
Definition at line 1953 of file interface.cc.
References uiBlock::auto_open, uiBlock::auto_open_last, BLI_listbase_is_empty(), BLI_movelisttolist(), uiBlock::butstore, uiBlock::buttons, C, Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), uiBlock::color_pickers, Vector< T, InlineBufferCapacity, Allocator >::is_empty(), ColorPickerData::list, uiBlock::oldblock, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), Vector< T, InlineBufferCapacity, Allocator >::size(), uiBlock::tooltipdisabled, ui_but_free(), UI_but_tooltip_refresh(), ui_but_update(), ui_but_update_from_old_block(), and UI_butstore_update().
Referenced by UI_block_end_ex(), and ui_popup_block_refresh().
Definition at line 3764 of file interface.cc.
References C, LISTBASE_FOREACH, and UI_block_draw().
Referenced by blender::ed::asset::shelf::region_draw(), and region_draw_blocks_in_view2d().
Can be called with C==NULL.
Definition at line 3773 of file interface.cc.
References BLI_pophead(), C, ARegion::runtime, and UI_block_free().
Referenced by ED_area_init(), ED_region_property_search(), ED_screen_state_toggle(), property_search_all_tabs(), and ui_region_handler_remove().
Definition at line 3782 of file interface.cc.
References BLI_remlink(), C, LISTBASE_FOREACH_MUTABLE, ARegion::runtime, and UI_block_free().
Referenced by ED_region_do_draw(), and ui_popup_block_refresh().
| int UI_blocklist_min_y_get | ( | ListBase * | lb | ) |
Definition at line 5997 of file interface.cc.
References ListBase::first, LISTBASE_FOREACH, min, uiBlock::rect, and rctf::ymin.
Definition at line 3755 of file interface.cc.
References C, LISTBASE_FOREACH, and ui_but_update_view_for_active().
Referenced by ED_region_panels_layout_ex().
Definition at line 3743 of file interface.cc.
References C, CTX_wm_region(), CTX_wm_window(), LISTBASE_FOREACH, and ui_update_window_matrix().
Referenced by ED_region_panels_draw(), blender::ed::asset::shelf::region_draw(), region_draw_blocks_in_view2d(), and blender::ed::asset::shelf::region_layout().
Definition at line 1183 of file interface.cc.
References C, and UI_but_active_only_ex().
Referenced by blender::ui::AbstractViewItem::add_rename_button(), ANIM_channel_draw_widgets(), blender::ed::vse::draw_channel_labels(), file_draw_list(), blender::ed::outliner::outliner_buttons(), UI_textbutton_activate_but(), and UI_textbutton_activate_rna().
| bool UI_but_active_only_ex | ( | const bContext * | C, |
| ARegion * | region, | ||
| uiBlock * | block, | ||
| uiBut * | but, | ||
| bool | remove_on_failure ) |
Special button case, only draw it when used actively, for outliner etc.
Needed for temporarily rename buttons, such as in outliner or file-select, they should keep calling uiDefBut to keep them alive.
Definition at line 1141 of file interface.cc.
References activate(), uiBut::active, C, uiBut::layout, uiBlock::oldblock, uiBlock::remove_but(), ui_but_activate_event(), ui_but_active_free(), ui_but_find_old(), ui_but_free(), ui_layout_remove_but(), and ui_region_find_active_but().
Referenced by UI_block_active_only_flagged_buttons(), and UI_but_active_only().
| void ui_but_add_shortcut | ( | uiBut * | but, |
| const char * | shortcut_str, | ||
| const bool | do_strip ) |
Definition at line 1337 of file interface.cc.
References uiBut::flag, uiBut::str, UI_BUT_HAS_SEP_CHAR, ui_but_update(), UI_SEP_CHAR, and UI_SEP_CHAR_S.
Referenced by but_shortcut_name_func(), UI_but_hint_drawstr_set(), ui_menu_block_set_keymaps(), and uiItemMenuEnumFullO_ptr().
|
static |
Definition at line 3920 of file interface.cc.
References uiBut::drawstr, PROP_FACTOR, PROP_NONE, PROP_PERCENTAGE, PROP_PIXEL, RNA_property_subtype(), uiBut::rnaprop, uiBut::str, U, ui_but_calc_float_precision(), ui_but_is_unit(), UI_FLOAT_VALUE_DISPLAY_MAX, UI_FLOAT_VALUE_DISPLAY_MIN, ui_get_but_string_unit(), UI_MAX_DRAW_STR, and USER_FACTOR_AS_FACTOR.
Referenced by ui_but_update_ex().
|
static |
Definition at line 3965 of file interface.cc.
References uiBut::drawstr, PROP_NONE, PROP_PERCENTAGE, PROP_PIXEL, RNA_property_subtype(), uiBut::rnaprop, and uiBut::str.
Referenced by ui_but_update_ex().
|
static |
Definition at line 728 of file interface.cc.
References CLAMP, uiBut::hardmax, ui_but_get_float_precision(), ui_but_hide_fraction(), ui_but_is_unit_radians(), UI_calc_float_precision(), and UI_PRECISION_FLOAT_MAX.
Referenced by ui_but_build_drawstr_float(), ui_but_string_get_ex(), and ui_but_update_ex().
Reallocate the button (new address is returned) for a new button type. This should generally be avoided and instead the correct type be created right away.
Definition at line 4255 of file interface.cc.
References BLI_assert, uiBut::block, uiBlock::but_index(), uiBlock::buttons, uiBut::layout, uiBut::poin, uiBut::type, ui_but_new(), ui_button_group_replace_but_ptr(), UI_editsource_but_replace(), UI_editsource_enable_check(), ui_layout_replace_but_ptr(), uiLayoutGetBlock(), and UNUSED_VARS_NDEBUG.
Referenced by uiLayout::prop(), ui_but_add_search(), and ui_item_array().
Sets the button's color, normally only used to recolor the icon. In the special case of UI_BTYPE_LABEL without icon this is used as text color.
Definition at line 6077 of file interface.cc.
References uiBut::col, and copy_v4_v4_uchar().
Referenced by file_add_overlay_icon_but(), and wm_block_splash_add_label().
| const bContextStore * UI_but_context_get | ( | const uiBut * | but | ) |
Definition at line 6181 of file interface.cc.
References uiBut::context.
Referenced by blender::ed::asset::shelf::context(), and wm_drop_ui_context_create().
Definition at line 6173 of file interface.cc.
References uiBut::context, and CTX_store_int_lookup().
Referenced by blender::ed::outliner::outliner_but_identity_cmp_context_id_fn().
| void UI_but_context_int_set | ( | uiBlock * | block, |
| uiBut * | but, | ||
| const StringRef | name, | ||
| const int64_t | value ) |
Definition at line 6150 of file interface.cc.
References uiBut::context, uiBlock::contexts, CTX_store_add(), and bContextStore::used.
Referenced by blender::ed::outliner::outliner_draw_overrides_restrictbuts().
| std::string UI_but_context_menu_title_from_button | ( | uiBut & | but | ) |
Definition at line 6882 of file interface.cc.
References blender::ui::AbstractView::get_context_menu_title(), blender::ui::AbstractViewItem::get_view(), IFACE_, uiBut::type, UI_BTYPE_VIEW_ITEM, UI_but_string_get_label(), and uiButViewItem::view_item.
Referenced by ui_popup_context_menu_for_button().
| bool ui_but_context_poll_operator | ( | bContext * | C, |
| wmOperatorType * | ot, | ||
| const uiBut * | but ) |
Definition at line 2045 of file interface.cc.
References C, uiBut::opcontext, ot, params, ui_but_context_poll_operator_ex(), and WM_OP_INVOKE_DEFAULT.
Referenced by UI_block_end_ex(), ui_list_invoke_item_operator(), and ui_list_is_hovering_draggable_but().
| bool ui_but_context_poll_operator_ex | ( | bContext * | C, |
| const uiBut * | but, | ||
| const wmOperatorCallParams * | optype_params ) |
Check if the operator ot poll is successful with the context given by but (optionally).
| but | The button that might store context. Can be NULL for convenience (e.g. if there is no button to take context from, but we still want to poll the operator). |
Definition at line 2008 of file interface.cc.
References BLI_assert_msg, C, uiBut::context, CTX_store_get(), CTX_store_set(), flag, uiBut::flag, wmOperatorCallParams::opcontext, wmOperatorCallParams::optype, result, UI_BUT_ACTIVE_OVERRIDE, and WM_operator_poll_context().
Referenced by UI_block_end_ex(), ui_but_context_poll_operator(), and ui_tooltip_data_from_button_or_extra_icon().
| const PointerRNA * UI_but_context_ptr_get | ( | const uiBut * | but, |
| const StringRef | name, | ||
| const StructRNA * | type ) |
Definition at line 6157 of file interface.cc.
References uiBut::context, and CTX_store_ptr_lookup().
| void UI_but_context_ptr_set | ( | uiBlock * | block, |
| uiBut * | but, | ||
| const StringRef | name, | ||
| const PointerRNA * | ptr ) |
Definition at line 6140 of file interface.cc.
References uiBut::context, uiBlock::contexts, CTX_store_add(), ptr, and bContextStore::used.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile().
| std::optional< blender::StringRefNull > UI_but_context_string_get | ( | const uiBut * | but, |
| const StringRef | name ) |
Definition at line 6164 of file interface.cc.
References uiBut::context, and CTX_store_string_lookup().
Referenced by UI_asset_shelf_idname_from_button_context().
| void ui_but_convert_to_unit_alt_name | ( | uiBut * | but, |
| char * | str, | ||
| size_t | str_maxncpy ) |
| str | will be overwritten. |
Definition at line 2921 of file interface.cc.
References BKE_unit_name_to_alt(), BLI_strdup(), uiBut::block, MEM_freeN(), RNA_SUBTYPE_UNIT_VALUE, str, UnitSettings::system, ui_but_is_unit(), UI_but_unit_type_get(), and uiBlock::unit.
Referenced by ui_textedit_begin().
| void UI_but_disable | ( | uiBut * | but, |
| const char * | disabled_hint ) |
Definition at line 6065 of file interface.cc.
References uiBut::disabled_info, UI_BUT_DISABLED, and UI_but_flag_enable().
Referenced by curvemap_buttons_layout(), CurveProfile_buttons_layout(), draw_setting_widget(), modifier_panel_header(), blender::ed::outliner::outliner_draw_mode_column_toggle(), ui_def_but_operator_ptr(), ui_def_but_rna(), ui_def_but_rna_propname(), ui_item_disabled(), uiTemplateTextureShow(), and v3d_object_dimension_buts().
Definition at line 2892 of file interface.cc.
References BLI_assert, uiBut::block, uiBlock::buttons, uiBut::flag, and UI_BUT_DRAG_MULTI.
Referenced by ui_draw_but(), widget_draw_text(), and widget_draw_text_icon().
| void UI_but_dragflag_disable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6060 of file interface.cc.
References uiBut::dragflag, and flag.
| void UI_but_dragflag_enable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6055 of file interface.cc.
References uiBut::dragflag, and flag.
Referenced by asset_view_item_but_drag_set(), file_draw_list(), and UI_but_drag_attach_image().
| void UI_but_drawflag_disable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6050 of file interface.cc.
References uiBut::drawflag, and flag.
Referenced by block_create_autorun_warning(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float4x4(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_left_column_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), file_add_icon_but(), file_add_overlay_icon_but(), blender::ed::space_node::reroute_node_draw_label(), save_file_overwrite_cancel_button(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), ui_block_colorpicker(), UI_but_type_set_menu_from_pulldown(), uiItemFullO_ptr_ex(), widget_draw_extra_icons(), wm_block_file_close_cancel_button(), wm_block_file_close_discard_button(), wm_block_file_close_save_button(), wm_block_insert_unicode_create(), and wm_block_splash_add_label().
| void UI_but_drawflag_enable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6045 of file interface.cc.
References uiBut::drawflag, and flag.
Referenced by blender::ed::asset::shelf::add_tab_button(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_left_column_cell(), blender::ed::outliner::outliner_draw_restrictbuts(), template_add_button_search_menu(), template_ID_tabs(), UI_but_func_quick_tooltip_set(), UI_but_type_set_menu_from_pulldown(), ui_def_but_operator_ptr(), ui_item_enum_expand_tabs(), ui_item_menu(), ui_template_list_layout_draw(), uiTemplateMarker(), uiTemplateNodeLink(), view3d_panel_vgroup(), and wm_block_splash_add_label().
Definition at line 775 of file interface.cc.
References uiBut::apply_func, BLI_assert, uiBut::block_create_func, uiBut::dragtype, ELEM, uiBut::func, uiBut::func_arg1, uiBut::func_arg2, uiBut::funcN, uiBut::identity_cmp_func, uiBut::optype, uiBut::poin, uiBut::pointype, uiBut::retval, uiBut::type, UI_BTYPE_VIEW_ITEM, ui_but_rna_equals(), UI_view_item_matches(), and uiButViewItem::view_item.
Referenced by ui_but_find_new(), ui_but_find_old(), and ui_but_update_from_old_block().
|
static |
Definition at line 1421 of file interface.cc.
References C, uiBut::opcontext, uiBut::opptr, uiBut::optype, params, ui_but_event_operator_string_from_menu(), ui_but_event_operator_string_from_operator(), ui_but_event_operator_string_from_panel(), UI_but_menutype_get(), and UI_but_paneltype_get().
Referenced by UI_but_string_get_operator_keymap(), and ui_menu_block_set_keymaps().
|
static |
Definition at line 1376 of file interface.cc.
References BLI_assert, C, blender::bke::idprop::create_group(), MenuType::idname, IDP_AddToGroup(), IDP_FreeProperty(), IDP_NewStringMaxSize(), result, UI_but_menutype_get(), WM_key_event_operator_string(), and WM_OP_INVOKE_REGION_WIN.
Referenced by ui_but_event_operator_string().
|
static |
Definition at line 1364 of file interface.cc.
References BLI_assert, C, PointerRNA::data, wmOperatorType::idname, wmOperatorCallParams::opcontext, wmOperatorCallParams::opptr, wmOperatorCallParams::optype, and WM_key_event_operator_string().
Referenced by ui_but_event_operator_string(), and ui_but_extra_icon_event_operator_string().
|
static |
Nearly exact copy of ui_but_event_operator_string_from_menu
Definition at line 1393 of file interface.cc.
References BLI_assert, BLI_SCOPED_DEFER, C, blender::bke::idprop::create(), blender::bke::idprop::create_group(), i, PanelType::idname, IDP_AddToGroup(), IDP_FreeProperty(), IDP_NewStringMaxSize(), IDP_ReplaceInGroup(), PanelType::region_type, result, PanelType::space_type, UI_but_paneltype_get(), WM_key_event_operator_string(), and WM_OP_INVOKE_REGION_WIN.
Referenced by ui_but_event_operator_string().
|
static |
Definition at line 1452 of file interface.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), ARRAY_SIZE, BLI_SCOPED_DEFER, uiBut::block, uiPopupBlockCreate::but, C, blender::bke::idprop::create(), blender::bke::idprop::create_group(), blender::StringRef::drop_known_prefix(), ELEM, free(), GS, uiBlock::handle, uiBut::hardmin, i, ID_SCR, IDP_AddToGroup(), IDP_FreeProperty(), blender::StringRefBase::is_empty(), MEM_freeN(), uiBut::menu_create_func, ID::name, uiPopupBlockHandle::popup_create_vars, PROP_ENUM, ptr, RNA_enum_from_value(), RNA_property_enum_get(), RNA_property_enum_items(), RNA_property_identifier(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_is_a(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::StringRefBase::startswith(), str, STREQ, uiBut::type, UI_BTYPE_BUT_MENU, ui_def_but_rna__menu(), ui_def_but_rna__menu_type(), ui_def_but_rna__panel_type(), EnumPropertyItem::value, WM_context_path_resolve_property_full(), WM_key_event_operator_string(), and WM_OP_INVOKE_REGION_WIN.
Referenced by UI_but_string_get_property_keymap(), and ui_menu_block_set_keymaps().
Simulate button click.
Definition at line 1218 of file interface.cc.
References C, ui_but_execute_begin(), and ui_but_execute_end().
Referenced by force_activate_view_item_but(), ui_button_press_invoke(), ui_drag_toggle_set_xy_xy(), ui_handle_menu_event(), ui_list_activate_hovered_row(), and ui_list_activate_row_from_index().
|
static |
Definition at line 1440 of file interface.cc.
References C, uiButExtraOpIcon::optype_params, ui_but_event_operator_string_from_operator(), and UI_but_extra_operator_icon_optype_get().
Referenced by UI_but_extra_icon_string_get_operator_keymap().
|
static |
Definition at line 898 of file interface.cc.
References uiBut::extra_op_icons, LISTBASE_FOREACH, and ui_but_extra_icons_equals_old().
Referenced by ui_but_extra_icons_update_from_old_but().
| std::string UI_but_extra_icon_string_get_label | ( | const uiButExtraOpIcon & | extra_icon | ) |
Definition at line 7000 of file interface.cc.
References UI_but_extra_operator_icon_opptr_get(), UI_but_extra_operator_icon_optype_get(), and WM_operatortype_name().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
| std::string UI_but_extra_icon_string_get_operator_keymap | ( | const bContext & | C, |
| const uiButExtraOpIcon & | extra_icon ) |
Definition at line 7014 of file interface.cc.
References C, and ui_but_extra_icon_event_operator_string().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
| std::string UI_but_extra_icon_string_get_tooltip | ( | bContext & | C, |
| const uiButExtraOpIcon & | extra_icon ) |
Definition at line 7007 of file interface.cc.
References C, UI_but_extra_operator_icon_opptr_get(), UI_but_extra_operator_icon_optype_get(), and WM_operatortype_description().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
|
static |
Definition at line 891 of file interface.cc.
References uiButExtraOpIcon::icon, wmOperatorCallParams::optype, and uiButExtraOpIcon::optype_params.
Referenced by ui_but_extra_icon_find_old().
Definition at line 909 of file interface.cc.
References uiBut::active, BLI_assert, uiBut::extra_op_icons, uiButExtraOpIcon::highlighted, LISTBASE_FOREACH, uiBut::semi_modal_state, and ui_but_extra_icon_find_old().
Referenced by ui_but_update_old_active_from_new().
| PointerRNA * UI_but_extra_operator_icon_add | ( | uiBut * | but, |
| const StringRefNull | opname, | ||
| wmOperatorCallContext | opcontext, | ||
| int | icon ) |
Definition at line 1788 of file interface.cc.
References blender::StringRefNull::c_str(), ui_but_extra_operator_icon_add_ptr(), and WM_operatortype_find().
Referenced by blender::ed::asset_browser::AssetCatalogTreeViewItem::build_row(), file_panel_execution_buttons_draw(), and template_id_workspace_pin_extra_icon().
|
static |
Definition at line 1750 of file interface.cc.
References BLI_addtail(), uiButExtraOpIcon::disabled, uiBut::extra_op_icons, uiButExtraOpIcon::highlighted, uiButExtraOpIcon::icon, MEM_callocN(), wmOperatorCallParams::opcontext, wmOperatorCallParams::opptr, wmOperatorCallParams::optype, uiButExtraOpIcon::optype_params, and WM_operator_properties_create_ptr().
Referenced by UI_but_extra_operator_icon_add(), and ui_but_predefined_extra_operator_icons_add().
|
static |
Definition at line 1772 of file interface.cc.
References MEM_freeN(), wmOperatorCallParams::opptr, uiButExtraOpIcon::optype_params, and WM_operator_properties_free().
Referenced by ui_but_extra_operator_icons_free().
| PointerRNA * UI_but_extra_operator_icon_opptr_get | ( | const uiButExtraOpIcon * | extra_icon | ) |
Definition at line 1807 of file interface.cc.
References wmOperatorCallParams::opptr, and uiButExtraOpIcon::optype_params.
Referenced by UI_but_extra_icon_string_get_label(), UI_but_extra_icon_string_get_tooltip(), and ui_tooltip_data_from_button_or_extra_icon().
| wmOperatorType * UI_but_extra_operator_icon_optype_get | ( | const uiButExtraOpIcon * | extra_icon | ) |
Definition at line 1802 of file interface.cc.
References wmOperatorCallParams::optype, and uiButExtraOpIcon::optype_params.
Referenced by ui_but_extra_icon_event_operator_string(), UI_but_extra_icon_string_get_label(), UI_but_extra_icon_string_get_tooltip(), and ui_tooltip_data_from_button_or_extra_icon().
| void ui_but_extra_operator_icons_free | ( | uiBut * | but | ) |
Definition at line 1780 of file interface.cc.
References BLI_listbase_clear(), uiBut::extra_op_icons, LISTBASE_FOREACH_MUTABLE, and ui_but_extra_operator_icon_free().
Referenced by ui_but_extra_operator_icon_apply(), and ui_but_free().
Definition at line 881 of file interface.cc.
References uiBlock::buttons, and ui_but_equals_old().
Referenced by UI_butstore_update().
Definition at line 861 of file interface.cc.
References ui_but_find_old().
|
static |
Definition at line 849 of file interface.cc.
References uiBlock::buttons, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and ui_but_equals_old().
Referenced by UI_but_active_only_ex(), ui_but_find_old(), and ui_but_update_from_old_block().
|
static |
Definition at line 866 of file interface.cc.
Referenced by ui_but_update_from_old_block().
| void UI_but_flag2_enable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6030 of file interface.cc.
References flag, and uiBut::flag2.
Referenced by uiLayout::prop(), and wm_block_search_menu().
| void UI_but_flag_disable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6035 of file interface.cc.
References flag, and uiBut::flag.
Referenced by blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::add_tab_button(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), file_draw_list(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_warning_tree_element(), template_ID(), template_operator_property_buts_draw_single(), ui_block_colorpicker(), ui_template_list_layout_draw(), and ui_update_color_picker_buts_rgba().
| void UI_but_flag_enable | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6025 of file interface.cc.
References flag, and uiBut::flag.
Referenced by blender::nodes::add_attribute_search_button(), block_create_autorun_warning(), blender::ui::bonecollections::BoneCollectionItem::build_row(), blender::ed::space_node::create_search_popup_block(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), draw_setting_widget(), ED_file_path_button(), file_draw_list(), file_panel_execution_buttons_draw(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_find_menu(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_draw_rnabuts(), blender::ed::outliner::outliner_draw_userbuts(), uiLayout::prop(), blender::ed::space_node::reroute_node_draw_label(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), template_add_button_search_menu(), template_ID(), template_id_def_new_but(), UI_but_disable(), ui_but_search_refresh(), ui_item_with_label(), ui_layout_list_set_labels_active(), UI_popup_block_template_confirm(), ui_popup_context_menu_for_button(), ui_template_list_layout_draw(), uiDefAutoButR(), uiItemFullO_ptr_ex(), uiItemL_(), uiItemL_ex(), uiTemplateKeymapItemProperties(), view3d_panel_vgroup(), wm_block_dialog_create(), wm_block_file_close_save_button(), wm_block_insert_unicode_create(), and wm_block_search_menu().
| bool UI_but_flag_is_set | ( | uiBut * | but, |
| int | flag ) |
Definition at line 6040 of file interface.cc.
References flag, and uiBut::flag.
Referenced by blender::ui::bonedropper_init(), datadropper_init(), depthdropper_init(), driverdropper_init(), drop_color_invoke(), ED_file_path_button(), blender::ui::eyedropper_colorband_init(), eyedropper_init(), file_panel_execution_buttons_draw(), and insert_key_button_exec().
push a new event onto event queue to activate the given button (usually a text-field) upon entering a popup
Definition at line 6775 of file interface.cc.
References EVT_BUT_OPEN, KM_PRESS, WM_event_add(), and wm_event_init_from_window().
Referenced by template_common_search_menu(), template_operator_property_buts_draw_single(), and wm_enum_search_menu().
a full doc with API notes can be found in 'blender/doc/guides/interface_API.txt'
uiBlahBlah() external function. ui_blah_blah() internal function.
Frees internal data owned by the #but, however this does not free the #but itself, the #but is managed with a #std::unique_ptr, this must be called before the #std::unique_ptr owner is destroyed.
Definition at line 3623 of file interface.cc.
References uiBut::active, BLI_assert, uiBut::block, C, uiBut::func_argN, uiBut::func_argN_free_fn, uiBut::hold_argN, IMB_freeImBuf(), MEM_freeN(), uiBut::opptr, uiBut::placeholder, uiBut::poin, uiBut::semi_modal_state, uiBut::tip_arg, uiBut::tip_arg_free, uiBut::type, UI_BTYPE_IMAGE, ui_but_active_free(), ui_but_drag_free(), ui_but_extra_operator_icons_free(), ui_but_free_type_specific(), ui_but_handle_data_free(), ui_but_semi_modal_state_free(), UI_butstore_is_registered(), and WM_operator_properties_free().
Referenced by UI_block_free(), UI_block_update_from_old(), and UI_but_active_only_ex().
|
static |
Free data specific to a certain button type. For now just do in a switch-case, we could instead have a callback stored in uiBut and set that in #ui_but_alloc_info().
Definition at line 3600 of file interface.cc.
References uiButSearch::arg, uiButSearch::arg_free_fn, uiButSearch::item_active_str, MEM_SAFE_FREE, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by ui_but_free().
| void UI_but_func_complete_set | ( | uiBut * | but, |
| uiButCompleteFunc | func, | ||
| void * | arg ) |
Definition at line 6284 of file interface.cc.
References uiBut::autocomplete_func, and uiBut::autofunc_arg.
Referenced by ED_file_path_button(), and file_panel_execution_buttons_draw().
| void UI_but_func_drawextra_set | ( | uiBlock * | block, |
| std::function< void(const bContext *C, rcti *rect)> | func ) |
Definition at line 6248 of file interface.cc.
References C, and uiBlock::drawextra.
Referenced by uiTemplatePreview().
| void UI_but_func_hold_set | ( | uiBut * | but, |
| uiButHandleHoldFunc | func, | ||
| void * | argN ) |
Definition at line 6789 of file interface.cc.
References uiBut::hold_argN, and uiBut::hold_func.
Referenced by uiItemFullOMenuHold_ptr().
| void UI_but_func_menu_step_set | ( | uiBut * | but, |
| uiMenuStepFunc | func ) |
Definition at line 6290 of file interface.cc.
References uiBut::menu_step_func.
Referenced by uiblock_layer_pass_buttons().
Definition at line 6329 of file interface.cc.
References uiBut::pushed_state_func, and ui_but_update().
Referenced by blender::ed::asset::shelf::add_catalog_tabs(), and blender::ed::space_node::node_draw_panels().
| void UI_but_func_quick_tooltip_set | ( | uiBut * | but, |
| std::function< std::string(const uiBut *but)> | func ) |
Enable a tooltip that appears faster than the usual tooltip. If the button has both a quick and a normal tooltip, the quick one is shown first, and expanded to the full one after the usual tooltip delay. Quick tooltips are useful in cases like:
Definition at line 6300 of file interface.cc.
References uiBut::tip_quick_func, UI_but_drawflag_enable(), and UI_BUT_HAS_QUICK_TOOLTIP.
Referenced by blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ed::space_node::draw_link_errors(), and blender::ed::space_node::node_add_error_message_button().
| void UI_but_func_rename_full_set | ( | uiBut * | but, |
| std::function< void(std::string &new_name)> | rename_full_func ) |
Definition at line 6242 of file interface.cc.
References uiBut::rename_full_func.
Referenced by uiLayout::prop(), and template_ID().
| void UI_but_func_rename_set | ( | uiBut * | but, |
| uiButHandleRenameFunc | func, | ||
| void * | arg1 ) |
Definition at line 6236 of file interface.cc.
References uiBut::rename_arg1, and uiBut::rename_func.
Referenced by blender::ui::AbstractViewItem::add_rename_button(), file_draw_list(), and blender::ed::outliner::outliner_buttons().
| void UI_but_func_search_set | ( | uiBut * | but, |
| uiButSearchCreateFn | search_create_fn, | ||
| uiButSearchUpdateFn | search_update_fn, | ||
| void * | arg, | ||
| bool | free_arg, | ||
| uiFreeArgFunc | search_arg_free_fn, | ||
| uiButHandleFunc | search_exec_fn, | ||
| void * | active ) |
| search_create_fn | Function to create the menu. |
| search_update_fn | Function to refresh search content after the search text has changed. |
| arg | user value. |
| free_arg | Set to true if the argument is newly allocated memory for every redraw and should be freed when the button is destroyed. |
| search_arg_free_fn | When non-null, use this function to free arg. |
| search_exec_fn | Function that executes the action, gets arg as the first argument. The second argument as the active item-pointer |
| active | When non-null, this item-pointer item will be visible and selected, otherwise the first item will be selected. |
Definition at line 6487 of file interface.cc.
References active, uiButSearch::arg, uiButSearch::arg_free_fn, BLI_assert, uiBut::block, uiBut::drawstr, uiBlock::flag, uiBut::func, uiButSearch::item_active, uiButSearch::items_update_fn, uiButSearch::popup_create_fn, printf, uiButSearch::results_are_suggestions, uiBut::type, UI_BLOCK_LOOP, UI_BTYPE_SEARCH_MENU, UI_but_func_set(), UI_but_funcN_set(), ui_but_search_refresh(), and ui_searchbox_create_generic().
Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ed::space_node::create_search_popup_block(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), template_common_search_menu(), ui_but_add_search(), UI_but_func_menu_search(), UI_but_func_operator_search(), and uiDefSearchButO_ptr().
| void UI_but_func_search_set_context_menu | ( | uiBut * | but, |
| uiButSearchContextMenuFn | context_menu_fn ) |
Definition at line 6545 of file interface.cc.
References BLI_assert, uiButSearch::item_context_menu_fn, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by UI_but_func_menu_search().
| void UI_but_func_search_set_listen | ( | uiBut * | but, |
| uiButSearchListenFn | listen_fn ) |
Definition at line 6569 of file interface.cc.
References BLI_assert, uiButSearch::listen_fn, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by blender::ed::space_node::create_search_popup_block().
| void UI_but_func_search_set_results_are_suggestions | ( | uiBut * | but, |
| const bool | value ) |
Definition at line 6576 of file interface.cc.
References BLI_assert, uiButSearch::results_are_suggestions, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), and ui_but_add_search().
| void UI_but_func_search_set_sep_string | ( | uiBut * | but, |
| const char * | search_sep_string ) |
| search_sep_string | when not NULL, this string is used as a separator, showing the icon and highlighted text after the last instance of this string. |
Definition at line 6553 of file interface.cc.
References BLI_assert, uiButSearch::item_sep_string, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ed::space_node::create_search_popup_block(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), and UI_but_func_menu_search().
| void UI_but_func_search_set_tooltip | ( | uiBut * | but, |
| uiButSearchTooltipFn | tooltip_fn ) |
Definition at line 6561 of file interface.cc.
References BLI_assert, uiButSearch::item_tooltip_fn, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by template_common_search_menu(), and UI_but_func_menu_search().
Definition at line 6261 of file interface.cc.
References uiBut::apply_func.
Referenced by blender::ed::asset::shelf::add_catalog_tabs(), ANIM_channel_draw_widgets(), block_create__close_file_dialog(), block_create_autorun_warning(), blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), colorband_buttons_layout(), colorband_tools_fn(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_buttons_layout(), curvemap_clipping_func(), curvemap_tools_func(), CurveProfile_buttons_layout(), envelope_panel_draw(), graph_draw_driver_settings_panel(), graph_panel_key_properties(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_panels(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_restrictbuts(), blender::ed::outliner::outliner_draw_userbuts(), save_file_overwrite_cancel_button(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), template_operator_property_buts_draw_single(), ui_block_colorpicker(), ui_colorpicker_circle(), ui_colorpicker_square(), ui_item_array(), ui_item_enum_expand_elem_exec(), ui_item_with_label(), UI_popup_block_template_confirm(), ui_popup_context_menu_for_button(), ui_template_list_layout_draw(), uiItemDecoratorR_prop(), uiTemplateKeymapItemProperties(), uiTemplateLayers(), uiTemplateTextureShow(), view3d_panel_vgroup(), wm_block_dialog_create(), wm_block_file_close_cancel_button(), wm_block_file_close_discard_button(), wm_block_file_close_save_button(), wm_block_insert_unicode_create(), and wm_block_splash_create().
| void UI_but_func_set | ( | uiBut * | but, |
| uiButHandleFunc | func, | ||
| void * | arg1, | ||
| void * | arg2 ) |
Definition at line 6254 of file interface.cc.
References uiBut::func, uiBut::func_arg1, and uiBut::func_arg2.
Referenced by UI_but_func_search_set().
| void UI_but_func_tooltip_custom_set | ( | uiBut * | but, |
| uiButToolTipCustomFunc | func, | ||
| void * | arg, | ||
| uiFreeArgFunc | free_arg ) |
Definition at line 6316 of file interface.cc.
References uiBut::tip_arg, uiBut::tip_arg_free, and uiBut::tip_custom_func.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), file_but_tooltip_func_set(), ui_block_colorpicker(), and uiTemplateRecentFiles().
| void UI_but_func_tooltip_set | ( | uiBut * | but, |
| uiButToolTipFunc | func, | ||
| void * | arg, | ||
| uiFreeArgFunc | free_arg ) |
Definition at line 6306 of file interface.cc.
References uiBut::tip_arg, uiBut::tip_arg_free, and uiBut::tip_func.
Referenced by blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::vse::draw_channel_widget_lock(), blender::ed::vse::draw_channel_widget_mute(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float4x4(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_socket_tooltip_set(), ui_def_but_rna__menu(), ui_template_list_layout_draw(), uiLayoutSetTooltipFunc(), uiTemplateRunningJobs(), and uiTemplateStatusInfo().
| void UI_but_funcN_set | ( | uiBut * | but, |
| uiButHandleNFunc | funcN, | ||
| void * | argN, | ||
| void * | arg2, | ||
| uiButArgNFree | func_argN_free_fn, | ||
| uiButArgNCopy | func_argN_copy_fn ) |
Definition at line 6266 of file interface.cc.
References uiBut::func_arg2, uiBut::func_argN, uiBut::func_argN_copy_fn, uiBut::func_argN_free_fn, and uiBut::funcN.
Referenced by colorband_buttons_layout(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), draw_setting_widget(), ED_file_path_button(), file_panel_execution_buttons_draw(), fmodifier_panel_header(), template_ID(), template_id_def_new_but(), template_ID_tabs(), template_texture_user_menu(), UI_but_func_search_set(), blender::ed::space_node::ui_node_menu_column(), ui_pie_menu_level_create(), blender::ed::space_node::ui_template_node_link_menu(), uiblock_layer_pass_buttons(), and uiTemplateMarker().
|
static |
Definition at line 682 of file interface.cc.
References BLI_assert_unreachable, uiBut::type, UI_BTYPE_NUM, and UI_BTYPE_NUM_SLIDER.
Referenced by ui_but_calc_float_precision(), and ui_get_but_string_unit().
|
static |
Definition at line 694 of file interface.cc.
References BLI_assert_unreachable, uiBut::type, UI_BTYPE_NUM, and UI_BTYPE_NUM_SLIDER.
Referenced by ui_but_hide_fraction().
|
static |
Definition at line 706 of file interface.cc.
References floor, floorf, PROP_UNIT_NONE, PROP_UNIT_TIME, step, ui_but_get_float_step_size(), UI_but_unit_type_get(), and UI_PRECISION_FLOAT_SCALE.
Referenced by ui_but_calc_float_precision(), and ui_but_string_get_ex().
| void UI_but_hint_drawstr_set | ( | uiBut * | but, |
| const char * | string ) |
Adds a hint to the button which draws right aligned, grayed out and never clipped.
Definition at line 6685 of file interface.cc.
References ui_but_add_shortcut().
Referenced by blender::ed::spreadsheet::draw_row_suffix().
|
static |
Definition at line 1859 of file interface.cc.
References uiBut::flag, PREDEFINED_EXTRA_OP_ICON_BONE_EYEDROPPER, PREDEFINED_EXTRA_OP_ICON_CLEAR, PREDEFINED_EXTRA_OP_ICON_EYEDROPPER, PREDEFINED_EXTRA_OP_ICON_NONE, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, ui_but_icon_extra_is_visible_bone_eyedropper(), ui_but_icon_extra_is_visible_search_eyedropper(), ui_but_icon_extra_is_visible_search_unlink(), ui_but_icon_extra_is_visible_text_clear(), and UI_BUT_VALUE_CLEAR.
Referenced by ui_but_predefined_extra_operator_icons_add().
|
static |
Definition at line 1839 of file interface.cc.
References uiBut::editstr, ELEM, uiBut::flag, PROP_POINTER, PROP_STRING, RNA_property_pointer_type(), RNA_property_type(), uiBut::rnaprop, uiButSearch::rnasearchpoin, uiButSearch::rnasearchprop, uiBut::type, UI_BTYPE_SEARCH_MENU, and UI_BUT_VALUE_CLEAR.
Referenced by ui_but_icon_extra_get().
|
static |
Definition at line 1825 of file interface.cc.
References BLI_assert, uiBut::editstr, uiBut::flag, ID_OB, OB_DATA_SUPPORT_ID, RNA_property_pointer_type(), RNA_type_to_ID_code(), uiBut::rnapoin, uiBut::rnaprop, uiBut::type, UI_BTYPE_SEARCH_MENU, and UI_BUT_VALUE_CLEAR.
Referenced by ui_but_icon_extra_get().
|
static |
Definition at line 1818 of file interface.cc.
References BLI_assert, uiBut::drawstr, uiBut::editstr, ELEM, uiBut::flag, uiBut::type, UI_BTYPE_SEARCH_MENU, and UI_BUT_VALUE_CLEAR.
Referenced by ui_but_icon_extra_get().
|
static |
Definition at line 1812 of file interface.cc.
References BLI_assert, uiBut::drawstr, uiBut::flag, uiBut::type, UI_BTYPE_TEXT, and UI_BUT_VALUE_CLEAR.
Referenced by ui_but_icon_extra_get().
Definition at line 6700 of file interface.cc.
References IconTextOverlay::color, copy_v4_v4_uchar(), and uiBut::icon_overlay_text.
Referenced by blender::ed::outliner::outliner_draw_userbuts(), and uiTemplateStatusInfo().
| void UI_but_icon_indicator_number_set | ( | uiBut * | but, |
| const int | indicator_number ) |
Definition at line 6690 of file interface.cc.
References uiBut::icon_overlay_text, and UI_icon_text_overlay_init_from_count().
Referenced by blender::ed::space_node::node_draw_basis(), and blender::ui::template_breadcrumbs().
| void UI_but_icon_indicator_set | ( | uiBut * | but, |
| const char * | string ) |
Definition at line 6695 of file interface.cc.
References uiBut::icon_overlay_text, STRNCPY(), and IconTextOverlay::text.
Referenced by blender::ed::outliner::outliner_draw_userbuts().
| bool ui_but_is_bool | ( | const uiBut * | but | ) |
Definition at line 2622 of file interface.cc.
References ELEM, PROP_BOOLEAN, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, uiBut::type, UI_BTYPE_BUT_TOGGLE, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_ROW, UI_BTYPE_TAB, UI_BTYPE_TOGGLE, and UI_BTYPE_TOGGLE_N.
Referenced by ui_drag_toggle_but_is_supported(), and ui_drag_toggle_but_pushed_state().
Check if this button is similar enough to be grouped with another.
Definition at line 2680 of file interface.cc.
References uiBut::pointype, RNA_property_subtype(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, PointerRNA::type, and uiBut::type.
Referenced by ui_multibut_states_tag().
| bool ui_but_is_float | ( | const uiBut * | but | ) |
Definition at line 2601 of file interface.cc.
References uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_type(), uiBut::rnaprop, and UI_BUT_POIN_FLOAT.
Referenced by ui_but_string_eval_number(), ui_but_string_get_ex(), ui_but_string_set(), ui_but_update_ex(), ui_do_but_NUM(), ui_do_but_SLI(), ui_numedit_begin(), ui_numedit_but_NUM(), ui_numedit_but_SLI(), and ui_textedit_begin().
| int ui_but_is_pushed | ( | uiBut * | but | ) |
Definition at line 2437 of file interface.cc.
References ui_but_is_pushed_ex(), and UI_BUT_VALUE_UNSET.
Referenced by ui_drag_toggle_but_pushed_state().
| int ui_but_is_pushed_ex | ( | uiBut * | but, |
| double * | value ) |
Check if the button is pushed, this is only meaningful for some button types.
Definition at line 2340 of file interface.cc.
References uiBut::bit, uiBut::bitnr, uiBut::custom_data, PointerRNA::data, uiBut::drawflag, ELEM, uiBut::hardmax, uiBut::hardmin, blender::ui::AbstractViewItem::is_active(), uiBut::optype, PROP_ENUM_FLAG, PROP_POINTER, uiBut::pushed_state_func, RNA_property_flag(), RNA_property_pointer_get(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, state, uiBut::type, UI_BITBUT_TEST, UI_BTYPE_BUT, UI_BTYPE_BUT_TOGGLE, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_COLOR, UI_BTYPE_DECORATOR, UI_BTYPE_HOTKEY_EVENT, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_KEY_EVENT, UI_BTYPE_LISTROW, UI_BTYPE_ROW, UI_BTYPE_TAB, UI_BTYPE_TOGGLE, UI_BTYPE_TOGGLE_N, UI_BTYPE_VIEW_ITEM, UI_BUT_CHECKBOX_INVERT, UI_GET_BUT_VALUE_INIT, and uiButViewItem::view_item.
Referenced by ui_but_is_pushed(), and ui_but_update_select_flag().
|
static |
Definition at line 1228 of file interface.cc.
References ID_CHECK_UNDO, PointerRNA::owner_id, RNA_struct_undo_check(), uiBut::rnapoin, uiBut::rnaprop, and PointerRNA::type.
Referenced by ui_def_but_rna().
| bool ui_but_is_rna_valid | ( | uiBut * | but | ) |
Definition at line 2706 of file interface.cc.
References uiBut::drawstr, printf, RNA_struct_contains_property(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_button_value_default().
Definition at line 399 of file interface.cc.
References uiBut::alignnr, left, uiBut::rect, and rctf::xmin.
Referenced by ui_block_bounds_calc_text().
| bool ui_but_is_unit | ( | const uiBut * | but | ) |
Definition at line 2650 of file interface.cc.
References uiBut::block, ELEM, PROP_UNIT_NONE, PROP_UNIT_ROTATION, PROP_UNIT_TIME, PROP_UNIT_TIME_ABSOLUTE, UnitSettings::system, ui_but_is_unit_radians_ex(), UI_but_unit_type_get(), uiBlock::unit, and USER_UNIT_NONE.
Referenced by ui_but_build_drawstr_float(), ui_but_convert_to_unit_alt_name(), ui_but_string_eval_number(), ui_but_string_get_ex(), ui_def_but_rna(), ui_numedit_apply_snapf(), and ui_textedit_begin().
|
static |
Definition at line 108 of file interface.cc.
References uiBut::block, ui_but_is_unit_radians_ex(), UI_but_unit_type_get(), and uiBlock::unit.
Referenced by ui_but_calc_float_precision().
|
static |
Definition at line 103 of file interface.cc.
References PROP_UNIT_ROTATION, UnitSettings::system_rotation, and USER_UNIT_ROT_RADIANS.
Referenced by ui_but_is_unit(), and ui_but_is_unit_radians().
| void UI_but_label_alpha_factor_set | ( | uiBut * | but, |
| const float | alpha_factor ) |
Definition at line 6750 of file interface.cc.
References uiButLabel::alpha_factor, BLI_assert, uiBut::type, and UI_BTYPE_LABEL.
Referenced by file_add_icon_but(), file_add_overlay_icon_but(), and blender::ed::outliner::tselem_draw_icon().
| void UI_but_menu_disable_hover_open | ( | uiBut * | but | ) |
When a button displays a menu, hovering another button that can display one will switch to that menu instead. In some cases that's unexpected, so the feature can be disabled here (as in, this button will not spawn its menu on hover and the previously spawned menu will remain open).
Definition at line 6295 of file interface.cc.
References uiBut::menu_no_hover_open.
Referenced by blender::ui::template_asset_shelf_popover().
| bool ui_but_menu_draw_as_popover | ( | const uiBut * | but | ) |
Definition at line 4741 of file interface.cc.
References uiBut::menu_create_func, and ui_def_but_rna__panel_type().
Referenced by button_activate_state(), ui_block_open_begin(), ui_popup_block_position(), and widget_roundbox_set().
Factory function: Allocate button and set uiBut.type.
Definition at line 4193 of file interface.cc.
References UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_DECORATOR, UI_BTYPE_HOTKEY_EVENT, UI_BTYPE_HSVCUBE, UI_BTYPE_LABEL, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_PROGRESS, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_SEPR_LINE, UI_BTYPE_TAB, and UI_BTYPE_VIEW_ITEM.
Referenced by ui_but_change_type(), and ui_def_but().
| void UI_but_node_link_set | ( | uiBut * | but, |
| bNodeSocket * | socket, | ||
| const float | draw_color[4] ) |
Definition at line 6705 of file interface.cc.
References uiBut::col, uiBut::custom_data, uiBut::flag, rgba_float_to_uchar(), and UI_BUT_NODE_LINK.
Referenced by uiTemplateNodeLink().
| void UI_but_number_precision_set | ( | uiBut * | but, |
| float | precision ) |
Definition at line 6721 of file interface.cc.
References BLI_assert, uiButNumber::precision, uiBut::type, and UI_BTYPE_NUM.
Referenced by curvemap_buttons_layout(), curvemap_clipping_func(), CurveProfile_buttons_layout(), ui_def_but_rna(), uiTemplateMarker(), uvedit_vertex_buttons(), v3d_editvertex_buts(), v3d_object_dimension_buts(), and view3d_panel_vgroup().
| void UI_but_number_slider_precision_set | ( | uiBut * | but, |
| float | precision ) |
Definition at line 6740 of file interface.cc.
References BLI_assert, uiButNumberSlider::precision, uiBut::type, and UI_BTYPE_NUM_SLIDER.
Referenced by ui_block_colorpicker(), and ui_def_but_rna().
| void UI_but_number_slider_step_size_set | ( | uiBut * | but, |
| float | step_size ) |
Definition at line 6731 of file interface.cc.
References BLI_assert, uiButNumberSlider::step_size, uiBut::type, and UI_BTYPE_NUM_SLIDER.
Referenced by ui_block_colorpicker(), and ui_def_but_rna().
| void UI_but_number_step_size_set | ( | uiBut * | but, |
| float | step_size ) |
Definition at line 6712 of file interface.cc.
References BLI_assert, uiButNumber::step_size, uiBut::type, and UI_BTYPE_NUM.
Referenced by colorband_buttons_layout(), curvemap_buttons_layout(), curvemap_clipping_func(), CurveProfile_buttons_layout(), ui_def_but_rna(), uiTemplateMarker(), uvedit_vertex_buttons(), v3d_editvertex_buts(), v3d_object_dimension_buts(), and view3d_panel_vgroup().
| PointerRNA * UI_but_operator_ptr_ensure | ( | uiBut * | but | ) |
For passing inputs to ButO buttons.
Definition at line 6130 of file interface.cc.
References uiBut::opptr, uiBut::optype, and WM_operator_properties_create_ptr().
Referenced by ANIM_channel_draw_widgets(), copy_python_command_button_exec(), file_draw_invalid_asset_library_hint(), operator_enum_search_exec_fn(), operator_enum_search_update_fn(), template_ID(), ui_but_copy_operator(), UI_but_rna_enum_item_get(), UI_but_string_get_rna_label(), UI_but_string_get_rna_tooltip(), ui_tooltip_data_from_button_or_extra_icon(), uiDefSearchButO_ptr(), uiItemFullO_ptr_ex(), uiTemplatePalette(), and view3d_panel_vgroup().
| void UI_but_operator_set | ( | uiBut * | but, |
| wmOperatorType * | optype, | ||
| wmOperatorCallContext | opcontext, | ||
| const PointerRNA * | opptr ) |
Definition at line 5970 of file interface.cc.
References uiBut::flag, uiBut::opcontext, uiBut::opptr, uiBut::optype, and UI_BUT_UNDO.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), and ui_def_but_operator_ptr().
| void UI_but_operator_set_never_call | ( | uiBut * | but | ) |
Disable calling operators from but in button handling. Useful to attach an operator to a button for tooltips, "Assign Shortcut", etc. without actually making the button execute the operator.
Definition at line 5988 of file interface.cc.
References uiBut::operator_never_call.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile().
Definition at line 1718 of file interface.cc.
References uiBut::flag, RNA_OVERRIDE_STATUS_OVERRIDDEN, RNA_property_override_library_status(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and UI_BUT_OVERRIDDEN.
Referenced by UI_block_end_ex(), and UI_context_update_anim_flag().
|
static |
Definition at line 1661 of file interface.cc.
References ARRAY_SIZE, BLI_assert, uiBut::pie_dir, and ui_radial_dir_to_numpad.
Referenced by ui_menu_block_set_keymaps().
Definition at line 2205 of file interface.cc.
References BLI_rcti_isect(), BLI_rcti_translate(), ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by UI_block_draw().
| const char * ui_but_placeholder_get | ( | uiBut * | but | ) |
Get the hint that describes the expected value when empty.
Definition at line 6093 of file interface.cc.
References BLT_I18NCONTEXT_ID_ID, BLT_I18NCONTEXT_ID_WINDOWMANAGER, CTX_IFACE_, uiBut::icon, uiBut::placeholder, rna_enum_id_type_items, RNA_enum_name(), RNA_property_pointer_type(), RNA_struct_identifier(), RNA_struct_ui_name(), RNA_type_to_ID_code(), uiBut::rnapoin, uiBut::rnaprop, STREQ, uiBut::type, UI_BTYPE_SEARCH_MENU, and UI_BTYPE_TEXT.
Referenced by widget_draw_text().
| void UI_but_placeholder_set | ( | uiBut * | but, |
| blender::StringRef | placeholder_text ) |
Set at hint that describes the expected value when empty.
Definition at line 6082 of file interface.cc.
References BLI_strdupn(), blender::StringRefBase::data(), blender::StringRefBase::is_empty(), MEM_SAFE_FREE, uiBut::placeholder, and blender::StringRefBase::size().
Referenced by blender::nodes::add_layer_name_search_button(), blender::ed::space_node::node_geometry_add_attribute_search_button(), blender::ed::space_node::node_geometry_add_layer_search_button(), and uiLayout::prop().
|
static |
While some extra operator icons have to be set explicitly upon button creating, this code adds some generic ones based on button data. Currently these are mutually exclusive, so there's only ever one predefined extra icon.
Definition at line 1893 of file interface.cc.
References BLI_assert, uiBut::extra_op_icons, LISTBASE_FOREACH, PREDEFINED_EXTRA_OP_ICON_BONE_EYEDROPPER, PREDEFINED_EXTRA_OP_ICON_CLEAR, PREDEFINED_EXTRA_OP_ICON_EYEDROPPER, ui_but_extra_operator_icon_add_ptr(), ui_but_icon_extra_get(), WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
Referenced by UI_block_end_ex().
| void ui_but_range_set_hard | ( | uiBut * | but | ) |
Definition at line 3471 of file interface.cc.
References uiBut::hardmax, uiBut::hardmin, PROP_FLOAT, PROP_INT, RNA_property_float_range(), RNA_property_int_range(), RNA_property_type(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_handle_button_event().
| void ui_but_range_set_soft | ( | uiBut * | but | ) |
Definition at line 3493 of file interface.cc.
References CLAMP, e, FLT_MAX, uiBut::hardmax, uiBut::hardmin, max_ff(), min_ff(), uiBut::poin, uiBut::pointype, PROP_COLOR, PROP_FLOAT, PROP_INT, RNA_property_array_check(), RNA_property_float_get_array_range(), RNA_property_float_ui_range(), RNA_property_int_get_array_range(), RNA_property_int_ui_range(), RNA_property_subtype(), RNA_property_type(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, soft_range_round_down(), soft_range_round_up(), uiBut::softmax, uiBut::softmin, UI_BUT_POIN_TYPES, and ui_but_value_get().
Referenced by ui_but_update_ex(), and ui_handle_button_event().
| int UI_but_return_value_get | ( | uiBut * | but | ) |
Definition at line 6125 of file interface.cc.
References uiBut::retval.
| std::optional< EnumPropertyItem > UI_but_rna_enum_item_get | ( | bContext & | C, |
| uiBut & | but ) |
Definition at line 6795 of file interface.cc.
References C, ELEM, uiBut::hardmax, uiBut::optype, ot, PROP_ENUM, ptr, RNA_property_enum_get(), RNA_property_enum_item_from_value_gettexted(), RNA_property_type(), RNA_struct_contains_property(), uiBut::rnapoin, uiBut::rnaprop, uiBut::type, UI_BTYPE_ROW, UI_BTYPE_TAB, UI_but_operator_ptr_ensure(), ui_but_value_get(), and WM_operator_properties_sanitize().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
Definition at line 754 of file interface.cc.
References b, and ui_but_rna_equals_ex().
Referenced by ui_but_equals_old(), and ui_list_contains_row().
| bool ui_but_rna_equals_ex | ( | const uiBut * | but, |
| const PointerRNA * | ptr, | ||
| const PropertyRNA * | prop, | ||
| int | index ) |
Definition at line 759 of file interface.cc.
References PointerRNA::data, ptr, uiBut::rnaindex, uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_but_anim_decorate_find_attached_button(), and ui_but_rna_equals().
| void ui_but_rna_menu_convert_to_menu_type | ( | uiBut * | but, |
| const char * | menu_type ) |
Definition at line 4761 of file interface.cc.
References BLI_assert, BLI_strdup(), uiBut::func_argN, uiBut::func_argN_copy_fn, uiBut::func_argN_free_fn, MEM_dupallocN(), MEM_freeN(), uiBut::menu_create_func, uiBut::poin, uiBut::type, UI_BTYPE_MENU, ui_def_but_rna__menu(), and ui_def_but_rna__menu_type().
Referenced by uiItemFullR_with_menu().
| void ui_but_rna_menu_convert_to_panel_type | ( | uiBut * | but, |
| const char * | panel_type ) |
Definition at line 4730 of file interface.cc.
References BLI_assert, BLI_strdup(), ELEM, uiBut::func_argN, uiBut::func_argN_copy_fn, uiBut::func_argN_free_fn, MEM_dupallocN(), MEM_freeN(), uiBut::menu_create_func, uiBut::type, UI_BTYPE_COLOR, UI_BTYPE_MENU, and ui_def_but_rna__panel_type().
Referenced by uiItemFullR_with_popover().
| PropertyScaleType ui_but_scale_type | ( | const uiBut * | but | ) |
Definition at line 2614 of file interface.cc.
References PROP_SCALE_LINEAR, RNA_property_ui_scale(), and uiBut::rnaprop.
Referenced by ui_do_but_NUM(), ui_do_but_SLI(), ui_numedit_apply_snapf(), ui_numedit_begin(), ui_numedit_but_NUM(), ui_numedit_but_SLI(), and widget_numslider().
| void UI_but_search_preview_grid_size_set | ( | uiBut * | but, |
| int | rows, | ||
| int | cols ) |
Definition at line 6757 of file interface.cc.
References BLI_assert, uiButSearch::preview_cols, uiButSearch::preview_rows, uiBut::type, and UI_BTYPE_SEARCH_MENU.
Referenced by template_common_search_menu().
| bool ui_but_string_eval_number | ( | bContext * | C, |
| const uiBut * | but, | ||
| const char * | str, | ||
| double * | r_value ) |
Definition at line 3276 of file interface.cc.
References C, PROP_FACTOR, PROP_NONE, PROP_PERCENTAGE, RNA_property_subtype(), uiBut::rnaprop, str, ui_but_is_float(), ui_but_is_unit(), ui_number_from_string(), ui_number_from_string_factor(), ui_number_from_string_percentage(), and ui_number_from_string_units_with_but().
Referenced by ui_apply_but_NUM(), ui_but_paste_numeric_value(), and ui_but_string_set().
| void ui_but_string_get | ( | uiBut * | but, |
| char * | str, | ||
| const size_t | str_maxncpy ) |
Definition at line 3142 of file interface.cc.
References str, and ui_but_string_get_ex().
Referenced by ui_but_copy_text(), ui_but_update_ex(), ui_colorpicker_hex_rna_cb(), and ui_tooltip_data_from_button_or_extra_icon().
| char * ui_but_string_get_dynamic | ( | uiBut * | but, |
| int * | r_str_size ) |
A version of ui_but_string_get_ex for dynamic buffer sizes (where ui_but_string_get_maxncpy returns 0).
| r_str_size | size of the returned string (including terminator). |
Definition at line 3147 of file interface.cc.
References BLI_assert, BLI_strdup(), BLI_strdupn(), uiBut::block, ELEM, uiBlock::evil_C, PROP_ENUM, PROP_POINTER, PROP_STRING, ptr, RNA_property_enum_get(), RNA_property_enum_name(), RNA_property_pointer_get(), RNA_property_string_get_alloc(), RNA_property_type(), RNA_struct_name_get_alloc(), uiBut::rnapoin, uiBut::rnaprop, str, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, and UNLIKELY.
Referenced by ui_do_but_text_value_cycle(), and ui_textedit_begin().
| void ui_but_string_get_ex | ( | uiBut * | but, |
| char * | str, | ||
| const size_t | str_maxncpy, | ||
| const int | float_precision, | ||
| const bool | use_exp_float, | ||
| bool * | r_use_exp_float ) |
Definition at line 3011 of file interface.cc.
References BLI_assert, BLI_snprintf(), BLI_strncpy(), BLI_strncpy_utf8(), uiBut::block, CLAMP, uiBut::custom_data, ELEM, uiBlock::evil_C, integer_digits_f(), MEM_freeN(), PointerRNA::owner_id, uiBut::poin, PROP_ENUM, PROP_FACTOR, PROP_NONE, PROP_POINTER, PROP_STRING, ptr, RNA_pointer_create_discrete(), RNA_property_enum_get(), RNA_property_enum_name(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_string_get_alloc(), RNA_property_subtype(), RNA_property_type(), RNA_struct_name_get_alloc(), uiBut::rnapoin, uiBut::rnaprop, str, uiBut::type, U, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TAB, UI_BTYPE_TEXT, ui_but_anim_expression_get(), ui_but_calc_float_precision(), ui_but_hide_fraction(), ui_but_is_float(), ui_but_is_unit(), UI_but_is_utf8(), ui_but_value_get(), ui_get_but_string_unit(), UI_PRECISION_FLOAT_MAX, and USER_FACTOR_AS_FACTOR.
Referenced by ui_but_copy_numeric_value(), ui_but_string_get(), ui_do_but_text_value_cycle(), and ui_textedit_begin().
| std::string UI_but_string_get_label | ( | uiBut & | but | ) |
Definition at line 6866 of file interface.cc.
References uiBut::flag, uiBut::str, UI_BUT_HAS_SEP_CHAR, UI_but_string_get_rna_label(), and UI_SEP_CHAR.
Referenced by UI_but_context_menu_title_from_button(), and ui_tooltip_data_from_button_or_extra_icon().
| int ui_but_string_get_maxncpy | ( | uiBut * | but | ) |
Definition at line 2884 of file interface.cc.
References ELEM, uiBut::hardmax, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, and UI_MAX_DRAW_STR.
Referenced by ui_do_but_text_value_cycle(), ui_searchbox_autocomplete(), and ui_textedit_begin().
Buttons assigned to an operator (common case).
Definition at line 6990 of file interface.cc.
References C, and ui_but_event_operator_string().
Referenced by ui_tooltip_data_from_button_or_extra_icon(), and ui_tooltip_data_from_tool().
Use for properties that are bound to one of the context cycle, etc. keys.
Definition at line 6995 of file interface.cc.
References C, and ui_but_event_property_operator_string().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
| std::string UI_but_string_get_rna_label | ( | uiBut & | but | ) |
Definition at line 6903 of file interface.cc.
References CTX_TIP_, ELEM, uiBut::optype, ot, RNA_property_ui_name(), uiBut::rnaprop, uiBut::type, UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_but_menutype_get(), UI_but_operator_ptr_ensure(), UI_but_operatortype_get_from_enum_menu(), UI_but_paneltype_get(), and WM_operatortype_name().
Referenced by UI_but_string_get_label().
| std::string UI_but_string_get_rna_label_context | ( | const uiBut & | but | ) |
Context specified in CTX_*_ macros are just unreachable!
Definition at line 6928 of file interface.cc.
References BLT_I18NCONTEXT_DEFAULT_BPYRNA, ELEM, uiBut::optype, RNA_property_translation_context(), RNA_struct_translation_context(), uiBut::rnaprop, wmOperatorType::srna, uiBut::type, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN, and UI_but_menutype_get().
| std::string UI_but_string_get_rna_property_identifier | ( | const uiBut & | but | ) |
Definition at line 6837 of file interface.cc.
References RNA_property_identifier(), and uiBut::rnaprop.
Referenced by ui_tooltip_data_from_button_or_extra_icon().
| std::string UI_but_string_get_rna_struct_identifier | ( | const uiBut & | but | ) |
Definition at line 6845 of file interface.cc.
References PointerRNA::data, ELEM, wmOperatorType::idname, uiBut::optype, RNA_struct_identifier(), uiBut::rnapoin, uiBut::rnaprop, PointerRNA::type, uiBut::type, UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_but_menutype_get(), and UI_but_paneltype_get().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
Definition at line 6955 of file interface.cc.
References C, uiBut::context, CTX_store_get(), CTX_store_set(), ELEM, uiBut::optype, ot, RNA_property_ui_description(), RNA_struct_ui_description(), uiBut::rnaprop, uiBut::type, UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_but_menutype_get(), UI_but_operator_ptr_ensure(), UI_but_operatortype_get_from_enum_menu(), and WM_operatortype_description().
Referenced by UI_but_string_get_tooltip().
Definition at line 6944 of file interface.cc.
References C, blender::StringRefBase::is_empty(), uiBut::tip, uiBut::tip_arg, uiBut::tip_func, and UI_but_string_get_rna_tooltip().
Referenced by ui_tooltip_data_from_button_or_extra_icon().
| std::string UI_but_string_get_tooltip_label | ( | const uiBut & | but | ) |
Query the result of #uiBut::tip_label_func(). Meant to allow overriding the label to be displayed in the tool-tip.
Definition at line 6895 of file interface.cc.
References uiBut::tip_quick_func.
Referenced by ui_tooltip_data_from_button_or_extra_icon().
Definition at line 3303 of file interface.cc.
References BLI_assert, BLI_strncpy(), BLI_strncpy_utf8(), uiBut::block, C, CTX_wm_manager(), CTX_wm_window(), uiBut::custom_data, PointerRNA::data, ELEM, uiBlock::evil_C, floor, uiBut::hardmax, uiBut::hardmin, uiButSearch::item_active, PointerRNA::owner_id, uiBut::poin, PointerRNA_NULL, PROP_ENUM, PROP_POINTER, PROP_STRING, ptr, uiBut::rename_full_func, uiBut::rename_full_new, RNA_pointer_create_discrete(), RNA_property_collection_lookup_string(), RNA_property_editable(), RNA_property_enum_set(), RNA_property_enum_value(), RNA_property_pointer_set(), RNA_property_pointer_type(), RNA_property_string_set(), RNA_property_type(), RNA_struct_name_property(), uiBut::rnapoin, uiBut::rnaprop, uiButSearch::rnasearchpoin, uiButSearch::rnasearchprop, str, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TAB, UI_BTYPE_TEXT, ui_but_anim_expression_create(), ui_but_anim_expression_set(), ui_but_is_float(), UI_but_is_utf8(), ui_but_string_eval_number(), ui_but_value_set(), and WM_report_banner_show().
Referenced by ui_apply_but_NUM(), ui_apply_but_TAB(), ui_apply_but_TEX(), ui_but_paste_numeric_value(), and ui_multibut_states_apply().
Definition at line 4776 of file interface.cc.
References uiBlock::content_hints, uiBut::flag, UI_BLOCK_CONTAINS_SUBMENU_BUT, and UI_BUT_ICON_SUBMENU.
Referenced by ui_def_but_rna(), and uiDefIconTextMenuBut().
| bool ui_but_supports_cycling | ( | const uiBut * | but | ) |
Checks if the button supports cycling next/previous menu items (ctrl+mouse-wheel).
Definition at line 2715 of file interface.cc.
References ELEM, uiBut::menu_step_func, uiBut::type, UI_BTYPE_COLOR, UI_BTYPE_LISTBOX, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_ROW, and ui_but_menu_step_poll().
Referenced by ui_do_but_BLOCK(), and ui_handle_panel_category_cycling().
| void ui_but_to_pixelrect | ( | rcti * | rect, |
| const ARegion * | region, | ||
| const uiBlock * | block, | ||
| const uiBut * | but ) |
Project button or block (but==nullptr) to pixels in region-space.
Definition at line 2190 of file interface.cc.
References uiBlock::rect, uiBut::rect, and ui_to_pixelrect().
Referenced by button_section_bounds_calc(), UI_block_draw(), and ui_update_flexible_spacing().
| void UI_but_type_set_menu_from_pulldown | ( | uiBut * | but | ) |
Definition at line 6117 of file interface.cc.
References BLI_assert, uiBut::type, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN, UI_but_drawflag_disable(), UI_but_drawflag_enable(), UI_BUT_TEXT_LEFT, and UI_BUT_TEXT_RIGHT.
Referenced by ui_item_menu(), uiblock_layer_pass_buttons(), uiTemplateNodeLink(), and uiTemplateTextureUser().
| int UI_but_unit_type_get | ( | const uiBut * | but | ) |
Definition at line 6191 of file interface.cc.
References RNA_property_subtype(), RNA_SUBTYPE_UNIT, uiBut::rnaprop, and uiBut::unit_type.
Referenced by ui_but_convert_to_unit_alt_name(), ui_but_hide_fraction(), ui_but_is_unit(), ui_but_is_unit_radians(), ui_get_but_scale_unit(), ui_get_but_step_unit(), ui_get_but_string_unit(), ui_number_from_string_units_with_but(), ui_numedit_apply_snapf(), and ui_tooltip_data_from_button_or_extra_icon().
| void UI_but_unit_type_set | ( | uiBut * | but, |
| const int | unit_type ) |
Definition at line 6186 of file interface.cc.
References RNA_SUBTYPE_UNIT_VALUE, and uiBut::unit_type.
Referenced by graph_panel_key_properties(), ui_item_array(), v3d_editvertex_buts(), and v3d_object_dimension_buts().
| void ui_but_update | ( | uiBut * | but | ) |
Definition at line 4150 of file interface.cc.
References ui_but_update_ex().
Referenced by button_activate_exit(), button_activate_state(), ui_block_bounds_calc_text(), UI_block_update_from_old(), ui_but_add_shortcut(), UI_but_func_pushed_state_set(), ui_but_update_and_icon_set(), UI_context_active_but_prop_handle(), ui_do_but_HOTKEYEVT(), ui_do_but_textedit_select(), ui_handle_button_return_submenu(), ui_item_move(), ui_item_position(), ui_layer_but_cb(), ui_numedit_apply(), ui_popup_block_position(), ui_textedit_begin(), ui_textedit_move(), ui_textedit_set_cursor_select(), ui_update_color_picker_buts_rgba(), uiDefBlockBut(), uiDefBlockButN(), uiDefBut(), uiDefButImage(), uiDefButO_ptr(), uiDefButR(), uiDefButR_prop(), uiDefIconBlockBut(), uiDefIconMenuBut(), uiDefIconPreviewBut(), uiDefIconTextMenuBut(), uiDefMenuBut(), and uiDefSearchBut().
|
static |
Definition at line 5231 of file interface.cc.
References ui_but_update(), ui_def_but_icon(), and UI_HAS_ICON.
Referenced by uiDefIconBut(), uiDefIconButO_ptr(), uiDefIconButR(), uiDefIconButR_prop(), uiDefIconTextBut(), uiDefIconTextButO_ptr(), uiDefIconTextButR(), and uiDefIconTextButR_prop().
| void ui_but_update_edited | ( | uiBut * | but | ) |
Definition at line 4155 of file interface.cc.
References ui_but_update_ex().
Referenced by ui_apply_but_BLOCK(), ui_apply_but_NUM(), ui_apply_but_ROW(), ui_apply_but_TAB(), ui_apply_but_TEX(), ui_apply_but_TOG(), ui_apply_but_VEC(), ui_do_but_textedit(), and ui_drag_toggle_set_xy_xy().
|
static |
| but | Button to update. |
| validate | When set, this function may change the button value. Otherwise treat the button value as read-only. |
Definition at line 3987 of file interface.cc.
References wmKeyMapItem::alt, BLI_assert, BLI_rctf_size_x(), uiBut::block, wmKeyMapItem::ctrl, uiBut::drawflag, uiBut::drawstr, uiBut::editstr, uiBlock::evil_C, uiBlock::flag, uiBut::flag, uiBut::hardmax, uiBut::hardmin, wmKeyMapItem::hyper, EnumPropertyItem::icon, uiBut::icon, uiBut::iconadd, IFACE_, KM_ALT, KM_CTRL, KM_HYPER, KM_MOD_HELD, KM_NOTHING, KM_OSKEY, KM_SHIFT, uiButHotkeyEvent::modifier_key, EnumPropertyItem::name, wmKeyMapItem::oskey, uiBut::poin, uiBut::pointype, PROP_ENUM, PROP_ICONS_CONSECUTIVE, PROP_ICONS_REVERSE, uiBut::rect, RNA_property_enum_get(), RNA_property_enum_item_from_value_gettexted(), RNA_property_flag(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, wmKeyMapItem::shift, uiBut::softmax, uiBut::softmin, str, uiBut::str, uiBut::type, UI_BLOCK_LOOP, UI_BTYPE_HOTKEY_EVENT, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_KEY_EVENT, UI_BTYPE_LABEL, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, ui_but_build_drawstr_float(), ui_but_build_drawstr_int(), ui_but_calc_float_precision(), UI_BUT_ICON_REVERSE, ui_but_is_editing(), ui_but_is_float(), UI_BUT_POIN_TYPES, ui_but_range_set_soft(), ui_but_string_get(), ui_but_update_select_flag(), ui_but_value_set(), UI_BUT_VALUE_UNSET, UI_GET_BUT_VALUE_INIT, UI_MAX_DRAW_STR, UI_SELECT, UI_UNIT_X, WM_key_event_string(), and WM_keymap_item_to_string().
Referenced by ui_but_update(), and ui_but_update_edited().
|
static |
Optimization: but_old_idx is used to avoid having to lookup the matching button from the old block on every iteration. On most redraws, button order doesn't change, so the index of the new button is the index of the matching old button. Only if they don't match using the expected index, a lookup has to be performed. Even if individual buttons are inserted or removed, likely at some point the following buttons (if any) will match again, so successive indices will produce successive matches again. Think of but_old_idx as a cursor that indicates the likely/expected position of the matching button in the old block. This optimization brings the whole button updating to O(n) amortized time instead of O(n^2).
| matched_old_buttons | Collects all previously found matches in the old block. These should be ignored when looking up further matches. |
| but_uptr | The owning pointer for the button to update. The pointed to button may be replaced, in which case the function will return true. |
| but_old_idx | Index into the old-button vector indicating the likely/expected position of the matching button in the old block, for the optimization explained above. Value is optional because sometimes the expected position of the following matching button can not be determined, in which case a full lookup will have to be performed. |
Definition at line 1060 of file interface.cc.
References uiBut::active, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BLI_assert, BLI_listbase_is_empty(), uiBut::block, uiBlock::butstore, uiBlock::buttons, blender::IndexRange::contains(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), ELEM, uiBut::flag, Vector< T, InlineBufferCapacity, Allocator >::index_range(), LIKELY, uiBlock::oldblock, uiBut::semi_modal_state, Vector< T, InlineBufferCapacity, Allocator >::size(), uiBut::type, UI_BTYPE_LISTROW, UI_BTYPE_VIEW_ITEM, UI_BUT_DRAG_MULTI, ui_but_equals_old(), ui_but_find_old(), ui_but_find_old_idx(), ui_but_update_old_active_from_new(), UI_butstore_register_update(), ui_button_group_replace_but_ptr(), UI_HOVER, and UNUSED_VARS.
Referenced by UI_block_update_from_old().
Update pointers and other information in the old active button based on new information in the corresponding new button from the current layout pass.
| oldbut | The button from the last layout pass that will be moved to the new block. |
| but | The newly added button with much of the up to date information, to be feed later. |
Definition at line 933 of file interface.cc.
References uiBut::active, uiBut::alignnr, uiButLabel::alpha_factor, uiButSearch::arg, uiButSearch::arg_free_fn, BLI_assert, uiBut::context, uiBut::dragpoin, uiBut::drawflag, ELEM, uiBut::extra_op_icons, uiBut::flag, uiBut::func_argN, uiBut::hardmax, uiBut::icon, uiBut::iconadd, uiBut::imb, uiButSeparatorLine::is_vertical, uiBut::poin, uiButProgress::progress_factor, uiBut::pushed_state_func, uiBut::rect, uiBut::rename_full_func, uiBut::semi_modal_state, uiBut::str, uiBut::tip_arg, uiBut::tip_arg_free, uiBut::tip_custom_func, uiBut::tip_func, uiBut::tip_quick_func, uiBut::type, UI_BTYPE_LABEL, UI_BTYPE_LISTROW, UI_BTYPE_PROGRESS, UI_BTYPE_ROW, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_SEPR_LINE, UI_BTYPE_VIEW_ITEM, ui_but_extra_icons_update_from_old_but(), UI_BUT_HAS_QUICK_TOOLTIP, UI_BUT_REDALERT, UI_HAS_ICON, UI_SELECT_DRAW, ui_view_item_swap_button_pointers(), uiButViewItem::view_item, and uiButScrollBar::visual_height.
Referenced by ui_but_update_from_old_block().
|
static |
Definition at line 2443 of file interface.cc.
References uiBut::flag, ui_but_is_pushed_ex(), and UI_SELECT.
Referenced by ui_but_update_ex(), and ui_but_value_set().
| void ui_but_v3_get | ( | uiBut * | but, |
| float | vec[3] ) |
For buttons pointing to color for example.
Definition at line 2475 of file interface.cc.
References BLI_assert, copy_v3_v3(), uiBut::editvec, normalize_v3(), uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_get_array_at_most(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, uiBut::type, UI_BTYPE_UNITVEC, UI_BUT_POIN_CHAR, UI_BUT_POIN_FLOAT, and zero_v3().
Referenced by ui_block_open_begin(), ui_but_copy_color(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_draw_but_HSV_v(), ui_draw_but_HSVCIRCLE(), ui_draw_but_HSVCUBE(), ui_draw_but_UNITVEC(), ui_numedit_begin(), ui_numedit_but_HSVCIRCLE(), ui_numedit_but_HSVCUBE(), ui_tooltip_data_from_button_or_extra_icon(), and widget_swatch().
| void ui_but_v3_set | ( | uiBut * | but, |
| const float | vec[3] ) |
Definition at line 2513 of file interface.cc.
References BLI_assert, copy_v3_v3(), uiBut::editvec, uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_set_array_at_most(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, UI_BUT_POIN_CHAR, and UI_BUT_POIN_FLOAT.
Referenced by ui_apply_but_VEC(), ui_but_hsv_set(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), and ui_numedit_but_HSVCIRCLE().
| void ui_but_v4_get | ( | uiBut * | but, |
| float | vec[4] ) |
Definition at line 2539 of file interface.cc.
References BLI_assert, copy_v4_v4(), uiBut::editvec, uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_get_array_at_most(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, UI_BUT_POIN_CHAR, UI_BUT_POIN_FLOAT, and zero_v4().
Referenced by ui_but_drag_init(), and ui_colorpicker_wheel_cb().
| void ui_but_v4_set | ( | uiBut * | but, |
| const float | vec[4] ) |
Definition at line 2574 of file interface.cc.
References BLI_assert, copy_v4_v4(), uiBut::editvec, uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_set_array_at_most(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, UI_BUT_POIN_CHAR, and UI_BUT_POIN_FLOAT.
Referenced by ui_colorpicker_wheel_cb(), and ui_update_color_picker_buts_rgba().
|
static |
Extra sanity checks for invariants (debug builds only).
Definition at line 1994 of file interface.cc.
References BLI_assert, ELEM, uiBut::pointype, uiButNumber::step_size, uiBut::type, UI_BTYPE_NUM, UI_BUT_POIN_CHAR, UI_BUT_POIN_INT, and UI_BUT_POIN_SHORT.
Referenced by UI_block_end_ex().
| double ui_but_value_get | ( | uiBut * | but | ) |
Definition at line 2723 of file interface.cc.
References BLI_assert, PointerRNA::data, uiBut::editval, uiBut::poin, uiBut::pointype, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, RNA_property_array_check(), RNA_property_boolean_get(), RNA_property_boolean_get_index(), RNA_property_enum_get(), RNA_property_float_get(), RNA_property_float_get_index(), RNA_property_int_get(), RNA_property_int_get_index(), RNA_property_type(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, UI_BUT_POIN_CHAR, UI_BUT_POIN_FLOAT, UI_BUT_POIN_INT, and UI_BUT_POIN_SHORT.
Referenced by ui_apply_but_NUM(), ui_apply_but_TOG(), ui_but_range_set_soft(), UI_but_rna_enum_item_get(), ui_but_string_get_ex(), ui_colorpicker_create_mode_cb(), ui_multibut_add(), ui_numedit_begin_set_values(), widget_numslider(), and widget_scroll().
| void ui_but_value_set | ( | uiBut * | but, |
| double | value ) |
Definition at line 2788 of file interface.cc.
References uiBut::editval, uiBut::poin, uiBut::pointype, PROP_BOOLEAN, PROP_ENUM, PROP_ENUM_FLAG, PROP_FLOAT, PROP_INT, RNA_property_array_check(), RNA_property_boolean_set(), RNA_property_boolean_set_index(), RNA_property_editable(), RNA_property_enum_get(), RNA_property_enum_set(), RNA_property_flag(), RNA_property_float_set(), RNA_property_float_set_index(), RNA_property_int_set(), RNA_property_int_set_index(), RNA_property_type(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, round_db_to_int_clamp(), round_db_to_short_clamp(), round_db_to_uchar_clamp(), UI_BUT_POIN_CHAR, UI_BUT_POIN_FLOAT, UI_BUT_POIN_INT, UI_BUT_POIN_SHORT, ui_but_update_select_flag(), and UI_BUT_VALUE_UNSET.
Referenced by ui_apply_but_BLOCK(), ui_apply_but_BUTM(), ui_apply_but_NUM(), ui_apply_but_ROW(), ui_apply_but_TAB(), ui_apply_but_TOG(), ui_but_string_set(), ui_but_update_ex(), ui_do_but_HOTKEYEVT(), ui_do_but_KEYEVT(), ui_handle_button_event(), and ui_multibut_restore().
| void UI_but_view_item_draw_size_set | ( | uiBut * | but, |
| const std::optional< int > | draw_width, | ||
| const std::optional< int > | draw_height ) |
Definition at line 6765 of file interface.cc.
References BLI_assert, uiButViewItem::draw_height, uiButViewItem::draw_width, uiBut::type, and UI_BTYPE_VIEW_ITEM.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_grid_tile().
|
static |
| x,y | The lower left hand corner of the button (X axis) |
| width,height | The size of the button. |
Definition at line 4299 of file interface.cc.
References uiBlock::alignnr, uiBut::alignnr, Vector< T, InlineBufferCapacity, Allocator >::append(), uiBut::bit, uiBut::bitnr, BLI_assert, uiBut::block, uiBlock::buttons, BUTTYPE, uiBlock::curlayout, uiBut::disabled_info, uiBut::dragflag, uiBut::drawflag, ELEM, uiBlock::emboss, uiBut::emboss, uiBlock::flag, uiBut::flag, uiBlock::func, uiBut::func, uiBlock::func_arg1, uiBut::func_arg1, uiBlock::func_arg2, uiBut::func_arg2, uiBlock::func_argN, uiBut::func_argN, uiBlock::func_argN_copy_fn, uiBut::func_argN_copy_fn, uiBlock::func_argN_free_fn, uiBut::func_argN_free_fn, uiBlock::funcN, uiBut::funcN, uiBut::hardmax, uiBut::hardmin, Vector< T, InlineBufferCapacity, Allocator >::last(), uiBlock::lock, uiBlock::lockstr, max, min, uiBut::poin, uiBut::pointype, uiBut::pos, uiBut::rect, uiBut::retval, uiBut::softmax, uiBut::softmin, str, uiBut::str, uiBut::tip, uiBut::type, ui_block_is_popover(), UI_BLOCK_LOOP, UI_BLOCK_PIE_MENU, UI_BLOCK_QUICK_SETUP, UI_BTYPE_BLOCK, UI_BTYPE_BUT, UI_BTYPE_BUT_MENU, UI_BTYPE_COLOR, UI_BTYPE_DECORATOR, UI_BTYPE_GRIP, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_BTYPE_ROUNDBOX, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER, UI_BTYPE_TEXT, UI_BUT_ALIGN, ui_but_can_align(), UI_BUT_DISABLED, UI_BUT_DRAG_FULL_BUT, UI_BUT_ICON_LEFT, ui_but_new(), UI_BUT_POIN_BIT, UI_BUT_POIN_TYPES, UI_BUT_TEXT_LEFT, UI_BUT_UNDO, UI_editsource_active_but_test(), UI_editsource_enable_check(), ui_layout_add_but(), UI_MAX_NAME_STR, x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by ui_def_but_operator_ptr(), ui_def_but_rna(), ui_def_but_rna_propname(), uiDefBlockBut(), uiDefBlockButN(), uiDefBut(), uiDefButImage(), uiDefIconBlockBut(), uiDefIconBut(), uiDefIconMenuBut(), uiDefIconPreviewBut(), uiDefIconTextBut(), uiDefIconTextMenuBut(), uiDefMenuBut(), and uiDefSearchBut().
| void ui_def_but_icon | ( | uiBut * | but, |
| const int | icon, | ||
| const int | flag ) |
Definition at line 4447 of file interface.cc.
References uiBut::block, uiBut::drawflag, uiBlock::evil_C, flag, uiBut::flag, uiBut::icon, uiBut::str, UI_BUT_ICON_LEFT, UI_BUT_ICON_PREVIEW, and ui_icon_ensure_deferred().
Referenced by asset_view_draw_item(), blender::ui::PreviewGridItem::build_grid_tile_button(), template_add_button_search_menu(), blender::ui::template_asset_shelf_popover(), UI_but_drag_set_asset(), UI_but_drag_set_image(), ui_but_update_and_icon_set(), ui_def_but_rna(), ui_icon_view_menu_cb(), uiDefIconBlockBut(), uiDefIconMenuBut(), uiDefIconPreviewBut(), uiDefIconTextMenuBut(), uiDefSearchBut(), uiTemplateIcon(), and uiTemplateIconView().
| void ui_def_but_icon_clear | ( | uiBut * | but | ) |
Avoid using this where possible since it's better not to ask for an icon in the first place.
Definition at line 4462 of file interface.cc.
References uiBut::drawflag, uiBut::flag, uiBut::icon, UI_BUT_ICON_LEFT, and UI_HAS_ICON.
Referenced by uiLayout::prop().
|
static |
Definition at line 5012 of file interface.cc.
References ot, RNA_struct_ui_description(), str, ui_block_is_popover(), UI_but_disable(), UI_but_drawflag_enable(), UI_BUT_HAS_QUICK_TOOLTIP, UI_but_is_tool(), UI_but_operator_set(), ui_def_but(), x, and y.
Referenced by uiDefButO_ptr(), uiDefIconButO_ptr(), and uiDefIconTextButO_ptr().
|
static |
ui_def_but_rna_propname and ui_def_but_rna both take the same args except for propname vs prop, this is done so we can avoid an extra lookup on 'prop' when its already available.
When this kind of change won't disrupt branches, best look into making more of our UI functions take prop rather than propname.
Definition at line 4790 of file interface.cc.
References BLI_assert, uiBut::context, uiBlock::contexts, CTX_IFACE_, CTX_store_add(), PointerRNA::data, ELEM, uiBut::emboss, uiBlock::evil_C, uiBut::flag, free(), i, EnumPropertyItem::icon, max, MEM_freeN(), uiBut::menu_create_func, min, EnumPropertyItem::name, uiBut::poin, PROP_ENUM, PROP_FLOAT, PROP_INT, PROP_POINTER, PROP_STRING, ptr, blender::ui::Pulldown, RNA_enum_from_value(), RNA_property_array_check(), RNA_property_editable_info(), RNA_property_enum_get(), RNA_property_enum_items(), RNA_property_float_range(), RNA_property_float_ui_range(), RNA_property_int_range(), RNA_property_int_ui_range(), RNA_property_pointer_get(), RNA_property_string_maxlength(), RNA_property_translation_context(), RNA_property_type(), RNA_property_ui_description(), RNA_property_ui_icon(), RNA_property_ui_name(), RNA_struct_is_ID(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, step, uiButNumber::step_size, uiButNumberSlider::step_size, str, PointerRNA::type, uiBut::type, UI_BTYPE_COLOR, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_LISTROW, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_ROW, UI_BTYPE_SEARCH_MENU, UI_but_disable(), ui_but_is_rna_undo(), ui_but_is_unit(), UI_but_number_precision_set(), UI_but_number_slider_precision_set(), UI_but_number_slider_step_size_set(), UI_but_number_step_size_set(), ui_but_submenu_enable(), UI_BUT_UNDO, ui_def_but(), ui_def_but_icon(), ui_def_but_rna__menu(), ui_get_but_step_unit(), UI_HAS_ICON, x, and y.
Referenced by ui_def_but_rna_propname(), uiDefButR_prop(), uiDefIconButR_prop(), and uiDefIconTextButR_prop().
Definition at line 4469 of file interface.cc.
References uiBut::alignnr, uiBlock::aspect, b, B_NOP, BLF_default(), BLF_DRAW_STR_DUMMY_MAX, BLF_size(), BLF_width(), BLI_strdup(), uiBut::block, C, CTX_wm_window(), EnumPropertyItem::description, uiBlock::evil_C, uiBut::flag, free(), uiBlock::handle, EnumPropertyItem::icon, EnumPropertyItem::identifier, uiLayout::label(), MEM_freeN(), EnumPropertyItem::name, uiBlock::prev_but(), uiPopupBlockHandle::retvalue, RNA_property_enum_get(), RNA_property_enum_items_gettexted(), RNA_property_is_idprop(), RNA_property_py_data_get(), RNA_property_ui_name(), uiBut::rnapoin, uiBut::rnaprop, uiLayout::separator(), split(), uiLayout::split(), uiBut::str, uiBut::type, UI_block_flag_enable(), UI_block_layout_set_current(), UI_BLOCK_MOVEMOUSE_QUIT, UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, UI_but_func_tooltip_set(), UI_SCALE_FAC, UI_SELECT_DRAW, UI_style_get(), UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButI(), uiDefIconTextButI(), uiLayoutGetBlock(), EnumPropertyItem::value, WM_window_native_pixel_x(), and WM_window_native_pixel_y().
Referenced by ui_but_event_property_operator_string(), ui_but_rna_menu_convert_to_menu_type(), and ui_def_but_rna().
Definition at line 4746 of file interface.cc.
References C, uiBut::func_argN, uiLayout::label(), RPT_, SNPRINTF, ui_item_menutype_func(), and WM_menutype_find().
Referenced by ui_but_event_property_operator_string(), and ui_but_rna_menu_convert_to_menu_type().
Definition at line 4719 of file interface.cc.
References C, uiLayout::label(), RPT_, and ui_item_paneltype_func().
Referenced by ui_but_event_property_operator_string(), ui_but_menu_draw_as_popover(), and ui_but_rna_menu_convert_to_panel_type().
|
static |
Definition at line 4981 of file interface.cc.
References blender::StringRefNull::c_str(), max, min, N_, ptr, RNA_struct_find_property(), str, UI_but_disable(), ui_def_but(), ui_def_but_rna(), x, and y.
Referenced by uiDefButR(), uiDefIconButR(), and uiDefIconTextButR().
| void UI_exit | ( | ) |
Definition at line 7052 of file interface.cc.
References ui_but_clipboard_free(), and ui_resources_free().
Referenced by WM_exit_ex().
| void ui_fontscale | ( | float * | points, |
| float | aspect ) |
Definition at line 2185 of file interface.cc.
Referenced by UI_block_draw(), UI_panel_category_draw_all(), ui_searchbox_create_generic_ex(), and ui_textedit_set_cursor_pos().
|
static |
Definition at line 2908 of file interface.cc.
References BKE_unit_value_scale(), uiBut::block, CTX_data_scene(), uiBlock::evil_C, FRA2TIME, PROP_UNIT_TIME, RNA_SUBTYPE_UNIT_VALUE, UI_but_unit_type_get(), and uiBlock::unit.
Referenced by ui_get_but_step_unit(), and ui_get_but_string_unit().
|
static |
Definition at line 2975 of file interface.cc.
References BKE_unit_closest_scalar(), BLI_assert, uiBut::block, RNA_SUBTYPE_UNIT_VALUE, step, UnitSettings::system, UI_but_unit_type_get(), ui_get_but_scale_unit(), UI_PRECISION_FLOAT_SCALE, and uiBlock::unit.
Referenced by ui_def_but_rna().
|
static |
| float_precision | Override the button precision. |
Definition at line 2942 of file interface.cc.
References BKE_unit_value_as_string(), BLI_assert, uiBut::block, pad, RNA_SUBTYPE_UNIT_VALUE, UnitSettings::scale_length, str, ui_but_get_float_precision(), UI_but_unit_type_get(), ui_get_but_scale_unit(), UI_PRECISION_FLOAT_MAX, and uiBlock::unit.
Referenced by ui_but_build_drawstr_float(), and ui_but_string_get_ex().
| void UI_init | ( | ) |
Definition at line 7022 of file interface.cc.
References ui_resources_init().
Referenced by WM_init().
| void UI_init_userdef | ( | ) |
Definition at line 7027 of file interface.cc.
References uiStyleInit().
Referenced by wm_init_userdef().
| void UI_interface_tag_script_reload | ( | ) |
Definition at line 7058 of file interface.cc.
References ui_interface_tag_script_reload_queries().
Referenced by WM_script_tag_reload().
|
static |
Definition at line 1245 of file interface.cc.
References uiBlock::buttons, ELEM, uiBlock::rect, UI_BTYPE_BLOCK, UI_BTYPE_BUT, UI_BTYPE_BUT_MENU, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN, UI_BTYPE_ROW, UI_HIDDEN, rctf::xmax, and rctf::xmin.
Referenced by UI_block_end_ex().
Definition at line 1669 of file interface.cc.
References BLI_assert, uiBlock::buttons, C, uiBlock::flag, uiBlock::name, blender::ui::Pulldown, uiBlock::rect, str, UI_BLOCK_LOOP, UI_BLOCK_PIE_MENU, UI_BLOCK_POPOVER, UI_BLOCK_SHOW_SHORTCUT_ALWAYS, ui_but_add_shortcut(), ui_but_event_operator_string(), ui_but_event_property_operator_string(), UI_but_is_tool(), ui_but_pie_direction_string(), UI_RADIAL_NONE, rctf::xmax, and rctf::xmin.
Referenced by UI_block_end_ex().
|
static |
Definition at line 3229 of file interface.cc.
References BPY_run_string_as_number(), C, CTX_wm_reports(), BPy_RunErrInfo::report_prefix, BPy_RunErrInfo::reports, str, UI_NUMBER_EVAL_ERROR_PREFIX, and UNUSED_VARS.
Referenced by ui_but_string_eval_number(), ui_number_from_string_factor(), and ui_number_from_string_percentage().
|
static |
Definition at line 3245 of file interface.cc.
References BLI_strdupn(), BLI_strn_endswith(), C, len, MEM_freeN(), str, U, ui_number_from_string(), and USER_FACTOR_AS_PERCENTAGE.
Referenced by ui_but_string_eval_number().
|
static |
Definition at line 3264 of file interface.cc.
References BLI_strdupn(), BLI_strn_endswith(), C, len, MEM_freeN(), str, and ui_number_from_string().
Referenced by ui_but_string_eval_number().
|
static |
Definition at line 3206 of file interface.cc.
References BKE_reportf(), C, CTX_wm_reports(), error(), MEM_freeN(), reports, RPT_ERROR, str, UI_NUMBER_EVAL_ERROR_PREFIX, and user_string_to_number().
Referenced by ui_number_from_string_units_with_but().
|
static |
Definition at line 3219 of file interface.cc.
References uiBut::block, C, RNA_SUBTYPE_UNIT_VALUE, str, UI_but_unit_type_get(), ui_number_from_string_units(), and uiBlock::unit.
Referenced by ui_but_string_eval_number().
| int UI_preview_tile_size_x | ( | const int | size_px = 96 | ) |
Get the scaled size for a preview button (typically #UI_BTyPE_PREVIEW_TILE) based on size_px plus padding.
Definition at line 5208 of file interface.cc.
References pad, PREVIEW_TILE_PAD, round_fl_to_int(), and UI_UNIT_X.
Referenced by blender::ui::AbstractGridView::AbstractGridView(), blender::ed::asset::shelf::asset_shelf_default_tile_height(), asset_view_draw_item(), blender::ed::asset::shelf::tile_width(), and ui_template_list_layout_draw().
| int UI_preview_tile_size_y | ( | const int | size_px | ) |
Definition at line 5214 of file interface.cc.
References pad, PREVIEW_TILE_PAD, round_fl_to_int(), UI_preview_tile_size_y_no_label(), and UI_UNIT_Y.
Referenced by blender::ui::AbstractGridView::AbstractGridView(), asset_view_draw_item(), blender::ed::asset::shelf::tile_height(), and ui_template_list_layout_draw().
| int UI_preview_tile_size_y_no_label | ( | const int | size_px | ) |
Definition at line 5223 of file interface.cc.
References pad, PREVIEW_TILE_PAD, round_fl_to_int(), and UI_UNIT_Y.
Referenced by asset_view_draw_item(), blender::ed::asset::shelf::tile_height(), UI_preview_tile_size_y(), and ui_template_list_layout_draw().
Definition at line 2331 of file interface.cc.
References LISTBASE_FOREACH, ARegion::runtime, and ui_block_message_subscribe().
Referenced by ED_region_message_subscribe().
| void ui_region_to_window | ( | const ARegion * | region, |
| int * | x, | ||
| int * | y ) |
Definition at line 256 of file interface.cc.
References ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Popups will add a margin to ARegion.winrct for shadow, for interactivity (point-inside tests for eg), we want the winrct without the margin added.
Definition at line 376 of file interface.cc.
References BLI_rcti_rctf_copy_floor(), BLI_rcti_translate(), uiBlock::flag, uiBlock::rect, ARegion::runtime, UI_BLOCK_LOOP, UI_BLOCK_PIE_MENU, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by ui_region_contains_point_px(), ui_region_contains_rect_px(), and ui_screen_region_find_mouse_over_ex().
| void UI_reinit_font | ( | ) |
Definition at line 7033 of file interface.cc.
References uiStyleInit().
Referenced by reloadtranslation_exec().
Definition at line 2195 of file interface.cc.
References BLI_rcti_rctf_copy_round(), BLI_rcti_translate(), ui_block_to_window_rctf(), ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by ui_but_to_pixelrect(), and ui_draw_layout_panels_backdrop().
Definition at line 302 of file interface.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BLI_rctf_translate(), uiBlock::buttons, i, Vector< T, InlineBufferCapacity, Allocator >::last(), min_ff(), step, ui_block_bounds_calc(), UI_BTYPE_SEPR_SPACER, ui_but_to_pixelrect(), UI_HEADER_OFFSET, UI_view2d_scale_get_x(), ARegion::v2d, ARegion::winx, and rcti::xmax.
Referenced by UI_block_end_ex().
| void UI_update_text_styles | ( | ) |
Definition at line 7038 of file interface.cc.
References BLF_default_weight(), BLF_has_variable_weight(), uiFontStyle::character_weight, uiStyle::grouplabel, uiStyle::paneltitle, uiStyle::tooltip, U, and uiStyle::widget.
|
static |
Definition at line 357 of file interface.cc.
References uiBlock::aspect, fabsf, GPU_matrix_projection_get, ARegion::runtime, uiBlock::winmat, ARegion::winx, WM_window_native_pixel_size(), and wmGetProjectionMatrix().
Referenced by UI_block_begin(), and UI_blocklist_update_window_matrix().
Definition at line 223 of file interface.cc.
References ui_window_to_block_fl(), x, and y.
Referenced by ui_but_contains_point_px_icon(), ui_but_extra_operator_icon_mouse_over_get(), ui_do_but_COLORBAND(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), ui_do_but_GRIP(), ui_do_but_HISTOGRAM(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_NUM(), ui_do_but_SCROLL(), ui_do_but_SLI(), ui_do_but_textedit_select(), ui_do_but_TRACKPREVIEW(), ui_do_but_UNITVEC(), ui_do_but_WAVEFORM(), ui_handle_list_event(), ui_handle_menu_event(), ui_handle_menus_recursive(), ui_handler_panel_region(), ui_numedit_but_CURVE(), ui_numedit_but_CURVEPROFILE(), ui_numedit_set_active(), and UI_region_panel_custom_data_under_cursor().
For mouse cursor.
Definition at line 186 of file interface.cc.
References b, BLI_rcti_size_x(), BLI_rcti_size_y(), e, Panel::ofsx, Panel::ofsy, uiBlock::panel, uiBlock::winmat, ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by ui_block_find_mouse_over_ex(), ui_but_contains_point_px(), ui_but_find_mouse_over_ex(), ui_do_but_textedit(), ui_drag_toggle_set_xy_xy(), ui_draw_popover_back(), ui_list_find_mouse_over_ex(), ui_multibut_states_tag(), ui_panel_drag_collapse(), ui_pie_handler(), UI_region_view_find_at(), ui_search_menu_create_tooltip(), ui_window_to_block(), and ui_window_to_block_rctf().
| void ui_window_to_block_rctf | ( | const ARegion * | region, |
| const uiBlock * | block, | ||
| rctf * | rct_dst, | ||
| const rctf * | rct_src ) |
Definition at line 213 of file interface.cc.
References ui_window_to_block_fl(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_but_find_rect_over().
| void ui_window_to_region | ( | const ARegion * | region, |
| int * | x, | ||
| int * | y ) |
Definition at line 234 of file interface.cc.
References ARegion::winrct, x, rcti::xmin, y, and rcti::ymin.
Referenced by ui_region_contains_point_px().
Definition at line 248 of file interface.cc.
References ARegion::winrct, rctf::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rctf::ymin, and rcti::ymin.
Definition at line 240 of file interface.cc.
References ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_region_contains_rect_px().
| uiBut * uiDefBlockBut | ( | uiBlock * | block, |
| uiBlockCreateFunc | func, | ||
| void * | arg, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 6335 of file interface.cc.
References uiBut::block_create_func, str, UI_BTYPE_BLOCK, ui_but_update(), ui_def_but(), x, and y.
Referenced by CurveProfile_buttons_layout(), and ui_popup_context_menu_for_button().
| uiBut * uiDefBlockButN | ( | uiBlock * | block, |
| uiBlockCreateFunc | func, | ||
| void * | argN, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip, | ||
| uiButArgNFree | func_argN_free_fn, | ||
| uiButArgNCopy | func_argN_copy_fn ) |
Definition at line 6351 of file interface.cc.
References uiBut::block_create_func, uiBut::func_argN, uiBut::func_argN_copy_fn, uiBut::func_argN_free_fn, str, UI_BTYPE_BLOCK, ui_but_update(), ui_def_but(), x, and y.
Referenced by template_add_button_search_menu(), uiTemplateComponentMenu(), and uiTemplateIconView().
| uiBut * uiDefBut | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| void * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5042 of file interface.cc.
References max, min, str, ui_but_update(), ui_def_but(), x, and y.
Referenced by blender::ui::AbstractViewItem::add_rename_button(), blender::ed::asset::shelf::add_tab_button(), blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ui::TreeViewLayoutBuilder::build_row(), colorband_buttons_layout(), blender::ed::space_node::create_search_popup_block(), create_title_button(), curvemap_buttons_layout(), CurveProfile_buttons_layout(), blender::ed::vse::draw_channel_labels(), envelope_panel_draw(), file_add_preview_drag_but(), file_draw_list(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_find_menu(), blender::ed::outliner::outliner_buttons(), blender::ed::outliner::outliner_draw_overrides_rna_buts(), blender::ed::outliner::outliner_draw_userbuts(), uiLayout::prop(), blender::ed::space_node::reroute_node_draw_label(), uiLayout::separator(), template_common_search_menu(), template_ID(), ui_block_colorpicker(), ui_def_but_rna__menu(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_slot_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), ui_item_array(), ui_item_disabled(), ui_item_with_label(), ui_layout_add_padding_button(), ui_layout_box(), blender::ed::space_node::ui_node_menu_column(), UI_pie_menu_begin(), ui_template_list_layout_draw(), blender::ed::space_node::ui_template_node_link_menu(), uiDefAutoButR(), uiDefButBit(), uiDefButC(), uiDefButF(), uiDefButI(), uiDefButS(), uiItemL_(), uiItemProgressIndicator(), uiItemsFullEnumO_items(), uiItemSpacer(), uiLayoutListItemAddPadding(), uiTemplateHistogram(), uiTemplateMarker(), uiTemplateMovieClip(), uiTemplateNodeSocket(), uiTemplatePreview(), uiTemplateReportsBanner(), uiTemplateStatusInfo(), uiTemplateTrack(), uiTemplateVectorscope(), uiTemplateWaveform(), v3d_editvertex_buts(), v3d_object_dimension_buts(), wm_block_dialog_create(), wm_block_insert_unicode_create(), wm_block_search_menu(), wm_block_splash_add_label(), and wm_enum_search_menu().
Definition at line 5079 of file interface.cc.
References uiWidgetColors::text, bTheme::tui, UI_GetTheme(), UI_icon_alert_imbuf_get(), uiDefButImage(), ThemeUI::wcol_menu_back, ImBuf::x, x, ImBuf::y, and y.
Referenced by uiItemsAlertBox().
|
static |
Definition at line 5240 of file interface.cc.
References findBitIndex(), max, min, str, UI_BUT_POIN_BIT, uiDefBut(), x, and y.
Referenced by uiDefButBitC(), uiDefButBitI(), and uiDefButBitS().
| uiBut * uiDefButBitC | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| char * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5431 of file interface.cc.
References max, min, str, UI_BUT_POIN_CHAR, uiDefButBit(), x, and y.
Referenced by block_create__close_file_dialog().
| uiBut * uiDefButBitI | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| int * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5323 of file interface.cc.
References max, min, str, UI_BUT_POIN_INT, uiDefButBit(), x, and y.
Referenced by curvemap_clipping_func(), and uiTemplateMarker().
| uiBut * uiDefButBitS | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| short * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5377 of file interface.cc.
References max, min, str, UI_BUT_POIN_SHORT, uiDefButBit(), x, and y.
Referenced by v3d_editvertex_buts().
| uiBut * uiDefButC | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| char * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5405 of file interface.cc.
References max, min, str, UI_BUT_POIN_CHAR, uiDefBut(), x, and y.
Referenced by blender::ed::asset::shelf::AssetCatalogSelectorTree::Item::build_row(), and ui_block_colorpicker().
| uiBut * uiDefButF | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| float * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5271 of file interface.cc.
References max, min, str, UI_BUT_POIN_FLOAT, uiDefBut(), x, and y.
Referenced by curvemap_buttons_layout(), curvemap_clipping_func(), CurveProfile_buttons_layout(), ui_block_colorpicker(), uiTemplateMarker(), uvedit_vertex_buttons(), v3d_editvertex_buts(), v3d_object_dimension_buts(), and view3d_panel_vgroup().
| uiBut * uiDefButI | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| int * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5297 of file interface.cc.
References max, min, str, UI_BUT_POIN_INT, uiDefBut(), x, and y.
Referenced by blender::ui::TreeViewLayoutBuilder::build_from_tree(), curvemap_buttons_layout(), ui_def_but_rna__menu(), and ui_template_list_layout_draw().
| uiBut * uiDefButImage | ( | uiBlock * | block, |
| void * | imbuf, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const uchar | color[4] ) |
Definition at line 5062 of file interface.cc.
References uiBut::col, copy_v4_v4_uchar(), UI_BTYPE_IMAGE, ui_but_update(), ui_def_but(), x, and y.
Referenced by uiDefButAlert(), wm_block_about_create(), and wm_block_splash_create().
| uiBut * uiDefButO | ( | uiBlock * | block, |
| int | type, | ||
| const StringRefNull | opname, | ||
| wmOperatorCallContext | opcontext, | ||
| std::optional< StringRef > | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5515 of file interface.cc.
References blender::StringRefNull::c_str(), ot, str, uiDefButO_ptr(), WM_operatortype_find(), x, and y.
Referenced by uiTemplateReportsBanner().
| uiBut * uiDefButO_ptr | ( | uiBlock * | block, |
| int | type, | ||
| wmOperatorType * | ot, | ||
| wmOperatorCallContext | opcontext, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5500 of file interface.cc.
References ot, str, ui_but_update(), ui_def_but_operator_ptr(), x, and y.
Referenced by uiDefButO(), uiItemFullO_ptr_ex(), and view3d_panel_vgroup().
| uiBut * uiDefButR | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const std::optional< StringRef > | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| const StringRefNull | propname, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5459 of file interface.cc.
References max, min, ptr, str, ui_but_update(), ui_def_but_rna_propname(), x, and y.
Referenced by ANIM_channel_draw_widgets(), blender::ed::vse::draw_channel_labels(), ED_area_header_switchbutton(), ED_file_path_button(), file_panel_execution_buttons_draw(), graph_draw_driven_property_enabled_btn(), graph_panel_key_properties(), blender::ed::space_node::node_draw_panels(), template_ID(), uiTemplatePalette(), and v3d_editvertex_buts().
| uiBut * uiDefButR_prop | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const std::optional< StringRef > | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5479 of file interface.cc.
References max, min, ptr, str, ui_but_update(), ui_def_but_rna(), x, and y.
Referenced by uiLayout::prop(), template_ID_tabs(), ui_block_colorpicker(), ui_colorpicker_circle(), ui_colorpicker_square(), ui_item_array(), ui_item_enum_expand_elem_exec(), ui_item_with_label(), ui_template_list_layout_draw(), uiDefAutoButR(), and uiTemplateColorPicker().
| uiBut * uiDefButS | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| short * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5351 of file interface.cc.
References max, min, str, UI_BUT_POIN_SHORT, uiDefBut(), x, and y.
Referenced by colorband_buttons_layout(), ui_imageuser_layer_menu(), ui_imageuser_pass_menu(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), and uiTemplatePreview().
| uiBut * uiDefIconBlockBut | ( | uiBlock * | block, |
| uiBlockCreateFunc | func, | ||
| void * | arg, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| std::optional< blender::StringRef > | tip ) |
Block button containing icon.
Definition at line 6440 of file interface.cc.
References uiBut::block_create_func, uiBut::drawflag, UI_BTYPE_BLOCK, UI_BUT_ICON_LEFT, ui_but_update(), ui_def_but(), ui_def_but_icon(), UI_HAS_ICON, x, and y.
Referenced by colorband_buttons_layout(), curvemap_buttons_layout(), and CurveProfile_buttons_layout().
| uiBut * uiDefIconBut | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| void * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5533 of file interface.cc.
References max, min, ui_but_update_and_icon_set(), ui_def_but(), x, and y.
Referenced by curvemap_buttons_layout(), CurveProfile_buttons_layout(), blender::ed::space_node::draw_link_errors(), envelope_panel_draw(), file_add_icon_but(), file_add_overlay_icon_but(), fmodifier_panel_header(), graph_draw_driver_settings_panel(), blender::ed::space_node::node_add_error_message_button(), blender::ed::space_node::node_add_unsupported_compositor_operation_error_message_button(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_extra_info_row(), blender::ed::space_node::node_draw_hidden(), blender::ed::space_node::node_draw_panels(), blender::ed::space_node::node_socket_tooltip_set(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_draw_warning_tree_element(), template_ID(), blender::ed::outliner::tselem_draw_icon(), uiDefIconButBit(), uiDefIconButI(), uiDefIconButS(), uiItemDecoratorR_prop(), uiItemL_(), uiItemsFullEnumO_items(), uiTemplateIcon(), uiTemplateIconView(), uiTemplateStatusInfo(), and uiTemplateTextureShow().
|
static |
Definition at line 5575 of file interface.cc.
References findBitIndex(), max, min, UI_BUT_POIN_BIT, uiDefIconBut(), x, and y.
Referenced by uiDefIconButBitC(), uiDefIconButBitI(), and uiDefIconButBitS().
| uiBut * uiDefIconButBitC | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| char * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5715 of file interface.cc.
References max, min, UI_BUT_POIN_CHAR, uiDefIconButBit(), x, and y.
Referenced by draw_setting_widget().
| uiBut * uiDefIconButBitI | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| int * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5633 of file interface.cc.
References max, min, UI_BUT_POIN_INT, uiDefIconButBit(), x, and y.
Referenced by draw_setting_widget(), modifier_panel_header(), blender::ed::outliner::outliner_draw_restrictbuts(), ui_template_list_layout_draw(), and uiTemplateMarker().
| uiBut * uiDefIconButBitS | ( | uiBlock * | block, |
| int | type, | ||
| int | bit, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| short * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5687 of file interface.cc.
References max, min, UI_BUT_POIN_SHORT, uiDefIconButBit(), x, and y.
Referenced by draw_setting_widget(), blender::ed::outliner::outliner_draw_restrictbuts(), and blender::ed::outliner::outliner_draw_userbuts().
| uiBut * uiDefIconButI | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| int * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5607 of file interface.cc.
References max, min, UI_BUT_POIN_INT, uiDefIconBut(), x, and y.
Referenced by blender::ui::TreeViewLayoutBuilder::build_from_tree(), ui_template_list_layout_draw(), uiTemplateHistogram(), uiTemplateTrack(), uiTemplateVectorscope(), and uiTemplateWaveform().
| uiBut * uiDefIconButO | ( | uiBlock * | block, |
| int | type, | ||
| const StringRefNull | opname, | ||
| wmOperatorCallContext | opcontext, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5799 of file interface.cc.
References blender::StringRefNull::c_str(), ot, uiDefIconButO_ptr(), WM_operatortype_find(), x, and y.
Referenced by ANIM_channel_draw_widgets(), blender::ed::outliner::outliner_draw_overrides_restrictbuts(), template_ID(), template_keymap_item_properties(), ui_block_colorpicker(), ui_item_with_label(), uiTemplateCryptoPicker(), uiTemplatePalette(), uiTemplateReportsBanner(), and uiTemplateRunningJobs().
| uiBut * uiDefIconButO_ptr | ( | uiBlock * | block, |
| int | type, | ||
| wmOperatorType * | ot, | ||
| wmOperatorCallContext | opcontext, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5784 of file interface.cc.
References ot, ui_but_update_and_icon_set(), ui_def_but_operator_ptr(), x, and y.
Referenced by uiDefIconButO(), uiDefIconTextButO(), and uiItemFullO_ptr_ex().
| uiBut * uiDefIconButR | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| const StringRefNull | propname, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5743 of file interface.cc.
References max, min, ptr, ui_but_update_and_icon_set(), ui_def_but_rna_propname(), x, and y.
Referenced by template_ID().
| uiBut * uiDefIconButR_prop | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5763 of file interface.cc.
References max, min, ptr, ui_but_update_and_icon_set(), ui_def_but_rna(), x, and y.
Referenced by clip_draw_dopesheet_channels(), blender::ed::vse::draw_channel_widget_lock(), blender::ed::vse::draw_channel_widget_mute(), blender::ed::outliner::outliner_draw_restrictbuts(), uiLayout::prop(), ui_icon_view_menu_cb(), ui_item_enum_expand_elem_exec(), and uiDefAutoButR().
| uiBut * uiDefIconButS | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| short * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5661 of file interface.cc.
References max, min, UI_BUT_POIN_SHORT, uiDefIconBut(), x, and y.
Referenced by uiTemplatePreview().
| uiBut * uiDefIconMenuBut | ( | uiBlock * | block, |
| uiMenuCreateFunc | func, | ||
| void * | arg, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 6418 of file interface.cc.
References uiBut::drawflag, uiBut::menu_create_func, UI_BTYPE_PULLDOWN, UI_BUT_ICON_LEFT, ui_but_update(), ui_def_but(), ui_def_but_icon(), UI_HAS_ICON, x, and y.
Referenced by ui_item_menu(), uiTemplateNodeLink(), and uiTemplatePalette().
| uiBut * uiDefIconPreviewBut | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| void * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5550 of file interface.cc.
References uiBut::drawflag, max, min, UI_BUT_ICON_LEFT, UI_BUT_ICON_PREVIEW, UI_BUT_NO_PREVIEW_PADDING, ui_but_update(), ui_def_but(), ui_def_but_icon(), UI_HAS_ICON, x, and y.
Referenced by file_add_icon_but().
| uiBut * uiDefIconTextBut | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| blender::StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| void * | poin, | ||
| float | min, | ||
| float | max, | ||
| std::optional< blender::StringRef > | tip ) |
Button containing both string label and icon.
Definition at line 5814 of file interface.cc.
References uiBut::drawflag, max, min, str, UI_BUT_ICON_LEFT, ui_but_update_and_icon_set(), ui_def_but(), x, and y.
Referenced by asset_view_draw_item(), block_create_autorun_warning(), colorband_buttons_layout(), colorband_tools_fn(), create_title_button(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_tools_func(), CurveProfile_buttons_layout(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_content_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float4x4(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_int_vector(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_left_column_cell(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_top_row_cell(), graph_draw_driver_settings_panel(), uiLayout::panel_prop(), save_file_overwrite_cancel_button(), save_file_overwrite_confirm_button(), save_file_overwrite_saveas_button(), template_ID(), template_id_def_new_but(), template_operator_property_buts_draw_single(), template_texture_user_menu(), blender::ed::space_node::ui_node_menu_column(), UI_pie_menu_begin(), ui_pie_menu_level_create(), UI_popup_block_template_confirm_op(), ui_popup_context_menu_for_button(), uiDefIconTextButI(), uiDefIconTextButS(), uiItemL_(), uiTemplateRunningJobs(), wm_block_file_close_cancel_button(), wm_block_file_close_discard_button(), wm_block_file_close_save_button(), and wm_block_insert_unicode_create().
| uiBut * uiDefIconTextButI | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| int * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5833 of file interface.cc.
References max, min, str, UI_BUT_POIN_INT, uiDefIconTextBut(), x, and y.
Referenced by ui_def_but_rna__menu().
| uiBut * uiDefIconTextButO | ( | uiBlock * | block, |
| int | type, | ||
| const StringRefNull | opname, | ||
| wmOperatorCallContext | opcontext, | ||
| int | icon, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5951 of file interface.cc.
References blender::StringRefNull::c_str(), ot, str, uiDefIconButO_ptr(), uiDefIconTextButO_ptr(), WM_operatortype_find(), x, and y.
Referenced by template_ID(), and template_id_def_new_but().
| uiBut * uiDefIconTextButO_ptr | ( | uiBlock * | block, |
| int | type, | ||
| wmOperatorType * | ot, | ||
| wmOperatorCallContext | opcontext, | ||
| int | icon, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5934 of file interface.cc.
References uiBut::drawflag, ot, str, UI_BUT_ICON_LEFT, ui_but_update_and_icon_set(), ui_def_but_operator_ptr(), x, and y.
Referenced by file_draw_invalid_asset_library_hint(), uiDefIconTextButO(), and uiItemFullO_ptr_ex().
| uiBut * uiDefIconTextButR | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| const std::optional< StringRefNull > | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| blender::StringRefNull | propname, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5890 of file interface.cc.
References uiBut::drawflag, max, min, ptr, str, UI_BUT_ICON_LEFT, ui_but_update_and_icon_set(), ui_def_but_rna_propname(), x, and y.
Referenced by blender::nodes::add_attribute_search_button(), blender::nodes::add_layer_name_search_button(), blender::ed::space_node::node_geometry_add_attribute_search_button(), and blender::ed::space_node::node_geometry_add_layer_search_button().
| uiBut * uiDefIconTextButR_prop | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| const std::optional< blender::StringRef > | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop, | ||
| int | index, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5912 of file interface.cc.
References uiBut::drawflag, max, min, ptr, str, UI_BUT_ICON_LEFT, ui_but_update_and_icon_set(), ui_def_but_rna(), x, and y.
| uiBut * uiDefIconTextButS | ( | uiBlock * | block, |
| int | type, | ||
| int | retval, | ||
| int | icon, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| short * | poin, | ||
| float | min, | ||
| float | max, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 5861 of file interface.cc.
References max, min, str, UI_BUT_POIN_SHORT, uiDefIconTextBut(), x, and y.
Referenced by ui_imageuser_slot_menu().
| uiBut * uiDefIconTextMenuBut | ( | uiBlock * | block, |
| uiMenuCreateFunc | func, | ||
| void * | arg, | ||
| int | icon, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 6393 of file interface.cc.
References uiBut::drawflag, uiBut::menu_create_func, str, UI_BTYPE_PULLDOWN, UI_BUT_ICON_LEFT, ui_but_submenu_enable(), ui_but_update(), ui_def_but(), ui_def_but_icon(), UI_HAS_ICON, x, and y.
Referenced by ui_item_menu(), and uiTemplateTextureUser().
| uiBut * uiDefMenuBut | ( | uiBlock * | block, |
| uiMenuCreateFunc | func, | ||
| void * | arg, | ||
| const StringRef | str, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| const std::optional< StringRef > | tip ) |
Definition at line 6376 of file interface.cc.
References uiBut::menu_create_func, str, UI_BTYPE_PULLDOWN, ui_but_update(), ui_def_but(), x, and y.
Referenced by ui_item_menu(), uiblock_layer_pass_buttons(), uiTemplateNodeLink(), and uiTemplateTextureUser().
| uiBut * uiDefSearchBut | ( | uiBlock * | block, |
| void * | arg, | ||
| int | retval, | ||
| int | icon, | ||
| int | maxncpy, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| std::optional< blender::StringRef > | tip ) |
| arg | A pointer to string/name, use UI_but_func_search_set() below to make this work. |
Definition at line 6464 of file interface.cc.
References uiBut::drawflag, UI_BTYPE_SEARCH_MENU, UI_BUT_ICON_LEFT, UI_BUT_TEXT_LEFT, ui_but_update(), ui_def_but(), ui_def_but_icon(), UI_HAS_ICON, x, and y.
Referenced by blender::ed::space_node::create_search_popup_block(), blender::ed::outliner::merged_element_search_menu(), blender::ed::space_node::node_find_menu(), template_common_search_menu(), uiDefSearchButO_ptr(), uiTemplateMenuSearch(), uiTemplateOperatorSearch(), and wm_block_search_menu().
| uiBut * uiDefSearchButO_ptr | ( | uiBlock * | block, |
| wmOperatorType * | ot, | ||
| IDProperty * | properties, | ||
| void * | arg, | ||
| int | retval, | ||
| int | icon, | ||
| int | maxncpy, | ||
| int | x, | ||
| int | y, | ||
| short | width, | ||
| short | height, | ||
| std::optional< blender::StringRef > | tip ) |
Same parameters as for uiDefSearchBut, with additional operator type and properties, used by callback to call again the right op with the right options (properties values).
Definition at line 6650 of file interface.cc.
References IDP_CopyProperty(), uiBut::opcontext, operator_enum_search_exec_fn(), operator_enum_search_update_fn(), uiBut::optype, ot, ptr, UI_but_func_search_set(), UI_but_operator_ptr_ensure(), ui_searchbox_create_generic(), uiDefSearchBut(), WM_OP_EXEC_DEFAULT, x, and y.
Referenced by wm_enum_search_menu().
| const char ui_radial_dir_order[8] |
Definition at line 1647 of file interface.cc.
Referenced by ui_get_radialbut_vec().
| const short ui_radial_dir_to_angle[8] = {90, 45, 0, 315, 270, 225, 180, 135} |
Definition at line 1659 of file interface.cc.
Referenced by ui_but_pie_dir().
| const char ui_radial_dir_to_numpad[8] = {8, 9, 6, 3, 2, 1, 4, 7} |
Definition at line 1658 of file interface.cc.
Referenced by ui_but_pie_direction_string().