2013-03-19 08:48:50 +00:00
|
|
|
@interface CocoaViewport : NSView {
|
|
|
|
@public
|
2013-05-02 11:25:45 +00:00
|
|
|
phoenix::Viewport* viewport;
|
2013-03-19 08:48:50 +00:00
|
|
|
}
|
2013-03-21 12:59:01 +00:00
|
|
|
-(id) initWith:(phoenix::Viewport&)viewport;
|
|
|
|
-(void) drawRect:(NSRect)rect;
|
|
|
|
-(BOOL) acceptsFirstResponder;
|
2013-07-29 09:42:45 +00:00
|
|
|
-(NSDragOperation) draggingEntered:(id<NSDraggingInfo>)sender;
|
|
|
|
-(BOOL) performDragOperation:(id<NSDraggingInfo>)sender;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(void) keyDown:(NSEvent*)event;
|
|
|
|
-(void) keyUp:(NSEvent*)event;
|
2013-03-19 08:48:50 +00:00
|
|
|
@end
|
|
|
|
|
2013-03-15 13:11:33 +00:00
|
|
|
namespace phoenix {
|
|
|
|
|
|
|
|
struct pViewport : public pWidget {
|
2013-05-02 11:25:45 +00:00
|
|
|
Viewport& viewport;
|
|
|
|
CocoaViewport* cocoaViewport = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
|
|
|
uintptr_t handle();
|
2013-07-29 09:42:45 +00:00
|
|
|
void setDroppable(bool droppable);
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2013-05-02 11:25:45 +00:00
|
|
|
pViewport(Viewport& viewport) : pWidget(viewport), viewport(viewport) {}
|
2013-03-15 13:11:33 +00:00
|
|
|
void constructor();
|
2013-03-19 08:48:50 +00:00
|
|
|
void destructor();
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|