Mercurial > MadButterfly
comparison pyink/FSM_window.py @ 1479:92a8497d0361
Make FSM editor scrollable
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 27 Apr 2011 15:41:47 +0800 |
parents | 6fe773e62b2a |
children | e11ffd5fd609 |
comparison
equal
deleted
inserted
replaced
1478:6fe773e62b2a | 1479:92a8497d0361 |
---|---|
448 pass | 448 pass |
449 | 449 |
450 def set_svg_view(self, view): | 450 def set_svg_view(self, view): |
451 self._view_box.add(view) | 451 self._view_box.add(view) |
452 self._view_widget = view | 452 self._view_widget = view |
453 | |
454 root = self._root() | |
455 root.setAttribute('width', '1024') | |
456 root.setAttribute('height', '768') | |
457 view.setResize(True, 800, 600) | |
453 pass | 458 pass |
454 | 459 |
455 def on_close_window_activate(self, *args): | 460 def on_close_window_activate(self, *args): |
456 self._close_cb() | 461 self._close_cb() |
457 pass | 462 pass |
526 | 531 |
527 view = self._view_widget.view | 532 view = self._view_widget.view |
528 doc = view.doc() | 533 doc = view.doc() |
529 rdoc = doc.rdoc | 534 rdoc = doc.rdoc |
530 root_node = doc.root().repr | 535 root_node = doc.root().repr |
531 | 536 |
532 line_node = rdoc.createElement('svg:line') | 537 line_node = rdoc.createElement('svg:line') |
533 line_node.setAttribute('x1', '10') | 538 line_node.setAttribute('x1', '10') |
534 line_node.setAttribute('y1', '10') | 539 line_node.setAttribute('y1', '10') |
535 line_node.setAttribute('x2', '100') | 540 line_node.setAttribute('x2', '100') |
536 line_node.setAttribute('y2', '100') | 541 line_node.setAttribute('y2', '100') |