81 (but->
tip ==
nullptr || but->
tip[0] ==
'\0'))
111 if (!
static_cast<const ButtonText *
>(but)->use_label_style) {
139#ifdef USE_UI_POPOVER_ONCE
155 if (but->
optype !=
nullptr) {
181 return ICON_PREVIEW_LOADING;
217 const float angle_8th_cos = 0.9238795f;
220 const float eps_bias = 1
e-4;
227 if (angle_but_cos < angle_4th_cos - eps_bias) {
231 if (angle_but_cos > angle_8th_cos + eps_bias) {
246 const bool has_8th_adjacent = block->
pie_data->pie_dir_mask & (1 << int(dir_adjacent_8th));
249 const RadialDirection dir_adjacent = has_8th_adjacent ? dir_adjacent_8th : dir_adjacent_4th;
250 float but_dir_adjacent[2];
253 const float angle_adjacent_cos =
dot_v2v2(but_dir_adjacent, block->
pie_data->pie_dir);
256 if (angle_but_cos == angle_adjacent_cos) [[unlikely]] {
257 return but->
pie_dir > dir_adjacent;
259 return angle_but_cos > angle_adjacent_cos;
284 float mx = xy[0], my = xy[1];
302 int x =
event->xy[0],
y =
event->xy[1];
316 rect.
xmin += delta / 2;
317 rect.
xmax -= delta / 2;
325 const void *find_custom_data)
329 if (find_poll && find_poll(&but, find_custom_data) ==
false) {
341 const bool labeledit,
342 const bool for_tooltip,
344 const void *find_custom_data)
346 Button *butover =
nullptr;
352 float mx = xy[0], my = xy[1];
361 if (find_poll && find_poll(&but, find_custom_data) ==
false) {
403 const bool labeledit =
true;
406 Button *butover =
nullptr;
440 float mx = xy[0], my = xy[1];
454 if (event ==
nullptr) {
507 data.listbox = listbox;
527 const auto *view_item_but =
static_cast<const ButtonViewItem *
>(but);
528 return (!view || &view_item_but->view_item->get_view() == view) &&
541 [](
const Button *but,
const void * ) {
546 const auto *view_item_but =
static_cast<const ButtonViewItem *
>(but);
634 if (sep_index != std::string::npos) {
649 if (but->
tip ==
nullptr) {
772 float mx = xy[0], my = xy[1];
810 if (((but.flag & flag_include) == flag_include) && ((but.flag & flag_exclude) == 0)) {
840 int mx = xy[0], my = xy[1];
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
static constexpr int64_t not_found
constexpr int64_t size() const
constexpr int64_t find(char c, int64_t pos=0) const
bool is_interactive() const
bool is_search_highlight() const
#define UI_RADIAL_DIRECTION_NEXT(dir)
#define UI_RADIAL_DIRECTION_PREV(dir)
#define UI_MENU_SCROLL_MOUSE
size_t button_drawstr_len_without_sep_char(const Button *but)
bool region_contains_rect_px(const ARegion *region, const rcti *rect_px)
Button * block_active_but_get(const Block *block)
Block Block * block_find_mouse_over(const ARegion *region, const wmEvent *event, bool only_clip)
Button * button_prev(Button *but) ATTR_WARN_UNUSED_RESULT
int button_icon(const Button *but)
bool but_contains_point_px_icon(const Button *but, ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
bool icon_is_preview_deferred_loading(const int icon_id, const bool big)
bool button_contains_pt(const Button *but, float mx, float my) ATTR_WARN_UNUSED_RESULT
bool but_contains_password(const Button *but) ATTR_WARN_UNUSED_RESULT
bool button_rna_equals(const Button *a, const Button *b)
bool button_is_interactive_ex(const Button *but, const bool labeledit, const bool for_tooltip)
void window_to_block_rctf(const ARegion *region, const Block *block, rctf *rct_dst, const rctf *rct_src)
Button * view_item_find_mouse_over(const ARegion *region, const int xy[2]) ATTR_NONNULL(1
static bool but_is_active_view_item(const Button *but, const void *view)
Button * view_item_find_search_highlight(const ARegion *region)
Button * listbox_find_mouse_over_ex(const ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool but_has_quick_tooltip(const Button *but)
bool region_contains_point_px(const ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool button_is_toggle(const Button *but) ATTR_WARN_UNUSED_RESULT
bool button_contains_rect(const Button *but, const rctf *rect)
bool button_is_cursor_warp(const Button *but) ATTR_WARN_UNUSED_RESULT
ARegion * screen_region_find_mouse_over_ex(bScreen *screen, const int xy[2]) ATTR_NONNULL(1
void button_pie_dir(RadialDirection dir, float vec[2])
Button * but_find_mouse_over(const ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
uiList * uilist_find_mouse_over(const ARegion *region, const wmEvent *event)
Button * region_find_first_but_test_flag(ARegion *region, int64_t flag_include, int64_t flag_exclude)
void window_to_block(const ARegion *region, const Block *block, int *x, int *y)
static const Button * but_next_non_separator(const Button *but)
bool block_can_add_separator(const Block *block)
char char view2d_mouse_in_scrollers(const ARegion *region, const View2D *v2d, const int xy[2]) ATTR_NONNULL(1
Button * region_find_active_but(ARegion *region) ATTR_WARN_UNUSED_RESULT
size_t button_tip_len_only_first_line(const Button *but)
bool block_is_menu(const Block *block) ATTR_WARN_UNUSED_RESULT
void interface_tag_script_reload_queries()
bool but_is_utf8(const Button *but)
static bool but_is_listrow_at_index(const Button *but, const void *customdata)
static bool but_is_listrow(const Button *but, const void *)
static wmOperatorType * g_ot_tool_set_by_id
bool block_has_active_default_button(const Block *block)
Button * button_find_mouse_over_ex(const ARegion *region, const int xy[2], bool labeledit, bool for_tooltip, const ButtonFindPollFn find_poll, const void *find_custom_data) ATTR_NONNULL(1
ARegion ARegion * screen_region_find_mouse_over(bScreen *screen, const wmEvent *event)
static bool but_isect_pie_seg(const Block *block, const Button *but)
bool block_is_popover(const Block *block) ATTR_WARN_UNUSED_RESULT
bool(*)(const Button *but, const void *customdata) ButtonFindPollFn
void window_to_region(const ARegion *region, int *x, int *y)
Button Button * view_item_find_active(const ARegion *region, const AbstractView *view=nullptr)
Button * listrow_find_index(const ARegion *region, int index, Button *listbox) ATTR_WARN_UNUSED_RESULT
Button * listrow_find_mouse_over(const ARegion *region, const int xy[2]) ATTR_NONNULL(1
void region_winrct_get_no_margin(const ARegion *region, rcti *r_rect)
bool block_is_pie_menu(const Block *block) ATTR_WARN_UNUSED_RESULT
bool button_is_editable(const Button *but) ATTR_WARN_UNUSED_RESULT
Button * button_first(Block *block) ATTR_WARN_UNUSED_RESULT
static bool but_is_view_item_fn(const Button *but, const void *)
void window_to_region_rcti(const ARegion *region, rcti *rect_dst, const rcti *rct_src)
bool block_is_empty_ex(const Block *block, bool skip_title)
static bool listbox_contains_listrow(const Button *listbox_but, const Button *listrow_but)
bool button_has_array_value(const Button *but) ATTR_WARN_UNUSED_RESULT
bool button_is_interactive(const Button *but, bool labeledit) ATTR_WARN_UNUSED_RESULT
bool button_drag_is_draggable(const Button *but)
Button * button_last(Block *block) ATTR_WARN_UNUSED_RESULT
static Button * but_find(const ARegion *region, const ButtonFindPollFn find_poll, const void *find_custom_data)
bool button_opens_link(const Button *button)
bool block_is_empty(const Block *block)
Button * listbox_find_mouse_over(const ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Button * button_find_rect_over(const ARegion *region, const rcti *rect_px) ATTR_WARN_UNUSED_RESULT
bool button_contains_point_px(const Button *but, const ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool button_is_editable_as_text(const Button *but) ATTR_WARN_UNUSED_RESULT
bool button_is_popover_once_compat(const Button *but) ATTR_WARN_UNUSED_RESULT
void window_to_block_fl(const ARegion *region, const Block *block, float *x, float *y)
char char char char view2d_rect_in_scrollers(const ARegion *region, const View2D *v2d, const rcti *rect) ATTR_NONNULL(1
const short radial_dir_to_angle[8]
bool block_is_popup_any(const Block *block) ATTR_WARN_UNUSED_RESULT
StringRef button_drawstr_without_sep_char(const Button *but) ATTR_NONNULL()
const Button * block_active_default_button_find(const Block *block)
bool but_is_tool(const Button *but)
Button * button_next(Button *but) ATTR_WARN_UNUSED_RESULT
Block * block_find_mouse_over_ex(const ARegion *region, const int xy[2], bool only_clip) ATTR_NONNULL(1
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bool BLI_rcti_isect(const struct rcti *src1, const struct rcti *src2, struct rcti *dest)
void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src)
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT
bool RNA_property_string_is_utf8(PropertyRNA *prop)
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
bool RNA_property_array_check(PropertyRNA *prop)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BMesh const char void * data
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
bool BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2])
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
void BLI_rctf_pad(struct rctf *rect, float pad_x, float pad_y)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
bke::ARegionRuntime * runtime
ListBaseT< ARegion > regionbase
ListBaseT< ui::Block > uiblocks
Button * last_but() const
int but_index(const Button *but) const
Button * first_but() const
std::ranges::transform_view< std::ranges::ref_view< const Vector< std::unique_ptr< Button > > >, Button &(*)(const std::unique_ptr< Button > &)> buttons() const
Button * next_but(const Button *but) const
std::unique_ptr< PieMenuData > pie_data
wmEventModifierFlag modifier