Class: SGL::SglNSView

Inherits:
OSX::NSView
  • Object
show all
Defined in:
lib/sgl/cocoa-window.rb

Overview

Do not use NSView for class name. It causes Illeagal Instruction Error. I don’t know why.

Instance Method Summary collapse

Instance Method Details

#drawRect(rect) ⇒ Object



184
# File 'lib/sgl/cocoa-window.rb', line 184

def drawRect(rect)	@app.display_all(rect);	end

#keyDown(event) ⇒ Object



188
# File 'lib/sgl/cocoa-window.rb', line 188

def keyDown(event)	@app.do_keydown(event);	end

#keyUp(event) ⇒ Object



189
# File 'lib/sgl/cocoa-window.rb', line 189

def keyUp(event)	@app.do_keyup(event);	end

#mouseDown(event) ⇒ Object



185
# File 'lib/sgl/cocoa-window.rb', line 185

def mouseDown(event)	@app.do_mousedown;	end

#mouseDragged(event) ⇒ Object

ignore



186
# File 'lib/sgl/cocoa-window.rb', line 186

def mouseDragged(event)	end

#mouseUp(event) ⇒ Object



187
# File 'lib/sgl/cocoa-window.rb', line 187

def mouseUp(event)	@app.do_mouseup;	end

#setApp(app) ⇒ Object



183
# File 'lib/sgl/cocoa-window.rb', line 183

def setApp(app)	@app = app;	end