Class: AGTkRenderer
- Inherits:
-
AGRenderer
- Object
- AGRenderer
- AGTkRenderer
- Defined in:
- ext/ae-rad/lib/tk/al-tk.rb
Constant Summary
Constants inherited from AGRenderer
Instance Method Summary collapse
- #class_controller(_ind = 0) ⇒ Object
- #class_controller_begin(_ind = 0) ⇒ Object
- #class_controller_end(_ind = 0) ⇒ Object
- #class_controller_hinner_begin(_ind = 0) ⇒ Object
- #class_controller_hinner_end(_ind = 0) ⇒ Object
- #class_end(_ind = 0) ⇒ Object
- #class_hinner_begin(_ind = 0) ⇒ Object
- #recursive_binding(_agobj, _ind = 0) ⇒ Object
Methods inherited from AGRenderer
#class_begin, #class_code, #class_hinner_end, #initialize, #obj_begin, #obj_code, #obj_end, #obj_hinner_begin, #obj_hinner_end, #render_family, #render_on_create_properties, #render_value, #render_value_default
Constructor Details
This class inherits a constructor from AGRenderer
Instance Method Details
#class_controller(_ind = 0) ⇒ Object
793 794 795 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 793 def class_controller(_ind=0) return class_controller_begin(_ind), class_controller_hinner_begin(_ind), class_controller_hinner_end(_ind), class_controller_end(_ind) end |
#class_controller_begin(_ind = 0) ⇒ Object
797 798 799 800 801 802 803 804 805 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 797 def class_controller_begin(_ind=0) code = "\n","\t"*_ind,'class ', @agobj.getInstanceClass, 'C', "\n" code = code, "\t"*(_ind+1),"attr_reader :",@agobj.i_name," :md\n" code = code, "\t"*(_ind+1),"def initialize(_md)\n" code = code, "\t"*(_ind+2),"@",@agobj.i_name,"=",@agobj.getInstanceClass,".new\n" code = code, "\t"*(_ind+2),"@md=_md\n" code = code, "\t"*(_ind+2),"self.binding\n" code = code, "\t"*(_ind+1),"end\n" end |
#class_controller_end(_ind = 0) ⇒ Object
836 837 838 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 836 def class_controller_end(_ind=0) code = code, "end\n" end |
#class_controller_hinner_begin(_ind = 0) ⇒ Object
807 808 809 810 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 807 def class_controller_hinner_begin(_ind=0) code = code, "\t"*(_ind+1),"def binding\n" code = code, "\t"*(_ind+2),recursive_binding(@agobj,2),"\n" end |
#class_controller_hinner_end(_ind = 0) ⇒ Object
832 833 834 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 832 def class_controller_hinner_end(_ind=0) code = code, " end\n" end |
#class_end(_ind = 0) ⇒ Object
785 786 787 788 789 790 791 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 785 def class_end(_ind=0) result = super(_ind) if @agobj.contains_events result = result,"\n", class_controller(_ind) end return result end |
#class_hinner_begin(_ind = 0) ⇒ Object
781 782 783 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 781 def class_hinner_begin(_ind=0) return super(_ind), render_family(_ind+1,TkWinfo.manager(@agobj.obj)), "\n" end |
#recursive_binding(_agobj, _ind = 0) ⇒ Object
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 812 def recursive_binding(_agobj,_ind=0) _code = '' _agobj.props_def['bind']['path'] = '@',_agobj.get_path_i_name,'.' if _agobj.has_events for i in 0.._agobj.persistent['events'].length - 1 _agobj.persistent['prog']=i if _agobj.persistent['procs'] == nil || (_agobj.persistent['procs'][i] == nil || _agobj.persistent['procs'][i].length == 0) _agobj.persistent['procs'] = Array.new if _agobj.persistent['procs'] == nil _agobj.persistent['procs'][i]= "@md.on_",_agobj.i_name,'_',_agobj.persistent['events'][i] end _code = _code, _agobj.renderer.render_family(_ind,'bind') end _code = _code,"\n" end _agobj.sons.each{|son| _code = _code, recursive_binding(son,_ind),"\n" } return _code end |