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:
authorSergey Sharybin <sergey@blender.org>2020-08-12 13:36:19 +0300
committerSergey Sharybin <sergey@blender.org>2020-08-13 16:24:21 +0300
commitc27123632bb4e40a36785dea148dcf0a00dce019 (patch)
treecd0e747f8c999a74deafea8dfb3aec97c72181e3 /source/blender/editors/include/UI_view2d.h
parentb89521de21be1a31c6dbfa186cf5512922a6ed36 (diff)
View2D: Centralize handling of changes to v2d->cur
Currently there are no functional changes, preparing code to add more functionality which is to be run from navigation/zoom operators.
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r--source/blender/editors/include/UI_view2d.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 6e0f4434b7b..1bd9b3063bd 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -120,6 +120,12 @@ void UI_view2d_curRect_validate(struct View2D *v2d);
void UI_view2d_curRect_reset(struct View2D *v2d);
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag);
+/* Perform all required updates after `v2d->cur` as been modified.
+ * This includes like validation view validation (UI_view2d_curRect_validate).
+ *
+ * Current lintent is to use it from user code, such as view navigation and zoom operations. */
+void UI_view2d_curRect_changed(const struct bContext *C, struct View2D *v2d);
+
void UI_view2d_totRect_set(struct View2D *v2d, int width, int height);
void UI_view2d_totRect_set_resize(struct View2D *v2d, int width, int height, bool resize);