Blender
V3.3
|
#include <ctype.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "DNA_curveprofile_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BLI_array_utils.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_sort_utils.h"
#include "BLI_string.h"
#include "BLI_string_cursor_utf8.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BKE_animsys.h"
#include "BKE_blender_undo.h"
#include "BKE_brush.h"
#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_curveprofile.h"
#include "BKE_movieclip.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BKE_tracking.h"
#include "BKE_unit.h"
#include "IMB_colormanagement.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_view2d.h"
#include "BLF_api.h"
#include "interface_intern.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_event_system.h"
Go to the source code of this file.
Classes | |
struct | uiBlockInteraction_Handle |
struct | uiSelectContextElem |
struct | uiSelectContextStore |
struct | uiButMultiState |
struct | uiHandleButtonMulti |
struct | uiHandleButtonData |
struct | uiAfterFunc |
struct | uiDragToggleHandle |
Macros | |
#define | CASE_NUM_TO_DIR(n, d) |
Feature Defines | |
These defines allow developers to locally toggle functionality which may be useful for testing (especially conflicts in dragging). Ideally the code would be refactored to support this functionality in a less fragile way. Until then keep these defines. | |
#define | USE_CONT_MOUSE_CORRECT |
#define | USE_DRAG_TOGGLE |
#define | USE_DRAG_MULTINUM |
#define | USE_ALLSELECT |
#define | USE_KEYNAV_LIMIT |
#define | USE_DRAG_POPUP |
Local Defines | |
#define | UI_MAX_PASSWORD_STR 128 |
#define | UI_PROP_SCALE_LOG_MIN 0.5e-8f |
#define | UI_PROP_SCALE_LOG_SNAP_OFFSET 0.03f |
#define | UI_DRAG_MAP_SOFT_RANGE_PIXEL_MAX 1000 |
Button Snap Values | |
enum | eSnapType { SNAP_OFF = 0 , SNAP_ON , SNAP_ON_SMALL } |
static enum eSnapType | ui_event_to_snap (const wmEvent *event) |
static bool | ui_event_is_snap (const wmEvent *event) |
static void | ui_color_snap_hue (const enum eSnapType snap, float *r_hue) |
Button Drag Toggle | |
typedef struct uiDragToggleHandle | uiDragToggleHandle |
static bool | ui_drag_toggle_but_is_supported (const uiBut *but) |
static int | ui_drag_toggle_but_pushed_state (uiBut *but) |
static bool | ui_drag_toggle_set_xy_xy (bContext *C, ARegion *region, const int pushed_state, const int xy_src[2], const int xy_dst[2]) |
static void | ui_drag_toggle_set (bContext *C, uiDragToggleHandle *drag_info, const int xy_input[2]) |
static void | ui_handler_region_drag_toggle_remove (bContext *UNUSED(C), void *userdata) |
static int | ui_handler_region_drag_toggle (bContext *C, const wmEvent *event, void *userdata) |
static bool | ui_but_is_drag_toggle (const uiBut *but) |
#define BUTTON_AUTO_OPEN_THRESH 0.2 |
Definition at line 188 of file interface_handlers.c.
#define BUTTON_DRAGLOCK_THRESH 3 |
Drag-lock distance threshold (in pixels).
Definition at line 198 of file interface_handlers.c.
#define BUTTON_FLASH_DELAY 0.020 |
Definition at line 185 of file interface_handlers.c.
#define BUTTON_KEYNAV_PX_LIMIT 8 |
Pixels to move the cursor to get out of keyboard navigation.
Definition at line 191 of file interface_handlers.c.
#define BUTTON_MOUSE_TOWARDS_THRESH 1.0 |
Definition at line 189 of file interface_handlers.c.
#define CASE_NUM_TO_DIR | ( | n, | |
d | |||
) |
how far to drag before we check for gesture direction (in pixels), NOTE: half the height of a button is about right...
Definition at line 291 of file interface_handlers.c.
How far to drag horizontally before we stop checking which buttons the gesture spans (in pixels), locking down the buttons so we can drag freely without worrying about vertical movement.
Definition at line 298 of file interface_handlers.c.
#define DRAG_MULTINUM_THRESHOLD_VERTICAL (0.75f) |
How strict to be when detecting a vertical gesture: [0.5 == sloppy], [0.9 == strict], (unsigned dot-product).
Definition at line 308 of file interface_handlers.c.
Definition at line 279 of file interface_handlers.c.
#define MENU_SCROLL_INTERVAL 0.1 |
Definition at line 186 of file interface_handlers.c.
#define MENU_TOWARDS_MARGIN 20 |
Margin around the menu, use to check if we're moving towards this rectangle (in pixels).
Definition at line 194 of file interface_handlers.c.
#define MENU_TOWARDS_WIGGLE_ROOM 64 |
Tolerance for closing menus (in pixels).
Definition at line 196 of file interface_handlers.c.
#define PIE_MENU_INTERVAL 0.01 |
Definition at line 187 of file interface_handlers.c.
#define UI_BUT_IS_SELECT_CONTEXT UI_BUT_NODE_ACTIVE |
just show a tinted color so users know its activated
Definition at line 282 of file interface_handlers.c.
#define UI_DRAG_MAP_SOFT_RANGE_PIXEL_MAX 1000 |
When USER_CONTINUOUS_MOUSE is disabled or tablet input is used, Use this as a maximum soft range for mapping cursor motion to the value. Otherwise min/max of #FLT_MAX, #INT_MAX cause small adjustments to jump to large numbers.
This is needed for values such as location & dimensions which don't have a meaningful min/max, Instead of mapping cursor motion to the min/max, map the motion to the click-step.
This value is multiplied by the click step to calculate a range to clamp the soft-range by. See: T68130
Definition at line 144 of file interface_handlers.c.
#define UI_MAX_PASSWORD_STR 128 |
The buffer side used for password strings, where the password is stored internally, but not displayed.
Definition at line 113 of file interface_handlers.c.
This is a lower limit on the soft minimum of the range. Usually the derived lower limit from the visible precision is higher, so this number is the backup minimum.
Logarithmic scale does not work with a minimum value of zero, but we want to support it anyway. It is set to 0.5e... for correct rounding since when the tweaked value is lower than the log minimum (lower limit), it will snap to 0.
Definition at line 125 of file interface_handlers.c.
#define UI_PROP_SCALE_LOG_SNAP_OFFSET 0.03f |
This constant defines an offset for the precision change in snap rounding, when going to higher values. It is set to 0.5 - log10(3) = 0.03
to make the switch at 0.3
values.
Definition at line 131 of file interface_handlers.c.
#define USE_ALLSELECT |
Allow dragging/editing all other selected items at once.
Definition at line 92 of file interface_handlers.c.
#define USE_ALLSELECT_LAYER_HACK |
Definition at line 246 of file interface_handlers.c.
#define USE_CONT_MOUSE_CORRECT |
Place the mouse at the scaled down location when un-grabbing.
Definition at line 84 of file interface_handlers.c.
#define USE_DRAG_MULTINUM |
Support dragging multiple number buttons at once.
Definition at line 89 of file interface_handlers.c.
#define USE_DRAG_POPUP |
Support dragging popups by their header.
Definition at line 101 of file interface_handlers.c.
#define USE_DRAG_TOGGLE |
Support dragging toggle buttons.
Definition at line 86 of file interface_handlers.c.
#define USE_KEYNAV_LIMIT |
Check to avoid very small mouse-moves from jumping away from keyboard navigation, while larger mouse motion will override keyboard input, see: T34936.
Definition at line 98 of file interface_handlers.c.
typedef struct uiAfterFunc uiAfterFunc |
typedef struct uiBlockInteraction_Handle uiBlockInteraction_Handle |
typedef struct uiButMultiState uiButMultiState |
typedef enum uiButtonActivateType uiButtonActivateType |
typedef struct uiDragToggleHandle uiDragToggleHandle |
typedef struct uiHandleButtonData uiHandleButtonData |
typedef struct uiHandleButtonMulti uiHandleButtonMulti |
typedef enum uiHandleButtonState uiHandleButtonState |
typedef enum uiMenuScrollType uiMenuScrollType |
typedef struct uiSelectContextElem uiSelectContextElem |
typedef struct uiSelectContextStore uiSelectContextStore |
anonymous enum |
Enumerator | |
---|---|
UI_TEXTEDIT_PASTE | |
UI_TEXTEDIT_COPY | |
UI_TEXTEDIT_CUT |
Definition at line 3298 of file interface_handlers.c.
enum eSnapType |
Enumerator | |
---|---|
SNAP_OFF | |
SNAP_ON | |
SNAP_ON_SMALL |
Definition at line 712 of file interface_handlers.c.
enum uiButtonActivateType |
Enumerator | |
---|---|
BUTTON_ACTIVATE_OVER | |
BUTTON_ACTIVATE | |
BUTTON_ACTIVATE_APPLY | |
BUTTON_ACTIVATE_TEXT_EDITING | |
BUTTON_ACTIVATE_OPEN |
Definition at line 200 of file interface_handlers.c.
enum uiHandleButtonState |
Definition at line 208 of file interface_handlers.c.
enum uiMenuScrollType |
Enumerator | |
---|---|
MENU_SCROLL_UP | |
MENU_SCROLL_DOWN | |
MENU_SCROLL_TOP | |
MENU_SCROLL_BOTTOM |
Definition at line 222 of file interface_handlers.c.
|
static |
Definition at line 8545 of file interface_handlers.c.
References uiBut::active, BLI_assert, uiBut::block, uiPopupBlockHandle::butretval, button_activate_state(), BUTTON_STATE_EXIT, uiBlock::buttons, C, CTX_wm_window(), uiBlock::custom_interaction_callbacks, data, ED_region_tag_redraw_no_rebuild(), ED_region_tag_refresh_ui(), uiSelectContextStore::elems, uiSelectContextStore::elems_len, uiBut::flag, uiBlock::flag, uiBlock::handle, LISTBASE_FOREACH, MEM_freeN, MEM_SAFE_FREE, uiPopupBlockHandle::menuretval, NULL, uiSelectContextElem::ptr, uiBut::rnapoin, uiBut::type, UI_ACTIVE, ui_apply_but(), ui_apply_but_autokey(), ui_apply_but_undo(), ui_block_interaction_end(), UI_BLOCK_KEEP_OPEN, UI_BLOCK_POPUP_MEMORY, ui_blocks_set_tooltips(), UI_BTYPE_GRIP, UI_BUT_DRAG_MULTI, UI_BUT_LAST_ACTIVE, ui_but_update(), ui_but_update_preferences_dirty(), ui_multibut_free(), ui_popup_menu_memory_set(), UI_RETURN_CANCEL, UI_RETURN_OK, UI_SELECT, ui_selectcontext_end(), WM_cursor_modal_restore(), and WM_event_add_mousemove().
Referenced by ui_but_active_free(), ui_but_execute_end(), ui_but_list_row_text_activate(), ui_but_pie_button_activate(), ui_but_pie_menu_apply(), ui_do_but_TOG(), ui_handle_button_activate(), ui_handle_button_event(), ui_handle_button_return_submenu(), and ui_handle_menu_event().
|
static |
Definition at line 8450 of file interface_handlers.c.
References uiBut::active, uiBlock::auto_open, uiBlock::auto_open_last, BLI_assert, BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, BUTTON_ACTIVATE, BUTTON_ACTIVATE_APPLY, BUTTON_ACTIVATE_OPEN, BUTTON_ACTIVATE_OVER, button_activate_state(), BUTTON_ACTIVATE_TEXT_EDITING, BUTTON_AUTO_OPEN_THRESH, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_INIT, BUTTON_STATE_MENU_OPEN, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_WAIT_FLASH, C, copy_v2_fl(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_window(), data, ELEM, ListBase::first, uiBut::flag, MEM_callocN, NULL, wmTooltipState::pass, PIL_check_seconds_timer(), uiBut::rect, bScreen::tool_tip, uiBut::type, type, UI_ACTIVE, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_GRIP, UI_BTYPE_NUM, UI_BTYPE_SEARCH_MENU, ui_but_first(), UI_but_has_tooltip_label(), ui_but_tooltip_init(), UI_BUT_UPDATE_DELAY, ui_handle_button_activate(), ui_numedit_set_active(), ui_region_find_active_but(), ARegion::uiblocks, WM_cursor_modal_set(), WM_CURSOR_X_MOVE, WM_CURSOR_Y_MOVE, WM_tooltip_immediate_init(), WM_tooltip_time_closed(), and WM_window_get_active_screen().
Referenced by ui_but_activate_event(), ui_but_activate_over(), ui_but_list_row_text_activate(), ui_but_pie_button_activate(), ui_but_pie_menu_apply(), ui_do_but_TOG(), ui_handle_button_activate(), ui_handle_button_event(), and ui_handle_button_over().
|
static |
Definition at line 8273 of file interface_handlers.c.
References uiBut::active, uiBlock::auto_open, uiBut::block, BUTTON_AUTO_OPEN_THRESH, BUTTON_FLASH_DELAY, button_modal_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_MENU_OPEN, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, BUTTON_STATE_WAIT_DRAG, BUTTON_STATE_WAIT_FLASH, BUTTON_STATE_WAIT_RELEASE, button_tooltip_timer_reset(), C, CTX_wm_window(), data, ED_region_tag_redraw_no_rebuild(), ELEM, uiBut::flag, uiBlock::flag, uiBlock::handle, uiBut::hold_func, NULL, uiPopupBlockHandle::popup, RPT_INFO, state, time, TIMER, uiBut::type, ui_block_interaction_begin_ensure(), UI_BLOCK_LOOP, ui_block_open_begin(), ui_block_open_end(), ui_block_to_window_fl(), UI_BTYPE_BLOCK, UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_BUT_DRIVEN, ui_but_is_cursor_warp(), ui_but_menu_draw_as_popover(), UI_but_paneltype_get(), UI_but_tooltip_timer_remove(), ui_but_update(), ui_handler_region_menu(), ui_numedit_begin(), ui_numedit_end(), UI_SELECT, ui_textedit_begin(), ui_textedit_end(), USER_MENUOPENAUTO, WM_cursor_grab_disable(), WM_cursor_grab_enable(), WM_CURSOR_WRAP_XY, WM_event_add_timer(), WM_event_add_ui_handler(), WM_event_remove_timer(), WM_event_remove_ui_handler(), WM_report(), and WM_stereo3d_enabled().
Referenced by button_activate_exit(), button_activate_init(), ui_but_active_string_clear_and_exit(), ui_but_drag_init(), ui_but_extra_operator_icon_apply(), ui_but_paste_colorband(), ui_but_paste_curvemapping(), ui_but_paste_CurveProfile(), ui_but_paste_numeric_value(), ui_but_set_float_array(), ui_but_set_string_interactive(), ui_do_but_ANY_drag_toggle(), ui_do_but_BLOCK(), ui_do_but_BUT(), ui_do_but_COLOR(), ui_do_but_COLORBAND(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), ui_do_but_EXIT(), ui_do_but_GRIP(), ui_do_but_HISTOGRAM(), ui_do_but_HOTKEYEVT(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_KEYEVT(), ui_do_but_NUM(), ui_do_but_SCROLL(), ui_do_but_SLI(), ui_do_but_TAB(), ui_do_but_TEX(), ui_do_but_textedit(), ui_do_but_textedit_select(), ui_do_but_TOG(), ui_do_but_TRACKPREVIEW(), ui_do_but_UNITVEC(), ui_do_but_VIEW_ITEM(), ui_do_but_WAVEFORM(), ui_handle_button_event(), ui_handle_button_return_submenu(), and ui_handler_region_menu().
|
static |
Definition at line 8262 of file interface_handlers.c.
References BUTTON_STATE_MENU_OPEN, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, BUTTON_STATE_WAIT_KEY_EVENT, BUTTON_STATE_WAIT_RELEASE, ELEM, and state.
Referenced by button_activate_state(), ui_handle_menu_event(), and ui_pie_handler().
Definition at line 8231 of file interface_handlers.c.
References uiBut::active, uiBut::block, C, CTX_wm_manager(), data, wmWindowManager::drags, ListBase::first, wmTooltipState::pass, bScreen::tool_tip, uiBlock::tooltipdisabled, UI_but_has_tooltip_label(), ui_but_tooltip_init(), UI_TOOLTIP_DELAY, UI_TOOLTIP_DELAY_LABEL, USER_TOOLTIPS, WM_tooltip_timer_clear(), WM_tooltip_timer_init_ex(), and WM_window_get_active_screen().
Referenced by button_activate_state(), ui_do_but_extra_operator_icon(), and ui_handle_button_event().
Definition at line 6380 of file interface_handlers.c.
References max, max_fff(), mul_v3_fl(), and v.
Referenced by ui_numedit_but_HSVCUBE().
|
static |
Definition at line 2452 of file interface_handlers.c.
References BLI_snprintf_rlen(), and output.
Referenced by ui_but_copy_color(), and ui_but_copy_numeric_array().
|
static |
Definition at line 2426 of file interface_handlers.c.
References RNA_property_array_length(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_but_copy_color(), ui_but_copy_numeric_array(), ui_but_paste_color(), and ui_but_paste_numeric_array().
Definition at line 2474 of file interface_handlers.c.
References BLI_assert, and v.
Referenced by ui_but_paste_color(), ui_but_paste_normalized_vector(), and ui_but_paste_numeric_array().
|
static |
Helper for ui_do_but_CURVEPROFILE. Used to tell whether to select a control point's handles.
Definition at line 7496 of file interface_handlers.c.
References ELEM, HD_ALIGN, HD_FREE, point, PROF_H1_SELECT, PROF_H2_SELECT, and PROF_SELECT.
Referenced by ui_do_but_CURVEPROFILE().
|
static |
Definition at line 792 of file interface_handlers.c.
References C, wmOperatorType::check, and wmOperator::type.
Referenced by ui_apply_but_funcs_after().
Check if a uiAfterFunc is needed for this button.
Definition at line 802 of file interface_handlers.c.
References uiBlock::butm_func, uiBut::func, uiBut::funcN, uiBlock::handle, uiBlock::handle_func, uiBut::optype, uiPopupBlockHandle::popup_op, uiBut::rename_func, uiBut::rnaprop, uiBut::type, and UI_BTYPE_BUT_MENU.
Referenced by ui_apply_but_func(), and ui_apply_but_TEX().
|
static |
Definition at line 745 of file interface_handlers.c.
References BLI_addtail(), MEM_callocN, and UIAfterFuncs.
Referenced by ui_apply_but_func(), ui_apply_but_undo(), and ui_handle_afterfunc_add_operator_ex().
|
static |
Definition at line 701 of file interface_handlers.c.
References uiAfterFunc::rnapoin, uiAfterFunc::rnaprop, and ui_rna_update_preferences_dirty().
Referenced by ui_apply_but_funcs_after().
|
static |
Definition at line 2183 of file interface_handlers.c.
References C, copy_v3_v3(), CTX_wm_window(), uiBlock::custom_interaction_callbacks, data, uiButColorBand::edit_coba, uiButCurveMapping::edit_cumap, uiButCurveProfile::edit_profile, uiBut::editstr, uiBut::editval, uiBut::editvec, wmWindow::eventstate, uiBut::flag, IS_ALLSELECT_EVENT, MEM_freeN, NULL, uiBut::type, ui_apply_but_BLOCK(), ui_apply_but_BUT(), ui_apply_but_BUTM(), ui_apply_but_COLORBAND(), ui_apply_but_CURVE(), ui_apply_but_CURVEPROFILE(), ui_apply_but_HISTOGRAM(), ui_apply_but_IMAGE(), ui_apply_but_LISTROW(), ui_apply_but_NUM(), ui_apply_but_ROW(), ui_apply_but_TAB(), ui_apply_but_TEX(), ui_apply_but_TOG(), ui_apply_but_TRACKPREVIEW(), ui_apply_but_VEC(), ui_apply_but_VIEW_ITEM(), ui_apply_but_WAVEFORM(), ui_block_interaction_update(), UI_BTYPE_BLOCK, UI_BTYPE_BUT, UI_BTYPE_BUT_MENU, UI_BTYPE_BUT_TOGGLE, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_DECORATOR, UI_BTYPE_GRIP, UI_BTYPE_HISTOGRAM, UI_BTYPE_HOTKEY_EVENT, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_IMAGE, UI_BTYPE_KEY_EVENT, UI_BTYPE_LISTROW, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_PULLDOWN, UI_BTYPE_ROW, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TAB, UI_BTYPE_TEXT, UI_BTYPE_TOGGLE, UI_BTYPE_TOGGLE_N, UI_BTYPE_TRACK_PREVIEW, UI_BTYPE_UNITVEC, UI_BTYPE_VIEW_ITEM, UI_BTYPE_WAVEFORM, UI_BUT_DRAG_MULTI, ui_multibut_restore(), ui_multibut_states_apply(), ui_selectcontext_apply(), ui_selectcontext_begin(), and zero_v3().
Referenced by button_activate_exit(), ui_but_execute_end(), ui_but_extra_operator_icon_apply(), ui_do_but_ANY_drag_toggle(), ui_do_but_BLOCK(), ui_do_but_COLOR(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_textedit(), ui_do_but_TOG(), ui_do_button(), ui_handle_button_return_submenu(), ui_numedit_apply(), and ui_textedit_begin().
Definition at line 967 of file interface_handlers.c.
References BKE_report(), C, RenderData::cfra, CTX_data_scene(), CTX_wm_reports(), MEM_freeN, NC_SPACE, ND_SPACE_INFO_REPORT, NULL, PROP_PASSWORD, Scene::r, RNA_property_subtype(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, RPT_PROPERTY, scene, ui_but_anim_autokey(), WM_event_add_notifier(), and WM_prop_pystring_assign().
Referenced by button_activate_exit(), ui_but_drag_init(), and ui_but_execute_end().
|
static |
Definition at line 1100 of file interface_handlers.c.
References C, data, uiBut::retval, uiBut::type, ui_apply_but_func(), UI_BTYPE_MENU, ui_but_update_edited(), and ui_but_value_set().
Referenced by ui_apply_but().
|
static |
Definition at line 1083 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
|
static |
Definition at line 1091 of file interface_handlers.c.
References C, data, uiBut::hardmin, uiBut::retval, ui_apply_but_func(), and ui_but_value_set().
Referenced by ui_apply_but().
|
static |
Definition at line 1306 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
|
static |
Definition at line 1313 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
|
static |
Definition at line 1320 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
These functions are postponed and only executed after all other handling is done, i.e. menus are closed, in order to avoid conflicts with these functions removing the buttons we are working with.
Definition at line 814 of file interface_handlers.c.
References uiAfterFunc::a2, uiBut::a2, uiBut::active, uiButSearch::arg, uiButSearch::arg_free_fn, uiBut::block, uiAfterFunc::butm_func, uiBlock::butm_func, uiAfterFunc::butm_func_arg, uiBlock::butm_func_arg, C, uiAfterFunc::context, uiBut::context, CTX_store_copy(), uiAfterFunc::custom_interaction_callbacks, uiBlock::custom_interaction_callbacks, uiAfterFunc::custom_interaction_handle, data, uiAfterFunc::drawstr, ELEM, uiAfterFunc::func, uiBut::func, uiAfterFunc::func_arg1, uiBut::func_arg1, uiAfterFunc::func_arg2, uiBut::func_arg2, uiAfterFunc::func_argN, uiBut::func_argN, uiAfterFunc::funcN, uiBut::funcN, uiBlock::handle, uiAfterFunc::handle_func, uiBlock::handle_func, uiAfterFunc::handle_func_arg, uiBlock::handle_func_arg, MEM_dupallocN, NULL, uiAfterFunc::opcontext, uiBut::opcontext, uiAfterFunc::opptr, uiBut::opptr, uiAfterFunc::optype, uiBut::optype, uiAfterFunc::popup_op, uiPopupBlockHandle::popup_op, uiAfterFunc::prev, uiAfterFunc::rename_arg1, uiBut::rename_arg1, uiAfterFunc::rename_func, uiBut::rename_func, uiAfterFunc::rename_orig, uiBut::rename_orig, uiAfterFunc::retval, uiBut::retval, uiAfterFunc::rnapoin, uiBut::rnapoin, uiAfterFunc::rnaprop, uiBut::rnaprop, uiAfterFunc::search_arg, uiAfterFunc::search_arg_free_fn, uiBut::type, ui_afterfunc_check(), ui_afterfunc_new(), UI_BTYPE_BUT_MENU, UI_BTYPE_SEARCH_MENU, ui_but_drawstr_without_sep_char(), and uiBlockInteraction_Handle::user_count.
Referenced by ui_apply_but_BLOCK(), ui_apply_but_BUT(), ui_apply_but_BUTM(), ui_apply_but_COLORBAND(), ui_apply_but_CURVE(), ui_apply_but_CURVEPROFILE(), ui_apply_but_HISTOGRAM(), ui_apply_but_IMAGE(), ui_apply_but_NUM(), ui_apply_but_ROW(), ui_apply_but_TAB(), ui_apply_but_TEX(), ui_apply_but_TOG(), ui_apply_but_TRACKPREVIEW(), ui_apply_but_VEC(), and ui_apply_but_WAVEFORM().
Definition at line 992 of file interface_handlers.c.
References uiAfterFunc::a2, BLI_assert, BLI_freelinkN(), BLI_listbase_clear(), uiAfterFunc::butm_func, uiAfterFunc::butm_func_arg, C, uiAfterFunc::context, CTX_store_free(), CTX_store_set(), uiAfterFunc::custom_interaction_callbacks, uiAfterFunc::custom_interaction_handle, PointerRNA::data, uiAfterFunc::drawstr, ED_undo_push(), uiAfterFunc::func, uiAfterFunc::func_arg1, uiAfterFunc::func_arg2, uiAfterFunc::func_argN, uiAfterFunc::funcN, uiAfterFunc::handle_func, uiAfterFunc::handle_func_arg, LISTBASE_FOREACH_MUTABLE, MEM_freeN, NULL, uiAfterFunc::opcontext, uiAfterFunc::opptr, uiAfterFunc::optype, popup_check(), uiAfterFunc::popup_op, uiAfterFunc::rename_arg1, uiAfterFunc::rename_func, uiAfterFunc::rename_orig, uiAfterFunc::retval, RNA_property_update(), uiAfterFunc::rnapoin, uiAfterFunc::rnaprop, uiAfterFunc::search_arg, uiAfterFunc::search_arg_free_fn, ui_afterfunc_update_preferences_dirty(), ui_block_interaction_end(), ui_block_interaction_update(), UIAfterFuncs, uiAfterFunc::undostr, uiBlockInteraction_Handle::user_count, WM_operator_name_call_ptr_with_depends_on_cursor(), and WM_operator_properties_free().
Referenced by ui_drag_toggle_set_xy_xy(), ui_handler_region_menu(), ui_popup_handler(), ui_popup_handler_remove(), ui_region_handler(), and ui_region_handler_remove().
|
static |
Definition at line 2162 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
|
static |
Definition at line 2155 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
|
static |
Definition at line 1189 of file interface_handlers.c.
References C, uiListDyn::custom_activate_opptr, uiListDyn::custom_activate_optype, uiBut::custom_data, data, uiList::dyn_data, ui_apply_but_ROW(), ui_list_find_from_row(), and ui_list_invoke_item_operator().
Referenced by ui_apply_but().
|
static |
Definition at line 1257 of file interface_handlers.c.
References C, data, uiBut::retval, ui_apply_but_func(), ui_but_string_eval_number(), ui_but_string_set(), ui_but_update_edited(), ui_but_value_get(), and ui_but_value_set().
Referenced by ui_apply_but().
|
static |
Definition at line 1137 of file interface_handlers.c.
References uiBlock::buttons, C, data, ELEM, uiBut::hardmax, LISTBASE_FOREACH, uiBut::poin, uiBut::retval, ui_apply_but_func(), UI_BTYPE_LISTROW, UI_BTYPE_ROW, ui_but_update_edited(), and ui_but_value_set().
Referenced by ui_apply_but(), ui_apply_but_LISTROW(), and ui_apply_but_VIEW_ITEM().
|
static |
Definition at line 1242 of file interface_handlers.c.
References C, data, uiBut::hardmax, uiBut::retval, ui_apply_but_func(), ui_but_string_set(), ui_but_update_edited(), and ui_but_value_set().
Referenced by ui_apply_but().
|
static |
Definition at line 1203 of file interface_handlers.c.
References BLI_strdup(), uiBut::block, C, data, uiBut::flag, uiBut::func_arg2, uiButSearch::item_active, NULL, uiBut::rename_orig, uiBut::retval, uiBut::type, ui_afterfunc_check(), ui_apply_but_func(), UI_BTYPE_SEARCH_MENU, ui_but_string_set(), UI_BUT_TEXTEDIT_UPDATE, and ui_but_update_edited().
Referenced by ui_apply_but(), and ui_but_active_string_clear_and_exit().
|
static |
Definition at line 1112 of file interface_handlers.c.
References uiBut::bit, uiBut::bitnr, C, data, ELEM, uiBut::retval, uiBut::type, ui_apply_but_func(), UI_BITBUT_VALUE_TOGGLED, UI_BTYPE_CHECKBOX_N, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_TOGGLE_N, ui_but_update_edited(), ui_but_value_get(), and ui_but_value_set().
Referenced by ui_apply_but().
|
static |
Definition at line 2176 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
Definition at line 903 of file interface_handlers.c.
References BKE_paintmode_get_active_from_context(), BLI_strncpy(), uiBut::block, uiBut::drawstr, ED_undo_is_legacy_compatible_for_property(), ELEM, uiBlock::evil_C, uiBut::flag, min_zz(), NULL, PointerRNA::owner_id, PAINT_MODE_SCULPT, uiBut::rnapoin, uiBut::rnaprop, SIZE_MAX, str, uiBut::tip, uiBut::type, ui_afterfunc_new(), UI_BTYPE_MENU, ui_but_drawstr_len_without_sep_char(), ui_but_tip_len_only_first_line(), UI_BUT_UNDO, and uiAfterFunc::undostr.
Referenced by button_activate_exit(), UI_context_active_but_prop_handle(), ui_handler_region_drag_toggle(), and ui_list_activate_row_from_index().
|
static |
Definition at line 1296 of file interface_handlers.c.
References C, data, uiBut::retval, ui_apply_but_func(), ui_but_update_edited(), and ui_but_v3_set().
Referenced by ui_apply_but().
|
static |
Definition at line 1154 of file interface_handlers.c.
References C, data, and ui_apply_but_ROW().
Referenced by ui_apply_but().
|
static |
Definition at line 2169 of file interface_handlers.c.
References C, data, uiBut::retval, and ui_apply_but_func().
Referenced by ui_apply_but().
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().
|
static |
Definition at line 11751 of file interface_handlers.c.
References uiBut::active, uiBlockInteraction_CallbackData::arg1, uiBlockInteraction_CallbackData::begin_fn, BLI_array_deduplicate_ordered, BLI_assert, BLI_sortutil_cmp_int(), uiBlock::buttons, C, uiBlock::custom_interaction_callbacks, uiBut::flag, uiBlockInteraction_Params::is_click, LISTBASE_FOREACH, MEM_callocN, MEM_mallocN, MEM_reallocN, NULL, uiBlockInteraction_Handle::params, uiBut::retval, UI_BUT_DRAG_MULTI, uiBlockInteraction_Params::unique_retval_ids, uiBlockInteraction_Params::unique_retval_ids_len, and uiBlockInteraction_Handle::user_data.
|
static |
Instead, it must be called immediately before the drag action begins.
Definition at line 11820 of file interface_handlers.c.
Referenced by button_activate_state(), ui_numedit_but_NUM(), and ui_numedit_but_SLI().
|
static |
Definition at line 11791 of file interface_handlers.c.
References uiBlockInteraction_CallbackData::arg1, BLI_assert, C, uiBlockInteraction_CallbackData::end_fn, MEM_freeN, NULL, uiBlockInteraction_Handle::params, uiBlockInteraction_Params::unique_retval_ids, and uiBlockInteraction_Handle::user_data.
Referenced by button_activate_exit(), and ui_apply_but_funcs_after().
void UI_block_interaction_set | ( | uiBlock * | block, |
uiBlockInteraction_CallbackData * | callbacks | ||
) |
Definition at line 11746 of file interface_handlers.c.
References uiBlock::custom_interaction_callbacks.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 11801 of file interface_handlers.c.
References uiBlockInteraction_CallbackData::arg1, BLI_assert, C, NULL, uiBlockInteraction_Handle::params, uiBlockInteraction_CallbackData::update_fn, and uiBlockInteraction_Handle::user_data.
Referenced by ui_apply_but(), and ui_apply_but_funcs_after().
|
static |
Definition at line 4202 of file interface_handlers.c.
References BLI_assert, uiBut::block, uiBut::block_create_func, C, copy_v3_v3(), data, uiBut::editvec, uiBut::func_argN, uiBlock::handle, IS_ALLSELECT_EVENT, uiBut::menu_create_func, NULL, uiBut::poin, uiPopupBlockHandle::popup, uiBut::type, ui_block_func_COLOR(), UI_BTYPE_BLOCK, UI_BTYPE_COLOR, UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, ui_but_menu_draw_as_popover(), ui_but_v3_get(), ui_popover_panel_create(), ui_popup_block_create(), and ui_popup_menu_create().
Referenced by button_activate_state().
|
static |
Definition at line 4285 of file interface_handlers.c.
References uiBlock::auto_open_last, uiBut::block, C, data, uiBut::editval, uiBut::editvec, NULL, PIL_check_seconds_timer(), and ui_popup_block_free().
Referenced by button_activate_state().
|
static |
Definition at line 10885 of file interface_handlers.c.
References uiBlock::buttons, ELEM, uiBlock::flag, KM_PRESS, LISTBASE_FOREACH, NULL, uiBut::pie_dir, uiBut::type, UI_BLOCK_NUMSELECT, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, and wmEvent::val.
Referenced by ui_pie_handler().
Definition at line 8171 of file interface_handlers.c.
References LISTBASE_FOREACH, and ARegion::uiblocks.
Referenced by button_activate_exit(), ui_handle_button_event(), ui_handler_region_menu(), ui_popup_handler(), and ui_region_handler().
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().
Definition at line 11725 of file interface_handlers.c.
References C, CTX_wm_region(), uiBut::type, UI_BTYPE_COLOR, and ui_region_find_active_but().
Referenced by UI_drop_color_poll().
Definition at line 11720 of file interface_handlers.c.
References C, NULL, and UI_but_active_drop_name_button().
Definition at line 11706 of file interface_handlers.c.
References C, CTX_wm_region(), ELEM, NULL, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, and ui_region_find_active_but().
Referenced by UI_but_active_drop_name().
Definition at line 8685 of file interface_handlers.c.
References uiBut::active, button_activate_exit(), C, and data.
Referenced by UI_but_active_only_ex(), ui_but_free(), UI_region_free_active_but_all(), and UI_screen_free_active_but_highlight().
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().
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 2704 of file interface_handlers.c.
References C, copy_array(), PointerRNA::data, NULL, uiBut::optype, uiBut::poin, uiBut::rnapoin, uiBut::type, UI_BTYPE_BUT, UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_MENU, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, UI_BTYPE_UNITVEC, ui_but_contains_password(), ui_but_copy_color(), ui_but_copy_colorband(), ui_but_copy_curvemapping(), ui_but_copy_CurveProfile(), ui_but_copy_menu(), ui_but_copy_numeric_array(), ui_but_copy_numeric_value(), ui_but_copy_operator(), ui_but_copy_popover(), ui_but_copy_text(), ui_but_has_array_value(), and WM_clipboard_text_set().
Referenced by ui_do_button().
Definition at line 2554 of file interface_handlers.c.
References float_array_to_string(), get_but_property_array_length(), output, PROP_COLOR_GAMMA, usdtokens::rgba(), RNA_property_float_get_index(), RNA_property_subtype(), uiBut::rnapoin, uiBut::rnaprop, srgb_to_linearrgb_v3_v3(), and ui_but_v3_get().
Referenced by ui_but_copy().
Definition at line 2608 of file interface_handlers.c.
References but_copypaste_coba, NULL, and uiBut::poin.
Referenced by ui_but_copy().
Definition at line 2628 of file interface_handlers.c.
References BKE_curvemapping_copy_data(), BKE_curvemapping_free_data(), but_copypaste_curve, but_copypaste_curve_alive, NULL, and uiBut::poin.
Referenced by ui_but_copy().
Definition at line 2651 of file interface_handlers.c.
References BKE_curveprofile_copy_data(), BKE_curveprofile_free_data(), but_copypaste_profile, but_copypaste_profile_alive, NULL, and uiBut::poin.
Referenced by ui_but_copy().
Definition at line 2684 of file interface_handlers.c.
References BLI_snprintf(), MenuType::idname, output, and UI_but_menutype_get().
Referenced by ui_but_copy().
Definition at line 2466 of file interface_handlers.c.
References float_array_to_string(), get_but_property_array_length(), output, RNA_property_float_get_array(), uiBut::rnapoin, and uiBut::rnaprop.
Referenced by ui_but_copy().
Definition at line 2511 of file interface_handlers.c.
References BLI_str_rstrip_float_zero(), NULL, output, ui_but_string_get_ex(), and UI_PRECISION_FLOAT_MAX.
Referenced by ui_but_copy().
|
static |
Definition at line 2674 of file interface_handlers.c.
References BLI_strncpy(), C, MEM_freeN, NULL, uiBut::optype, output, str, UI_but_operator_ptr_get(), and WM_operator_pystring_ex().
Referenced by ui_but_copy().
Definition at line 2694 of file interface_handlers.c.
References BLI_snprintf(), PanelType::idname, output, and UI_but_paneltype_get().
Referenced by ui_but_copy().
Definition at line 2596 of file interface_handlers.c.
References output, and ui_but_string_get().
Referenced by ui_but_copy().
|
static |
Definition at line 2035 of file interface_handlers.c.
References blender::math::abs(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), uiBut::block, uiDragToggleHandle::but_cent_start, button_activate_state(), BUTTON_STATE_EXIT, C, uiDragColorHandle::color, copy_v2_v2_int(), copy_v3_v3(), CTX_wm_region(), CTX_wm_region_set(), CTX_wm_window(), data, ELEM, uiDragColorHandle::gamma_corrected, uiDragToggleHandle::is_xy_lock_init, MEM_callocN, MEM_freeN, min_ii(), uiBut::poin, uiBut::pointype, PROP_COLOR, PROP_COLOR_GAMMA, uiDragToggleHandle::pushed_state, uiBut::rect, RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_NAV_BAR, RGN_TYPE_TOOL_HEADER, RNA_property_subtype(), uiBut::rnaprop, uiBut::type, ui_apply_but_autokey(), ui_block_to_window_scale(), UI_BTYPE_COLOR, UI_BTYPE_VIEW_ITEM, ui_but_drag_start(), UI_BUT_POIN_CHAR, UI_BUT_POIN_FLOAT, ui_but_v3_get(), ui_drag_toggle_but_is_supported(), ui_drag_toggle_but_pushed_state(), ui_handler_region_drag_toggle(), ui_handler_region_drag_toggle_remove(), UI_UNIT_Y, UI_view_item_drag_start(), uiButViewItem::view_item, WM_DRAG_COLOR, WM_DRAG_FREE_DATA, WM_event_add_ui_handler(), WM_event_drag_threshold(), WM_event_start_drag(), WM_gestures_remove(), WM_HANDLER_BLOCKING, wmEvent::xy, uiDragToggleHandle::xy_init, uiDragToggleHandle::xy_last, and uiDragToggleHandle::xy_lock.
Referenced by ui_do_but_BLOCK(), ui_do_but_COLOR(), and ui_do_but_EXIT().
|
static |
Ignore mouse movements within some horizontal pixel threshold before starting to drag
Definition at line 638 of file interface_handlers.c.
References blender::math::abs(), BUTTON_DRAGLOCK_THRESH, data, and ELEM.
Referenced by ui_numedit_but_NUM(), and ui_numedit_but_SLI().
void ui_but_execute_begin | ( | struct bContext * | UNUSEDC, |
struct ARegion * | region, | ||
uiBut * | but, | ||
void ** | active_back | ||
) |
Definition at line 9018 of file interface_handlers.c.
References uiBut::active, BLI_assert, BLI_findindex(), uiBut::block, data, MEM_callocN, NULL, and ARegion::uiblocks.
Referenced by UI_but_execute(), and ui_multibut_states_apply().
void ui_but_execute_end | ( | struct bContext * | C, |
struct ARegion * | UNUSEDregion, | ||
uiBut * | but, | ||
void * | active_back | ||
) |
Definition at line 9035 of file interface_handlers.c.
References uiBut::active, uiBut::block, button_activate_exit(), C, uiBut::flag, ui_apply_but(), ui_apply_but_autokey(), and UI_BUT_DRAG_MULTI.
Referenced by UI_but_execute(), and ui_multibut_states_apply().
|
static |
Definition at line 4175 of file interface_handlers.c.
References uiBut::active, uiHandleButtonData::apply_through_extra_icon, uiBut::block, button_activate_state(), BUTTON_STATE_EXIT, C, CTX_wm_window(), uiHandleButtonData::interactive, NULL, wmOperatorCallParams::opcontext, wmOperatorCallParams::opptr, wmOperatorCallParams::optype, uiButExtraOpIcon::optype_params, ui_apply_but(), ui_but_extra_operator_icons_free(), WM_event_add_mousemove(), and WM_operator_name_call_ptr_with_depends_on_cursor().
Referenced by ui_do_but_extra_operator_icon().
|
static |
Definition at line 4343 of file interface_handlers.c.
References BLI_rctf_isect_pt(), BLI_rctf_size_y(), uiBut::block, uiBut::extra_op_icons, ListBase::last, LISTBASE_FOREACH_BACKWARD, NULL, uiBut::rect, ui_window_to_block(), x, rctf::xmax, and y.
Referenced by ui_but_tooltip_init(), ui_do_but_extra_operator_icon(), ui_do_but_extra_operator_icons_mousemove(), ui_do_but_TEX(), and ui_do_but_VIEW_ITEM().
Definition at line 8950 of file interface_handlers.c.
References wmEvent::customdata, LISTBASE_FOREACH, NULL, and ARegion::uiblocks.
Referenced by ui_handle_button_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 580 of file interface_handlers.c.
References uiBut::alignnr, uiBut::poin, uiBut::rnapoin, uiBut::rnaprop, uiBut::type, and PointerRNA::type.
Referenced by ui_but_find_select_in_enum(), and ui_do_but_TOG().
|
static |
Definition at line 2410 of file interface_handlers.c.
References blender::math::length(), MEM_callocN, and WM_clipboard_text_get_firstline().
Referenced by ui_but_paste().
Definition at line 1779 of file interface_handlers.c.
References uiBut::block, ui_block_is_menu(), and ui_drag_toggle_but_is_supported().
Referenced by ui_do_but_ANY_drag_toggle(), ui_do_but_BLOCK(), and ui_do_but_EXIT().
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 682 of file interface_handlers.c.
References uiBut::rnapoin, uiBut::rnaprop, and ui_rna_is_userdef().
Referenced by UI_context_active_but_prop_get_filebrowser().
|
static |
Hack for uiList UI_BTYPE_LISTROW buttons to "give" events to overlaying UI_BTYPE_TEXT buttons (Ctrl-Click rename feature & co).
Definition at line 4315 of file interface_handlers.c.
References button_activate_exit(), button_activate_init(), C, data, uiBut::flag, NULL, uiBut::type, UI_BTYPE_TEXT, UI_BUT_DISABLED, ui_but_find_mouse_over_ex(), and wmEvent::xy.
Referenced by ui_do_but_LISTROW(), and ui_do_button().
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().
|
static |
Definition at line 2800 of file interface_handlers.c.
References BLI_assert, C, data, PointerRNA::data, uiBut::flag, MEM_freeN, NULL, uiBut::poin, uiBut::rnapoin, uiBut::type, UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, UI_BTYPE_UNITVEC, UI_BUT_DISABLED, ui_but_get_pasted_text_from_clipboard(), ui_but_has_array_value(), ui_but_paste_color(), ui_but_paste_colorband(), ui_but_paste_curvemapping(), ui_but_paste_CurveProfile(), ui_but_paste_normalized_vector(), ui_but_paste_numeric_array(), ui_but_paste_numeric_value(), and ui_but_paste_text().
Referenced by ui_do_button().
Definition at line 2575 of file interface_handlers.c.
References BLI_assert, C, ELEM, get_but_property_array_length(), linearrgb_to_srgb_v3_v3(), NULL, parse_float_array(), PROP_COLOR_GAMMA, usdtokens::rgba(), RNA_property_subtype(), uiBut::rnaprop, RPT_ERROR, ui_but_set_float_array(), and WM_report().
Referenced by ui_but_paste().
|
static |
Definition at line 2615 of file interface_handlers.c.
References but_copypaste_coba, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_NUM_EDITING, C, data, MEM_callocN, uiBut::poin, and ColorBand::tot.
Referenced by ui_but_paste().
Definition at line 2637 of file interface_handlers.c.
References BKE_curvemapping_copy_data(), BKE_curvemapping_free_data(), but_copypaste_curve, but_copypaste_curve_alive, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_NUM_EDITING, C, MEM_callocN, and uiBut::poin.
Referenced by ui_but_paste().
Definition at line 2660 of file interface_handlers.c.
References BKE_curveprofile_copy_data(), BKE_curveprofile_free_data(), but_copypaste_profile, but_copypaste_profile_alive, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_NUM_EDITING, C, MEM_callocN, and uiBut::poin.
Referenced by ui_but_paste().
|
static |
Definition at line 2536 of file interface_handlers.c.
References C, data, normalize_v3(), parse_float_array(), RPT_ERROR, ui_but_set_float_array(), and WM_report().
Referenced by ui_but_paste().
|
static |
Definition at line 2490 of file interface_handlers.c.
References C, data, get_but_property_array_length(), parse_float_array(), RPT_ERROR, ui_but_set_float_array(), and WM_report().
Referenced by ui_but_paste().
|
static |
Definition at line 2519 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_NUM_EDITING, C, data, RPT_ERROR, ui_but_string_eval_number(), ui_but_string_set(), and WM_report().
Referenced by ui_but_paste().
|
static |
Definition at line 2601 of file interface_handlers.c.
References uiBut::active, BLI_assert, C, data, ui_but_set_string_interactive(), and UNUSED_VARS_NDEBUG.
Referenced by ui_but_paste().
|
static |
Definition at line 10898 of file interface_handlers.c.
References uiBut::active, button_activate_exit(), button_activate_init(), BUTTON_ACTIVATE_OVER, C, NULL, uiPopupBlockHandle::region, ui_but_pie_menu_apply(), ui_region_find_active_but(), and WM_UI_HANDLER_BREAK.
Referenced by ui_pie_handler().
|
static |
Definition at line 10848 of file interface_handlers.c.
References uiBut::active, button_activate_exit(), button_activate_init(), BUTTON_ACTIVATE_OPEN, C, ED_region_tag_redraw(), uiPopupBlockHandle::menuretval, uiPopupBlockHandle::region, uiBut::type, UI_BTYPE_MENU, ui_but_pie_menu_supported_apply(), ui_region_find_active_but(), UI_RETURN_CANCEL, UI_RETURN_OK, and WM_UI_HANDLER_BREAK.
Referenced by ui_but_pie_button_activate(), and ui_pie_handler().
Definition at line 10843 of file interface_handlers.c.
References ELEM, uiBut::type, UI_BTYPE_NUM, and UI_BTYPE_NUM_SLIDER.
Referenced by ui_but_pie_menu_apply().
|
static |
Definition at line 2431 of file interface_handlers.c.
References BLI_assert, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_NUM_EDITING, C, copy_v3_v3(), data, RNA_property_float_set_index(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, uiBut::type, and UI_BTYPE_UNITVEC.
Referenced by ui_but_paste_color(), ui_but_paste_normalized_vector(), and ui_but_paste_numeric_array().
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().
void ui_but_text_password_hide | ( | char | password_str[UI_MAX_PASSWORD_STR], |
uiBut * | but, | ||
const bool | restore | ||
) |
Definition at line 2904 of file interface_handlers.c.
References BLI_strlen_utf8(), BLI_strncpy(), uiBut::drawstr, uiBut::editstr, if(), len, uiBut::pos, PROP_PASSWORD, RNA_property_subtype(), uiBut::rnaprop, uiBut::selend, uiBut::selsta, UI_MAX_PASSWORD_STR, ui_text_position_from_hidden(), and ui_text_position_to_hidden().
Referenced by ui_textedit_set_cursor_pos(), and widget_draw_text_icon().
|
static |
Definition at line 8209 of file interface_handlers.c.
References uiBut::active, C, CTX_wm_window(), wmWindow::eventstate, NULL, uiHandleButtonData::region, ui_but_extra_operator_icon_mouse_over_get(), UI_region_active_but_get(), UI_tooltip_create_from_button_or_extra_icon(), UI_TOOLTIP_DELAY, and UI_TOOLTIP_DELAY_LABEL.
Referenced by button_activate_init(), and button_tooltip_timer_reset().
Recreate tool-tip (use to update dynamic tips)
Definition at line 8183 of file interface_handlers.c.
References uiBut::active, C, data, wmTooltipState::region, bScreen::tool_tip, WM_tooltip_refresh(), and WM_window_get_active_screen().
Referenced by UI_block_update_from_old().
Removes tool-tip timer from active but (meaning tool-tip is disabled until it's re-enabled again).
Definition at line 8194 of file interface_handlers.c.
References uiBut::active, C, data, NULL, WM_event_remove_timer(), and WM_tooltip_clear().
Referenced by button_activate_state(), outliner_operation(), ui_handle_button_event(), ui_handle_menu_event(), ui_popup_block_create(), and ui_region_handler().
Definition at line 696 of file interface_handlers.c.
References uiBut::rnapoin, uiBut::rnaprop, and ui_rna_update_preferences_dirty().
Referenced by button_activate_exit(), and ui_drag_toggle_set_xy_xy().
Definition at line 8928 of file interface_handlers.c.
References uiBut::active, uiBut::block, C, uiBut::changed, data, uiHandleButtonData::region, ui_block_active_but_get(), and UI_but_ensure_in_view().
Referenced by UI_blocklist_update_view_for_buttons().
Definition at line 9097 of file interface_handlers.c.
References double(), ELEM, NULL, PROP_FLOAT, PROP_INT, RNA_property_array_check(), RNA_property_float_get_default(), RNA_property_float_get_default_index(), RNA_property_int_get_default(), RNA_property_int_get_default_index(), RNA_property_type(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, type, and ui_but_is_rna_valid().
Referenced by ui_handle_button_event().
|
static |
Definition at line 6421 of file interface_handlers.c.
References uiButHSVCube::gradient_type, hsl_to_rgb_v(), hsv_to_rgb_v(), usdtokens::rgb(), and UI_GRAD_L_ALT.
Referenced by ui_do_but_HSVCUBE(), and ui_numedit_but_HSVCUBE().
Definition at line 730 of file interface_handlers.c.
References BLI_assert, snap(), SNAP_OFF, and SNAP_ON_SMALL.
Referenced by ui_numedit_but_HSVCIRCLE(), and ui_numedit_but_HSVCUBE().
Definition at line 8834 of file interface_handlers.c.
References C, and wm_event_handler_ui_cancel_ex().
Referenced by datadropper_invoke(), depthdropper_invoke(), driverdropper_invoke(), eyedropper_colorband_invoke(), and eyedropper_invoke().
Definition at line 8766 of file interface_handlers.c.
References C, CTX_wm_region(), NULL, and ui_context_button_active().
Definition at line 8771 of file interface_handlers.c.
References C, CTX_wm_menu(), CTX_wm_region(), NULL, and ui_context_button_active().
uiBut* UI_context_active_but_prop_get | ( | const bContext * | C, |
struct PointerRNA * | r_ptr, | ||
struct PropertyRNA ** | r_prop, | ||
int * | r_index | ||
) |
Definition at line 8794 of file interface_handlers.c.
References C, PointerRNA::data, NULL, uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, and ui_context_rna_button_active().
Definition at line 8815 of file interface_handlers.c.
References uiBut::block, C, uiBlock::handle_func, uiBlock::handle_func_arg, uiBut::retval, ui_apply_but_undo(), ui_but_update(), and ui_context_rna_button_active().
Referenced by operator_button_property_finish(), and operator_button_property_finish_with_undo().
wmOperator* UI_context_active_operator_get | ( | const struct bContext * | C | ) |
Definition at line 8839 of file interface_handlers.c.
References C, CTX_wm_region(), CTX_wm_screen(), LISTBASE_FOREACH, NULL, bScreen::regionbase, and ARegion::uiblocks.
Referenced by screen_ctx_active_operator().
|
static |
Definition at line 8698 of file interface_handlers.c.
References uiBut::active, data, uiBut::flag, LISTBASE_FOREACH, NULL, UI_BUT_ACTIVE_OVERRIDE, UI_BUT_LAST_ACTIVE, and ARegion::uiblocks.
Referenced by UI_context_active_but_get(), UI_context_active_but_get_respect_menu(), ui_context_rna_button_active(), and UI_region_active_but_get().
Definition at line 8761 of file interface_handlers.c.
References C, CTX_wm_region(), ui_context_button_active(), and ui_context_rna_button_active_test().
Referenced by UI_context_active_but_prop_get(), and UI_context_active_but_prop_handle().
Definition at line 8757 of file interface_handlers.c.
References PointerRNA::data, NULL, and uiBut::rnapoin.
Referenced by ui_context_rna_button_active().
Definition at line 8880 of file interface_handlers.c.
References uiBut::active, BKE_animsys_eval_context_construct(), C, RenderData::cfra, CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_region(), data, depsgraph, ED_region_tag_redraw(), uiBut::flag, LISTBASE_FOREACH, NULL, Scene::r, scene, ui_but_anim_decorate_update_from_flag(), ui_but_anim_flag(), UI_but_is_decorator, UI_BUT_LAST_ACTIVE, ui_but_override_flag(), and ARegion::uiblocks.
|
static |
Definition at line 4428 of file interface_handlers.c.
References uiBut::block, button_activate_state(), BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_DRAG, C, data, KM_PRESS, LEFTMOUSE, wmEvent::type, ui_apply_but(), ui_but_is_drag_toggle(), ui_do_but_EXIT(), wmEvent::val, and WM_UI_HANDLER_BREAK.
Referenced by ui_do_but_BUT(), ui_do_but_TAB(), and ui_do_but_TOG().
|
static |
Definition at line 5994 of file interface_handlers.c.
References uiBut::block, BUTTON_ACTIVATE_OVER, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_MENU_OPEN, BUTTON_STATE_WAIT_DRAG, C, data, ELEM, EVT_PADENTER, EVT_RETKEY, KM_CTRL, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmEvent::modifier, MOUSEPAN, type, wmEvent::type, ui_apply_but(), ui_but_contains_point_px_icon(), ui_but_drag_init(), ui_but_drag_is_draggable(), ui_but_is_drag_toggle(), ui_but_menu_step(), ui_but_supports_cycling(), ui_pan_to_scroll(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_event_add_mousemove(), WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 4452 of file interface_handlers.c.
References uiBut::block, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_FLASH, BUTTON_STATE_WAIT_RELEASE, C, data, ELEM, EVT_PADENTER, EVT_RETKEY, uiBut::flag, uiBlock::handle, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmEvent::type, UI_ACTIVE, ui_do_but_ANY_drag_toggle(), UI_SELECT, wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 6178 of file interface_handlers.c.
References BKE_brush_color_set(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_palette_color_remove(), BLI_assert, uiBut::block, BRUSH_USE_GRADIENT, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_MENU_OPEN, BUTTON_STATE_WAIT_DRAG, C, clamp_f(), col, color, CTX_data_scene(), ColorBand::cur, uiBut::custom_data, data, ColorBand::data, PointerRNA::data, ELEM, EVT_DELKEY, EVT_PADENTER, EVT_RETKEY, Brush::flag, Brush::gradient, ColorPicker::hsv_perceptual, hsv_to_rgb_v(), Brush::id, IMB_colormanagement_scene_linear_to_srgb_v3(), IMB_colormanagement_srgb_to_scene_linear_v3(), uiButColor::is_pallete_color, KM_CTRL, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmEvent::modifier, MOUSEPAN, NULL, PointerRNA::owner_id, PointerRNA_NULL, PROP_COLOR, PROP_COLOR_GAMMA, CBData::r, rgb_to_hsv_compat_v(), RNA_id_pointer_create(), RNA_property_float_get_array(), RNA_property_subtype(), RNA_property_update(), RNA_struct_find_property(), uiBut::rnapoin, uiBut::rnaprop, scene, uiBut::type, wmEvent::type, ui_apply_but(), UI_BTYPE_COLOR, ui_but_contains_point_px_icon(), ui_but_drag_init(), ui_but_drag_is_draggable(), ui_but_v3_get(), ui_but_v3_set(), ui_palette_set_active(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 7027 of file interface_handlers.c.
References Freestyle::a, blender::math::abs(), uiBlock::aspect, BKE_colorband_element_add(), BKE_colorband_update_sort(), BLI_rctf_size_x(), button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, ColorBand::cur, data, ColorBand::data, ELEM, EVT_ESCKEY, float(), if(), KM_CTRL, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmEvent::modifier, MOUSEMOVE, uiBut::poin, pos, CBData::pos, uiBut::rect, RIGHTMOUSE, wmEvent::type, UI_DPI_FAC, ui_numedit_apply(), ui_numedit_but_COLORBAND(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and rctf::xmin.
Referenced by ui_do_button().
|
static |
Definition at line 7219 of file interface_handlers.c.
References Freestyle::a, BKE_curvemap_insert(), BKE_curvemapping_changed(), BLI_rctf_transform_pt_v(), button_activate_state(), BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, CurveMapping::cm, CM_TABLE, copy_v2_v2(), CTX_data_scene(), CTX_data_view_layer(), CUMA_SELECT, CurveMapping::cur, data, dist_squared_to_line_segment_v2(), CurveMapPoint::flag, KM_CTRL, KM_PRESS, KM_SHIFT, LEFTMOUSE, len_squared_v2v2(), wmEvent::modifier, uiBut::poin, uiBut::rect, scene, square_f(), wmEvent::type, ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, x, and CurveMapPoint::x.
Referenced by ui_do_button().
|
static |
Interaction for curve profile widget.
Definition at line 7507 of file interface_handlers.c.
References BKE_curveprofile_insert(), BKE_curveprofile_remove_by_flag(), BKE_curveprofile_table_size(), BKE_curveprofile_update(), BLI_assert, BLI_rctf_transform_pt_v(), button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, copy_v2_v2(), data, dist_squared_to_line_segment_v2(), ELEM, EVT_GKEY, EVT_XKEY, CurveProfilePoint::flag, CurveProfilePoint::h1, CurveProfilePoint::h1_loc, CurveProfilePoint::h2, CurveProfilePoint::h2_loc, HD_ALIGN, HD_FREE, KM_CTRL, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, len_squared_v2v2(), wmEvent::modifier, MOUSEMOVE, CurveProfile::path, CurveProfile::path_len, uiBut::poin, point_draw_handles(), PROF_H1_SELECT, PROF_H2_SELECT, PROF_SELECT, PROF_UPDATE_CLIP, PROF_UPDATE_NONE, PROF_UPDATE_REMOVE_DOUBLES, uiBut::rect, square_f(), CurveProfile::table, wmEvent::type, ui_numedit_apply(), ui_numedit_but_CURVEPROFILE(), ui_window_to_block(), wmEvent::val, CurveProfile::view_rect, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, CurveProfilePoint::x, and wmEvent::xy.
Referenced by ui_do_button().
|
static |
Definition at line 4808 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_DRAG, C, uiBut::custom_data, uiListDyn::custom_drag_optype, data, uiList::dyn_data, ELEM, EVT_PADENTER, EVT_RETKEY, uiBut::imb, KM_PRESS, KM_RELEASE, LEFTMOUSE, ret, wmEvent::type, ui_but_contains_point_px_icon(), ui_but_drag_init(), ui_but_drag_is_draggable(), ui_but_is_drag_toggle(), ui_list_find_mouse_over(), ui_view_item_find_mouse_over(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_do_but_ANY_drag_toggle(), ui_do_but_LISTROW(), ui_do_but_VIEW_ITEM(), and ui_do_button().
|
static |
Definition at line 4375 of file interface_handlers.c.
References button_tooltip_timer_reset(), C, data, ED_region_tag_redraw(), KM_RELEASE, ui_but_extra_operator_icon_apply(), ui_but_extra_operator_icon_mouse_over_get(), and wmEvent::val.
Referenced by ui_do_but_SEARCH_UNLINK(), ui_do_but_textedit(), ui_do_but_TOG(), and ui_do_button().
|
static |
Definition at line 4401 of file interface_handlers.c.
References data, ED_region_tag_redraw_no_rebuild(), uiBut::extra_op_icons, uiButExtraOpIcon::highlighted, LISTBASE_FOREACH, NULL, and ui_but_extra_operator_icon_mouse_over_get().
Referenced by ui_do_but_textedit(), and ui_handle_button_event().
|
static |
Definition at line 5919 of file interface_handlers.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, EVT_ESCKEY, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, uiBut::rect, wmEvent::type, ui_numedit_apply(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 7691 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, EVT_BACKSPACEKEY, EVT_ESCKEY, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, uiBut::poin, wmEvent::type, ui_numedit_apply(), ui_numedit_but_HISTOGRAM(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and Histogram::ymax.
Referenced by ui_do_button().
|
static |
Definition at line 4494 of file interface_handlers.c.
References uiBut::active, BLI_assert, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_KEY_EVENT, C, data, uiBut::drawstr, ED_region_tag_redraw(), ELEM, EVT_BUT_OPEN, EVT_CAPSLOCKKEY, EVT_ESCKEY, EVT_PADENTER, EVT_RETKEY, EVT_UNKNOWNKEY, ISHOTKEY, ISMOUSE_MOTION, KM_PRESS, LEFTMOUSE, uiButHotkeyEvent::modifier_key, uiHandleButtonData::region, RPT_WARNING, uiBut::type, wmEvent::type, UI_BTYPE_HOTKEY_EVENT, ui_but_contains_point_px(), ui_but_update(), ui_but_value_set(), wmEvent::val, WM_key_event_string(), WM_report(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_do_button().
|
static |
Definition at line 6896 of file interface_handlers.c.
References uiBut::block, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, clamp_f(), uiBut::custom_data, data, ELEM, EVT_BACKSPACEKEY, EVT_ESCKEY, ColorPicker::hsv_perceptual, hsv_to_rgb_v(), KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, len, MEM_callocN, MEM_freeN, wmEvent::modifier, MOUSEMOVE, NDOF_MOTION, usdtokens::rgb(), RIGHTMOUSE, RNA_property_array_length(), RNA_property_float_get_default_array(), RNA_property_update(), uiBut::rnapoin, uiBut::rnaprop, snap(), wmEvent::type, ui_apply_but(), ui_but_hsv_set(), ui_but_v3_get(), ui_but_v3_set(), ui_color_picker_hsv_to_rgb(), ui_color_picker_rgb_to_hsv_compat(), ui_event_is_snap(), ui_event_to_snap(), ui_numedit_apply(), ui_numedit_but_HSVCIRCLE(), ui_window_to_block(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 6621 of file interface_handlers.c.
References uiBut::block, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, uiBut::custom_data, data, ELEM, EVT_BACKSPACEKEY, EVT_ESCKEY, uiButHSVCube::gradient_type, ColorPicker::hsv_perceptual, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, len, wmEvent::modifier, MOUSEMOVE, NDOF_MOTION, usdtokens::rgb(), RIGHTMOUSE, RNA_property_array_length(), RNA_property_float_get_default_array(), RNA_property_update(), uiBut::rnapoin, uiBut::rnaprop, snap(), wmEvent::type, ui_apply_but(), ui_but_v3_get(), ui_but_v3_set(), ui_color_picker_to_rgb_HSVCUBE_v(), ui_event_is_snap(), ui_event_to_snap(), UI_GRAD_L_ALT, UI_GRAD_V_ALT, ui_numedit_apply(), ui_numedit_but_HSVCUBE(), ui_rgb_to_color_picker_HSVCUBE_compat_v(), ui_rgb_to_color_picker_HSVCUBE_v(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 4566 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_KEY_EVENT, C, data, ELEM, EVT_PADENTER, EVT_RETKEY, ISMOUSE_MOTION, KM_PRESS, LEFTMOUSE, wmEvent::type, ui_but_value_set(), wmEvent::val, WM_key_event_string(), WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 5970 of file interface_handlers.c.
References BUTTON_ACTIVATE_TEXT_EDITING, BUTTON_STATE_HIGHLIGHT, C, data, ELEM, EVT_PADENTER, EVT_RETKEY, KM_CTRL, KM_DBL_CLICK, KM_PRESS, LEFTMOUSE, wmEvent::modifier, wmEvent::type, ui_but_list_row_text_activate(), ui_do_but_EXIT(), wmEvent::val, and WM_UI_HANDLER_BREAK.
Referenced by ui_do_button().
|
static |
Definition at line 5288 of file interface_handlers.c.
References blender::math::abs(), BLI_assert, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, C, copy_v2_v2_int(), data, double(), uiBut::drawflag, ELEM, EVT_ESCKEY, EVT_MINUSKEY, EVT_PADENTER, EVT_RETKEY, KM_CTRL, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, max_ff(), max_ii(), min_ff(), min_ii(), wmEvent::modifier, MOUSEMOVE, MOUSEPAN, powf, PROP_SCALE_LOG, uiBut::rect, RIGHTMOUSE, round_fl_to_int_clamp(), snap(), uiBut::softmax, uiBut::softmin, uiButNumber::step_size, uiBut::type, type, wmEvent::type, UI_BTYPE_NUM, UI_BUT_ACTIVE_LEFT, UI_BUT_ACTIVE_RIGHT, ui_but_is_cursor_warp(), ui_but_is_float(), ui_but_scale_type(), ui_do_but_textedit(), ui_do_but_textedit_select(), ui_event_is_snap(), ui_event_to_snap(), ui_multibut_states_apply(), ui_numedit_apply(), ui_numedit_but_NUM(), ui_numedit_set_active(), ui_pan_to_scroll(), UI_PRECISION_FLOAT_SCALE, UI_PROP_SCALE_LOG_SNAP_OFFSET, ui_window_to_block(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, rctf::xmax, rctf::xmin, and wmEvent::xy.
Referenced by ui_do_button().
|
static |
Definition at line 5864 of file interface_handlers.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, ED_region_tag_refresh_ui(), EVT_ESCKEY, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, uiBut::rect, wmEvent::type, ui_block_is_popup_any(), ui_numedit_apply(), ui_numedit_but_SLI(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 4673 of file interface_handlers.c.
References C, data, ELEM, EVT_BUT_OPEN, EVT_PADENTER, EVT_RETKEY, KM_RELEASE, LEFTMOUSE, wmEvent::type, ui_do_but_extra_operator_icon(), ui_do_but_TEX(), wmEvent::val, and WM_UI_HANDLER_BREAK.
Referenced by ui_do_button().
|
static |
Definition at line 5639 of file interface_handlers.c.
References blender::math::abs(), BLI_rctf_cent_x(), BLI_rctf_size_x(), button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, C, CLAMP, copy_v2_fl(), copy_v2_v2_int(), data, ELEM, EVT_ESCKEY, EVT_MINUSKEY, EVT_PADENTER, EVT_RETKEY, float(), if(), KM_ALT, KM_CTRL, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, wmEvent::modifier, MOUSEMOVE, MOUSEPAN, powf, PROP_SCALE_LOG, uiBut::rect, RIGHTMOUSE, uiBut::softmax, uiBut::softmin, uiBut::type, type, wmEvent::type, ui_but_is_float(), ui_but_scale_type(), ui_do_but_textedit(), ui_do_but_textedit_select(), ui_event_is_snap(), ui_multibut_states_apply(), ui_numedit_apply(), ui_numedit_but_SLI(), ui_pan_to_scroll(), UI_PROP_SCALE_LOG_SNAP_OFFSET, ui_window_to_block(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, rctf::xmax, rctf::xmin, and wmEvent::xy.
Referenced by ui_do_button().
|
static |
Definition at line 4597 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, C, uiBut::custom_data, data, ELEM, EVT_PADENTER, EVT_RETKEY, KM_CLICK, KM_CTRL, KM_DBL_CLICK, KM_PRESS, LEFTMOUSE, wmEvent::modifier, NULL, PROP_POINTER, PROP_STRING, RNA_property_type(), uiBut::rnaprop, wmEvent::type, ui_do_but_ANY_drag_toggle(), ui_do_but_textedit(), ui_do_but_textedit_select(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 4640 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_TEXT_SELECTING, C, data, ELEM, uiBut::emboss, EVT_BUT_OPEN, EVT_PADENTER, EVT_RETKEY, KM_CTRL, KM_PRESS, LEFTMOUSE, wmEvent::modifier, wmEvent::type, ui_but_extra_operator_icon_mouse_over_get(), UI_but_is_utf8(), ui_do_but_textedit(), ui_do_but_textedit_select(), UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS, wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_but_SEARCH_UNLINK(), and ui_do_button().
|
static |
Definition at line 3619 of file interface_handlers.c.
References ATTR_FALLTHROUGH, AUTOCOMPLETE_FULL_MATCH, uiBut::autocomplete_func, AUTOCOMPLETE_NO_MATCH, BLI_assert, BLI_str_utf8_size(), button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_TEXT_SELECTING, C, uiBut::changed, CTX_wm_window(), data, ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_BACKSPACEKEY, EVT_CKEY, EVT_DELKEY, EVT_DOWNARROWKEY, EVT_ENDKEY, EVT_ESCKEY, EVT_HOMEKEY, EVT_LEFTARROWKEY, EVT_PADENTER, EVT_PADPERIOD, EVT_RETKEY, EVT_RIGHTARROWKEY, EVT_TABKEY, EVT_UPARROWKEY, EVT_VKEY, EVT_XKEY, EVT_ZKEY, uiBut::flag, wmWindow::ime_data, KM_ALT, KM_CTRL, KM_DBL_CLICK, KM_OSKEY, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, wmEvent::modifier, MOUSEMOVE, MOUSEPAN, NULL, uiBut::pos, RIGHTMOUSE, uiBut::selend, uiBut::selsta, STRCUR_DIR_NEXT, STRCUR_DIR_PREV, STRCUR_JUMP_ALL, STRCUR_JUMP_DELIM, STRCUR_JUMP_NONE, uiBut::type, wmEvent::type, ui_apply_but(), UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, ui_but_contains_pt(), UI_BUT_TEXTEDIT_UPDATE, ui_but_update_edited(), ui_do_but_extra_operator_icon(), ui_do_but_extra_operator_icons_mousemove(), ui_mouse_motion_keynav_init(), ui_mouse_motion_keynav_test(), ui_searchbox_event(), ui_searchbox_inside(), ui_searchbox_update(), ui_textedit_autocomplete(), UI_TEXTEDIT_COPY, ui_textedit_copypaste(), UI_TEXTEDIT_CUT, ui_textedit_delete(), ui_textedit_delete_selection(), ui_textedit_insert_ascii(), ui_textedit_insert_buf(), ui_textedit_move(), ui_textedit_next_but(), UI_TEXTEDIT_PASTE, ui_textedit_prev_but(), ui_textedit_set_cursor_pos(), ui_textedit_string_set(), ui_textedit_undo(), ui_textedit_undo_push(), ui_window_to_block_fl(), update(), wmEvent::utf8_buf, wmEvent::val, void, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_IME_COMPOSITE_END, WM_IME_COMPOSITE_EVENT, WM_IME_COMPOSITE_START, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_do_but_NUM(), ui_do_but_SLI(), ui_do_but_TAB(), and ui_do_but_TEX().
|
static |
Definition at line 3974 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_TEXT_EDITING, C, data, ED_region_tag_redraw(), KM_RELEASE, LEFTMOUSE, MOUSEMOVE, wmEvent::type, ui_but_update(), ui_textedit_set_cursor_select(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_do_but_NUM(), ui_do_but_SLI(), ui_do_but_TAB(), and ui_do_but_TEX().
|
static |
Definition at line 4686 of file interface_handlers.c.
References uiBut::active, BLI_assert, uiBut::block, button_activate_exit(), button_activate_init(), BUTTON_ACTIVATE_OVER, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, C, data, ELEM, EVT_PADENTER, EVT_RETKEY, if(), KM_CTRL, KM_DBL_CLICK, KM_PRESS, KM_RELEASE, LEFTMOUSE, wmEvent::modifier, MOUSEPAN, uiBut::next, uiBut::prev, uiBut::type, type, wmEvent::type, ui_apply_but(), ui_block_is_menu(), UI_BTYPE_ROW, ui_but_find_select_in_enum(), ui_but_find_select_in_enum__cmp(), ui_do_but_ANY_drag_toggle(), ui_do_but_extra_operator_icon(), ui_pan_to_scroll(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 7855 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, EVT_ESCKEY, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, wmEvent::modifier, MOUSEMOVE, wmEvent::type, ui_numedit_apply(), ui_numedit_but_TRACKPREVIEW(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 6328 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, ELEM, EVT_ESCKEY, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, RIGHTMOUSE, snap(), wmEvent::type, ui_event_is_snap(), ui_event_to_snap(), ui_numedit_apply(), ui_numedit_but_UNITVEC(), ui_window_to_block(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 4767 of file interface_handlers.c.
References BLI_assert, uiButViewItem::but, button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_WAIT_DRAG, C, CTX_wm_region(), data, ED_region_tag_redraw(), KM_CLICK, KM_DBL_CLICK, KM_PRESS, LEFTMOUSE, uiBut::type, wmEvent::type, UI_BTYPE_VIEW_ITEM, ui_but_extra_operator_icon_mouse_over_get(), ui_do_but_EXIT(), UI_view_item_begin_rename(), wmEvent::val, uiButViewItem::view_item, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 7764 of file interface_handlers.c.
References button_activate_state(), BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, C, data, EVT_BACKSPACEKEY, EVT_ESCKEY, KM_PRESS, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, uiBut::poin, wmEvent::type, ui_numedit_apply(), ui_numedit_but_WAVEFORM(), ui_window_to_block(), wmEvent::val, Scopes::wavefrm_yfac, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_do_button().
|
static |
Definition at line 7902 of file interface_handlers.c.
References blender::math::abs(), uiBut::active, uiBlock::aspect, BLI_assert, uiBut::block, BUTTON_ACTIVATE_OVER, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, C, data, dot_v2v2(), DRAG_MULTINUM_THRESHOLD_DRAG_X, DRAG_MULTINUM_THRESHOLD_DRAG_Y, DRAG_MULTINUM_THRESHOLD_VERTICAL, ED_region_tag_redraw(), ELEM, EVT_BUT_OPEN, EVT_CKEY, EVT_PADENTER, EVT_RETKEY, EVT_VKEY, fabsf, uiBut::flag, is_disabled, ISMOUSE_MOTION, KM_ALT, KM_CTRL, KM_OSKEY, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, len_squared_v2(), wmEvent::modifier, normalize_v2_v2(), uiBut::poin, uiBut::pointype, wmEvent::prev_xy, RIGHTMOUSE, sqrtf, uiBut::type, wmEvent::type, ui_apply_but(), UI_BTYPE_BLOCK, UI_BTYPE_BUT, UI_BTYPE_BUT_MENU, UI_BTYPE_BUT_TOGGLE, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N, UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_DECORATOR, UI_BTYPE_EXTRA, UI_BTYPE_GRIP, UI_BTYPE_HISTOGRAM, UI_BTYPE_HOTKEY_EVENT, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_ICON_TOGGLE, UI_BTYPE_ICON_TOGGLE_N, UI_BTYPE_IMAGE, UI_BTYPE_KEY_EVENT, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_LISTROW, UI_BTYPE_MENU, UI_BTYPE_NODE_SOCKET, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_POPOVER, UI_BTYPE_PREVIEW_TILE, UI_BTYPE_PROGRESS_BAR, UI_BTYPE_PULLDOWN, UI_BTYPE_ROUNDBOX, UI_BTYPE_ROW, UI_BTYPE_SCROLL, UI_BTYPE_SEARCH_MENU, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BTYPE_SEPR_SPACER, UI_BTYPE_TAB, UI_BTYPE_TEXT, UI_BTYPE_TOGGLE, UI_BTYPE_TOGGLE_N, UI_BTYPE_TRACK_PREVIEW, UI_BTYPE_UNITVEC, UI_BTYPE_VECTORSCOPE, UI_BTYPE_VIEW_ITEM, UI_BTYPE_WAVEFORM, ui_but_copy(), UI_BUT_DISABLED, ui_but_list_row_text_activate(), ui_but_paste(), UI_BUT_VALUE_CLEAR, ui_do_but_BLOCK(), ui_do_but_BUT(), ui_do_but_COLOR(), ui_do_but_COLORBAND(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), ui_do_but_EXIT(), ui_do_but_extra_operator_icon(), ui_do_but_GRIP(), ui_do_but_HISTOGRAM(), ui_do_but_HOTKEYEVT(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_KEYEVT(), ui_do_but_LISTROW(), ui_do_but_NUM(), ui_do_but_SCROLL(), ui_do_but_SEARCH_UNLINK(), ui_do_but_SLI(), ui_do_but_TAB(), ui_do_but_TEX(), ui_do_but_TOG(), ui_do_but_TRACKPREVIEW(), ui_do_but_UNITVEC(), ui_do_but_VIEW_ITEM(), ui_do_but_WAVEFORM(), ui_multibut_states_create(), ui_multibut_states_tag(), ui_popup_context_menu_for_button(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_but_activate_event(), ui_handle_button_event(), ui_handle_button_over(), and ui_handle_view_item_event().
Definition at line 1578 of file interface_handlers.c.
References ELEM, uiBut::flag, uiBut::icon, UI_BUT_DISABLED, ui_but_is_bool(), and UI_but_is_decorator.
Referenced by ui_but_drag_init(), ui_but_is_drag_toggle(), and ui_drag_toggle_set_xy_xy().
|
static |
Definition at line 1598 of file interface_handlers.c.
References PointerRNA::data, uiBut::icon, uiBut::iconadd, NULL, uiBut::poin, uiBut::rnapoin, ui_but_is_bool(), and ui_but_is_pushed().
Referenced by ui_but_drag_init(), and ui_drag_toggle_set_xy_xy().
|
static |
Initialize Locking:
Check if we need to initialize the lock axis by finding if the first button we mouse over is X or Y aligned, then lock the mouse to that axis after.
Definition at line 1677 of file interface_handlers.c.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), uiDragToggleHandle::but_cent_start, C, copy_v2_v2_int(), CTX_wm_region(), ED_region_tag_redraw(), fabsf, uiBut::flag, uiDragToggleHandle::is_xy_lock_init, len_manhattan_v2v2(), NULL, uiDragToggleHandle::pushed_state, uiBut::rect, UI_BUT_DRAG_LOCK, ui_but_find_mouse_over_ex(), ui_drag_toggle_set_xy_xy(), xy, uiDragToggleHandle::xy_last, and uiDragToggleHandle::xy_lock.
Referenced by ui_handler_region_drag_toggle().
|
static |
Definition at line 1624 of file interface_handlers.c.
References BLI_rctf_isect_segment(), C, LISTBASE_FOREACH, ARegion::regiontype, RGN_TYPE_TEMPORARY, ui_apply_but_funcs_after(), UI_but_execute(), ui_but_is_interactive(), ui_but_update_edited(), ui_but_update_preferences_dirty(), ui_drag_toggle_but_is_supported(), ui_drag_toggle_but_pushed_state(), ui_window_to_block_fl(), ARegion::uiblocks, and UNPACK2.
Referenced by ui_drag_toggle_set().
Definition at line 724 of file interface_handlers.c.
References ELEM, EVT_LEFTCTRLKEY, EVT_LEFTSHIFTKEY, EVT_RIGHTCTRLKEY, EVT_RIGHTSHIFTKEY, and wmEvent::type.
Referenced by ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_NUM(), ui_do_but_SLI(), and ui_do_but_UNITVEC().
Definition at line 701 of file interface_handlers.c.
Referenced by ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_NUM(), and ui_do_but_UNITVEC().
void ui_handle_afterfunc_add_operator | ( | 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().
|
static |
For executing operators after the button is pressed. (some non operator buttons need to trigger operators), see: T37795.
context_but | A button from which to get the context from (uiBut.context ) for the operator execution. |
Definition at line 764 of file interface_handlers.c.
References uiAfterFunc::context, uiBut::context, CTX_store_copy(), uiAfterFunc::drawstr, NULL, uiAfterFunc::opcontext, uiAfterFunc::opptr, uiAfterFunc::optype, ot, ui_afterfunc_new(), and ui_but_drawstr_without_sep_char().
Referenced by ui_handle_afterfunc_add_operator(), and ui_list_invoke_item_operator().
|
static |
Definition at line 9050 of file interface_handlers.c.
References uiBut::active, button_activate_exit(), button_activate_init(), C, data, type, and ui_region_find_active_but().
Referenced by button_activate_init(), ui_handle_button_activate_by_type(), ui_handle_button_event(), ui_handle_menu_event(), ui_handle_view_item_event(), and ui_handler_region_menu().
|
static |
Use for key accelerator or default key to activate the button even if its not active.
Definition at line 9068 of file interface_handlers.c.
References BUTTON_ACTIVATE, BUTTON_ACTIVATE_APPLY, BUTTON_ACTIVATE_OPEN, C, ELEM, uiBut::type, UI_BTYPE_BLOCK, UI_BTYPE_BUT_MENU, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN, and ui_handle_button_activate().
Referenced by ui_handle_menu_event().
Definition at line 9130 of file interface_handlers.c.
References uiBut::active, ATTR_FALLTHROUGH, uiBut::block, button_activate_exit(), button_activate_init(), BUTTON_ACTIVATE_OVER, button_activate_state(), BUTTON_ACTIVATE_TEXT_EDITING, BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT, BUTTON_STATE_INIT, BUTTON_STATE_MENU_OPEN, BUTTON_STATE_WAIT_DRAG, BUTTON_STATE_WAIT_FLASH, BUTTON_STATE_WAIT_RELEASE, button_tooltip_timer_reset(), C, wmEvent::customdata, data, ED_region_tag_redraw_no_rebuild(), ELEM, EVT_BUT_CANCEL, uiBut::flag, uiBlock::flag, uiBlock::handle, uiBut::hold_func, KM_PRESS, KM_RELEASE, l, LEFTMOUSE, len_manhattan_v2v2_int(), MEM_SAFE_FREE, uiPopupBlockHandle::menuretval, MIDDLEMOUSE, MOUSEMOVE, MOUSEPAN, BMLoop::next, NULL, wmEvent::prev_xy, PROP_FLOAT, PROP_INT, RIGHTMOUSE, RNA_property_type(), uiBut::rnaprop, state, TIMER, uiBut::type, wmEvent::type, UI_ACTIVE, ui_block_is_menu(), ui_block_is_pie_menu(), UI_BLOCK_POPOVER_ONCE, ui_blocks_set_tooltips(), UI_BTYPE_COLOR, ui_but_contains_point_px(), UI_BUT_DISABLED, ui_but_find_mouse_over(), ui_but_is_editable(), ui_but_is_editable_as_text(), ui_but_is_popover_once_compat(), ui_but_range_set_hard(), ui_but_range_set_soft(), UI_but_tooltip_timer_remove(), ui_but_value_set(), ui_button_value_default(), ui_do_but_extra_operator_icons_mousemove(), ui_do_button(), ui_handle_button_activate(), ui_region_contains_point_px(), UI_RETURN_CANCEL, UI_SELECT, wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WINDEACTIVATE, WM_event_add_timer(), WM_EVENT_CURSOR_MOTION_THRESHOLD, WM_event_remove_timer(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_handle_menu_button(), ui_handler_region_menu(), and ui_region_handler().
Definition at line 8962 of file interface_handlers.c.
References uiBut::active, uiBut::block, button_activate_init(), BUTTON_ACTIVATE_OVER, C, uiHandleButtonData::disable_force, EVT_BUT_OPEN, KM_ALT, KM_CTRL, wmEvent::modifier, MOUSEMOVE, NULL, uiHandleButtonData::tooltip_force, wmEvent::type, ui_but_find_mouse_over_ex(), ui_but_find_open_event(), ui_but_is_interactive(), ui_do_button(), WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_handle_menu_button(), and ui_region_handler().
|
static |
Definition at line 9727 of file interface_handlers.c.
References uiBut::active, uiBut::block, button_activate_exit(), button_activate_state(), BUTTON_STATE_HIGHLIGHT, C, copy_v3_v3(), data, ISKEYBOARD, uiPopupBlockHandle::menuretval, MOUSEMOVE, uiPopupBlockHandle::retvalue, uiPopupBlockHandle::retvec, uiBut::type, wmEvent::type, ui_apply_but(), UI_BTYPE_COLOR, UI_BTYPE_MENU, ui_but_contains_point_px(), ui_but_update(), UI_RETURN_CANCEL, UI_RETURN_OK, UI_RETURN_OUT, UI_RETURN_UPDATE, uiHandleButtonData::used_mouse, and wmEvent::xy.
Referenced by ui_handle_menu_return_submenu(), and ui_handler_region_menu().
|
static |
Definition at line 9552 of file interface_handlers.c.
References uiBut::block, C, CLAMP, uiListDyn::columns, uiBut::custom_data, uiList::dyn_data, ED_region_tag_redraw(), ED_region_tag_refresh_ui(), ELEM, EVT_DOWNARROWKEY, EVT_LEFTARROWKEY, EVT_RIGHTARROWKEY, EVT_UPARROWKEY, uiList::filter_flag, uiList::flag, wmEvent::flag, uiListDyn::height, uiListDyn::items_filter_flags, uiListDyn::items_filter_neworder, uiListDyn::items_len, uiListDyn::items_shown, KM_ALT, KM_CTRL, KM_OSKEY, KM_PRESS, KM_SHIFT, LEFTMOUSE, len, uiList::list_grip, uiList::list_scroll, max, MEM_freeN, MEM_mallocN, min, wmEvent::modifier, MOUSEPAN, RNA_property_int_get(), RNA_property_int_range(), uiBut::rnapoin, uiBut::rnaprop, type, wmEvent::type, ui_list_activate_row_from_index(), UI_LIST_AUTO_SIZE_THRESHOLD, ui_list_get_increment(), ui_list_handle_click_drag(), ui_pan_to_scroll(), ui_window_to_block(), UILST_FLT_EXCLUDE, UILST_FLT_ITEM, UILST_SCROLL_TO_ACTIVE_ITEM, uiListDyn::visual_height, uiListDyn::visual_height_min, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_EVENT_SCROLL_INVERT, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_handle_menus_recursive(), and ui_region_handler().
|
static |
Definition at line 10082 of file interface_handlers.c.
References uiBut::active, uiBut::block, C, uiPopupBlockHandle::ctx_area, uiPopupBlockHandle::ctx_region, CTX_wm_area(), CTX_wm_area_set(), CTX_wm_region(), CTX_wm_region_set(), ISMOUSE_BUTTON, KM_RELEASE, NULL, uiHandleButtonData::region, uiPopupBlockHandle::region, uiBut::type, wmEvent::type, ui_block_is_menu(), ui_block_is_pie_menu(), UI_BTYPE_SEARCH_MENU, ui_but_contains_point_px(), ui_handle_button_event(), ui_handle_button_over(), ui_region_auto_open_clear(), ui_region_contains_point_px(), ui_region_find_active_but(), wmEvent::val, and wmEvent::xy.
Referenced by ui_handle_menu_event(), ui_handle_menus_recursive(), and ui_pie_handler().
|
static |
Definition at line 10166 of file interface_handlers.c.
References activate(), uiBut::active, add_v2_v2v2_int(), uiPopupBlockCreate::arg, ATTR_FALLTHROUGH, BLI_rctf_isect_pt(), uiBlock::block_event_func, BUTTON_ACTIVATE, BUTTON_ACTIVATE_APPLY, button_activate_exit(), BUTTON_ACTIVATE_OPEN, button_modal_state(), uiBlock::buttons, C, uiHandleButtonData::cancel, copy_v2_v2_int(), count, CTX_wm_manager(), CTX_wm_window(), wmEvent::customdata, PointerRNA::data, uiBlock::direction, uiPopupBlockHandle::dotowards, ELEM, uiPopupBlockCreate::event_xy, EVT_AKEY, EVT_BKEY, EVT_CKEY, EVT_DKEY, EVT_DOWNARROWKEY, EVT_EIGHTKEY, EVT_EKEY, EVT_ENDKEY, EVT_ESCKEY, EVT_FIVEKEY, EVT_FKEY, EVT_FOURKEY, EVT_GKEY, EVT_HKEY, EVT_HOMEKEY, EVT_IKEY, EVT_JKEY, EVT_KKEY, EVT_LEFTARROWKEY, EVT_LKEY, EVT_MKEY, EVT_NINEKEY, EVT_NKEY, EVT_OKEY, EVT_ONEKEY, EVT_PAD0, EVT_PAD1, EVT_PAD2, EVT_PAD3, EVT_PAD4, EVT_PAD5, EVT_PAD6, EVT_PAD7, EVT_PAD8, EVT_PAD9, EVT_PADENTER, EVT_PAGEDOWNKEY, EVT_PAGEUPKEY, EVT_PKEY, EVT_QKEY, EVT_RETKEY, EVT_RIGHTARROWKEY, EVT_RKEY, EVT_SEVENKEY, EVT_SIXKEY, EVT_SKEY, EVT_THREEKEY, EVT_TKEY, EVT_TWOKEY, EVT_UKEY, EVT_UPARROWKEY, EVT_VKEY, EVT_WKEY, EVT_XKEY, EVT_YKEY, EVT_ZEROKEY, EVT_ZKEY, ListBase::first, uiBut::flag, uiBlock::flag, wmEvent::flag, uiPopupBlockHandle::grab_xy_prev, uiPopupBlockHandle::is_grab, uiPopupBlockHandle::keynav_state, KM_ALT, KM_CLICK, KM_CTRL, KM_DBL_CLICK, KM_OSKEY, KM_PRESS, KM_RELEASE, KM_SHIFT, LEFTMOUSE, uiBut::menu_key, MENU_SCROLL_BOTTOM, MENU_SCROLL_DOWN, MENU_SCROLL_INTERVAL, MENU_SCROLL_TOP, MENU_SCROLL_UP, uiPopupBlockHandle::menuretval, MIDDLEMOUSE, wmEvent::modifier, MOUSEMOVE, MOUSEPAN, uiBut::next, uiSafetyRct::next, NULL, uiSafetyRct::parent, uiPopupBlockHandle::popup_create_vars, PROP_LAYER, PROP_LAYER_MEMBER, uiBlock::rect, uiPopupBlockHandle::region, RIGHTMOUSE, RNA_property_subtype(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, uiBlock::saferct, uiSafetyRct::safety, uiPopupBlockHandle::scrolltimer, uiHandleButtonData::state, sub_v2_v2v2_int(), TIMER, uiBut::type, type, wmEvent::type, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, UI_BLOCK_IS_FLIP, ui_block_is_menu(), UI_BLOCK_LOOP, UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_NUMSELECT, UI_BLOCK_OUT_1, UI_BLOCK_POPOVER, UI_BLOCK_POPOVER_ONCE, UI_BLOCK_POPUP_HOLD, UI_BTYPE_BLOCK, UI_BTYPE_BUT, UI_BTYPE_BUT_MENU, UI_BTYPE_IMAGE, UI_BTYPE_LABEL, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BUT_ACTIVE_DEFAULT, ui_but_contains_point_px(), UI_BUT_DISABLED, UI_but_execute(), ui_but_first(), ui_but_last(), ui_but_next(), ui_but_prev(), UI_but_tooltip_timer_remove(), UI_DIR_UP, ui_handle_button_activate(), ui_handle_button_activate_by_type(), ui_handle_menu_button(), UI_HIDDEN, ui_menu_pass_event_to_parent_if_nonactive(), ui_menu_scroll_apply_offset_y(), ui_menu_scroll_step(), ui_menu_scroll_test(), ui_menu_scroll_to_but(), ui_menu_scroll_to_y(), ui_mouse_motion_keynav_init(), ui_mouse_motion_keynav_test(), ui_mouse_motion_towards_check(), ui_mouse_motion_towards_init(), ui_mouse_motion_towards_reinit(), ui_pan_to_scroll(), UI_popover_once_clear(), ui_popup_translate(), ui_region_find_active_but(), ui_region_find_first_but_test_flag(), UI_RETURN_CANCEL, UI_RETURN_OK, UI_RETURN_OUT, UI_RETURN_OUT_PARENT, UI_RETURN_POPUP_OK, UI_RETURN_UPDATE, UI_UNIT_Y, ui_window_to_block(), ARegion::uiblocks, USER_MENUOPENAUTO, wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_event_add_mousemove(), WM_event_add_timer(), WM_EVENT_IS_REPEAT, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, wmEvent::xy, and rctf::ymax.
Referenced by ui_handle_menus_recursive().
|
static |
Definition at line 10794 of file interface_handlers.c.
References uiBut::active, BLI_assert, uiPopupBlockHandle::butretval, C, data, ListBase::first, uiBlock::flag, uiPopupBlockHandle::menuretval, uiPopupBlockHandle::region, UI_BLOCK_KEEP_OPEN, UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_POPOVER, ui_handle_button_return_submenu(), ui_mouse_motion_towards_reinit(), ui_region_find_active_but(), UI_RETURN_CANCEL, UI_RETURN_OK, UI_RETURN_UPDATE, ARegion::uiblocks, update(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_handle_menus_recursive().
|
static |
Definition at line 11171 of file interface_handlers.c.
References uiBut::active, BLI_rctf_isect_pt(), C, data, PieMenuData::event_type, ListBase::first, uiBlock::flag, KM_DBL_CLICK, LEFTMOUSE, NULL, uiBlock::pie_data, uiBlock::rect, uiPopupBlockHandle::region, TIMER, uiBut::type, wmEvent::type, ui_block_is_menu(), UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_POPOVER, UI_BLOCK_RADIAL, UI_BTYPE_SEARCH_MENU, ui_handle_list_event(), ui_handle_menu_button(), ui_handle_menu_event(), ui_handle_menu_return_submenu(), ui_list_find_mouse_over(), ui_mouse_motion_towards_reinit(), ui_pie_handler(), ui_region_find_active_but(), UI_RETURN_OUT_PARENT, ui_window_to_block(), ARegion::uiblocks, wmEvent::val, void, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_handler_region_menu(), and ui_popup_handler().
|
static |
Definition at line 9712 of file interface_handlers.c.
References BLI_assert, uiBut::block, BUTTON_ACTIVATE_OVER, C, LEFTMOUSE, uiBut::type, wmEvent::type, UI_BTYPE_VIEW_ITEM, ui_do_button(), ui_handle_button_activate(), and WM_UI_HANDLER_CONTINUE.
Referenced by ui_region_handler().
Definition at line 9680 of file interface_handlers.c.
References BLI_listbase_is_empty(), uiBut::flag, LISTBASE_FOREACH, uiBut::type, UI_ACTIVE, UI_BTYPE_VIEW_ITEM, ui_view_item_find_mouse_over(), ARegion::uiblocks, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_region_handler().
|
static |
Definition at line 1739 of file interface_handlers.c.
References C, CTX_wm_region(), CTX_wm_window(), KM_RELEASE, LEFTMOUSE, wmWindow::modalhandlers, MOUSEMOVE, NULL, wmEvent::type, ui_apply_but_undo(), ui_but_find_mouse_over_ex(), ui_drag_toggle_set(), ui_handler_region_drag_toggle_remove(), wmEvent::val, WM_event_add_mousemove(), WM_event_remove_ui_handler(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, wmEvent::xy, and uiDragToggleHandle::xy_init.
Referenced by ui_but_drag_init(), and ui_popup_handler().
Definition at line 1733 of file interface_handlers.c.
References MEM_freeN.
Referenced by ui_but_drag_init(), ui_handler_region_drag_toggle(), and ui_popup_handler().
|
static |
Definition at line 11366 of file interface_handlers.c.
References uiBut::active, BLI_rctf_isect_rect_x(), BLI_rctf_isect_rect_y(), BUTTON_ACTIVATE_OVER, button_activate_state(), BUTTON_STATE_MENU_OPEN, C, CTX_wm_menu(), CTX_wm_menu_set(), CTX_wm_region(), CTX_wm_screen(), data, ELEM, uiBut::flag, KM_DBL_CLICK, uiHandleButtonData::menu, MOUSEMOVE, NULL, wmEvent::prev_xy, uiBut::rect, uiPopupBlockHandle::region, TIMER, uiBut::type, wmEvent::type, ui_apply_but_funcs_after(), ui_blocks_set_tooltips(), UI_BTYPE_MENU, UI_BTYPE_POPOVER, UI_BTYPE_PULLDOWN, UI_BUT_DISABLED, ui_but_find_mouse_over(), UI_DIR_DOWN, UI_DIR_LEFT, UI_DIR_RIGHT, UI_DIR_UP, ui_handle_button_activate(), ui_handle_button_event(), ui_handle_button_return_submenu(), ui_handle_menus_recursive(), ui_region_find_active_but(), ui_screen_region_find_mouse_over(), wmEvent::val, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by button_activate_state().
|
static |
Activate the underlying list-row button, so the row is highlighted. Early exits if activate_dragging is true, but the custom drag operator fails to execute. Gives the wanted behavior where the item is activated on a click-drag event when the custom drag operator is executed.
Definition at line 9412 of file interface_handlers.c.
References C, uiListDyn::custom_activate_optype, uiListDyn::custom_drag_opptr, uiListDyn::custom_drag_optype, uiList::dyn_data, NULL, UI_but_execute(), ui_but_find_mouse_over(), ui_list_invoke_item_operator(), ui_list_row_find_mouse_over(), WM_event_drag_start_xy(), WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_list_handle_click_drag().
|
static |
Definition at line 9509 of file interface_handlers.c.
References C, uiList::flag, RNA_property_int_set(), RNA_property_update(), uiBut::rnapoin, uiBut::rnaprop, ui_apply_but_undo(), UI_but_execute(), ui_list_row_find_from_index(), and UILST_SCROLL_TO_ACTIVE_ITEM.
Referenced by ui_handle_list_event().
|
static |
Definition at line 9531 of file interface_handlers.c.
References ELEM, EVT_DOWNARROWKEY, EVT_LEFTARROWKEY, EVT_UPARROWKEY, uiList::filter_sort_flag, uiList::layout_type, type, UILST_FLT_SORT_REVERSE, UILST_LAYOUT_BIG_PREVIEW_GRID, UILST_LAYOUT_GRID, and WHEELUPMOUSE.
Referenced by ui_handle_list_event().
|
static |
Definition at line 9473 of file interface_handlers.c.
References activate(), C, KM_CLICK, KM_CLICK_DRAG, LEFTMOUSE, wmEvent::type, ui_list_activate_hovered_row(), ui_list_is_hovering_draggable_but(), wmEvent::val, and WM_HANDLER_CONTINUE.
Referenced by ui_handle_list_event().
|
static |
context_but | The button to use context from when calling or polling the operator. |
Definition at line 1174 of file interface_handlers.c.
References C, ot, ui_but_context_poll_operator(), ui_handle_afterfunc_add_operator_ex(), and WM_OP_INVOKE_DEFAULT.
Referenced by ui_apply_but_LISTROW(), and ui_list_activate_hovered_row().
|
static |
Definition at line 9453 of file interface_handlers.c.
References C, uiListDyn::custom_drag_optype, uiList::dyn_data, NULL, ui_but_context_poll_operator(), ui_but_drag_is_draggable(), ui_but_find_mouse_over_ex(), and WM_event_drag_start_xy().
Referenced by ui_list_handle_click_drag().
|
static |
Special function to handle nested menus. let the parent menu get the event.
This allows a menu to be open, but send key events to the parent if there's no active buttons.
Without this keyboard navigation from menus won't work.
Definition at line 10068 of file interface_handlers.c.
References BLI_assert, uiPopupBlockHandle::menuretval, NULL, UI_RETURN_OUT, UI_RETURN_OUT_PARENT, void, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_handle_menu_event().
Definition at line 9942 of file interface_handlers.c.
References BLI_assert, uiBlock::buttons, ED_region_tag_redraw(), uiBlock::handle, LISTBASE_FOREACH, max_ff(), min_ff(), uiBlock::rect, uiPopupBlockHandle::scrolloffset, ui_block_is_menu(), UI_MENU_SCROLL_PAD, ui_popup_block_scrolltest(), UI_UNIT_Y, rctf::ymax, and rctf::ymin.
Referenced by ui_handle_menu_event(), ui_menu_scroll_to_but(), and ui_menu_scroll_to_y().
Definition at line 10023 of file interface_handlers.c.
References BLI_assert, uiBlock::flag, uiBlock::rect, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, ui_menu_scroll_to_y(), UI_UNIT_Y, rctf::ymax, and rctf::ymin.
Referenced by ui_handle_menu_event().
|
static |
Definition at line 9925 of file interface_handlers.c.
References uiBlock::flag, uiBlock::rect, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, UI_MENU_SCROLL_MOUSE, and rctf::ymax.
Referenced by ui_handle_menu_event(), and ui_menu_scroll_to_y().
Scroll to activated button.
Definition at line 9985 of file interface_handlers.c.
References uiBlock::flag, uiBut::rect, uiBlock::rect, UI_BLOCK_CLIPBOTTOM, UI_BLOCK_CLIPTOP, ui_menu_scroll_apply_offset_y(), UI_MENU_SCROLL_ARROW, rctf::ymax, and rctf::ymin.
Referenced by ui_handle_menu_event().
Scroll to y location (in block space, see ui_window_to_block).
Definition at line 10006 of file interface_handlers.c.
References ui_menu_scroll_apply_offset_y(), ui_menu_scroll_test(), UI_UNIT_Y, and y.
Referenced by ui_handle_menu_event(), and ui_menu_scroll_step().
|
static |
Definition at line 9899 of file interface_handlers.c.
References copy_v2_v2_int(), uiKeyNavLock::event_xy, uiKeyNavLock::is_keynav, and wmEvent::xy.
Referenced by ui_do_but_textedit(), and ui_handle_menu_event().
|
static |
Return true if key-input isn't blocking mouse-motion, or if the mouse-motion is enough to disable key-input.
Definition at line 9908 of file interface_handlers.c.
References BUTTON_KEYNAV_PX_LIMIT, uiKeyNavLock::event_xy, uiKeyNavLock::is_keynav, len_manhattan_v2v2_int(), and wmEvent::xy.
Referenced by ui_do_but_textedit(), and ui_handle_menu_event().
|
static |
Definition at line 9826 of file interface_handlers.c.
References add_v2_v2(), BLI_assert, BLI_rctf_cent_x(), BLI_rctf_cent_y(), BUTTON_MOUSE_TOWARDS_THRESH, uiPopupBlockHandle::dotowards, ListBase::first, uiBlock::flag, isect_point_tri_v2(), len_squared_v2v2(), MENU_TOWARDS_MARGIN, MENU_TOWARDS_WIGGLE_ROOM, ARegion::next, normalize_v2_length(), PIL_check_seconds_timer(), uiBlock::rect, uiPopupBlockHandle::region, sub_v2_v2v2(), uiPopupBlockHandle::towards_xy, uiPopupBlockHandle::towardstime, ui_block_is_menu(), UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_POPOVER, ui_block_to_window_rctf(), ARegion::uiblocks, rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Referenced by ui_handle_menu_event().
|
static |
Definition at line 9816 of file interface_handlers.c.
References ui_mouse_motion_towards_init_ex(), and xy.
Referenced by ui_handle_menu_event().
|
static |
Function used to prevent losing the open menu when using nested pull-downs, when moving mouse towards the pull-down menu over other buttons that could steal the highlight from the current button, only checks:
Definition at line 9795 of file interface_handlers.c.
References BLI_assert, uiPopupBlockHandle::dotowards, ListBase::first, PIL_check_seconds_timer(), uiPopupBlockHandle::region, uiPopupBlockHandle::towards_xy, uiPopupBlockHandle::towardstime, UI_BLOCK_MOVEMOUSE_QUIT, UI_BLOCK_POPOVER, ARegion::uiblocks, and xy.
Referenced by ui_mouse_motion_towards_init(), and ui_mouse_motion_towards_reinit().
|
static |
Definition at line 9821 of file interface_handlers.c.
References ui_mouse_motion_towards_init_ex(), and xy.
Referenced by ui_handle_menu_event(), ui_handle_menu_return_submenu(), and ui_handle_menus_recursive().
|
static |
Definition at line 615 of file interface_handlers.c.
References data, and ui_mouse_scale_warp_factor().
Referenced by ui_numedit_but_HSVCIRCLE(), ui_numedit_but_HSVCUBE(), and ui_numedit_but_SLI().
Definition at line 610 of file interface_handlers.c.
Referenced by ui_mouse_scale_warp(), ui_numedit_but_CURVE(), and ui_numedit_but_CURVEPROFILE().
|
static |
Definition at line 1336 of file interface_handlers.c.
References BLI_assert, BLI_linklist_prepend(), uiButMultiState::but, data, uiBut::flag, uiSelectContextStore::is_copy, MEM_callocN, uiButMultiState::origvalue, uiButMultiState::select_others, UI_BUT_DRAG_MULTI, ui_but_value_get(), and UI_butstore_register().
Referenced by ui_multibut_states_create().
|
static |
Definition at line 1387 of file interface_handlers.c.
References BLI_linklist_freeN(), data, uiSelectContextStore::elems, LinkNode::link, MEM_freeN, LinkNode::next, next, NULL, uiButMultiState::select_others, and UI_butstore_free().
Referenced by button_activate_exit().
|
static |
Definition at line 1353 of file interface_handlers.c.
References uiButMultiState::but, data, l, BMLoop::next, and NULL.
Referenced by ui_multibut_restore(), and ui_multibut_states_apply().
|
static |
Definition at line 1366 of file interface_handlers.c.
References uiBlock::buttons, C, data, uiSelectContextStore::elems_len, LISTBASE_FOREACH, uiButMultiState::origvalue, uiButMultiState::select_others, UI_BUT_DRAG_MULTI, ui_but_value_set(), ui_multibut_lookup(), ui_selectcontext_apply(), and UNUSED_VARS.
Referenced by ui_apply_but().
|
static |
Definition at line 1497 of file interface_handlers.c.
References BLI_assert, uiBlock::buttons, C, CLAMP, data, uiSelectContextStore::do_free, uiSelectContextStore::elems_len, LISTBASE_FOREACH, NULL, uiButMultiState::origvalue, uiButMultiState::select_others, UI_BUT_DRAG_MULTI, ui_but_execute_begin(), ui_but_execute_end(), ui_but_string_set(), ui_multibut_lookup(), and ui_selectcontext_begin().
Referenced by ui_apply_but(), ui_do_but_NUM(), and ui_do_but_SLI().
|
static |
Definition at line 1473 of file interface_handlers.c.
References BLI_assert, uiBut::block, uiBlock::buttons, data, ELEM, LISTBASE_FOREACH, PROP_PROPORTIONAL, PROP_UNIT_LENGTH, RNA_property_flag(), RNA_SUBTYPE_UNIT_VALUE, uiBut::rnaprop, UI_BUT_DRAG_MULTI, UI_butstore_create(), ui_multibut_add(), and uiBut::unit_type.
Referenced by ui_do_button().
|
static |
Definition at line 1417 of file interface_handlers.c.
References BLI_assert, BLI_rctf_isect_segment(), uiBut::block, uiBlock::buttons, data, LISTBASE_FOREACH, NULL, UI_BUT_DRAG_MULTI, ui_but_is_compatible(), ui_but_is_interactive(), and ui_window_to_block_fl().
Referenced by ui_do_button().
|
static |
Definition at line 4163 of file interface_handlers.c.
References C, data, ED_region_tag_redraw(), ui_apply_but(), and ui_but_update().
Referenced by ui_do_but_COLORBAND(), ui_do_but_CURVEPROFILE(), ui_do_but_GRIP(), ui_do_but_HISTOGRAM(), ui_do_but_HSVCIRCLE(), ui_do_but_HSVCUBE(), ui_do_but_NUM(), ui_do_but_SCROLL(), ui_do_but_SLI(), ui_do_but_TRACKPREVIEW(), ui_do_but_UNITVEC(), and ui_do_but_WAVEFORM().
|
static |
Definition at line 4959 of file interface_handlers.c.
References ELEM, snap(), SNAP_OFF, SNAP_ON, and SNAP_ON_SMALL.
Referenced by ui_numedit_but_NUM().
|
static |
Definition at line 4881 of file interface_handlers.c.
References B_UNIT_AREA, B_UNIT_LENGTH, B_UNIT_VOLUME, BKE_unit_base_scalar(), BKE_unit_is_valid(), BLI_assert, uiBut::block, ELEM, float(), powf, PROP_SCALE_CUBIC, PROP_SCALE_LINEAR, PROP_SCALE_LOG, PROP_UNIT_ROTATION, RNA_SUBTYPE_UNIT_VALUE, UnitSettings::scale_length, snap(), SNAP_OFF, SNAP_ON, SNAP_ON_SMALL, UnitSettings::system, UnitSettings::system_rotation, ui_but_is_unit(), ui_but_scale_type(), UI_but_unit_type_get(), UI_PROP_SCALE_LOG_SNAP_OFFSET, uiBlock::unit, and USER_UNIT_ROT_RADIANS.
Referenced by ui_numedit_but_NUM().
|
static |
Definition at line 4016 of file interface_handlers.c.
References BLI_assert, copy_v3_v3(), cube_f(), data, double(), uiButColorBand::edit_coba, uiButCurveMapping::edit_cumap, uiButCurveProfile::edit_profile, uiBut::editval, uiBut::editvec, ELEM, float(), CCL_NAMESPACE_BEGIN::isfinite(), logf, max_ff(), min_ff(), uiBut::poin, powf, uiButNumber::precision, PROP_SCALE_CUBIC, PROP_SCALE_LINEAR, PROP_SCALE_LOG, uiBut::softmax, uiBut::softmin, uiButNumber::step_size, uiBut::type, UI_BTYPE_COLOR, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, UI_BTYPE_CURVEPROFILE, UI_BTYPE_HSVCIRCLE, UI_BTYPE_HSVCUBE, UI_BTYPE_NUM, UI_BTYPE_UNITVEC, ui_but_is_cursor_warp(), ui_but_is_float(), ui_but_scale_type(), ui_but_v3_get(), UI_DPI_FAC, UI_DRAG_MAP_SOFT_RANGE_PIXEL_MAX, ui_numedit_begin_set_values(), UI_PRECISION_FLOAT_SCALE, UI_PROP_SCALE_LOG_MIN, and UNLIKELY.
Referenced by button_activate_state().
|
static |
Definition at line 4009 of file interface_handlers.c.
References data, and ui_but_value_get().
Referenced by ui_numedit_begin(), and ui_textedit_begin().
|
static |
Definition at line 7002 of file interface_handlers.c.
References BKE_colorband_update_sort(), BLI_rctf_size_x(), CLAMP, data, float(), and uiBut::rect.
Referenced by ui_do_but_COLORBAND().
|
static |
Definition at line 7103 of file interface_handlers.c.
References Freestyle::a, BKE_curvemapping_changed(), BLI_rctf_clamp_pt_v(), BLI_rctf_size_x(), BLI_rctf_size_y(), CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CUMA_SELECT, CurveMapping::cur, CurveMapping::curr, data, CurveMapping::flag, len_squared_v2(), NULL, uiBut::poin, uiBut::rect, snap(), ui_but_is_cursor_warp(), ui_mouse_scale_warp_factor(), ui_window_to_block(), x, CurveMapPoint::x, rctf::xmax, rctf::xmin, y, CurveMapPoint::y, rctf::ymax, and rctf::ymin.
|
static |
Definition at line 7377 of file interface_handlers.c.
References Freestyle::a, BKE_curveprofile_move_handle(), BKE_curveprofile_move_point(), BKE_curveprofile_update(), BLI_rctf_clamp_pt_v(), BLI_rctf_size_x(), BLI_rctf_size_y(), CurveProfile::clip_rect, data, ELEM, CurveProfile::flag, HD_ALIGN, HD_FREE, len_squared_v2(), CurveProfile::path, CurveProfile::path_len, uiBut::poin, PROF_H1_SELECT, PROF_H2_SELECT, PROF_SELECT, PROF_UPDATE_NONE, PROF_USE_CLIP, uiBut::rect, snap(), ui_but_is_cursor_warp(), ui_mouse_scale_warp_factor(), ui_window_to_block(), CurveProfile::view_rect, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_do_but_CURVEPROFILE().
|
static |
Definition at line 7672 of file interface_handlers.c.
References CLAMP, data, min_ff(), uiBut::poin, pow2f(), and Histogram::ymax.
Referenced by ui_do_but_HISTOGRAM().
|
static |
Definition at line 6718 of file interface_handlers.c.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_rctf_copy(), copy_v3_v3(), uiBut::custom_data, data, dist_ensure_v2_v2fl(), ColorPicker::hsv_perceptual, is_zero_v3(), len, len_v2v2(), ColorPicker::luminosity_lock_value, min_ff(), normalize_v3_length(), uiBut::rect, usdtokens::rgb(), snap(), SNAP_OFF, sqrt3f(), ui_but_is_cursor_warp(), ui_but_v3_get(), ui_but_v3_set(), ui_color_picker_hsv_to_rgb(), ui_color_picker_rgb_to_hsv_compat(), ui_color_snap_hue(), ui_hsvcircle_pos_from_vals(), ui_hsvcircle_vals_from_pos(), ui_mouse_scale_warp(), ui_perceptual_to_scene_linear_space(), ui_scene_linear_to_perceptual_space(), ColorPicker::use_color_cubic, ColorPicker::use_color_lock, ColorPicker::use_luminosity_lock, and USER_CP_CIRCLE_HSV.
Referenced by ui_do_but_HSVCIRCLE().
|
static |
Definition at line 6433 of file interface_handlers.c.
References BLI_assert, BLI_rctf_clamp_pt_v(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_rctf_copy(), CLAMP, clamp_axis_max_v3(), copy_v3_v3(), uiBut::custom_data, data, ELEM, float(), uiButHSVCube::gradient_type, ColorPicker::hsv_perceptual, max, min, uiBut::rect, usdtokens::rgb(), snap(), SNAP_OFF, uiBut::softmax, uiBut::softmin, ui_but_is_cursor_warp(), ui_but_v3_get(), ui_color_picker_to_rgb_HSVCUBE_v(), ui_color_snap_hue(), UI_GRAD_H, UI_GRAD_HS, UI_GRAD_HV, UI_GRAD_L_ALT, UI_GRAD_S, UI_GRAD_SV, UI_GRAD_V, UI_GRAD_V_ALT, ui_hsvcube_pos_from_vals(), ui_mouse_scale_warp(), ui_perceptual_to_scene_linear_space(), ui_rgb_to_color_picker_HSVCUBE_compat_v(), ui_scene_linear_to_perceptual_space(), x, rctf::xmin, y, and rctf::ymin.
Referenced by ui_do_but_HSVCUBE().
|
static |
Definition at line 4982 of file interface_handlers.c.
References blender::math::abs(), uiBut::block, uiButNumber::but, CLAMP, CLAMP_MAX, CLAMP_MIN, data, double(), uiBlock::evil_C, expf, float(), if(), logf, max_ff(), powf, uiButNumber::precision, PROP_SCALE_CUBIC, PROP_SCALE_LINEAR, PROP_SCALE_LOG, round_fl_to_int(), snap(), uiBut::softmax, uiBut::softmin, uiButNumber::step_size, ui_block_interaction_begin_ensure(), ui_but_dragedit_update_mval(), ui_but_is_cursor_warp(), ui_but_is_float(), ui_but_scale_type(), UI_DPI_FAC, ui_numedit_apply_snap(), ui_numedit_apply_snapf(), and UI_PROP_SCALE_LOG_MIN.
Referenced by ui_do_but_NUM().
|
static |
Definition at line 5494 of file interface_handlers.c.
References uiBut::a1, BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_clamp_pt_v(), BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, CLAMP, cube_f(), data, ELEM, uiBlock::evil_C, powf, PROP_SCALE_CUBIC, PROP_SCALE_LINEAR, PROP_SCALE_LOG, uiBut::rect, round_fl_to_int(), size(), snap(), uiBut::softmax, uiBut::softmin, uiBut::type, ui_block_interaction_begin_ensure(), UI_BTYPE_NUM_SLIDER, UI_BTYPE_SCROLL, ui_but_dragedit_update_mval(), ui_but_is_cursor_warp(), ui_but_is_float(), ui_but_scale_type(), ui_mouse_scale_warp(), rctf::xmin, and rctf::ymin.
Referenced by ui_do_but_SCROLL(), and ui_do_but_SLI().
|
static |
Definition at line 7819 of file interface_handlers.c.
References BKE_movieclip_remap_scene_to_clip_frame(), BKE_tracking_marker_ensure(), BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, C, CTX_data_edit_movieclip(), data, MovieTrackingMarker::flag, MovieTrackingMarker::framenr, if(), MovieClipScopes::marker, MARKER_DISABLED, MARKER_TRACKED, NA_EDITED, NC_MOVIECLIP, NULL, MovieClipScopes::ok, uiBut::poin, MovieTrackingMarker::pos, uiBlock::rect, MovieClipScopes::scene_framenr, MovieClipScopes::slide_scale, MovieClipScopes::track, MovieClipScopes::track_locked, and WM_event_add_notifier().
Referenced by ui_do_but_TRACKPREVIEW().
|
static |
Definition at line 6090 of file interface_handlers.c.
References angle(), asinf, BLI_rctf_size_x(), compare_v3v3(), data, float(), M_PI, normalize_v3(), uiBut::rect, sinf, snap(), SNAP_OFF, SNAP_ON, and sqrtf.
Referenced by ui_do_but_UNITVEC().
|
static |
Definition at line 7746 of file interface_handlers.c.
References CLAMP, data, uiBut::poin, and Scopes::wavefrm_yfac.
Referenced by ui_do_but_WAVEFORM().
|
static |
Definition at line 4140 of file interface_handlers.c.
References data, uiButColorBand::edit_coba, uiButCurveMapping::edit_cumap, uiButCurveProfile::edit_profile, uiBut::editval, uiBut::editvec, NULL, uiBut::type, UI_BTYPE_COLORBAND, UI_BTYPE_CURVE, and UI_BTYPE_CURVEPROFILE.
Referenced by button_activate_state().
Definition at line 5239 of file interface_handlers.c.
References uiBut::active, BLI_rctf_size_x(), BLI_rctf_size_y(), uiBut::block, data, uiBut::drawflag, ED_region_tag_redraw(), uiBut::flag, min_ff(), uiBut::rect, UI_BUT_ACTIVE_LEFT, UI_BUT_ACTIVE_RIGHT, UI_SELECT, ui_window_to_block(), WM_cursor_modal_restore(), WM_cursor_modal_set(), WM_CURSOR_X_MOVE, rctf::xmax, and rctf::xmin.
Referenced by button_activate_init(), and ui_do_but_NUM().
|
static |
Definition at line 6169 of file interface_handlers.c.
References Palette::active_color, BLI_findindex(), uiButColor::but, color, Palette::colors, PointerRNA::data, uiButColor::is_pallete_color, PointerRNA::owner_id, and uiBut::rnapoin.
Referenced by ui_do_but_COLOR().
Definition at line 549 of file interface_handlers.c.
References blender::math::abs(), BLI_assert, KM_PRESS, MOUSEPAN, type, UI_UNIT_Y, WHEELDOWNMOUSE, WHEELUPMOUSE, and WM_event_absolute_delta_y().
Referenced by ui_do_but_BLOCK(), ui_do_but_NUM(), ui_do_but_SLI(), ui_do_but_TOG(), ui_handle_list_event(), ui_handle_menu_event(), and ui_searchbox_event().
|
static |
Definition at line 10915 of file interface_handlers.c.
References uiBut::active, add_v2_v2(), PieMenuData::alphafac, ATTR_FALLTHROUGH, BLI_rctf_recenter(), BLI_rctf_size_x(), BLI_rctf_size_y(), button_modal_state(), uiBlock::buttons, C, CASE_NUM_TO_DIR, center, copy_v2_v2(), CTX_wm_manager(), CTX_wm_window(), wmEvent::customdata, wmTimer::duration, PieMenuData::duration_gesture, ED_region_tag_redraw(), ELEM, PieMenuData::event_type, EVT_AKEY, EVT_BKEY, EVT_CKEY, EVT_DKEY, EVT_DROP, EVT_EKEY, EVT_ESCKEY, EVT_FKEY, EVT_GKEY, EVT_HKEY, EVT_IKEY, EVT_JKEY, EVT_KKEY, EVT_LKEY, EVT_MKEY, EVT_NKEY, EVT_OKEY, EVT_PKEY, EVT_QKEY, EVT_RKEY, EVT_SKEY, EVT_TKEY, EVT_UKEY, EVT_VKEY, EVT_WKEY, EVT_XKEY, EVT_YKEY, EVT_ZKEY, ListBase::first, PieMenuData::flags, KM_CTRL, KM_DBL_CLICK, KM_OSKEY, KM_PRESS, KM_RELEASE, KM_SHIFT, PieMenuData::last_pos, LEFTMOUSE, len_squared_v2v2(), LISTBASE_FOREACH, uiBut::menu_key, uiPopupBlockHandle::menuretval, wmEvent::modifier, MOUSEMOVE, mul_v2_fl(), NULL, PieMenuData::pie_center_init, PieMenuData::pie_center_spawned, PIE_CLICK_THRESHOLD_SQ, uiBlock::pie_data, uiBut::pie_dir, PIE_MENU_INTERVAL, uiBut::rect, uiPopupBlockHandle::region, RIGHTMOUSE, uiPopupBlockHandle::scrolltimer, uiHandleButtonData::state, TIMER, wmEvent::type, ui_block_calc_pie_segment(), ui_block_pie_dir_activate(), ui_but_pie_button_activate(), ui_but_pie_dir(), ui_but_pie_menu_apply(), UI_DPI_FAC, ui_handle_menu_button(), UI_PIE_ANIMATION_FINISHED, UI_PIE_CLICK_STYLE, UI_PIE_DRAG_STYLE, UI_PIE_GESTURE_END_WAIT, UI_PIE_INITIAL_DIRECTION, UI_PIE_INVALID_DIR, UI_RADIAL_E, UI_RADIAL_N, UI_RADIAL_NE, UI_RADIAL_NONE, UI_RADIAL_NW, UI_RADIAL_S, UI_RADIAL_SE, UI_RADIAL_SW, UI_RADIAL_W, ui_region_find_active_but(), UI_RETURN_CANCEL, ui_window_to_block_fl(), ARegion::uiblocks, UNPACK2, wmEvent::val, WM_event_add_timer(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_handle_menus_recursive().
Definition at line 11459 of file interface_handlers.c.
References C, uiPopupBlockHandle::cancel_func, CTX_wm_menu(), CTX_wm_menu_set(), CTX_wm_region_set(), CTX_wm_window(), EVENT_NONE, PieMenuData::event_type, EVT_DROP, ListBase::first, uiBlock::flag, KM_DBL_CLICK, uiPopupBlockHandle::menuretval, wmWindow::modalhandlers, MOUSEMOVE, NULL, uiBlock::pie_data, wmWindow::pie_event_type_last, uiPopupBlockHandle::popup_arg, uiPopupBlockHandle::popup_func, wmEvent::prev_xy, uiPopupBlockHandle::region, uiPopupBlockHandle::retvalue, wmEvent::type, ui_apply_but_funcs_after(), UI_BLOCK_RADIAL, ui_blocks_set_tooltips(), ui_handle_menus_recursive(), ui_handler_region_drag_toggle(), ui_handler_region_drag_toggle_remove(), ui_popup_block_free(), UI_popup_handlers_remove(), UI_RETURN_OK, UI_RETURN_POPUP_OK, ARegion::uiblocks, wmEvent::val, WM_event_add_mousemove(), WM_event_free_ui_handler_all(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by UI_popup_handlers_add(), UI_popup_handlers_remove(), and UI_popup_handlers_remove_all().
Definition at line 11547 of file interface_handlers.c.
References C, uiPopupBlockHandle::cancel_func, uiPopupBlockHandle::menuretval, uiPopupBlockHandle::popup_arg, ui_apply_but_funcs_after(), ui_popup_block_free(), and UI_RETURN_OK.
Referenced by UI_popup_handlers_add(), UI_popup_handlers_remove(), and UI_popup_handlers_remove_all().
void UI_popup_handlers_add | ( | bContext * | C, |
ListBase * | handlers, | ||
uiPopupBlockHandle * | popup, | ||
const char | flag | ||
) |
Definition at line 11572 of file interface_handlers.c.
References C, ui_popup_handler(), ui_popup_handler_remove(), and WM_event_add_ui_handler().
Referenced by 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_handlers_remove | ( | ListBase * | handlers, |
uiPopupBlockHandle * | popup | ||
) |
Definition at line 11580 of file interface_handlers.c.
References ED_region_tag_refresh_ui(), wmEventHandler_UI::handle_fn, wmEventHandler_UI::head, if(), LISTBASE_FOREACH, wmEventHandler::next, uiPopupBlockHandle::region, wmEventHandler_UI::remove_fn, wmEventHandler::type, ui_popup_handler(), ui_popup_handler_remove(), wmEventHandler_UI::user_data, WM_event_remove_ui_handler(), and WM_HANDLER_TYPE_UI.
Referenced by UI_popup_block_close(), and ui_popup_handler().
Definition at line 11604 of file interface_handlers.c.
References C, ui_popup_handler(), ui_popup_handler_remove(), and WM_event_free_ui_handler_all().
Referenced by ghost_event_proc(), WM_event_add_fileselect(), and wm_event_do_notifiers().
Allow setting menu return value from externals. E.g. WM might need to do this for exiting files correctly.
Definition at line 11271 of file interface_handlers.c.
References uiBlock::handle, and uiPopupBlockHandle::menuretval.
Referenced by dialog_exec_cb().
Definition at line 8777 of file interface_handlers.c.
References NULL, and ui_context_button_active().
Referenced by ui_but_tooltip_init(), and UI_region_searchbox_region_get().
Definition at line 10052 of file interface_handlers.c.
References LISTBASE_FOREACH, and ARegion::uiblocks.
Referenced by ui_handle_menu_button().
uiBlock* UI_region_block_find_mouse_over | ( | const struct ARegion * | region, |
const int | xy[2], | ||
bool | only_clip | ||
) |
Definition at line 8787 of file interface_handlers.c.
References ui_block_find_mouse_over_ex(), and xy.
Referenced by wm_handlers_do_gizmo_handler().
Definition at line 8782 of file interface_handlers.c.
References ui_but_find_rect_over().
Definition at line 11674 of file interface_handlers.c.
References uiBut::active, C, LISTBASE_FOREACH, NULL, ui_but_active_free(), and ARegion::uiblocks.
Referenced by ED_region_visibility_change_update().
Definition at line 11285 of file interface_handlers.c.
References BLI_listbase_is_empty(), C, CTX_wm_region(), MOUSEMOVE, NULL, wmEvent::prev_xy, wmEvent::type, ui_apply_but_funcs_after(), ui_blocks_set_tooltips(), UI_but_tooltip_timer_remove(), ui_handle_button_event(), ui_handle_button_over(), ui_handle_list_event(), ui_handle_view_item_event(), ui_handle_view_items_hover(), ui_handler_panel_region(), ui_list_find_mouse_over(), ui_region_find_active_but(), ui_view_item_find_mouse_over(), ARegion::uiblocks, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by UI_region_handlers_add().
Definition at line 11343 of file interface_handlers.c.
References BLI_findindex(), C, CTX_wm_region(), CTX_wm_screen(), NULL, bScreen::regionbase, ui_apply_but_funcs_after(), and UI_blocklist_free().
Referenced by UI_region_handlers_add().
Definition at line 11566 of file interface_handlers.c.
References NULL, ui_region_handler(), ui_region_handler_remove(), WM_event_add_ui_handler(), and WM_event_remove_ui_handler().
Referenced by ed_default_handlers(), hud_region_init(), and ui_popup_block_create().
Definition at line 8874 of file interface_handlers.c.
References uiBut::active, NULL, uiHandleButtonData::searchbox, and UI_region_active_but_get().
|
static |
Definition at line 6397 of file interface_handlers.c.
References uiButHSVCube::gradient_type, usdtokens::rgb(), rgb_to_hsl_compat_v(), rgb_to_hsv_compat_v(), and UI_GRAD_L_ALT.
Referenced by ui_do_but_HSVCUBE(), and ui_numedit_but_HSVCUBE().
|
static |
Definition at line 6409 of file interface_handlers.c.
References uiButHSVCube::gradient_type, usdtokens::rgb(), rgb_to_hsl_v(), rgb_to_hsv_v(), and UI_GRAD_L_ALT.
Referenced by ui_do_but_HSVCUBE().
|
static |
Definition at line 660 of file interface_handlers.c.
References ELEM, NULL, PROP_NO_DEG_UPDATE, ptr, RNA_property_flag(), RNA_struct_base(), and PointerRNA::type.
Referenced by UI_but_is_userdef(), and ui_rna_update_preferences_dirty().
|
static |
Definition at line 688 of file interface_handlers.c.
References NC_WINDOW, NULL, ptr, ui_rna_is_userdef(), and WM_main_add_notifier().
Referenced by ui_afterfunc_update_preferences_dirty(), and ui_but_update_preferences_dirty().
Definition at line 11686 of file interface_handlers.c.
References uiBut::active, blender::compositor::area(), BUTTON_STATE_HIGHLIGHT, C, CTX_wm_window(), data, ED_screen_areas_iter, LISTBASE_FOREACH, NULL, ui_but_active_free(), and ui_region_find_active_but().
|
static |
Definition at line 1900 of file interface_handlers.c.
References usdtokens::b(), BLI_assert, C, CLAMP, CTX_wm_window(), ELEM, uiSelectContextStore::elems, uiSelectContextStore::elems_len, wmWindow::eventstate, uiBut::func, uiSelectContextStore::is_copy, KM_SHIFT, len, max, MEM_callocN, MEM_freeN, min, wmEvent::modifier, NULL, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, PROP_LAYER, PROP_LAYER_MEMBER, PROP_POINTER, uiSelectContextElem::ptr, RNA_property_array_check(), RNA_property_array_length(), RNA_property_boolean_get(), RNA_property_boolean_get_index(), RNA_property_boolean_set(), RNA_property_boolean_set_array(), RNA_property_boolean_set_index(), RNA_property_enum_get(), RNA_property_enum_set(), RNA_property_float_range(), RNA_property_float_set(), RNA_property_float_set_index(), RNA_property_int_range(), RNA_property_int_set(), RNA_property_int_set_index(), RNA_property_pointer_get(), RNA_property_pointer_set(), RNA_property_subtype(), RNA_property_type(), RNA_property_update(), uiBut::rnaindex, uiBut::rnapoin, uiBut::rnaprop, uiSelectContextElem::val_f, and uiSelectContextElem::val_i.
Referenced by ui_apply_but(), and ui_multibut_restore().
|
static |
Definition at line 1790 of file interface_handlers.c.
References BLI_freelistN(), BLI_listbase_count(), BLI_listbase_is_empty(), C, PointerRNA::data, uiSelectContextStore::do_free, uiSelectContextStore::elems, uiSelectContextStore::elems_len, uiBut::flag, LISTBASE_FOREACH_INDEX, MEM_mallocN, MEM_SAFE_FREE, NULL, PROP_BOOLEAN, PROP_ENUM, PROP_FLOAT, PROP_INT, uiSelectContextElem::ptr, ptr, 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_IS_SELECT_CONTEXT, UI_context_copy_to_selected_check(), UI_context_copy_to_selected_list(), uiSelectContextElem::val_b, uiSelectContextElem::val_f, and uiSelectContextElem::val_i.
Referenced by ui_apply_but(), and ui_multibut_states_apply().
|
static |
Definition at line 1889 of file interface_handlers.c.
References uiSelectContextStore::do_free, uiSelectContextStore::elems, uiBut::flag, MEM_freeN, and UI_BUT_IS_SELECT_CONTEXT.
Referenced by button_activate_exit().
|
static |
Definition at line 2886 of file interface_handlers.c.
References BLI_str_find_next_char_utf8(), uiBut::drawstr, uiBut::editstr, and pos.
Referenced by ui_but_text_password_hide().
|
static |
Definition at line 2898 of file interface_handlers.c.
References BLI_strnlen_utf8(), uiBut::drawstr, uiBut::editstr, and pos.
Referenced by ui_but_text_password_hide().
Definition at line 11641 of file interface_handlers.c.
References C, CTX_wm_region(), LISTBASE_FOREACH, NULL, uiBut::type, UI_BTYPE_TEXT, UI_but_active_only(), and ARegion::uiblocks.
bool UI_textbutton_activate_rna | ( | const bContext * | C, |
ARegion * | region, | ||
const void * | rna_poin_data, | ||
const char * | rna_prop_id | ||
) |
Definition at line 11609 of file interface_handlers.c.
References C, PointerRNA::data, LISTBASE_FOREACH, NULL, RNA_property_identifier(), uiBut::rnapoin, uiBut::rnaprop, STREQ, uiBut::type, UI_BTYPE_TEXT, UI_but_active_only(), and ARegion::uiblocks.
|
static |
Definition at line 3279 of file interface_handlers.c.
References uiBut::autocomplete_func, uiBut::autofunc_arg, C, data, uiBut::pos, uiBut::selend, uiBut::selsta, str, and ui_searchbox_autocomplete().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 3389 of file interface_handlers.c.
References BLI_assert, BLI_str_rstrip_float_zero(), BLI_strdupn(), uiBut::block, C, uiBut::changed, data, uiBut::editstr, ELEM, wmWindow::eventstate, uiBut::flag, IS_ALLSELECT_EVENT, len, MEM_callocN, MEM_SAFE_FREE, NULL, uiButSearch::popup_create_fn, uiBut::pos, uiBut::selend, uiBut::selsta, uiBut::type, ui_apply_but(), UI_block_layout_needs_resolving(), UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER, UI_BTYPE_SEARCH_MENU, ui_but_anim_expression_get(), ui_but_convert_to_unit_alt_name(), UI_but_ensure_in_view(), ui_but_is_float(), ui_but_is_unit(), UI_BUT_REDALERT, ui_but_string_get_dynamic(), ui_but_string_get_ex(), ui_but_string_get_max_length(), ui_but_update(), ui_numedit_begin_set_values(), UI_PRECISION_FLOAT_MAX, ui_searchbox_update(), ui_textedit_undo_push(), ui_textedit_undo_stack_create(), WM_cursor_modal_set(), and WM_CURSOR_TEXT_EDIT.
Referenced by button_activate_state().
|
static |
Definition at line 3304 of file interface_handlers.c.
References BLI_str_utf8_invalid_strip(), BLI_strncpy(), data, ELEM, MEM_freeN, MEM_mallocN, uiBut::selend, uiBut::selsta, UI_but_is_utf8(), UI_TEXTEDIT_COPY, UI_TEXTEDIT_CUT, ui_textedit_delete_selection(), ui_textedit_insert_buf(), UI_TEXTEDIT_PASTE, WM_clipboard_text_get_firstline(), and WM_clipboard_text_set().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 3228 of file interface_handlers.c.
References BLI_str_cursor_step_utf8(), data, jump(), len, uiBut::pos, pos, uiBut::selend, uiBut::selsta, str, STRCUR_JUMP_ALL, and ui_textedit_delete_selection().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 3006 of file interface_handlers.c.
References data, len, uiBut::pos, uiBut::selend, uiBut::selsta, and str.
Referenced by ui_do_but_textedit(), ui_textedit_copypaste(), ui_textedit_delete(), and ui_textedit_insert_buf().
|
static |
Definition at line 3496 of file interface_handlers.c.
References BLI_assert, BLI_str_utf8_invalid_strip(), C, data, uiBut::editstr, uiBut::flag, wmWindow::ime_data, NULL, uiBut::pos, uiButSearch::results_are_suggestions, RPT_ERROR, uiBut::type, UI_BTYPE_SEARCH_MENU, UI_but_is_utf8(), UI_BUT_VALUE_CLEAR, ui_searchbox_apply(), ui_searchbox_find_index(), ui_searchbox_free(), ui_textedit_undo_stack_destroy(), WM_cursor_modal_restore(), WM_report_banner_show(), and WM_reportf().
Referenced by button_activate_state().
|
static |
Definition at line 3175 of file interface_handlers.c.
References BLI_assert, data, and ui_textedit_insert_buf().
Referenced by ui_do_but_textedit().
|
static |
This is used for both utf8 and ascii
For unicode buttons, buf is treated as unicode.
Definition at line 3131 of file interface_handlers.c.
References BLI_strnlen_utf8_ex(), data, len, uiBut::pos, uiBut::selend, uiBut::selsta, str, UI_but_is_utf8(), ui_textedit_delete_selection(), and ui_textedit_string_ensure_max_length().
Referenced by ui_do_but_textedit(), ui_textedit_copypaste(), and ui_textedit_insert_ascii().
|
static |
Definition at line 3182 of file interface_handlers.c.
References BLI_str_cursor_step_utf8(), data, jump(), len, uiBut::pos, select(), uiBut::selend, uiBut::selsta, str, STRCUR_JUMP_ALL, SWAP, and ui_but_update().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 3555 of file interface_handlers.c.
References BUTTON_ACTIVATE_TEXT_EDITING, uiBlock::buttons, data, ELEM, ListBase::first, uiBut::flag, uiBut::next, uiBut::type, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_ROUNDBOX, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BUT_DISABLED, and ui_but_is_editable_as_text().
Referenced by ui_do_but_textedit().
|
static |
Definition at line 3587 of file interface_handlers.c.
References BUTTON_ACTIVATE_TEXT_EDITING, uiBlock::buttons, data, ELEM, uiBut::flag, ListBase::last, uiBut::prev, uiBut::type, UI_BTYPE_LABEL, UI_BTYPE_LISTBOX, UI_BTYPE_ROUNDBOX, UI_BTYPE_SEPR, UI_BTYPE_SEPR_LINE, UI_BUT_DISABLED, and ui_but_is_editable_as_text().
Referenced by ui_do_but_textedit().
|
static |
x | Screen space cursor location - #wmEvent.x |
but->block->aspect
is used here, so drawing button style is getting scaled too. Definition at line 3042 of file interface_handlers.c.
References uiBlock::aspect, BLF_boundbox_foreach_glyph(), BLF_width(), BLI_str_cursor_step_prev_utf8(), uiBut::block, data, uiBut::editstr, ELEM, uiBut::flag, uiBut::ofs, uiFontStyle::points, uiBut::pos, uiBut::rect, str, uiBut::type, ui_block_to_window_fl(), UI_BTYPE_SEARCH_MENU, UI_BTYPE_TEXT, ui_but_text_password_hide(), UI_DPI_ICON_SIZE, ui_fontscale(), UI_fontstyle_set(), UI_HAS_ICON, UI_MAX_PASSWORD_STR, UI_style_get(), UI_TEXT_MARGIN_X, ui_textedit_set_cursor_pos_foreach_glyph(), uiFontStyle::uifont_id, uiStyle::widget, x, and rctf::xmin.
Referenced by ui_do_but_textedit(), and ui_textedit_set_cursor_select().
|
static |
Definition at line 3020 of file interface_handlers.c.
References BLI_rcti_size_x(), center, user_data, and rcti::xmin.
Referenced by ui_textedit_set_cursor_pos().
|
static |
Definition at line 3113 of file interface_handlers.c.
References data, uiBut::pos, uiBut::selend, uiBut::selsta, SWAP, ui_but_update(), ui_textedit_set_cursor_pos(), and x.
Referenced by ui_do_but_textedit_select().
|
static |
Definition at line 2981 of file interface_handlers.c.
References BLI_assert, data, uiBut::editstr, and MEM_reallocN.
Referenced by ui_textedit_insert_buf(), and ui_textedit_string_set().
|
static |
Definition at line 2992 of file interface_handlers.c.
References BLI_strncpy(), BLI_strncpy_utf8(), data, str, UI_but_is_utf8(), and ui_textedit_string_ensure_max_length().
Referenced by ui_but_set_string_interactive(), and ui_do_but_textedit().
|
static |
Definition at line 531 of file interface_handlers.c.
Referenced by ui_but_copy_colorband(), and ui_but_paste_colorband().
|
static |
Definition at line 532 of file interface_handlers.c.
Referenced by ui_but_clipboard_free(), ui_but_copy_curvemapping(), and ui_but_paste_curvemapping().
|
static |
Definition at line 533 of file interface_handlers.c.
Referenced by ui_but_copy_curvemapping(), and ui_but_paste_curvemapping().
|
static |
Definition at line 534 of file interface_handlers.c.
Referenced by ui_but_clipboard_free(), ui_but_copy_CurveProfile(), and ui_but_paste_CurveProfile().
|
static |
Definition at line 535 of file interface_handlers.c.
Referenced by ui_but_copy_CurveProfile(), and ui_but_paste_CurveProfile().
Definition at line 743 of file interface_handlers.c.
Referenced by ui_afterfunc_new(), and ui_apply_but_funcs_after().