Blender
V3.3
|
#include "BLI_compiler_attrs.h"
#include "BLI_rect.h"
#include "DNA_listBase.h"
#include "RNA_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
Go to the source code of this file.
Classes | |
struct | uiBut |
struct | uiButNumber |
struct | uiButColor |
struct | uiButTab |
struct | uiButSearch |
struct | uiButDecorator |
struct | uiButProgressbar |
struct | uiButViewItem |
struct | uiButHSVCube |
struct | uiButColorBand |
struct | uiButCurveProfile |
struct | uiButCurveMapping |
struct | uiButHotkeyEvent |
struct | uiButExtraOpIcon |
struct | ColorPicker |
struct | ColorPickerData |
struct | PieMenuData |
struct | uiButtonGroup |
struct | uiBlock |
struct | uiSafetyRct |
struct | uiKeyNavLock |
struct | uiPopupBlockCreate |
struct | uiPopupBlockHandle |
struct | uiWidgetBaseParameters |
struct | uiRNACollectionSearch |
Variables | |
const char | ui_radial_dir_order [8] |
const char | ui_radial_dir_to_numpad [8] |
const short | ui_radial_dir_to_angle [8] |
const float | ui_pixel_jitter [UI_PIXEL_AA_JITTER][2] |
bool | ATTR_WARN_UNUSED_RESULT |
#define PIE_CLICK_THRESHOLD_SQ 50.0f |
Definition at line 147 of file interface_intern.h.
#define PIE_MAX_ITEMS 8 |
The maximum number of items a radial menu (pie menu) can contain.
Definition at line 150 of file interface_intern.h.
Definition at line 110 of file interface_intern.h.
#define RNA_ENUM_VALUE -2 |
Definition at line 45 of file interface_intern.h.
#define RNA_NO_INDEX -1 |
Definition at line 44 of file interface_intern.h.
#define UI_BITBUT_ROW | ( | min, | |
max | |||
) | (((max) >= 31 ? 0xFFFFFFFF : (1 << ((max) + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0)) |
Definition at line 120 of file interface_intern.h.
#define UI_BITBUT_TEST | ( | a, | |
b | |||
) | (((a) & (1 << (b))) != 0) |
Definition at line 114 of file interface_intern.h.
#define UI_BITBUT_VALUE_DISABLED | ( | a, | |
b | |||
) | ((a) & ~(1 << (b))) |
Definition at line 117 of file interface_intern.h.
#define UI_BITBUT_VALUE_ENABLED | ( | a, | |
b | |||
) | ((a) | (1 << (b))) |
Definition at line 116 of file interface_intern.h.
#define UI_BITBUT_VALUE_TOGGLED | ( | a, | |
b | |||
) | ((a) ^ (1 << (b))) |
Definition at line 115 of file interface_intern.h.
Definition at line 47 of file interface_intern.h.
#define UI_MENU_SCROLL_ARROW (12 * UI_DPI_FAC) |
Definition at line 54 of file interface_intern.h.
#define UI_MENU_SCROLL_MOUSE (UI_MENU_SCROLL_ARROW + 2 * UI_DPI_FAC) |
Definition at line 55 of file interface_intern.h.
#define UI_MENU_SCROLL_PAD (4 * UI_DPI_FAC) |
Definition at line 56 of file interface_intern.h.
#define UI_MENU_SUBMENU_PADDING (6 * UI_DPI_FAC) |
Some extra padding added to menus containing sub-menu icons.
Definition at line 51 of file interface_intern.h.
Definition at line 49 of file interface_intern.h.
#define UI_PANEL_MINX 100 |
Definition at line 59 of file interface_intern.h.
#define UI_PANEL_MINY 70 |
Definition at line 60 of file interface_intern.h.
#define UI_PIXEL_AA_JITTER 8 |
Definition at line 1259 of file interface_intern.h.
#define UI_POPOVER_WIDTH_UNITS 10 |
Popover width (multiplied by #U.widget_unit)
Definition at line 63 of file interface_intern.h.
#define UI_POPUP_MARGIN (UI_DPI_FAC * 12) |
Definition at line 1252 of file interface_intern.h.
#define UI_POPUP_MENU_TOP (int)(10 * UI_DPI_FAC) |
Margin at top of screen for popups. Note this value must be sufficient to draw a popover arrow to avoid cropping it.
Definition at line 1257 of file interface_intern.h.
#define UI_TEXT_MARGIN_X 0.4f |
Definition at line 1251 of file interface_intern.h.
#define USE_NUMBUTS_LR_ALIGN |
Split number-buttons by ':' and align left/right.
Definition at line 124 of file interface_intern.h.
#define USE_UIBUT_SPATIAL_ALIGN |
Use new 'align' computation code.
Definition at line 127 of file interface_intern.h.
typedef struct ColorPicker ColorPicker |
typedef struct ColorPickerData ColorPickerData |
typedef enum RadialDirection RadialDirection |
typedef uiBlock*(* uiBlockHandleCreateFunc) (struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1) |
Definition at line 789 of file interface_intern.h.
typedef struct uiButColor uiButColor |
Derived struct for UI_BTYPE_COLOR
typedef struct uiButColorBand uiButColorBand |
Derived struct for UI_BTYPE_COLORBAND.
typedef struct uiButCurveMapping uiButCurveMapping |
Derived struct for UI_BTYPE_CURVE.
typedef struct uiButCurveProfile uiButCurveProfile |
Derived struct for UI_BTYPE_CURVEPROFILE.
typedef struct uiButDecorator uiButDecorator |
Derived struct for UI_BTYPE_DECORATOR
typedef struct uiButExtraOpIcon uiButExtraOpIcon |
Additional, superimposed icon for a button, invoking an operator.
Definition at line 1403 of file interface_intern.h.
typedef struct uiButHotkeyEvent uiButHotkeyEvent |
Derived struct for UI_BTYPE_HOTKEY_EVENT.
typedef struct uiButHSVCube uiButHSVCube |
Derived struct for UI_BTYPE_HSVCUBE.
typedef struct uiButNumber uiButNumber |
Derived struct for UI_BTYPE_NUM
typedef struct uiButProgressbar uiButProgressbar |
Derived struct for UI_BTYPE_PROGRESS_BAR.
typedef struct uiButSearch uiButSearch |
Derived struct for UI_BTYPE_SEARCH_MENU
Derived struct for UI_BTYPE_TAB
typedef struct uiButtonGroup uiButtonGroup |
A group of button references, used by property search to keep track of sets of buttons that should be searched together. For example, in property split layouts number buttons and their labels (and even their decorators) are separate buttons, but they must be searched and highlighted together.
typedef enum uiButtonGroupFlag uiButtonGroupFlag |
typedef struct uiButViewItem uiButViewItem |
typedef struct uiRNACollectionSearch uiRNACollectionSearch |
For use with ui_rna_collection_search_update_fn.
typedef struct uiSafetyRct uiSafetyRct |
typedef struct uiWidgetBaseParameters uiWidgetBaseParameters |
anonymous enum |
Enumerator | |
---|---|
UI_SELECT | Use when the button is pressed. |
UI_SCROLLED | Temporarily hidden (scrolled out of the view). |
UI_ACTIVE | |
UI_HAS_ICON | |
UI_HIDDEN | |
UI_SELECT_DRAW | Display selected, doesn't impact interaction. |
UI_SEARCH_FILTER_NO_MATCH | Property search filter is active and the button does not match. |
UI_BUT_ACTIVE_OVERRIDE | Temporarily override the active button for lookups in context, regions, etc. (everything using ui_context_button_active()). For example, so that operators normally acting on the active button can be polled on non-active buttons to (e.g. for disabling). |
Definition at line 66 of file interface_intern.h.
anonymous enum |
anonymous enum |
Definition at line 130 of file interface_intern.h.
anonymous enum |
Enumerator | |
---|---|
ROUNDBOX_TRIA_NONE | |
ROUNDBOX_TRIA_ARROWS | |
ROUNDBOX_TRIA_SCROLL | |
ROUNDBOX_TRIA_MENU | |
ROUNDBOX_TRIA_CHECK | |
ROUNDBOX_TRIA_HOLD_ACTION_ARROW | |
ROUNDBOX_TRIA_MAX |
Definition at line 1169 of file interface_intern.h.
enum eBlockContentHints |
Enumerator | |
---|---|
UI_BLOCK_CONTAINS_SUBMENU_BUT | In a menu block, if there is a single sub-menu button, we add some padding to the right to put nicely aligned triangle icons there. |
Definition at line 447 of file interface_intern.h.
enum RadialDirection |
Enumerator | |
---|---|
UI_RADIAL_NONE | |
UI_RADIAL_N | |
UI_RADIAL_NE | |
UI_RADIAL_E | |
UI_RADIAL_SE | |
UI_RADIAL_S | |
UI_RADIAL_SW | |
UI_RADIAL_W | |
UI_RADIAL_NW |
Definition at line 93 of file interface_intern.h.
enum uiButtonGroupFlag |
Enumerator | |
---|---|
UI_BUTTON_GROUP_LOCK | While this flag is set, don't create new button groups for layout item calls. |
UI_BUTTON_GROUP_PANEL_HEADER | The buttons in this group are inside a panel header. |
Definition at line 466 of file interface_intern.h.
Info about what the separator character separates, used to decide between different drawing styles. E.g. we never want a shortcut string to be clipped, but other hint strings can be clipped.
Definition at line 1209 of file interface_intern.h.
struct wmKeyMap* eyedropper_colorband_modal_keymap | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 62 of file interface_eyedropper.c.
References EYE_MODAL_POINT_CANCEL, EYE_MODAL_POINT_CONFIRM, EYE_MODAL_POINT_RESET, EYE_MODAL_POINT_SAMPLE, wmKeyMap::modal_items, NULL, WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by ED_keymap_ui().
struct wmKeyMap* eyedropper_modal_keymap | ( | struct wmKeyConfig * | keyconf | ) |
Definition at line 32 of file interface_eyedropper.c.
References EYE_MODAL_CANCEL, EYE_MODAL_SAMPLE_BEGIN, EYE_MODAL_SAMPLE_CONFIRM, EYE_MODAL_SAMPLE_RESET, wmKeyMap::modal_items, NULL, WM_modalkeymap_assign(), WM_modalkeymap_ensure(), and WM_modalkeymap_find().
Referenced by ED_keymap_ui().
void icon_draw_rect_input | ( | float | x, |
float | y, | ||
int | w, | ||
int | h, | ||
float | alpha, | ||
short | event_type, | ||
short | event_value | ||
) |
Definition at line 475 of file interface_widgets.c.
References Freestyle::a, Freestyle::c, g_ui_batch_cache, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, gpu_batch_presets_register(), GPU_PRIM_TRI_STRIP, GPU_vertbuf_attr_get_raw_data(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), INNER, NO_AA, NULL, set_roundbox_vertex(), set_roundbox_vertex_data(), vflag_format(), WIDGET_CURVE_RESOLU, and WIDGET_SIZE_MAX.
Referenced by ui_draw_dropshadow().
Definition at line 449 of file interface_widgets.c.
References g_ui_batch_cache, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, gpu_batch_presets_register(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, and vflag_format().
Referenced by draw_widgetbase_batch(), UI_draw_roundbox_4fv_ex(), and UI_widgetbase_draw_cache_flush().
Definition at line 599 of file interface_query.cc.
References uiBut::active, uiBlock::buttons, and LISTBASE_FOREACH.
Referenced by ui_but_update_view_for_active(), and ui_region_find_active_but().
Compute the alignment of all 'align groups' of buttons in given block.
This is using an order-independent algorithm, i.e. alignment of buttons should be OK regardless of order in which they are added to the block.
Definition at line 444 of file interface.cc.
References BLI_listbase_is_empty(), BLI_rctf_init_minmax(), BLI_rctf_size_x(), BLI_rctf_union(), uiBlock::bounds, uiBlock::buttons, ListBase::first, LISTBASE_FOREACH, max_ff(), uiBlock::minbounds, uiBlock::panel, uiBlock::rect, uiBlock::safety, Panel::sizex, Panel::sizey, uiBut::str, STRPREFIX, 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_end_ex(), ui_offset_panel_block(), and ui_update_flexible_spacing().
Definition at line 10140 of file interface_handlers.c.
References copy_v2_v2(), PieMenuData::flags, len, normalize_v2_v2(), PieMenuData::pie_center_init, PieMenuData::pie_center_spawned, uiBlock::pie_data, PieMenuData::pie_dir, sub_v2_v2v2(), UI_PIE_INITIAL_DIRECTION, and UI_PIE_INVALID_DIR.
Referenced by ui_pie_handler(), and ui_popup_block_refresh().
struct ColorManagedDisplay* ui_block_cm_display_get | ( | uiBlock * | block | ) |
Definition at line 3928 of file interface.cc.
References uiBlock::display_device, and IMB_colormanagement_display_get_named().
Referenced by ui_block_cm_to_display_space_v3(), and ui_draw_but_COLORBAND().
Definition at line 3933 of file interface.cc.
References IMB_colormanagement_scene_linear_to_display_v3(), and ui_block_cm_display_get().
Referenced by ui_draw_but_HSVCIRCLE(), and widget_swatch().
ColorPicker* ui_block_colorpicker_create | ( | struct uiBlock * | block | ) |
Definition at line 903 of file interface_region_color_picker.cc.
References BLI_addhead(), uiBlock::color_pickers, and ColorPickerData::list.
Referenced by ui_block_colorpicker(), and uiTemplateColorPicker().
uiBlock uiBlock* ui_block_find_mouse_over | ( | const struct ARegion * | region, |
const struct wmEvent * | event, | ||
bool | only_clip | ||
) |
uiBlock* ui_block_find_mouse_over_ex | ( | const struct ARegion * | region, |
const int | xy[2], | ||
bool | only_clip | ||
) |
Referenced by UI_region_block_find_mouse_over().
Definition at line 53 of file interface_button_group.c.
References button_group_free(), uiBlock::button_groups, and LISTBASE_FOREACH_MUTABLE.
Referenced by UI_block_free().
Definition at line 77 of file interface_view.cc.
References LISTBASE_FOREACH_MUTABLE, and uiBlock::views.
Referenced by UI_block_free().
uiBlock* ui_block_func_COLOR | ( | struct bContext * | C, |
uiPopupBlockHandle * | handle, | ||
void * | arg_but | ||
) |
Definition at line 867 of file interface_region_color_picker.cc.
References uiBut::block, uiBlock::block_event_func, C, copy_v3_v3(), uiBlock::direction, uiBut::editvec, uiBlock::flag, uiBlock::is_color_gamma_picker, uiPopupBlockHandle::region, uiPopupBlockHandle::retvec, UI_block_begin(), UI_block_bounds_set_normal(), ui_block_colorpicker(), UI_BLOCK_KEEP_OPEN, UI_BLOCK_LOOP, UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_OUT_1, UI_BLOCK_POPUP, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), ui_but_is_color_gamma(), ui_colorpicker_small_wheel_cb(), UI_DIR_UP, UI_EMBOSS, and UI_UNIT_X.
Referenced by ui_block_open_begin().
Definition at line 610 of file interface_query.cc.
References uiBlock::flag, UI_BLOCK_KEEP_OPEN, and UI_BLOCK_LOOP.
Referenced by UI_block_can_add_separator(), ui_block_func_POPOVER(), ui_block_is_popup_any(), ui_but_is_drag_toggle(), UI_but_string_info_get(), ui_do_but_TOG(), ui_handle_button_event(), ui_handle_menu_button(), ui_handle_menu_event(), ui_handle_menus_recursive(), ui_menu_scroll_apply_offset_y(), ui_mouse_motion_towards_check(), ui_popup_context_menu_for_button(), ui_popup_menu_create(), uiItemS_ex(), and widget_draw_text_icon().
Definition at line 622 of file interface_query.cc.
References uiBlock::flag, and UI_BLOCK_RADIAL.
Referenced by UI_block_can_add_separator(), ui_block_is_popup_any(), ui_handle_button_event(), ui_handle_menu_button(), widget_draw_icon(), and widget_draw_text_icon().
Definition at line 617 of file interface_query.cc.
References uiBlock::flag, and UI_BLOCK_POPOVER.
Referenced by ui_block_is_popup_any(), UI_but_has_tooltip_label(), and ui_def_but().
Definition at line 627 of file interface_query.cc.
References ui_block_is_menu(), ui_block_is_pie_menu(), and ui_block_is_popover().
Referenced by ui_do_but_SCROLL(), ui_popup_context_menu_for_button(), and uiItemSpacer().
void ui_block_new_button_group | ( | uiBlock * | block, |
uiButtonGroupFlag | flag | ||
) |
Every function that adds a set of buttons must create another group, then ui_def_but adds buttons to the current group (the last).
Definition at line 17 of file interface_button_group.c.
References BLI_addtail(), BLI_listbase_clear(), BLI_listbase_is_empty(), uiBlock::button_groups, uiButtonGroup::buttons, uiButtonGroup::flag, ListBase::last, MEM_mallocN, and UI_BUTTON_GROUP_LOCK.
Referenced by ui_button_group_add_but(), ui_item_menu(), UI_panel_header_buttons_begin(), UI_panel_header_buttons_end(), uiItemFullO_ptr_ex(), uiItemFullR(), uiItemL_(), and uiItemPointerR_prop().
void ui_block_to_region_fl | ( | const struct ARegion * | region, |
uiBlock * | block, | ||
float * | r_x, | ||
float * | r_y | ||
) |
void ui_block_to_region_rctf | ( | const struct ARegion * | region, |
uiBlock * | block, | ||
rctf * | rct_dst, | ||
const rctf * | rct_src | ||
) |
void ui_block_to_window_rctf | ( | const struct ARegion * | region, |
uiBlock * | block, | ||
rctf * | rct_dst, | ||
const rctf * | rct_src | ||
) |
uiViewHandle* ui_block_view_find_matching_in_old_block | ( | const uiBlock * | new_block, |
const uiViewHandle * | new_view | ||
) |
Definition at line 150 of file interface_view.cc.
References BLI_assert, and ui_block_view_find_matching_in_old_block_impl().
Referenced by blender::ui::AbstractView::update_from_old().
uiButViewItem* ui_block_view_find_matching_view_item_but_in_old_block | ( | const uiBlock * | new_block, |
const uiViewItemHandle * | new_item_handle | ||
) |
Definition at line 160 of file interface_view.cc.
References uiBlock::buttons, blender::ui::AbstractViewItem::get_view(), LISTBASE_FOREACH, uiBlock::oldblock, ui_block_view_find_matching_in_old_block_impl(), UI_BTYPE_VIEW_ITEM, UI_view_item_matches(), and uiButViewItem::view_item.
Referenced by blender::ui::AbstractTreeViewItem::is_hovered().
Exported to interface.c: UI_but_active_only()
Definition at line 8996 of file interface_handlers.c.
References uiBut::block, button_activate_init(), BUTTON_ACTIVATE_OVER, C, CTX_wm_window(), EVT_BUT_OPEN, KM_PRESS, ui_do_button(), and wm_event_init_from_window().
Referenced by UI_but_active_only_ex().
Simulate moving the mouse over a button (or navigating to it with arrow keys).
exported so menus can start with a highlighted button, even if the mouse isn't over it
Definition at line 9013 of file interface_handlers.c.
References button_activate_init(), BUTTON_ACTIVATE_OVER, and C.
Referenced by ui_block_func_POPUP().
Clear & exit the active button's string..
Definition at line 2965 of file interface_handlers.c.
References uiBut::active, button_activate_state(), BUTTON_STATE_EXIT, C, MEM_callocN, uiHandleButtonData::str, and ui_apply_but_TEX().
Referenced by button_string_clear_exec().
uiBut* ui_but_add_search | ( | uiBut * | but, |
PointerRNA * | ptr, | ||
PropertyRNA * | prop, | ||
PointerRNA * | searchptr, | ||
PropertyRNA * | searchprop, | ||
bool | results_are_suggestions | ||
) |
Definition at line 2717 of file interface_layout.c.
References uiBut::block, uiRNACollectionSearch::butstore, uiRNACollectionSearch::butstore_block, uiBut::drawflag, uiBut::flag, uiBut::hardmax, MAX2, MEM_mallocN, NULL, PointerRNA_NULL, PROP_ENUM, PROP_POINTER, PROP_STRING, ptr, RNA_property_is_unlink(), RNA_property_pointer_type(), RNA_property_string_search_flag(), RNA_property_type(), uiButSearch::rnasearchpoin, uiButSearch::rnasearchprop, uiRNACollectionSearch::search_but, search_id_collection(), uiRNACollectionSearch::search_prop, uiRNACollectionSearch::search_ptr, uiBut::str, uiRNACollectionSearch::target_prop, uiRNACollectionSearch::target_ptr, uiBut::type, UI_BTYPE_SEARCH_MENU, ui_but_change_type(), UI_BUT_DISABLED, UI_but_func_search_set(), UI_but_func_search_set_results_are_suggestions(), UI_BUT_ICON_LEFT, UI_BUT_TEXT_LEFT, UI_BUT_VALUE_CLEAR, UI_butstore_create(), UI_butstore_register(), ui_rna_collection_search_arg_free_fn(), ui_rna_collection_search_update_fn(), and ui_searchbox_create_generic().
Referenced by uiDefAutoButR(), uiItemFullR(), and uiItemPointerR_prop().
Definition at line 1205 of file interface.cc.
References BLI_snprintf(), BLI_strdup(), uiBut::flag, MEM_freeN, uiBut::str, uiBut::strdata, 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().
int ui_but_align_opposite_to_area_align_get | ( | const struct ARegion * | region | ) |
Definition at line 295 of file interface_anim.c.
References C, ED_autokeyframe_property(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and scene.
Referenced by ui_apply_but_autokey().
Definition at line 300 of file interface_anim.c.
References C, NULL, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
void ui_but_anim_decorate_update_from_flag | ( | uiButDecorator * | but | ) |
Definition at line 131 of file interface_anim.c.
References uiButDecorator::but, PointerRNA::data, uiBut::flag, uiBut::icon, RNA_property_identifier(), RNA_struct_identifier(), uiButDecorator::rnapoin, uiButDecorator::rnaprop, PointerRNA::type, ui_but_anim_decorate_find_attached_button(), UI_BUT_ANIMATED, UI_BUT_ANIMATED_KEY, UI_BUT_DISABLED, UI_BUT_DRIVEN, UI_BUT_INACTIVE, and UI_BUT_OVERRIDDEN.
Referenced by UI_block_end_ex(), and UI_context_update_anim_flag().
Create new expression for button (i.e. a "scripted driver"), if it can be created.
Definition at line 227 of file interface_anim.c.
References BKE_driver_invalidate_expression(), BLI_strncpy_utf8(), uiBut::block, C, CTX_data_main(), PointerRNA::data, DEG_relations_tag_update(), FCurve::driver, DRIVER_FCURVE_KEYFRAMES, DRIVER_TYPE_PYTHON, ELEM, uiBlock::evil_C, ChannelDriver::expression, G, G_DEBUG, GS, id, ID_MA, ID_TE, MEM_freeN, ID::name, NC_ANIMATION, ND_KEYFRAME, NULL, PointerRNA::owner_id, RNA_path_from_ID_to_property(), RNA_property_array_check(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, str, ChannelDriver::type, verify_driver_fcurve(), and WM_event_add_notifier().
Referenced by ui_but_string_set().
str can be NULL to only perform check if but has an expression at all.
Definition at line 170 of file interface_anim.c.
References BLI_strncpy(), FCurve::driver, DRIVER_TYPE_PYTHON, ChannelDriver::expression, NULL, str, ChannelDriver::type, and ui_but_get_fcurve().
Referenced by ui_but_string_get_ex(), ui_textedit_begin(), and ui_tooltip_data_from_button_or_extra_icon().
Definition at line 192 of file interface_anim.c.
References BKE_driver_invalidate_expression(), BLI_strncpy_utf8(), uiBut::block, C, CTX_data_main(), DEG_relations_tag_update(), FCurve::driver, DRIVER_FLAG_INVALID, DRIVER_TYPE_PYTHON, uiBlock::evil_C, ChannelDriver::expression, FCURVE_DISABLED, ChannelDriver::flag, FCurve::flag, NC_ANIMATION, ND_KEYFRAME, NULL, str, ChannelDriver::type, ui_but_get_fcurve(), and WM_event_add_notifier().
Referenced by ui_but_string_set().
void ui_but_anim_flag | ( | uiBut * | but, |
const struct AnimationEvalContext * | anim_eval_context | ||
) |
Definition at line 306 of file interface_anim.c.
References C, NULL, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Definition at line 98 of file interface_align.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), ButAlign::but, ELEM, uiBut::rect, uiBut::type, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_LABEL, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER, and UI_BTYPE_TAB.
Referenced by block_align_proximity_compute(), ui_def_but(), and ui_item_align().
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 4025 of file interface.cc.
References BLI_assert, BLI_insertlinkafter(), BLI_remlink(), uiBut::block, uiBlock::buttons, uiBut::layout, MEM_recallocN_id, uiBut::poin, uiBut::prev, uiBut::str, uiBut::strdata, uiBut::type, ui_but_alloc_info(), 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 ui_but_add_search(), ui_item_array(), and uiItemFullR().
Definition at line 2865 of file interface_handlers.c.
References BKE_curvemapping_free_data(), BKE_curveprofile_free_data(), but_copypaste_curve, and but_copypaste_profile.
Referenced by UI_exit().
Definition at line 552 of file interface_query.cc.
References PROP_PASSWORD, RNA_property_subtype(), and uiBut::rnaprop.
Referenced by ui_but_copy().
bool ui_but_contains_point_px_icon | ( | const uiBut * | but, |
struct ARegion * | region, | ||
const struct wmEvent * | event | ||
) |
Referenced by ui_do_but_BLOCK(), ui_do_but_COLOR(), and ui_do_but_EXIT().
Definition at line 209 of file interface_query.cc.
References BLI_rctf_isect_pt(), and uiBut::rect.
Referenced by ui_but_contains_point_px(), ui_but_find_mouse_over_ex(), ui_do_but_textedit(), and ui_list_find_mouse_over_ex().
Definition at line 214 of file interface_query.cc.
References BLI_rctf_isect(), and uiBut::rect.
Referenced by ui_but_find_rect_over().
bool ui_but_context_poll_operator | ( | struct bContext * | C, |
struct wmOperatorType * | ot, | ||
const uiBut * | but | ||
) |
Definition at line 1898 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 | ( | struct bContext * | C, |
const uiBut * | but, | ||
const struct 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). |
str | will be overwritten. |
Definition at line 2690 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().
Definition at line 111 of file interface_drag.cc.
References uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, UI_BUT_DRAGPOIN_FREE, and WM_drag_data_free().
Referenced by ui_but_free().
Definition at line 118 of file interface_drag.cc.
References uiBut::dragpoin.
Referenced by ui_but_is_interactive_ex(), ui_do_but_BLOCK(), ui_do_but_COLOR(), ui_do_but_EXIT(), ui_list_is_hovering_draggable_but(), and widget_draw_icon().
Definition at line 2661 of file interface.cc.
References BLI_assert, uiBut::block, uiBlock::buttons, uiBut::flag, LISTBASE_FOREACH, and UI_BUT_DRAG_MULTI.
Referenced by ui_draw_but(), widget_draw_text(), and widget_draw_text_icon().
Definition at line 123 of file interface_drag.cc.
References C, uiBut::dragflag, uiBut::dragpoin, uiBut::dragtype, ELEM, uiBut::icon, uiBut::imb, uiBut::imb_scale, NULL, UI_BUT_DRAGPOIN_FREE, ui_but_value_get(), WM_DRAG_ASSET, WM_DRAG_ASSET_LIST, WM_drag_data_create(), WM_DRAG_FREE_DATA, WM_DRAG_ID, WM_DRAG_NOP, WM_event_drag_image(), WM_event_start_drag(), and WM_event_start_prepared_drag().
Referenced by ui_but_drag_init().
size_t size_t ui_but_drawstr_len_without_sep_char | ( | const uiBut * | but | ) |
Definition at line 563 of file interface_query.cc.
References uiBut::drawstr, uiBut::flag, UI_BUT_HAS_SEP_CHAR, and UI_SEP_CHAR.
Referenced by ui_apply_but_undo(), and ui_but_drawstr_without_sep_char().
size_t ui_but_drawstr_without_sep_char | ( | const uiBut * | but, |
char * | str, | ||
size_t | str_maxlen | ||
) |
Referenced by ui_apply_but_func(), ui_but_user_menu_add(), and ui_handle_afterfunc_add_operator_ex().
void ui_but_execute_begin | ( | struct bContext * | C, |
struct ARegion * | region, | ||
uiBut * | but, | ||
void ** | active_back | ||
) |
void ui_but_execute_end | ( | struct bContext * | C, |
struct ARegion * | region, | ||
uiBut * | but, | ||
void * | active_back | ||
) |
Definition at line 1674 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().
uiBut* ui_but_find_mouse_over_ex | ( | const struct ARegion * | region, |
const int | xy[2], | ||
bool | labeledit, | ||
bool | for_tooltip, | ||
const uiButFindPollFn | find_poll, | ||
const void * | find_custom_data | ||
) |
x and y are only used in case event is NULL.
Referenced by ui_but_list_row_text_activate(), ui_drag_toggle_set(), ui_handle_button_over(), ui_handler_region_drag_toggle(), and ui_list_is_hovering_draggable_but().
Definition at line 794 of file interface.cc.
References uiBlock::buttons, LISTBASE_FOREACH, and ui_but_equals_old().
Referenced by UI_butstore_update().
Definition at line 784 of file interface.cc.
References uiBlock::buttons, LISTBASE_FOREACH, and ui_but_equals_old().
Referenced by UI_but_active_only_ex(), and ui_but_update_from_old_block().
Definition at line 333 of file interface_query.cc.
References BLI_assert, BLI_rctf_isect(), BLI_rctf_rcti_copy(), LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, UI_BLOCK_CLIP_EVENTS, ui_but_contains_rect(), ui_but_is_interactive(), UI_RADIAL_NONE, ui_region_contains_rect_px(), ui_window_to_block_rctf(), and ARegion::uiblocks.
Referenced by UI_region_but_find_rect_over().
Finds the pressed button in an aligned row (typically an expanded enum).
direction | Use when there may be multiple buttons pressed. |
Definition at line 587 of file interface_handlers.c.
References BLI_assert, ELEM, uiBut::flag, uiBut::next, NULL, uiBut::prev, ui_but_find_select_in_enum__cmp(), and UI_SELECT.
Referenced by ui_do_but_TOG().
Definition at line 512 of file interface_query.cc.
References uiBlock::buttons, LISTBASE_FOREACH, and ui_but_is_editable().
Referenced by button_activate_init(), and ui_handle_menu_event().
Definition at line 118 of file interface_query.cc.
References PointerRNA::data, ELEM, PROP_ACCELERATION, PROP_AXISANGLE, PROP_COLOR, PROP_COLOR_GAMMA, PROP_COORDS, PROP_DIRECTION, PROP_EULER, PROP_MATRIX, PROP_QUATERNION, PROP_TRANSLATION, PROP_VELOCITY, PROP_XYZ, PROP_XYZ_LENGTH, RNA_property_subtype(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_but_copy(), and ui_but_paste().
For picker, while editing HSV.
Definition at line 168 of file interface_region_color_picker.cc.
References uiBut::custom_data, ColorPicker::hsv_perceptual, ui_but_v3_set(), and ui_color_picker_hsv_to_rgb().
Referenced by ui_do_but_HSVCIRCLE().
int ui_but_icon | ( | const uiBut * | but | ) |
Definition at line 160 of file interface_query.cc.
References uiBut::drawflag, uiBut::flag, uiBut::icon, uiBut::iconadd, UI_BUT_ICON_REVERSE, and UI_HAS_ICON.
Referenced by menu_items_from_ui_create_item_from_button(), and widget_draw_text_icon().
Definition at line 2397 of file interface.cc.
References ELEM, PROP_BOOLEAN, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, uiBut::type, 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().
Returns true if the button is for a color with gamma baked in, or if it's a color picker for such a button.
Definition at line 102 of file interface_region_color_picker.cc.
References uiBut::block, uiBlock::is_color_gamma_picker, PROP_COLOR_GAMMA, RNA_property_subtype(), and uiBut::rnaprop.
Referenced by ui_block_colorpicker(), ui_block_func_COLOR(), ui_colorpicker_hex_rna_cb(), ui_draw_but_HSVCIRCLE(), ui_perceptual_to_scene_linear_space(), ui_scene_linear_to_perceptual_space(), ui_update_color_picker_buts_rgb(), and widget_swatch().
Check if this button is similar enough to be grouped with another.
Definition at line 2449 of file interface.cc.
References uiBut::pointype, RNA_property_subtype(), RNA_property_type(), uiBut::rnapoin, uiBut::rnaprop, uiBut::type, and PointerRNA::type.
Referenced by ui_multibut_states_tag().
Definition at line 534 of file interface_query.cc.
References ELEM, uiBut::type, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_TRACK_PREVIEW, and USER_CONTINUOUS_MOUSE.
Referenced by button_activate_state(), ui_do_but_NUM(), ui_numedit_begin(), ui_numedit_but_CURVE(), ui_numedit_but_CURVEPROFILE(), ui_numedit_but_HSVCIRCLE(), ui_numedit_but_HSVCUBE(), ui_numedit_but_NUM(), and ui_numedit_but_SLI().
Definition at line 31 of file interface_query.cc.
References ELEM, uiBut::type, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_PROGRESS_BAR, UI_BTYPE_ROUNDBOX, UI_BTYPE_SEPR, and UI_BTYPE_SEPR_LINE.
Referenced by UI_block_active_only_flagged_buttons(), ui_block_func_POPOVER(), ui_block_func_POPUP(), ui_but_first(), ui_but_last(), ui_but_next(), ui_but_prev(), and ui_handle_button_event().
Definition at line 42 of file interface_query.cc.
References ELEM, uiBut::type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_SEARCH_MENU, and UI_BTYPE_TEXT.
Referenced by ui_handle_button_event(), ui_textedit_next_but(), and ui_textedit_prev_but().
Definition at line 543 of file interface_handlers.c.
References uiBut::active, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, data, and ELEM.
Referenced by ui_but_update_ex().
Definition at line 2376 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().
Definition at line 97 of file interface_query.cc.
References ui_but_is_interactive_ex().
Referenced by ui_but_find_rect_over(), ui_drag_toggle_set_xy_xy(), ui_handle_button_over(), and ui_multibut_states_tag().
Can we mouse over the button or is it hidden/disabled/layout.
Definition at line 60 of file interface_query.cc.
References ELEM, uiBut::emboss, uiBut::flag, uiBut::tip_func, uiBut::type, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_LISTROW, UI_BTYPE_ROUNDBOX, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_TEXT, ui_but_drag_is_draggable(), UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS, UI_HIDDEN, and UI_SCROLLED.
Referenced by ui_but_find_mouse_over_ex(), and ui_but_is_interactive().
Definition at line 112 of file interface_query.cc.
References ELEM, uiBut::type, UI_BTYPE_BUT, UI_BTYPE_DECORATOR, and ui_but_is_toggle().
Referenced by ui_draw_but(), and ui_handle_button_event().
int ui_but_is_pushed | ( | uiBut * | but | ) |
Definition at line 2253 of file interface.cc.
References ui_but_is_pushed_ex(), and UI_BUT_VALUE_UNSET.
Referenced by ui_drag_toggle_but_pushed_state().
Check if the button is pushed, this is only meaningful for some button types.
Definition at line 2156 of file interface.cc.
References uiBut::bit, uiBut::bitnr, bool, uiBut::custom_data, PointerRNA::data, uiBut::drawflag, ELEM, uiBut::hardmax, uiBut::hardmin, uiBut::optype, PROP_ENUM_FLAG, PROP_POINTER, uiBut::pushed_state_arg, 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, UI_view_item_is_active(), and uiButViewItem::view_item.
Referenced by ui_but_is_pushed(), and ui_but_update_select_flag().
Definition at line 2475 of file interface.cc.
References uiBut::drawstr, RNA_struct_contains_property(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_button_value_default().
Definition at line 47 of file interface_query.cc.
References ELEM, 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_TOGGLE, and UI_BTYPE_TOGGLE_N.
Referenced by ui_but_is_popover_once_compat().
Definition at line 2420 of file interface.cc.
References uiBut::block, PROP_UNIT_NONE, PROP_UNIT_ROTATION, PROP_UNIT_TIME, 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().
Definition at line 522 of file interface_query.cc.
References uiBlock::buttons, ListBase::last, uiBut::prev, and ui_but_is_editable().
Referenced by ui_handle_menu_event().
int ui_but_menu_direction | ( | uiBut * | but | ) |
Definition at line 4300 of file interface_handlers.c.
References uiBut::active, and data.
Referenced by widget_roundbox_set().
Definition at line 4494 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(), and widget_roundbox_set().
int ui_but_menu_step | ( | uiBut * | but, |
int | direction | ||
) |
Definition at line 57 of file interface_region_menu_popup.cc.
References uiBut::block, uiBlock::evil_C, uiBut::menu_step_func, uiBut::poin, RNA_property_enum_get(), RNA_property_enum_step(), uiBut::rnapoin, uiBut::rnaprop, uiBut::str, and ui_but_menu_step_poll().
Referenced by ui_do_but_BLOCK().
Definition at line 48 of file interface_region_menu_popup.cc.
References BLI_assert, uiBut::menu_step_func, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, uiBut::type, and UI_BTYPE_MENU.
Referenced by ui_but_menu_step(), and ui_but_supports_cycling().
Definition at line 501 of file interface_query.cc.
References uiBut::next, and ui_but_is_editable().
Referenced by ui_handle_menu_event().
Definition at line 1613 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().
void ui_but_pie_dir | ( | RadialDirection | dir, |
float | vec[2] | ||
) |
Definition at line 179 of file interface_query.cc.
References angle(), BLI_assert, cosf, DEG2RADF, sinf, ui_radial_dir_to_angle, and UI_RADIAL_NONE.
Referenced by ui_but_isect_pie_seg(), ui_get_radialbut_vec(), and ui_pie_handler().
Definition at line 490 of file interface_query.cc.
References uiBut::prev, and ui_but_is_editable().
Referenced by ui_handle_menu_event().
Definition at line 3258 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, uiBut::rnaprop, and type.
Referenced by ui_handle_button_event().
Definition at line 3280 of file interface.cc.
References CLAMP, double(), e, uiBut::hardmax, uiBut::hardmin, CCL_NAMESPACE_BEGIN::isfinite(), 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, type, UI_BUT_POIN_TYPES, and ui_but_value_get().
Referenced by ui_but_update_ex(), and ui_handle_button_event().
Definition at line 705 of file interface.cc.
References Freestyle::a, usdtokens::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 710 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().
Definition at line 4514 of file interface.cc.
References BLI_assert, BLI_strdup(), uiBut::func_argN, 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().
Definition at line 4485 of file interface.cc.
References BLI_assert, BLI_strdup(), ELEM, uiBut::func_argN, 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 2389 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_refresh | ( | uiButSearch * | but | ) |
XXX weak: search_func adds all partial matches.
Definition at line 1000 of file interface_region_search.cc.
References uiBut::block, uiButSearch::but, uiBut::drawstr, uiBlock::evil_C, uiBut::hardmax, uiSearchItems::maxitem, uiSearchItems::maxstrlen, MEM_callocN, MEM_freeN, uiSearchItems::more, uiSearchItems::names, PROP_STRING, uiButSearch::results_are_suggestions, RNA_property_type(), uiBut::rnaprop, uiSearchItems::totitem, UI_but_flag_enable(), UI_BUT_REDALERT, UI_search_items_find_index(), and ui_searchbox_update_fn().
Referenced by UI_but_func_search_set().
Use handling code to set a string for the button. Handles the case where the string is set for a search button while the search menu is open, so the results are updated accordingly. This is basically the same as pasting the string into the button.
Definition at line 2949 of file interface_handlers.c.
References uiBut::active, BLI_assert, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_TEXT_EDITING, C, uiBut::changed, uiBut::flag, uiHandleButtonData::searchbox, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BUT_DISABLED, ui_searchbox_update(), and ui_textedit_string_set().
Referenced by drop_name_invoke(), and ui_but_paste_text().
bool ui_but_string_eval_number | ( | struct bContext * | C, |
const uiBut * | but, | ||
const char * | str, | ||
double * | value | ||
) |
Definition at line 3044 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().
Definition at line 2911 of file interface.cc.
References str, and ui_but_string_get_ex().
Referenced by ui_but_copy_text(), ui_but_update_ex(), 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_max_length returns 0).
r_str_size | size of the returned string (including terminator). |
Definition at line 2916 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, type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, and UNLIKELY.
Referenced by ui_textedit_begin().
void ui_but_string_get_ex | ( | uiBut * | but, |
char * | str, | ||
size_t | maxlen, | ||
int | float_precision, | ||
bool | use_exp_float, | ||
bool * | r_use_exp_float | ||
) |
float_precision | For number buttons the precision to use or -1 to fallback to the button default. |
use_exp_float | Use exponent representation of floats when out of reasonable range (outside of 1e3/1e-3). |
int ui_but_string_get_max_length | ( | uiBut * | but | ) |
Definition at line 2653 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_searchbox_autocomplete(), and ui_textedit_begin().
Definition at line 3098 of file interface.cc.
References BLI_assert, BLI_strncpy(), BLI_strncpy_utf8(), uiBut::block, C, uiBut::custom_data, PointerRNA::data, ELEM, uiBlock::evil_C, blender::math::floor(), uiBut::hardmax, uiBut::hardmin, uiButSearch::item_active, PointerRNA::owner_id, uiBut::poin, PointerRNA_NULL, PROP_ENUM, PROP_POINTER, PROP_STRING, ptr, RNA_pointer_create(), 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, 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().
Checks if the button supports cycling next/previous menu items (ctrl+mouse-wheel).
Definition at line 2484 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().
size_t ui_but_tip_len_only_first_line | ( | const uiBut * | but | ) |
Definition at line 580 of file interface_query.cc.
References uiBut::tip.
Referenced by ui_apply_but_undo().
Definition at line 3900 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_rgb(), uiDefBlockBut(), uiDefBlockButN(), uiDefBut(), uiDefButImage(), uiDefButO_ptr(), uiDefButR(), uiDefButR_prop(), uiDefIconBlockBut(), uiDefIconMenuBut(), uiDefIconTextBlockBut(), uiDefIconTextMenuBut(), uiDefMenuBut(), uiDefPulldownBut(), and uiDefSearchBut().
Definition at line 3905 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().
In some cases we may want to update the view (View2D) in-between layout definition and drawing. E.g. to make sure a button is visible while editing.
For buttons pointing to color for example.
Definition at line 2291 of file interface.cc.
References Freestyle::a, BLI_assert, copy_v3_v3(), uiBut::editvec, float(), min_ii(), normalize_v3(), uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_get_array(), RNA_property_float_get_index(), 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_but_drag_init(), ui_colorpicker_small_wheel_cb(), 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(), and widget_swatch().
For buttons pointing to color for example.
Definition at line 2338 of file interface.cc.
References Freestyle::a, BLI_assert, copy_v3_v3(), uiBut::editvec, min_ii(), uiBut::poin, uiBut::pointype, PROP_FLOAT, RNA_property_array_length(), RNA_property_float_set_array(), RNA_property_float_set_index(), 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_colorpicker_small_wheel_cb(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_numedit_but_HSVCIRCLE(), and ui_update_color_picker_buts_rgb().
Definition at line 2492 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_drag_start(), ui_but_range_set_soft(), ui_but_string_get_ex(), UI_but_string_info_get(), ui_colorpicker_create_mode_cb(), ui_multibut_add(), ui_numedit_begin_set_values(), widget_numslider(), and widget_scroll().
Definition at line 2557 of file interface.cc.
References uiBut::editval, float(), 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(), ui_multibut_restore(), and ui_update_color_picker_buts_rgb().
Definition at line 33 of file interface_button_group.c.
References BLI_addtail(), BLI_genericNodeN(), BLI_listbase_is_empty(), uiBlock::button_groups, uiButtonGroup::buttons, ListBase::last, and ui_block_new_button_group().
Referenced by ui_layout_add_but().
Definition at line 60 of file interface_button_group.c.
References uiBlock::button_groups, and LISTBASE_FOREACH.
Referenced by ui_but_change_type(), and ui_but_update_from_old_block().
Definition at line 90 of file interface_region_color_picker.cc.
References hsl_to_rgb_v(), hsv_to_rgb_v(), usdtokens::rgb(), and USER_CP_CIRCLE_HSL.
Referenced by ui_but_hsv_set(), ui_colorpicker_hsv_update_cb(), ui_colorpicker_small_wheel_cb(), ui_do_but_HSVCIRCLE(), ui_draw_but_HSVCIRCLE(), and ui_numedit_but_HSVCIRCLE().
Definition at line 78 of file interface_region_color_picker.cc.
References usdtokens::rgb(), rgb_to_hsl_v(), rgb_to_hsv_v(), and USER_CP_CIRCLE_HSL.
Referenced by ui_color_picker_update_hsv().
Definition at line 64 of file interface_region_color_picker.cc.
References usdtokens::rgb(), rgb_to_hsl_compat_v(), rgb_to_hsv_compat_v(), and USER_CP_CIRCLE_HSL.
Referenced by ui_color_picker_update_hsv(), ui_colorpicker_small_wheel_cb(), ui_do_but_HSVCIRCLE(), ui_draw_but_HSVCIRCLE(), and ui_numedit_but_HSVCIRCLE().
Definition at line 4244 of file interface.cc.
References uiBut::block, uiBut::drawflag, uiBlock::evil_C, 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(), template_add_button_search_menu(), 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(), uiDefIconTextBlockBut(), uiDefIconTextMenuBut(), uiDefSearchBut(), uiTemplateIcon(), and uiTemplateIconView().
Avoid using this where possible since it's better not to ask for an icon in the first place.
Definition at line 4259 of file interface.cc.
References uiBut::drawflag, uiBut::flag, uiBut::icon, UI_BUT_ICON_LEFT, and UI_HAS_ICON.
Referenced by uiItemFullR().
void ui_draw_aligned_panel | ( | const struct uiStyle * | style, |
const uiBlock * | block, | ||
const rcti * | rect, | ||
bool | show_pin, | ||
bool | show_background, | ||
bool | region_search_filter_active | ||
) |
Draw a panel integrated in buttons-window, tool/property lists etc.
Referenced by UI_block_draw().
void ui_draw_but | ( | const struct bContext * | C, |
struct ARegion * | region, | ||
struct uiStyle * | style, | ||
uiBut * | but, | ||
rcti * | rect | ||
) |
Conversion from old to new buttons, so still messy.
Referenced by UI_block_draw().
void ui_draw_but_COLORBAND | ( | uiBut * | but, |
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_CURVE | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_CURVEPROFILE | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
Draws the curve profile widget. Somewhat similar to ui_draw_but_CURVE.
void ui_draw_but_HISTOGRAM | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_IMAGE | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_TAB_outline | ( | const rcti * | rect, |
float | rad, | ||
uchar | highlight[3], | ||
uchar | highlight_fade[3] | ||
) |
Definition at line 183 of file interface_draw.c.
References Freestyle::a, col, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_LINE_STRIP, GPU_SHADER_2D_SMOOTH_COLOR, GPU_vertformat_attr_add(), immAttr3ubv(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), mul_v2_fl(), pos, roundboxtype, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by widget_tab().
void ui_draw_but_TRACKPREVIEW | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_UNITVEC | ( | uiBut * | but, |
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect, | ||
float | radius | ||
) |
void ui_draw_but_VECTORSCOPE | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_but_WAVEFORM | ( | struct ARegion * | region, |
uiBut * | but, | ||
const struct uiWidgetColors * | wcol, | ||
const rcti * | rect | ||
) |
void ui_draw_gradient | ( | const rcti * | rect, |
const float | hsv[3], | ||
eButGradientType | type, | ||
float | alpha | ||
) |
Draws in resolution of 48x4 colors.
Definition at line 3003 of file interface_widgets.c.
References Freestyle::a, BLI_assert_msg, BLI_rcti_size_x(), BLI_rcti_size_y(), col, color_step, copy_v3_v3(), float(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_SHADER_2D_SMOOTH_COLOR, GPU_vertformat_attr_add(), hsv_to_rgb(), immAttr4f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), pos, steps, sy, type, UI_GRAD_H, UI_GRAD_HS, UI_GRAD_HV, UI_GRAD_S, UI_GRAD_SV, UI_GRAD_V, v, rcti::xmin, and rcti::ymin.
Referenced by ui_draw_but_CURVE(), and ui_draw_but_HSVCUBE().
Referenced by hud_region_draw(), and UI_block_draw().
void ui_draw_menu_item | ( | const struct uiFontStyle * | fstyle, |
rcti * | rect, | ||
const char * | name, | ||
int | iconid, | ||
int | but_flag, | ||
uiMenuItemSeparatorType | separator_type, | ||
int * | r_xmax | ||
) |
Helper call to draw a menu item without a button.
but_flag | Button flags (uiBut.flag) indicating the state of the item, typically UI_ACTIVE, UI_BUT_DISABLED, UI_BUT_INACTIVE. |
separator_type | The kind of separator which controls if and how the string is clipped. |
r_xmax | The right hand position of the text, this takes into the icon, padding and text clipping when there is not enough room to display the full text. |
Referenced by ui_searchbox_region_draw_cb__operator(), and ui_searchbox_region_draw_fn().
Definition at line 5199 of file interface_widgets.c.
References angle(), atan2f, col, draw_disk_shaded(), PieMenuData::flags, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor4ubv(), immVertexFormat(), uiWidgetColors::inner, uiWidgetColors::inner_sel, M_PI, M_PI_2, M_PI_4, NULL, uiWidgetColors::outline, PieMenuData::pie_center_spawned, uiBlock::pie_data, PieMenuData::pie_dir, pos, shadecolors4(), uiWidgetColors::shaded, uiWidgetColors::shadedown, uiWidgetColors::shadetop, uiWidgetColors::text_sel, bTheme::tui, UI_GetTheme(), UI_PIE_CLICK_STYLE, UI_PIE_DEGREES_RANGE_LARGE, UI_PIE_INVALID_DIR, UNPACK3, and ThemeUI::wcol_pie_menu.
Referenced by UI_block_draw().
void ui_draw_popover_back | ( | struct ARegion * | region, |
struct uiStyle * | style, | ||
uiBlock * | block, | ||
rcti * | rect | ||
) |
Referenced by UI_block_draw().
void ui_draw_preview_item | ( | const struct uiFontStyle * | fstyle, |
rcti * | rect, | ||
const char * | name, | ||
int | iconid, | ||
int | but_flag, | ||
eFontStyle_Align | text_align | ||
) |
Referenced by ui_searchbox_region_draw_fn().
void ui_draw_preview_item_stateless | ( | const struct uiFontStyle * | fstyle, |
rcti * | rect, | ||
const char * | name, | ||
int | iconid, | ||
const uchar | text_col[4], | ||
eFontStyle_Align | text_align | ||
) |
Version of ui_draw_preview_item() that does not draw the menu background and item text based on state. It just draws the preview and text directly.
Referenced by ui_tooltip_region_draw_cb().
Definition at line 5349 of file interface_widgets.c.
References NULL, ui_draw_widget_back_color(), and UI_WTYPE_MENU_BACK.
Referenced by ui_searchbox_region_draw_cb__operator(), and ui_searchbox_region_draw_fn().
Definition at line 5344 of file interface_widgets.c.
References color, ui_draw_widget_back_color(), and UI_WTYPE_MENU_BACK.
Definition at line 2014 of file interface.cc.
Referenced by UI_block_draw(), UI_fontstyle_string_width_with_block_aspect(), UI_panel_category_draw_all(), ui_searchbox_create_generic_ex(), ui_textedit_set_cursor_pos(), and ui_tooltip_create_with_data().
void ui_handle_afterfunc_add_operator | ( | struct wmOperatorType * | ot, |
wmOperatorCallContext | opcontext | ||
) |
Definition at line 787 of file interface_handlers.c.
References NULL, uiAfterFunc::opcontext, ot, and ui_handle_afterfunc_add_operator_ex().
Referenced by panel_activate_state().
int ui_handler_panel_region | ( | struct bContext * | C, |
const struct wmEvent * | event, | ||
struct ARegion * | region, | ||
const uiBut * | active_but | ||
) |
Handle region panel events like opening and closing panels, changing categories, etc.
Referenced by ui_region_handler().
void ui_hsvcircle_pos_from_vals | ( | const ColorPicker * | cpicker, |
const rcti * | rect, | ||
const float * | hsv, | ||
float * | xpos, | ||
float * | ypos | ||
) |
Cursor in HSV circle, in float units -1 to 1, to map on radius.
Definition at line 2867 of file interface_widgets.c.
References BLI_rcti_cent_x_fl(), BLI_rcti_cent_y_fl(), BLI_rcti_size_x(), BLI_rcti_size_y(), clamp_f(), cosf, float(), M_PI, M_PI_2, min_ii(), pow3f(), sinf, ColorPicker::use_color_cubic, and USER_CP_CIRCLE_HSV.
Referenced by ui_draw_but_HSVCIRCLE(), and ui_numedit_but_HSVCIRCLE().
void ui_hsvcircle_vals_from_pos | ( | const rcti * | rect, |
float | mx, | ||
float | my, | ||
float * | r_val_rad, | ||
float * | r_val_dist | ||
) |
Definition at line 2853 of file interface_widgets.c.
References atan2f, BLI_rcti_cent_x_fl(), BLI_rcti_cent_y_fl(), BLI_rcti_size_x(), BLI_rcti_size_y(), float(), len_squared_v2(), m_delta, M_PI, min_ii(), and sqrtf.
Referenced by ui_draw_but_HSVCIRCLE(), and ui_numedit_but_HSVCIRCLE().
void ui_hsvcube_pos_from_vals | ( | const struct uiButHSVCube * | hsv_but, |
const rcti * | rect, | ||
const float * | hsv, | ||
float * | xp, | ||
float * | yp | ||
) |
Referenced by ui_numedit_but_HSVCUBE().
Definition at line 818 of file interface_query.cc.
References g_ot_tool_set_by_id.
Referenced by UI_interface_tag_script_reload().
Definition at line 2890 of file interface_layout.c.
References uiLayoutRoot::block, C, uiBlock::flag, uiLayout::root, UI_BLOCK_IS_FLIP, and UI_menutype_draw().
Referenced by UI_but_menutype_get(), ui_def_but_rna__menu_type(), and uiItemM_ptr().
Definition at line 2900 of file interface_layout.c.
References uiLayoutRoot::block, C, uiBlock::flag, uiLayout::root, UI_BLOCK_IS_FLIP, and UI_paneltype_draw().
Referenced by UI_but_paneltype_get(), ui_def_but_rna__panel_type(), UI_popover_panel_invoke(), and uiItemPopoverPanel_ptr().
Definition at line 1591 of file interface_ops.c.
References C, and jump_to_target_button().
Referenced by UI_OT_jump_to_target_button(), and ui_popup_context_menu_for_button().
Definition at line 5560 of file interface_layout.c.
References BLI_addtail(), uiButtonItem::but, uiLayout::child_items_layout, uiBut::context, uiLayout::context, uiBut::emboss, uiLayout::emboss, uiItem::flag, uiButtonItem::item, ITEM_BUTTON, uiLayout::items, uiBut::layout, MEM_callocN, uiBut::str, uiItem::type, ui_button_group_add_but(), UI_EMBOSS_UNDEFINED, UI_ITEM_FIXED_SIZE, ui_item_size(), UI_UNIT_X, uiLayoutGetBlock(), bContextStore::used, and w().
Referenced by ui_def_but().
Check all buttons defined in this layout, and set any button flagged as UI_BUT_LIST_ITEM as active/selected. Needed to handle correctly text colors of active (selected) list item.
Definition at line 4854 of file interface_layout.c.
References ITEM_BUTTON, uiLayout::items, LISTBASE_FOREACH, UI_but_flag_enable(), UI_BUT_LIST_ITEM, ui_layout_list_set_labels_active(), and UI_SELECT.
Referenced by ui_layout_list_set_labels_active(), and ui_template_list_layout_draw().
Definition at line 5618 of file interface_layout.c.
References BLI_freelinkN(), uiLayout::items, and ui_layout_find_button_item().
Referenced by UI_but_active_only_ex().
Definition at line 5628 of file interface_layout.c.
References uiButtonItem::but, and ui_layout_find_button_item().
Referenced by ui_but_change_type().
Referenced by ui_apply_but_LISTROW().
Referenced by ui_do_but_EXIT(), ui_handle_menus_recursive(), ui_popup_context_menu_for_button(), and ui_region_handler().
Referenced by ui_list_activate_row_from_index().
Referenced by ui_list_activate_hovered_row(), and ui_popup_context_menu_for_button().
void UI_OT_eyedropper_color | ( | struct wmOperatorType * | ot | ) |
Definition at line 538 of file eyedropper_color.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, eyedropper_cancel(), eyedropper_exec(), eyedropper_invoke(), eyedropper_modal(), eyedropper_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_colorramp | ( | struct wmOperatorType * | ot | ) |
Definition at line 329 of file eyedropper_colorband.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, eyedropper_colorband_cancel(), eyedropper_colorband_exec(), eyedropper_colorband_invoke(), eyedropper_colorband_modal(), eyedropper_colorband_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_colorramp_point | ( | struct wmOperatorType * | ot | ) |
Definition at line 349 of file eyedropper_colorband.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, eyedropper_colorband_cancel(), eyedropper_colorband_exec(), eyedropper_colorband_invoke(), eyedropper_colorband_point_modal(), eyedropper_colorband_poll(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_depth | ( | struct wmOperatorType * | ot | ) |
Definition at line 364 of file eyedropper_depth.c.
References wmOperatorType::cancel, depthdropper_cancel(), depthdropper_exec(), depthdropper_invoke(), depthdropper_modal(), depthdropper_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_driver | ( | struct wmOperatorType * | ot | ) |
Definition at line 197 of file eyedropper_driver.c.
References wmOperatorType::cancel, wmOperatorType::description, driverdropper_cancel(), driverdropper_exec(), driverdropper_invoke(), driverdropper_modal(), driverdropper_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_driver_create_mapping_types, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_gpencil_color | ( | struct wmOperatorType * | ot | ) |
Definition at line 353 of file eyedropper_gpencil_color.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, eyedropper_gpencil_cancel(), eyedropper_gpencil_exec(), eyedropper_gpencil_invoke(), eyedropper_gpencil_modal(), eyedropper_gpencil_poll(), wmOperatorType::flag, GP_EYE_MATERIAL, GP_EYE_PALETTE, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, NULL, OPTYPE_BLOCKING, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_ui().
void UI_OT_eyedropper_id | ( | struct wmOperatorType * | ot | ) |
Definition at line 360 of file eyedropper_datablock.c.
References wmOperatorType::cancel, datadropper_cancel(), datadropper_exec(), datadropper_invoke(), datadropper_modal(), datadropper_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_ui().
Assumes event type is MOUSEPAN.
Definition at line 863 of file interface_panel.c.
References PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by UI_block_apply_search_filter().
Definition at line 124 of file interface_region_color_picker.cc.
References IMB_colormanagement_color_picking_to_scene_linear_v3(), usdtokens::rgb(), ui_but_is_color_gamma(), and ui_color_picker_rgb_round().
Referenced by ui_colorpicker_small_wheel_cb(), ui_draw_but_HSVCIRCLE(), ui_numedit_but_HSVCIRCLE(), and ui_numedit_but_HSVCUBE().
void ui_pie_menu_level_create | ( | uiBlock * | block, |
struct wmOperatorType * | ot, | ||
const char * | propname, | ||
struct IDProperty * | properties, | ||
const EnumPropertyItem * | items, | ||
int | totitem, | ||
wmOperatorCallContext | context, | ||
wmOperatorCallContext | flag | ||
) |
Set up data for defining a new pie menu level and add button that invokes it.
Definition at line 358 of file interface_region_menu_pie.cc.
References BLI_strncpy(), blender::compositor::context, PieMenuLevelData::context, PieMenuLevelData::flag, MEM_mallocN, PieMenuLevelData::ot, ot, uiBlock::pie_data, PIE_MAX_ITEMS, PieMenuLevelData::properties, PieMenuLevelData::propname, PieMenuData::title, PieMenuLevelData::title, PieMenuLevelData::totitem, UI_BTYPE_BUT, UI_but_funcN_set(), UI_MAX_NAME_STR, ui_pie_menu_level_invoke(), UI_UNIT_X, UI_UNIT_Y, and uiDefIconTextBut().
Referenced by uiItemsFullEnumO_items().
uiPopupBlockHandle* ui_popover_panel_create | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiBut * | but, | ||
uiMenuCreateFunc | menu_func, | ||
void * | arg | ||
) |
Definition at line 230 of file interface_region_popover.cc.
References uiPopover::but, C, uiPopupBlockHandle::can_refresh, CTX_wm_window(), wmWindow::eventstate, float(), uiPopover::is_once, KM_PRESS, LEFTMOUSE, MAX2, uiPopover::menu_arg, uiPopover::menu_func, wmWindow::modalhandlers, uiFontStyle::points, uiPopupBlockHandle::popup, ui_block_free_func_POPOVER(), ui_block_func_POPOVER(), UI_DEFAULT_TEXT_POINTS, UI_POPOVER_WIDTH_UNITS, ui_popup_block_create(), UI_popup_handlers_add(), uiPopover::ui_size_x, UI_style_get_dpi(), PanelType::ui_units_x, uiStyle::widget, uiStyle::widgetlabel, and WM_event_add_mousemove().
Referenced by ui_block_open_begin(), and UI_popover_panel_invoke().
uiPopupBlockHandle* ui_popup_block_create | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiBut * | but, | ||
uiBlockCreateFunc | create_func, | ||
uiBlockHandleCreateFunc | handle_create_func, | ||
void * | arg, | ||
uiFreeArgFunc | arg_free | ||
) |
Definition at line 749 of file interface_region_popup.cc.
References uiPopupBlockCreate::arg, uiPopupBlockCreate::arg_free, uiBlock::bounds_type, uiPopupBlockCreate::but, uiPopupBlockCreate::butregion, C, uiPopupBlockHandle::can_refresh, copy_v2_v2_int(), create_func(), uiPopupBlockCreate::create_func, uiPopupBlockHandle::ctx_area, uiPopupBlockHandle::ctx_region, CTX_wm_area(), CTX_wm_region(), CTX_wm_screen(), CTX_wm_window(), uiPopupBlockCreate::event_xy, wmWindow::eventstate, uiBlock::handle, uiPopupBlockCreate::handle_create_func, ARegion::handlers, uiPopupBlockHandle::popup_create_vars, uiPopupBlockHandle::region, RGN_TYPE_TEMPORARY, type, ARegion::type, UI_BLOCK_BOUNDS_POPUP_CENTER, ui_block_region_draw(), ui_block_region_popup_window_listener(), ui_block_region_refresh(), UI_but_tooltip_timer_remove(), UI_context_active_but_get(), ui_popup_block_refresh(), UI_region_handlers_add(), ui_region_temp_add(), WM_CURSOR_DEFAULT, WM_cursor_set(), and wmEvent::xy.
Referenced by ui_block_open_begin(), UI_pie_menu_end(), UI_popover_end(), ui_popover_panel_create(), UI_popup_block_ex(), UI_popup_block_invoke_ex(), ui_popup_menu_create(), and UI_popup_menu_end().
void ui_popup_block_free | ( | struct bContext * | C, |
uiPopupBlockHandle * | handle | ||
) |
Definition at line 812 of file interface_region_popup.cc.
References uiPopupBlockCreate::arg, uiPopupBlockCreate::arg_free, uiPopupBlockCreate::butregion, C, LISTBASE_FOREACH, MEM_freeN, uiPopupBlockHandle::menuretval, uiPopupBlockHandle::popup_create_vars, UI_BLOCK_KEEP_OPEN, UI_BLOCK_POPOVER, ui_popup_block_remove(), UI_RETURN_OK, and ARegion::uiblocks.
Referenced by ui_block_open_end(), UI_popup_block_close(), ui_popup_handler(), and ui_popup_handler_remove().
uiBlock* ui_popup_block_refresh | ( | struct bContext * | C, |
uiPopupBlockHandle * | handle, | ||
struct ARegion * | butregion, | ||
uiBut * | but | ||
) |
Called for creating new popups and refreshing existing ones.
Definition at line 538 of file interface_region_popup.cc.
References uiPopupBlockCreate::arg, uiBlock::aspect, BLI_addhead(), BLI_assert, BLI_rctf_recenter(), BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, uiBlock::bounds_type, uiBlock::buttons, C, uiPopupBlockHandle::can_refresh, copy_v2_v2(), create_func(), uiPopupBlockCreate::create_func, CTX_wm_window(), uiBlock::direction, uiPopupBlockHandle::direction, ED_region_floating_init(), ED_region_tag_redraw(), ED_region_update_rect(), ELEM, uiBlock::endblock, wmWindow::event_last_handled, uiPopupBlockCreate::event_xy, wmWindow::eventstate, ListBase::first, uiBlock::flag, PieMenuData::flags, uiBlock::handle, uiPopupBlockCreate::handle_create_func, LISTBASE_FOREACH, MEM_freeN, offset, uiBlock::oldblock, PieMenuData::pie_center_init, PieMenuData::pie_center_spawned, uiBlock::pie_data, uiPopupBlockHandle::popup_create_vars, uiPopupBlockHandle::prev_block_rect, uiBlock::rect, uiPopupBlockHandle::refresh, uiPopupBlockHandle::region, ARegion::regiondata, uiBlock::saferct, uiBlock::safety, uiSafetyRct::safety, uiPopupBlockHandle::scrolloffset, UI_BLOCK_BOUNDS_POPUP_CENTER, ui_block_calc_pie_segment(), UI_block_end_ex(), UI_BLOCK_LOOP, UI_BLOCK_POPOVER, UI_BLOCK_POPUP, UI_BLOCK_RADIAL, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), UI_block_translate(), UI_block_update_from_old(), UI_blocklist_free_inactive(), UI_DIR_DOWN, UI_DIR_UP, UI_PIE_INITIAL_DIRECTION, ui_popup_block_clip(), ui_popup_block_position(), ui_popup_block_scrolltest(), UI_POPUP_MARGIN, UI_POPUP_MENU_TOP, UI_RADIAL_NONE, UI_SCREEN_MARGIN, ARegion::uiblocks, UNPACK2, uiBlock::winmat, ARegion::winrct, WM_window_pixels_x(), WM_window_pixels_y(), wmGetProjectionMatrix(), rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_block_region_refresh(), and ui_popup_block_create().
Definition at line 457 of file interface_region_popup.cc.
References uiBlock::buttons, ListBase::first, uiBlock::flag, ListBase::last, LISTBASE_FOREACH, uiBlock::rect, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, UI_MENU_SCROLL_ARROW, UI_SCROLLED, rctf::ymax, and rctf::ymin.
Referenced by ui_menu_scroll_apply_offset_y(), and ui_popup_block_refresh().
bool ui_popup_context_menu_for_button | ( | struct bContext * | C, |
uiBut * | but, | ||
const struct wmEvent * | event | ||
) |
void ui_popup_context_menu_for_panel | ( | struct bContext * | C, |
struct ARegion * | region, | ||
struct Panel * | panel | ||
) |
menu to show when right clicking on the panel header
Definition at line 1269 of file interface_context_menu.c.
References BLI_snprintf(), uiBlock::buttons, C, CTX_wm_screen(), uiBut::flag, bScreen::id, IFACE_, ListBase::last, NULL, PanelType::parent, ptr, RNA_pointer_create(), Panel::type, UI_BUT_HAS_SEP_CHAR, UI_panel_can_be_pinned(), UI_panel_category_is_visible(), UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), UI_SEP_CHAR_S, uiItemR(), and uiLayoutGetBlock().
Referenced by ui_handler_panel_region().
uiPopupBlockHandle* ui_popup_menu_create | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiBut * | but, | ||
uiMenuCreateFunc | menu_func, | ||
void * | arg | ||
) |
Definition at line 316 of file interface_region_menu_popup.cc.
References uiBut::block, uiPopupMenu::block, uiPopupMenu::but, C, uiBut::context, CTX_wm_window(), wmWindow::eventstate, uiBlock::flag, uiPopupMenu::layout, MEM_freeN, uiPopupMenu::menu_arg, uiPopupMenu::menu_func, wmWindow::modalhandlers, uiPopupMenu::mx, uiPopupMenu::my, uiPopupBlockHandle::popup, uiPopupMenu::popup, PROP_ENUM, RNA_property_type(), uiBut::rnaprop, uiPopupMenu::slideout, UI_block_begin(), ui_block_func_POPUP(), ui_block_is_menu(), UI_block_layout(), UI_BLOCK_NO_FLIP, UI_BLOCK_NUMSELECT, UI_EMBOSS_PULLDOWN, UI_LAYOUT_MENU, UI_LAYOUT_VERTICAL, UI_MENU_PADDING, ui_popup_block_create(), UI_popup_handlers_add(), UI_style_get_dpi(), uiLayoutContextCopy(), uiLayoutSetOperatorContext(), WM_event_add_mousemove(), WM_OP_INVOKE_REGION_WIN, and wmEvent::xy.
Referenced by ui_block_open_begin().
Definition at line 147 of file interface_region_menu_popup.cc.
References ui_popup_menu_memory__internal().
Referenced by ui_block_func_POPUP().
Definition at line 152 of file interface_region_menu_popup.cc.
References ui_popup_menu_memory__internal().
Referenced by button_activate_exit().
Translate any popup regions (so we can drag them).
Definition at line 40 of file interface_region_popup.cc.
References BLI_rctf_init(), BLI_rctf_translate(), BLI_rcti_translate(), ED_region_tag_redraw(), ED_region_update_rect(), LISTBASE_FOREACH, uiPopupBlockHandle::prev_block_rect, ARegion::uiblocks, UNPACK2, and ARegion::winrct.
Referenced by ui_handle_menu_event().
Referenced by ui_handle_button_event(), and ui_handle_menu_button().
Definition at line 707 of file interface_query.cc.
References LISTBASE_FOREACH, ui_block_active_but_get(), and ARegion::uiblocks.
Referenced by button_activate_init(), drop_color_invoke(), UI_but_active_drop_color(), UI_but_active_drop_name_button(), UI_but_active_only_ex(), ui_but_pie_button_activate(), ui_but_pie_menu_apply(), ui_handle_button_activate(), ui_handle_menu_button(), ui_handle_menu_event(), ui_handle_menu_return_submenu(), ui_handle_menus_recursive(), ui_handler_panel_region(), ui_handler_region_menu(), ui_pie_handler(), ui_region_handler(), and UI_screen_free_active_but_highlight().
uiBut* ui_region_find_first_but_test_flag | ( | struct ARegion * | region, |
int | flag_include, | ||
int | flag_exclude | ||
) |
Definition at line 719 of file interface_query.cc.
References uiBut::flag, LISTBASE_FOREACH, and ARegion::uiblocks.
Referenced by ui_handle_menu_event().
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 342 of file interface.cc.
References BLI_rcti_rctf_copy_floor(), BLI_rcti_translate(), ListBase::first, uiBlock::flag, uiBlock::rect, UI_BLOCK_LOOP, UI_BLOCK_RADIAL, ARegion::uiblocks, 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_rna_collection_search_update_fn | ( | const struct bContext * | C, |
void * | arg, | ||
const char * | str, | ||
uiSearchItems * | items, | ||
bool | is_first | ||
) |
Referenced by jump_to_target_button(), template_search_menu(), ui_but_add_search(), and ui_popup_context_menu_for_button().
Definition at line 113 of file interface_region_color_picker.cc.
References IMB_colormanagement_scene_linear_to_color_picking_v3(), usdtokens::rgb(), ui_but_is_color_gamma(), and ui_color_picker_rgb_round().
Referenced by ui_color_picker_update_hsv(), ui_colorpicker_small_wheel_cb(), ui_draw_but_HSV_v(), ui_draw_but_HSVCIRCLE(), ui_draw_but_HSVCUBE(), ui_numedit_but_HSVCIRCLE(), and ui_numedit_but_HSVCUBE().
struct ARegion struct ARegion* ui_screen_region_find_mouse_over | ( | struct bScreen * | screen, |
const struct wmEvent * | event | ||
) |
Referenced by ui_handler_region_menu().
Check if the cursor is over any popups.
String validated to be of correct length (but->hardmax).
Definition at line 272 of file interface_region_search.cc.
References BLI_assert, BLI_strncpy(), data, uiBut::editstr, uiBut::hardmax, uiButSearch::item_active, ARegion::regiondata, uiBut::type, UI_BTYPE_SEARCH_MENU, and UI_SEP_CHAR.
Referenced by ui_textedit_end().
int ui_searchbox_autocomplete | ( | struct bContext * | C, |
struct ARegion * | region, | ||
uiBut * | but, | ||
char * | str | ||
) |
Definition at line 522 of file interface_region_search.cc.
References AUTOCOMPLETE_NO_MATCH, BLI_assert, C, data, uiBut::editstr, ARegion::regiondata, str, uiBut::type, UI_autocomplete_begin(), UI_autocomplete_end(), UI_BTYPE_SEARCH_MENU, ui_but_string_get_max_length(), and ui_searchbox_update_fn().
Referenced by ui_textedit_autocomplete().
struct ARegion* ui_searchbox_create_generic | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiButSearch * | search_but | ||
) |
Search-box for string button.
Definition at line 861 of file interface_region_search.cc.
References C, and ui_searchbox_create_generic_ex().
Referenced by template_common_search_menu(), ui_but_add_search(), UI_but_func_search_set(), and uiDefSearchButO_ptr().
struct ARegion* ui_searchbox_create_menu | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiButSearch * | search_but | ||
) |
Definition at line 989 of file interface_region_search.cc.
References C, ARegionType::draw, ARegion::type, ui_searchbox_create_generic_ex(), and ui_searchbox_region_draw_cb__menu().
Referenced by UI_but_func_menu_search().
struct ARegion* ui_searchbox_create_operator | ( | struct bContext * | C, |
struct ARegion * | butregion, | ||
uiButSearch * | search_but | ||
) |
Definition at line 970 of file interface_region_search.cc.
References C, ARegionType::draw, ARegion::type, ui_searchbox_create_generic_ex(), and ui_searchbox_region_draw_cb__operator().
Referenced by UI_but_func_operator_search().
bool ui_searchbox_event | ( | struct bContext * | C, |
struct ARegion * | region, | ||
uiBut * | but, | ||
struct ARegion * | butregion, | ||
const struct wmEvent * | event | ||
) |
Referenced by ui_do_but_textedit().
Definition at line 259 of file interface_region_search.cc.
References data, ARegion::regiondata, and UI_search_items_find_index().
Referenced by ui_textedit_end().
Definition at line 979 of file interface_region_search.cc.
References C, CTX_wm_screen(), and ui_region_temp_remove().
Referenced by ui_textedit_end().
x and y in screen-coords.
Referenced by ui_do_but_textedit().
Region is the search box itself.
Definition at line 444 of file interface_region_search.cc.
References Freestyle::a, BLI_assert, uiButSearch::but, C, uiBut::changed, data, ED_region_tag_redraw(), uiBut::editstr, uiButSearch::item_active, uiButSearch::items_update_fn, ARegion::regiondata, reset, STREQLEN, uiBut::type, UI_BTYPE_SEARCH_MENU, ui_searchbox_select(), ui_searchbox_update_fn(), and UI_SEP_CHAR.
Referenced by ui_but_set_string_interactive(), ui_do_but_textedit(), ui_searchbox_select(), and ui_textedit_begin().
struct ID* ui_template_id_liboverride_hierarchy_make | ( | struct bContext * | C, |
struct Main * | bmain, | ||
struct ID * | owner_id, | ||
struct ID * | id, | ||
const char ** | r_undo_push_label | ||
) |
Definition at line 661 of file interface_templates.c.
References BKE_collection_has_collection(), BKE_collection_has_object_recursive(), BKE_lib_override_library_create(), BKE_lib_override_library_get(), BKE_lib_override_library_id_reset(), BKE_scene_collections_object_remove(), C, Main::collections, CTX_data_active_object(), CTX_data_collection(), CTX_data_scene(), CTX_data_view_layer(), IDOverrideLibrary::flag, GS, id, Collection::id, Object::id, ID_AR, ID_CA, ID_CU_LEGACY, ID_CV, ID_GD, ID_GR, ID_IM, ID_IS_LINKED, ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY, ID_IS_OVERRIDE_LIBRARY, ID_IS_OVERRIDE_LIBRARY_REAL, ID_LA, ID_LT, ID_MA, ID_MB, ID_ME, ID_NT, ID_OB, ID_PA, ID_PT, ID_SPK, ID_TE, ID_VO, ID_WO, IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED, Object::instance_collection, ID::lib, LIB_TAG_DOIT, LISTBASE_FOREACH, NA_ADDED, NA_REMOVED, ID::name, NC_ID, NC_SPACE, NC_WM, ND_DATACHANGED, ND_LIB_OVERRIDE_CHANGED, ND_SPACE_OUTLINER, ND_SPACE_VIEW3D, NULL, ID::override_library, RNA_warning, scene, ID::tag, template_id_liboverride_hierarchy_collection_root_find_recursive(), template_id_liboverride_hierarchy_collections_tag_recursive(), and WM_event_add_notifier().
Referenced by override_idtemplate_make_exec(), and template_id_liboverride_hierarchy_make().
const char* ui_textedit_undo | ( | struct uiUndoStack_Text * | undo_stack, |
int | direction, | ||
int * | r_cursor_index | ||
) |
Definition at line 69 of file interface_undo.c.
References BLI_assert, ELEM, ui_textedit_redo_impl(), and ui_textedit_undo_impl().
Referenced by ui_do_but_textedit().
void ui_textedit_undo_push | ( | struct uiUndoStack_Text * | undo_stack, |
const char * | text, | ||
int | cursor_index | ||
) |
Push the information in the arguments to a new state in the undo stack.
Definition at line 78 of file interface_undo.c.
References BLI_addtail(), BLI_remlink(), uiUndoStack_Text::current, uiUndoStack_Text_State::cursor_index, MEM_freeN, MEM_mallocN, uiUndoStack_Text_State::next, NULL, state, uiUndoStack_Text::states, and uiUndoStack_Text_State::text.
Referenced by ui_do_but_textedit(), and ui_textedit_begin().
struct uiUndoStack_Text* ui_textedit_undo_stack_create | ( | void | ) |
Start the undo stack.
Definition at line 97 of file interface_undo.c.
References BLI_listbase_clear(), uiUndoStack_Text::current, MEM_mallocN, NULL, and uiUndoStack_Text::states.
Referenced by ui_textedit_begin().
void ui_textedit_undo_stack_destroy | ( | struct uiUndoStack_Text * | undo_stack | ) |
Definition at line 106 of file interface_undo.c.
References BLI_freelistN(), MEM_freeN, and uiUndoStack_Text::states.
Referenced by ui_textedit_end().
const struct uiWidgetColors* ui_tooltip_get_theme | ( | void | ) |
Definition at line 5306 of file interface_widgets.c.
References UI_WTYPE_TOOLTIP, uiWidgetType::wcol_theme, and widget_type().
Referenced by ui_tooltip_region_draw_cb().
struct uiListType* UI_UL_asset_view | ( | void | ) |
Definition at line 134 of file interface_template_asset_view.cc.
References asset_view_draw_item(), asset_view_listener(), BLI_strncpy(), uiListType::draw_item, uiListType::idname, uiListType::listener, and MEM_callocN.
Referenced by ED_uilisttypes_ui().
struct uiListType* UI_UL_cache_file_layers | ( | void | ) |
Definition at line 6911 of file interface_templates.c.
References BLI_strncpy(), cache_file_layer_item(), uiListType::draw_item, uiListType::idname, and MEM_callocN.
Referenced by ED_uilisttypes_ui().
Referenced by UI_region_views_find_active_item().
For mouse cursor.
void ui_window_to_block_rctf | ( | const struct ARegion * | region, |
uiBlock * | block, | ||
rctf * | rct_dst, | ||
const rctf * | rct_src | ||
) |
Definition at line 218 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_rctf | ( | const struct ARegion * | region, |
rctf * | rect_dst, | ||
const rctf * | rct_src | ||
) |
void ui_window_to_region_rcti | ( | const struct ARegion * | region, |
rcti * | rect_dst, | ||
const rcti * | rct_src | ||
) |
Called on each startup.blend read, reading without uiFont will create one.
Second for rendering else we get threading problems,
Definition at line 375 of file interface_style.cc.
References BLF_cache_flush_set_fn(), BLF_default_set(), BLF_default_size(), BLF_disable(), BLF_enable(), BLF_HINTING_FULL, BLF_HINTING_NONE, BLF_HINTING_SLIGHT, BLF_load(), BLF_load_default(), BLF_load_font_stack(), BLF_load_mono_default(), BLF_load_unique(), blf_mono_font, blf_mono_font_render, BLF_MONOCHROME, BLF_unload_all(), BLI_addtail(), BLI_assert, BLI_strncpy(), CLAMP, uiFont::filepath, G, G_DEBUG, LISTBASE_FOREACH, uiFontStyle::points, ui_style_new(), UI_widgetbase_draw_cache_flush(), UIFONT_CUSTOM1, UIFONT_DEFAULT, uiFont::uifont_id, USER_TEXT_DISABLE_AA, USER_TEXT_HINTING_FULL, USER_TEXT_HINTING_NONE, USER_TEXT_HINTING_SLIGHT, and uiStyle::widgetlabel.
Referenced by UI_init_userdef(), UI_reinit_font(), and UI_style_init_default().
bool ATTR_WARN_UNUSED_RESULT |
Definition at line 1388 of file interface_intern.h.
|
extern |
Definition at line 296 of file interface_widgets.c.
|
extern |
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
Definition at line 1544 of file interface.cc.
Referenced by ui_get_radialbut_vec().
|
extern |
Definition at line 1556 of file interface.cc.
Referenced by ui_but_pie_dir().
|
extern |
Definition at line 1555 of file interface.cc.
Referenced by ui_but_pie_direction_string().