diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
commit | eddae6af0663243a2677674d501f9a87d55798f5 (patch) | |
tree | 08562171f870a6b592d624adfbfd0d6fa11fcdcb /cocoa/Tree.m | |
parent | a5dc6b9e6637c85d18510ac6446ee4a8a7955e7b (diff) | |
download | netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.gz netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.bz2 |
Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
Diffstat (limited to 'cocoa/Tree.m')
-rw-r--r-- | cocoa/Tree.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cocoa/Tree.m b/cocoa/Tree.m index 507dc3658..da03e75dc 100644 --- a/cocoa/Tree.m +++ b/cocoa/Tree.m @@ -19,6 +19,7 @@ #import "cocoa/Tree.h" #import "cocoa/coordinates.h" #import "cocoa/font.h" +#import "cocoa/plotter.h" #import "desktop/tree.h" @@ -124,8 +125,13 @@ static void tree_get_window_dimensions( int *width, int *height, void *data ) - (void) drawRect: (NSRect) rect inView: (NSView *) view; { + struct redraw_context ctx = { + .interactive = true, + .plot = &cocoa_plotters + }; + tree_draw( tree, 0, 0, cocoa_pt_to_px( NSMinX( rect ) ), cocoa_pt_to_px( NSMinY( rect )), - cocoa_pt_to_px( NSWidth( rect ) ), cocoa_pt_to_px( NSHeight( rect ) ) ); + cocoa_pt_to_px( NSWidth( rect ) ), cocoa_pt_to_px( NSHeight( rect ) ), &ctx ); } - (void) mouseAction: (browser_mouse_state)state atPoint: (NSPoint)point; |