Module: TkInputThrow

Defined in:
lib/a-tkcommons.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(_widget) ⇒ Object


2777
2778
2779
# File 'lib/a-tkcommons.rb', line 2777

def self.extended(_widget)
  _widget.__initialize_throw(_widget)
end

.included(_widget) ⇒ Object


2781
2782
2783
# File 'lib/a-tkcommons.rb', line 2781

def self.included(_widget)
  _widget.__initialize_throw(_widget)
end

Instance Method Details

#__initialize_throw(_widget) ⇒ Object


2785
2786
2787
2788
2789
2790
2791
2792
2793
# File 'lib/a-tkcommons.rb', line 2785

def __initialize_throw(_widget)
  #_widget.bind_append("Enter", proc{p "Enter on #{_widget}";Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>_widget))})
  _widget.bind_append("<Copy>"){Arcadia.process_event(CopyTextEvent.new(_widget));break}
  _widget.bind_append("<Cut>"){Arcadia.process_event(CutTextEvent.new(_widget));break}
  _widget.bind_append("<Paste>"){Arcadia.process_event(PasteTextEvent.new(_widget));break}
  _widget.bind_append("<Undo>"){Arcadia.process_event(UndoTextEvent.new(_widget));break}
  _widget.bind_append("<Redo>"){Arcadia.process_event(RedoTextEvent.new(_widget));break}
  _widget.bind_append("1", proc{Arcadia.process_event(InputEnterEvent.new(self,'receiver'=>_widget))})
end

#select_throwObject


2795
2796
2797
# File 'lib/a-tkcommons.rb', line 2795

def select_throw
  InputEnterEvent.new(self,'receiver'=>self).go!
end