diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index b1dc5821d7a..c525d9cffe6 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -367,7 +367,7 @@ void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, /* Shortening string helper. */ float UI_text_clip_middle_ex( - struct uiFontStyle *fstyle, char *str, float okwidth, const float minwidth, + const struct uiFontStyle *fstyle, char *str, float okwidth, const float minwidth, const size_t max_len, const char rpart_sep); /* Callbacks @@ -1254,20 +1254,33 @@ struct ID *UI_context_active_but_get_tab_ID(struct bContext *C); uiBut *UI_region_active_but_get(struct ARegion *ar); +/* uiFontStyle.align */ +typedef enum eFontStyle_Align { + UI_STYLE_TEXT_LEFT = 0, + UI_STYLE_TEXT_CENTER = 1, + UI_STYLE_TEXT_RIGHT = 2 +} eFontStyle_Align; + +struct uiFontStyleDraw_Params { + eFontStyle_Align align; + uint word_wrap : 1; +}; + /* Styled text draw */ void UI_fontstyle_set(const struct uiFontStyle *fs); void UI_fontstyle_draw_ex( const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4], size_t len, float *r_xofs, float *r_yofs); + const uchar col[4], const struct uiFontStyleDraw_Params *fs_params, + size_t len, float *r_xofs, float *r_yofs); void UI_fontstyle_draw( const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4]); + const uchar col[4], const struct uiFontStyleDraw_Params *fs_params); void UI_fontstyle_draw_rotated( const struct uiFontStyle *fs, const struct rcti *rect, const char *str, - const unsigned char col[4]); + const uchar col[4]); void UI_fontstyle_draw_simple( const struct uiFontStyle *fs, float x, float y, const char *str, - const unsigned char col[4]); + const uchar col[4]); void UI_fontstyle_draw_simple_backdrop( const struct uiFontStyle *fs, float x, float y, const char *str, const float col_fg[4], const float col_bg[4]); |