2015-12-30 06:41:46 +00:00
|
|
|
#if defined(Hiro_Viewport)
|
|
|
|
|
2013-03-19 08:48:50 +00:00
|
|
|
@interface CocoaViewport : NSView {
|
|
|
|
@public
|
2015-12-30 06:41:46 +00:00
|
|
|
hiro::mViewport* viewport;
|
2013-03-19 08:48:50 +00:00
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
-(id) initWith:(hiro::mViewport&)viewport;
|
2013-03-21 12:59:01 +00:00
|
|
|
-(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
|
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
namespace hiro {
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
struct pViewport : pWidget {
|
|
|
|
Declare(Viewport, Widget)
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
auto handle() const -> uintptr;
|
|
|
|
auto setDroppable(bool droppable) -> void;
|
2013-03-15 13:11:33 +00:00
|
|
|
|
2015-12-30 06:41:46 +00:00
|
|
|
CocoaViewport* cocoaViewport = nullptr;
|
2013-03-15 13:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2015-12-30 06:41:46 +00:00
|
|
|
|
|
|
|
#endif
|