2013-03-15 13:11:33 +00:00
|
|
|
@interface CocoaCanvas : NSImageView {
|
|
|
|
@public
|
|
|
|
phoenix::Canvas *canvas;
|
|
|
|
}
|
|
|
|
-(id) initWith:(phoenix::Canvas&)canvas;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(void) mouseButton:(NSEvent*)event down:(BOOL)isDown;
|
|
|
|
-(void) mouseExited:(NSEvent*)event;
|
|
|
|
-(void) mouseMove:(NSEvent*)event;
|
|
|
|
-(void) mouseDown:(NSEvent*)event;
|
|
|
|
-(void) mouseUp:(NSEvent*)event;
|
|
|
|
-(void) mouseDragged:(NSEvent*)event;
|
|
|
|
-(void) rightMouseDown:(NSEvent*)event;
|
|
|
|
-(void) rightMouseUp:(NSEvent*)event;
|
|
|
|
-(void) rightMouseDragged:(NSEvent*)event;
|
|
|
|
-(void) otherMouseDown:(NSEvent*)event;
|
|
|
|
-(void) otherMouseUp:(NSEvent*)event;
|
|
|
|
-(void) otherMouseDragged:(NSEvent*)event;
|
2013-03-15 13:11:33 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
namespace phoenix {
|
|
|
|
|
|
|
|
struct pCanvas : public pWidget {
|
|
|
|
Canvas &canvas;
|
2013-03-21 12:59:01 +00:00
|
|
|
CocoaCanvas *cocoaCanvas = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
|
|
|
void setSize(const Size &size);
|
|
|
|
void update();
|
|
|
|
|
|
|
|
pCanvas(Canvas &canvas) : pWidget(canvas), canvas(canvas) {}
|
|
|
|
void constructor();
|
|
|
|
void destructor();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|