Blender  V2.93
Enumerations | Functions
interface_eyedropper_intern.h File Reference

Go to the source code of this file.

Enumerations

enum  { EYE_MODAL_CANCEL = 1 , EYE_MODAL_SAMPLE_CONFIRM , EYE_MODAL_SAMPLE_BEGIN , EYE_MODAL_SAMPLE_RESET }
 
enum  {
  EYE_MODAL_POINT_CANCEL = 1 , EYE_MODAL_POINT_SAMPLE , EYE_MODAL_POINT_CONFIRM , EYE_MODAL_POINT_RESET ,
  EYE_MODAL_POINT_REMOVE_LAST
}
 

Functions

void eyedropper_draw_cursor_text_window (const struct wmWindow *window, const char *name)
 
void eyedropper_draw_cursor_text_region (const struct bContext *C, const struct ARegion *region, const char *name)
 
uiButeyedropper_get_property_button_under_mouse (bContext *C, const wmEvent *event)
 
void eyedropper_color_sample_fl (bContext *C, int mx, int my, float r_col[3])
 get the color from the screen. More...
 

Detailed Description

Share between interface_eyedropper_*.c files.

Definition in file interface_eyedropper_intern.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
EYE_MODAL_CANCEL 
EYE_MODAL_SAMPLE_CONFIRM 
EYE_MODAL_SAMPLE_BEGIN 
EYE_MODAL_SAMPLE_RESET 

Definition at line 36 of file interface_eyedropper_intern.h.

◆ anonymous enum

anonymous enum
Enumerator
EYE_MODAL_POINT_CANCEL 
EYE_MODAL_POINT_SAMPLE 
EYE_MODAL_POINT_CONFIRM 
EYE_MODAL_POINT_RESET 
EYE_MODAL_POINT_REMOVE_LAST 

Definition at line 44 of file interface_eyedropper_intern.h.

Function Documentation

◆ eyedropper_color_sample_fl()

void eyedropper_color_sample_fl ( bContext C,
int  mx,
int  my,
float  r_col[3] 
)

◆ eyedropper_draw_cursor_text_region()

void eyedropper_draw_cursor_text_region ( const struct bContext C,
const struct ARegion region,
const char *  name 
)

◆ eyedropper_draw_cursor_text_window()

void eyedropper_draw_cursor_text_window ( const struct wmWindow window,
const char *  name 
)

◆ eyedropper_get_property_button_under_mouse()

uiBut* eyedropper_get_property_button_under_mouse ( bContext C,
const wmEvent event 
)

Utility to retrieve a button representing a RNA property that is currently under the cursor.

This is to be used by any eyedroppers which fetch properties (e.g. UI_OT_eyedropper_driver). Especially during modal operations (e.g. as with the eyedroppers), context cannot be relied upon to provide this information, as it is not updated until the operator finishes.

Returns
A button under the mouse which relates to some RNA Property, or NULL

Definition at line 157 of file interface_eyedropper.c.

References blender::compositor::area(), BKE_area_find_region_xy(), BKE_screen_find_area_xy(), C, CTX_wm_screen(), PointerRNA::data, ELEM, NULL, RGN_TYPE_ANY, uiBut::rnapoin, uiBut::rnaprop, SPACE_TYPE_ANY, ui_but_find_mouse_over(), wmEvent::x, and wmEvent::y.

Referenced by driverdropper_sample().