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:
authorJoshua Leung <aligorith@gmail.com>2008-12-05 05:03:37 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-05 05:03:37 +0300
commit5e6041496174904e1745b39517b63b0dff78326b (patch)
tree204d9735a8abb407d03a4e7a09acfdc9268f6ca0 /source/blender/editors/include/UI_view2d.h
parente4a8a39f9d649a2fc022959ef8bbee147422a38e (diff)
View2D API: Cleaning up API + New Methods
* Cleaned up flags defined for View2D, and added some for defining the alignment of the view's data in the 'tot' rect (i.e. which quadrant(s) the view data is allowed to reside in). * These flags are used in the new UI_view2d_totRect_set() function, which sets the new size of the 'tot' rect (i.e. the maximum viewable area). Currently, is only used for Outliner, but channel-lists also require this. * Added API method to reset 'cur' (current viewing region) to 'default' viewing region - UI_view2d_curRect_reset(). Currently, 'keepzoom' is not respected. I'll check on whether this is needed when I recode UI_view2d_status_enforce(), which is badly in need of a cleanup.
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r--source/blender/editors/include/UI_view2d.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 07fc4e98519..02cf4b1f4cc 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -82,14 +82,19 @@ typedef struct View2DScrollers View2DScrollers;
/* ----------------------------------------- */
/* Prototypes: */
-/* setup */
+/* refresh and validation (of view rects) */
+ // XXX rename these...
+void UI_view2d_size_update(struct View2D *v2d, int winx, int winy);
+void UI_view2d_status_enforce(struct View2D *v2d, int winx, int winy);
+
+void UI_view2d_totRect_set(struct View2D *v2d, int width, int height);
+void UI_view2d_curRect_reset(struct View2D *v2d);
+
+/* view matrix operations */
void UI_view2d_view_ortho(const struct bContext *C, struct View2D *v2d);
-void UI_view2d_view_orthospecial(const struct bContext *C, struct View2D *v2d, short xaxis);
+void UI_view2d_view_orthoSpecial(const struct bContext *C, struct View2D *v2d, short xaxis);
void UI_view2d_view_restore(const struct bContext *C);
-void UI_view2d_update_size(struct View2D *v2d, int winx, int winy);
-void UI_view2d_enforce_status(struct View2D *v2d, int winx, int winy);
-
/* grid drawing */
View2DGrid *UI_view2d_calc_grid(const struct bContext *C, struct View2D *v2d, short unit, short clamp, int winx, int winy);
void UI_view2d_draw_grid(const struct bContext *C, struct View2D *v2d, View2DGrid *grid, int flag);