Method: Fox::FXWindow#addHotKey

Defined in:
rdoc-sources/FXWindow.rb

#addHotKey(code) ⇒ Object

Add this hot key to the closest ancestor’s accelerator table.



340
341
342
343
344
345
346
347
348
349
# File 'rdoc-sources/FXWindow.rb', line 340

def addHotKey(code)
  accel = nil
  win = self
  while win && (accel = win.accelTable).nil?
    win = win.parent
  end
  if accel
    accel.addAccel(code, self, MKUINT(ID_HOTKEY, SEL_KEYPRESS), MKUINT(ID_HOTKEY, SEL_KEYRELEASE))
  end
end