Class: InspectMultiList
- Inherits:
-
Object
- Object
- InspectMultiList
- Defined in:
- ext/ae-rad/ae-rad-inspector.rb
Instance Method Summary collapse
- #add_event ⇒ Object
- #del_event(_innerFrame, _item) ⇒ Object
-
#initialize(_family, _host) ⇒ InspectMultiList
constructor
A new instance of InspectMultiList.
- #set_current(_index) ⇒ Object
- #update(_agobj) ⇒ Object
Constructor Details
#initialize(_family, _host) ⇒ InspectMultiList
Returns a new instance of InspectMultiList.
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'ext/ae-rad/ae-rad-inspector.rb', line 710 def initialize(_family, _host) _contr = self @family = _family @itemCount = 0 @tkFrame1 = TkFrame.new(_host, Arcadia.style('panel')){ #borderwidth 2 #relief 'groove' place( 'relwidth' => '1', 'x' => 0, 'y' => 0, 'height' => 30 ) @tkButton1 = TkButton.new(self, Arcadia.style('button')){ text 'New' padx 0 pady 0 #relief 'groove' place( 'x' => 2, 'y' => 2, 'height' => 21, 'width' => 54 ) bind('ButtonPress-1',proc{_contr.add_event}) } class << self attr_reader :tkButton1 end } @tkFrame2 = TkFrame.new(_host, Arcadia.style('panel')){ borderwidth 2 #relief 'groove' place( 'relwidth' => '1', 'relheight' => '1', 'height'=>-50, 'x' => 0, 'y' => 50 ) } @il = Hash.new end |
Instance Method Details
#add_event ⇒ Object
754 755 756 757 758 759 760 |
# File 'ext/ae-rad/ae-rad-inspector.rb', line 754 def add_event set_current(@itemCount) fi = InnerFrameInspectMultiList.new(@tkFrame2, @itemCount, self) @il[fi]=InspectList.new(@family, fi.tkFrameHost,30) @il[fi].updatelines(@agobj, @agobj.props[@family]) @itemCount = @itemCount + 1 end |
#del_event(_innerFrame, _item) ⇒ Object
762 763 764 765 766 767 768 769 770 |
# File 'ext/ae-rad/ae-rad-inspector.rb', line 762 def del_event(_innerFrame, _item) if (@agobj.persistent != nil) @agobj.persistent['events'].delete_at(_item) @agobj.persistent['procs'].delete_at(_item) if @agobj.persistent['procs'] != nil end @itemCount = @itemCount - 1 _innerFrame.destroy _innerFrame.callback_break end |
#set_current(_index) ⇒ Object
772 773 774 775 776 777 |
# File 'ext/ae-rad/ae-rad-inspector.rb', line 772 def set_current(_index) @itemIndex = _index if (@agobj.persistent['prog'] != nil) @agobj.persistent['prog']=@itemIndex end end |
#update(_agobj) ⇒ Object
779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'ext/ae-rad/ae-rad-inspector.rb', line 779 def update(_agobj) @itemCount = 0 @agobj = _agobj @il.each_key{|k| k.destroy } @il.clear if _agobj.persistent['events'] != nil _agobj.persistent['events'].each{|item| add_event } end end |