From fae45a43fab410eb1e46a9bf4d4b6133b5a7bbdd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Mar 2022 10:51:22 +1100 Subject: Cleanup: use doxy-sections for pipeline, text_drag & effects Also improve on the doc-string for RE_RenderFrame & RE_RenderAnim. --- source/blender/editors/space_text/text_draw.c | 66 ++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 11 deletions(-) (limited to 'source/blender/editors/space_text/text_draw.c') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 8fefd258f7a..0e29c68cf23 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -36,7 +36,9 @@ #include "WM_api.h" #include "WM_types.h" -/******************** text font drawing ******************/ +/* -------------------------------------------------------------------- */ +/** \name Text Font Drawing + * \{ */ typedef struct TextDrawContext { int font_id; @@ -141,7 +143,11 @@ static void format_draw_color(const TextDrawContext *tdc, char formatchar) } } -/************************** draw text *****************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Text + * \{ */ /** * Notes on word-wrap @@ -556,7 +562,11 @@ static void text_draw(const SpaceText *st, flatten_string_free(&fs); } -/************************ cache utilities *****************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Cache Utilities + * \{ */ typedef struct DrawCache { int *line_height; @@ -766,7 +776,11 @@ void text_free_caches(SpaceText *st) } } -/************************ word-wrap utilities *****************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Word-Wrap Utilities + * \{ */ /* cache should be updated in caller */ static int text_get_visible_lines_no(const SpaceText *st, int lineno) @@ -845,7 +859,11 @@ int text_get_total_lines(SpaceText *st, ARegion *region) return drawcache->total_lines; } -/************************ draw scrollbar *****************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Scroll-Bar + * \{ */ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *back) { @@ -1006,7 +1024,11 @@ static void draw_textscroll(const SpaceText *st, rcti *scroll, rcti *back) col); } -/*********************** draw documentation *******************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Documentation + * \{ */ #if 0 static void draw_documentation(const SpaceText *st, ARegion *region) @@ -1118,7 +1140,11 @@ static void draw_documentation(const SpaceText *st, ARegion *region) } #endif -/*********************** draw suggestion list *******************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Suggestion List + * \{ */ static void draw_suggestion_list(const SpaceText *st, const TextDrawContext *tdc, ARegion *region) { @@ -1221,7 +1247,11 @@ static void draw_suggestion_list(const SpaceText *st, const TextDrawContext *tdc } } -/*********************** draw cursor ************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Cursor + * \{ */ static void draw_text_decoration(SpaceText *st, ARegion *region) { @@ -1383,7 +1413,11 @@ static void draw_text_decoration(SpaceText *st, ARegion *region) immUnbindProgram(); } -/******************* draw matching brackets *********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Draw Matching Brackets + * \{ */ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegion *region) { @@ -1544,7 +1578,11 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi } } -/*********************** main region drawing *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Main Region Drawing + * \{ */ void draw_text_main(SpaceText *st, ARegion *region) { @@ -1707,7 +1745,11 @@ void draw_text_main(SpaceText *st, ARegion *region) text_font_end(&tdc); } -/************************** update ***************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Update & Coordinate Conversion + * \{ */ void text_update_character_width(SpaceText *st) { @@ -1861,3 +1903,5 @@ error: r_pixel_co[0] = r_pixel_co[1] = -1; return false; } + +/** \} */ -- cgit v1.2.3