Class: TECSCDE::MainViewAndModel
- Defined in:
- lib/tecscde/main_view_and_model.rb
Instance Method Summary collapse
-
#initialize(tecsgen) ⇒ MainViewAndModel
constructor
A new instance of MainViewAndModel.
- #test_main ⇒ Object
Constructor Details
#initialize(tecsgen) ⇒ MainViewAndModel
Returns a new instance of MainViewAndModel.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/tecscde/main_view_and_model.rb', line 56 def initialize(tecsgen) @model = TECSCDE::TECSModel.new(tecsgen) control = TECSCDE::Control.new(@model) view = TECSCDE::View::MainView.new(@model, control) control.set_view(view) @model.set_view(view) @model.add_cell_list_from_tecsgen @model.set_undo_point view.paint_canvas end |
Instance Method Details
#test_main ⇒ Object
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/tecscde/main_view_and_model.rb', line 69 def test_main TECSCDE.logger.degug("test_main") cell1 = @model.new_cell(0, 0) cell2 = @model.new_cell(100, 100) cport = TECSModel::TmCPort.new(cell1) eport = TECSModel::TmEPort.new(cell2) @model.new_join(cport, eport) end |