Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_region_tooltip.c
| Show First 20 Lines • Show All 1,460 Lines • ▼ Show 20 Lines | ARegion *UI_tooltip_create_from_button_or_extra_icon( | ||||
| } | } | ||||
| ARegion *region = ui_tooltip_create_with_data( | ARegion *region = ui_tooltip_create_with_data( | ||||
| C, data, init_position, is_no_overlap ? &init_rect : NULL, aspect); | C, data, init_position, is_no_overlap ? &init_rect : NULL, aspect); | ||||
| return region; | return region; | ||||
| } | } | ||||
| /** | |||||
| * \param is_label: When true, show a small tip that only shows the name, otherwise show the full | |||||
| * tooltip. | |||||
| */ | |||||
| ARegion *UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but, bool is_label) | ARegion *UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but, bool is_label) | ||||
| { | { | ||||
| return UI_tooltip_create_from_button_or_extra_icon(C, butregion, but, NULL, is_label); | return UI_tooltip_create_from_button_or_extra_icon(C, butregion, but, NULL, is_label); | ||||
| } | } | ||||
| ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz) | ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz) | ||||
| { | { | ||||
| wmWindow *win = CTX_wm_window(C); | wmWindow *win = CTX_wm_window(C); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | static uiTooltipData *ui_tooltip_data_from_search_item_tooltip_data( | ||||
| if (data->fields_len == 0) { | if (data->fields_len == 0) { | ||||
| MEM_freeN(data); | MEM_freeN(data); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| return data; | return data; | ||||
| } | } | ||||
| /** | |||||
| * Create a tooltip from search-item tooltip data \a item_tooltip data. | |||||
| * To be called from a callback set with #UI_but_func_search_set_tooltip(). | |||||
| * | |||||
| * \param item_rect: Rectangle of the search item in search region space (#ui_searchbox_butrect()) | |||||
| * which is passed to the tooltip callback. | |||||
| */ | |||||
| ARegion *UI_tooltip_create_from_search_item_generic( | ARegion *UI_tooltip_create_from_search_item_generic( | ||||
| bContext *C, | bContext *C, | ||||
| const ARegion *searchbox_region, | const ARegion *searchbox_region, | ||||
| const rcti *item_rect, | const rcti *item_rect, | ||||
| const uiSearchItemTooltipData *item_tooltip_data) | const uiSearchItemTooltipData *item_tooltip_data) | ||||
| { | { | ||||
| uiTooltipData *data = ui_tooltip_data_from_search_item_tooltip_data(item_tooltip_data); | uiTooltipData *data = ui_tooltip_data_from_search_item_tooltip_data(item_tooltip_data); | ||||
| if (data == NULL) { | if (data == NULL) { | ||||
| Show All 18 Lines | |||||