class Canis::MenuLink
Public Class Methods
new(form, config={})
click to toggle source
Calls superclass method
Canis::Link::new
# File lib/canis/core/widgets/rmenulink.rb, line 7 def initialize form, config={}, &block config[:hotkey] = true super @col_offset = -1 * (@col || 1) @row_offset = -1 * (@row || 1) # in this case, we wish to use ENTER for firing bind_key( KEY_ENTER, "fire" ) { fire } # next did not work #bind_key( KEY_ENTER, "fire" ) { get_action( 32 ) } # next 2 work #bind_key( KEY_ENTER, "fire" ) { @form.window.ungetch(32) } #@_key_map[KEY_ENTER] = @_key_map[32] #get_action_map()[KEY_ENTER] = get_action(32) end
Public Instance Methods
getvalue_for_paint()
click to toggle source
added for some standardization 2010-09-07 20:28 alias :text :getvalue # NEXT VERSION change existing text to label
# File lib/canis/core/widgets/rmenulink.rb, line 25 def getvalue_for_paint "%s %-12s - %-s" % [ @mnemonic , getvalue(), @description ] end