22#include "RNA_prototypes.hh"
62 if (cumap->
curr.
xmin - d < cumap->clipr.xmin) {
79 if (cumap->
curr.
ymin - d < cumap->clipr.ymin) {
224 IFACE_(
"Extend Horizontal"),
246 IFACE_(
"Extend Extrapolated"),
356 if (labeltype ==
'v') {
362 bt =
uiDefButI(block,
UI_BTYPE_ROW, 0,
"X", 0, 0, dx, dx, &cumap->
cur, 0.0, 0.0,
"");
366 bt =
uiDefButI(block,
UI_BTYPE_ROW, 0,
"Y", 0, 0, dx, dx, &cumap->
cur, 0.0, 1.0,
"");
370 bt =
uiDefButI(block,
UI_BTYPE_ROW, 0,
"Z", 0, 0, dx, dx, &cumap->
cur, 0.0, 2.0,
"");
391 TIP_(
"Combined channels"));
406 TIP_(
"Red channel"));
421 TIP_(
"Green channel"));
436 TIP_(
"Blue channel"));
440 else if (labeltype ==
'h') {
472 TIP_(
"Saturation level"));
487 TIP_(
"Value level"));
495 if (labeltype ==
'h') {
507 block,
UI_BTYPE_BUT, 0, ICON_ZOOM_IN, 0, 0, dx, dx,
nullptr, 0.0, 0.0,
TIP_(
"Zoom in"));
515 block,
UI_BTYPE_BUT, 0, ICON_ZOOM_OUT, 0, 0, dx, dx,
nullptr, 0.0, 0.0,
TIP_(
"Zoom out"));
522 const int icon = (cumap->
flag &
CUMA_DO_CLIP) ? ICON_CLIPUV_HLT : ICON_CLIPUV_DEHLT;
529 RNAUpdateCb *tools_cb = MEM_new<RNAUpdateCb>(__func__, cb);
530 if (brush && neg_slope) {
546 else if (neg_slope) {
565 MEM_new<RNAUpdateCb>(__func__, cb),
572 row = &layout->
row(
false);
590 bool point_last_or_first =
false;
598 point_last_or_first =
true;
627 TIP_(
"Auto Handle"));
651 TIP_(
"Vector Handle"));
665 ICON_HANDLE_AUTOCLAMPED,
673 TIP_(
"Auto Clamped"));
725 block,
UI_BTYPE_BUT, 0, ICON_X, 0, 0, dx, dx,
nullptr, 0.0, 0.0,
TIP_(
"Delete points"));
731 if (point_last_or_first) {
754 TIP_(
"Reset Black/White point and curves"));
757 for (
int a = 0; a <
CM_TOT; a++) {
806 layout, &cptr, type, levels, brush, neg_slope, tone,
RNAUpdateCb{*
ptr, prop});
ARegion * CTX_wm_region(const bContext *C)
MINLINE int max_ii(int a, int b)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_COLOR
@ CUMA_EXTEND_EXTRAPOLATE
void ED_region_tag_redraw(ARegion *region)
void ED_undo_push(bContext *C, const char *str)
static void split(const char *text, const char *seps, char ***str, int *count)
#define RNA_warning(format,...)
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
void * but_func_argN_copy(const void *argN)
void but_func_argN_free(void *argN)
void UI_but_disable(uiBut *but, const char *disabled_hint)
uiBut * uiDefButBitI(uiBlock *block, int type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss)
void UI_block_lock_clear(uiBlock *block)
uiBut * uiDefBut(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_bounds_set_normal(uiBlock *block, int addval)
void UI_but_number_step_size_set(uiBut *but, float step_size)
@ UI_BLOCK_THEME_STYLE_POPUP
uiBut * uiDefButI(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_bounds_set_text(uiBlock *block, int addval)
void UI_block_align_begin(uiBlock *block)
void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void UI_but_number_precision_set(uiBut *but, float precision)
void UI_block_direction_set(uiBlock *block, char direction)
void UI_block_flag_enable(uiBlock *block, int flag)
uiBut * uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
@ UI_BLOCK_MOVEMOUSE_QUIT
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
uiBut * uiDefButF(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, float *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
void UI_but_flag_enable(uiBut *but, int flag)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
int uiLayoutGetWidth(uiLayout *layout)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
constexpr const char * c_str() const
#define ID_IS_EDITABLE(_id)
static void curvemap_buttons_redraw(bContext &C)
static uiBlock * curvemap_tools_negslope_func(bContext *C, ARegion *region, void *cb_v)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
static bool curvemap_can_zoom_in(CurveMapping *cumap)
static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labeltype, bool levels, bool brush, bool neg_slope, bool tone, const RNAUpdateCb &cb)
static uiBlock * curvemap_brush_tools_func(bContext *C, ARegion *region, void *cb_v)
static uiBlock * curvemap_tools_func(bContext *C, ARegion *region, RNAUpdateCb &cb, bool show_extend, int reset_mode)
static void curvemap_buttons_zoom_in(bContext *C, CurveMapping *cumap)
static uiBlock * curvemap_tools_posslope_func(bContext *C, ARegion *region, void *cb_v)
static bool curvemap_can_zoom_out(CurveMapping *cumap)
static void curvemap_buttons_zoom_out(bContext *C, CurveMapping *cumap)
static uiBlock * curvemap_brush_tools_negslope_func(bContext *C, ARegion *region, void *cb_v)
static uiBlock * curvemap_clipping_func(bContext *C, ARegion *region, void *cumap_v)
static void rna_update_cb(bContext &C, const RNAUpdateCb &cb)
#define ERROR_LIBDATA_MESSAGE
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
PropertyType RNA_property_type(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_struct_identifier(const StructRNA *type)
eButGradientType gradient_type
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)