View2D - Another WIP commit

* Start of basic scrollbar drawing. This will be improved. Only Outliner shows these for now, as although the Timeline should show them, the old files didn't have them turned on. 

* Tidied up the view-panning operator
- Fixed naming convention
- Added user-adjustable properties (deltax, deltay in screenspace)

* Added ctrl-scrollwheel (horizontal) and shift-scrollwheel (vertical) scroll operators. These use the view-panning code too. 
Unfortunately, I haven't been able to figure out why the WHEELMOUSEDOWN events don't seem to be triggering the operators!
This commit is contained in:
2008-12-01 00:20:19 +00:00
parent 3f0d3e0a50
commit 70fd53b469
5 changed files with 374 additions and 93 deletions

View File

@@ -79,17 +79,19 @@ typedef struct View2DScrollers View2DScrollers;
/* Prototypes: */
/* setup */
void UI_view2d_ortho(const struct bContext *C, struct View2D *v2d);
void UI_view2d_view_ortho(const struct bContext *C, struct View2D *v2d);
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 type, int winx, int winy);
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);
void UI_view2d_free_grid(View2DGrid *grid);
/* scrollbar drawing */
View2DScrollers *UI_view2d_calc_scrollers(const struct bContext *C, struct View2D *v2d, short units, short clamp);
void UI_view2d_draw_scrollers(const struct bContext *C, struct View2D *v2d, View2DScrollers *scrollers, int flag);
void UI_view2d_free_scrollbars(View2DScrollers *scrollers);