Class: RubyCurses::MenuLink

Inherits:
Link show all
Defined in:
lib/rbcurse/extras/rmenulink.rb

Constant Summary

Constants included from Io

Io::ERROR_COLOR_PAIR, Io::FOOTER_COLOR_PAIR, Io::LINEONE, Io::MAIN_WINDOW_COLOR_PAIR

Instance Attribute Summary

Attributes inherited from Widget

#_object_created, #col_offset, #cols_panned, #config, #curpos, #focussed, #form, #id, #parent_component, #row_offset, #rows_panned, #state

Instance Method Summary collapse

Methods inherited from Link

#fire

Methods inherited from Button

#action, #bind_hotkey, button_layout, #command, #fire, #getvalue, #handle_key, #mnemonic, #repaint, #text

Methods inherited from Widget

#changed, #click, #destroy, #enter, #event_list, #focus, #get_preferred_size, #getvalue, #handle_key, #height, #height=, #hide, #init_vars, #leave, #modified?, #move, #on_enter, #on_leave, #override_graphic, #printstring, #process_key, #remove, #repaint, #repaint_all, #repaint_required, #rowcol, #set_buffer_modified, #set_buffering, #set_form, #set_form_col, #set_form_row, #set_modified, #setformrowcol, #setrowcol, #show, #text_variable, #unbind_key, #width, #width=

Methods included from Io

#askchoice, #askyesno, #askyesnocancel, #clear_error, #clear_this, #get_string, #newaskyesno, #old_print_header, #old_print_top_right, #print_action, #print_error, #print_footer_help, #print_header, #print_headers, #print_help, #print_help_page, #print_in_middle, #print_key_labels, #print_key_labels_row, #print_screen_labels, #print_status, #print_this, #print_top_right, #rbgetstr, #warn

Methods included from Utils

#_process_key, #bind_key, #clean_string!, #get_color, #keycode_tos, #repeatm, #view, #wrap_text

Methods included from ConfigSetup

#cget, #config_setup, #configure, #variable_set

Methods included from EventHandler

#bind, #fire_handler, #fire_property_change

Constructor Details

#initialize(form, config = {}, &block) ⇒ MenuLink

Returns a new instance of MenuLink.



7
8
9
10
11
# File 'lib/rbcurse/extras/rmenulink.rb', line 7

def initialize form, config={}, &block
  super
  @col_offset = -1 * @col
  @row_offset = -1 * @row
end

Instance Method Details

#getvalue_for_paintObject

added for some standardization 2010-09-07 20:28 alias :text :getvalue # NEXT VERSION change existing text to label



16
17
18
# File 'lib/rbcurse/extras/rmenulink.rb', line 16

def getvalue_for_paint
  "%s      %-12s   -    %-s" % [ @mnemonic , getvalue(), @description ]
end