Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-09-06 09:12:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-06 09:46:00 +0300
commitebb7096bb15689f61414d89989c681dfd94d8330 (patch)
treefea3b5814143cc79e3dd43a9b6097068d594c506 /source/blender/editors/interface/view2d.c
parent1b287230a46d98f7cdfe6cbfd6c86e43c7e14968 (diff)
Cleanup: use doxy sections
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c66
1 files changed, 50 insertions, 16 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index c760ddcca6f..50cc42866fe 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -61,7 +61,9 @@
static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mask_scrollers);
-/* *********************************************************************** */
+/* -------------------------------------------------------------------- */
+/** \name Internal Utilities
+ * \{ */
BLI_INLINE int clamp_float_to_int(const float f)
{
@@ -94,6 +96,12 @@ BLI_INLINE void clamp_rctf_to_rcti(rcti *dst, const rctf *src)
/* XXX still unresolved: scrolls hide/unhide vs region mask handling */
/* XXX there's V2D_SCROLL_HORIZONTAL_HIDE and V2D_SCROLL_HORIZONTAL_FULLR ... */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Internal Scroll & Mask Utilities
+ * \{ */
+
/**
* helper to allow scrollbars to dynamically hide
* - returns a copy of the scrollbar settings with the flags to display
@@ -219,7 +227,11 @@ static void view2d_masks(View2D *v2d, bool check_scrollers, const rcti *mask_scr
}
}
-/* Refresh and Validation */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View2D Refresh and Validation (Spatial)
+ * \{ */
/**
* Initialize all relevant View2D data (including view rects if first time)
@@ -1123,8 +1135,11 @@ void UI_view2d_zoom_cache_reset(void)
BLF_cache_clear();
}
-/* *********************************************************************** */
-/* View Matrix Setup */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View2D Matrix Setup
+ * \{ */
/* mapping function to ensure 'cur' draws extended over the area where sliders are */
static void view2d_map_cur_using_mask(const View2D *v2d, rctf *r_curmasked)
@@ -1245,8 +1260,11 @@ void UI_view2d_view_restore(const bContext *C)
// ED_region_pixelspace(CTX_wm_region(C));
}
-/* *********************************************************************** */
-/* Gridlines */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Gridline Drawing
+ * \{ */
/* Draw a constant grid in given 2d-region */
void UI_view2d_constant_grid_draw(View2D *v2d, float step)
@@ -1405,8 +1423,11 @@ void UI_view2d_multi_grid_draw(View2D *v2d, int colorid, float step, int level_s
immUnbindProgram();
}
-/* *********************************************************************** */
-/* Scrollers */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Scrollers
+ * \{ */
/**
* View2DScrollers is typedef'd in UI_view2d.h
@@ -1648,8 +1669,11 @@ void UI_view2d_scrollers_free(View2DScrollers *scrollers)
MEM_freeN(scrollers);
}
-/* *********************************************************************** */
-/* List View Utilities */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name List View Utilities
+ * \{ */
/**
* Get the 'cell' (row, column) that the given 2D-view coordinates
@@ -1693,8 +1717,11 @@ void UI_view2d_listview_view_to_cell(float columnwidth,
}
}
-/* *********************************************************************** */
-/* Coordinate Conversions */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Coordinate Conversions
+ * \{ */
float UI_view2d_region_to_view_x(const struct View2D *v2d, float x)
{
@@ -1872,8 +1899,11 @@ bool UI_view2d_view_to_region_rcti_clip(View2D *v2d, const rctf *rect_src, rcti
}
}
-/* *********************************************************************** */
-/* Utilities */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Utilities
+ * \{ */
/* View2D data by default resides in region, so get from region stored in context */
View2D *UI_view2d_fromcontext(const bContext *C)
@@ -2075,7 +2105,11 @@ char UI_view2d_rect_in_scrollers(const ARegion *ar, const View2D *v2d, const rct
return UI_view2d_rect_in_scrollers_ex(ar, v2d, rect, &scroll_dummy);
}
-/* ******************* view2d text drawing cache ******************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name View2D Text Drawing Cache
+ * \{ */
typedef struct View2DString {
struct View2DString *next;
@@ -2205,4 +2239,4 @@ void UI_view2d_text_cache_draw(ARegion *ar)
}
}
-/* ******************************************************** */
+/** \} */