Changeset 3798 for trunk/umitGUI/radialnet/ControlWidget.py
- Timestamp:
- 11/29/08 18:08:19 (4 years ago)
- Files:
-
- 1 modified
-
trunk/umitGUI/radialnet/ControlWidget.py (modified) (33 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/umitGUI/radialnet/ControlWidget.py
r3726 r3798 23 23 import gobject 24 24 25 import bestwidgets as bw25 #import bestwidgets as bw 26 26 import higwidgets.drawing as drawing 27 27 … … 29 29 from umitGUI.radialnet.RadialNet import * 30 30 31 from higwidgets.higboxes import HIGBox, HIGHBox, HIGVBox, HIGScrolledWindow 32 from higwidgets.higexpanders import HIGExpanderRNet 33 from higwidgets.higtables import HIGTableRNet 31 34 32 35 OPTIONS = ['address', … … 42 45 43 46 44 class ControlWidget( bw.BWVBox):47 class ControlWidget(HIGVBox): 45 48 """ 46 49 """ … … 48 51 """ 49 52 """ 50 bw.BWVBox.__init__(self)53 HIGVBox.__init__(self) 51 54 self.set_border_width(6) 52 55 … … 64 67 self.__view = ControlView(self.radialnet) 65 68 66 self. bw_pack_start_noexpand_nofill(self.__action)67 self. bw_pack_start_noexpand_nofill(self.__interpolation)68 self. bw_pack_start_noexpand_nofill(self.__layout)69 self. bw_pack_start_noexpand_nofill(self.__view)70 71 72 73 class ControlAction( bw.BWExpander):69 self._pack_noexpand_nofill(self.__action) 70 self._pack_noexpand_nofill(self.__interpolation) 71 self._pack_noexpand_nofill(self.__layout) 72 self._pack_noexpand_nofill(self.__view) 73 74 75 76 class ControlAction(HIGExpanderRNet): 74 77 """ 75 78 """ … … 77 80 """ 78 81 """ 79 bw.BWExpander.__init__(self, 'Action')82 HIGExpanderRNet.__init__(self, 'Action') 80 83 self.set_expanded(True) 81 84 … … 88 91 """ 89 92 """ 90 self.__tbox = bw.BWTable(1, 4)91 self.__tbox. bw_set_spacing(0)92 self.__vbox = bw.BWVBox()93 self.__tbox = HIGTableRNet(1, 4) 94 self.__tbox._set_spacing(0) 95 self.__vbox = HIGVBox() 93 96 94 97 self.__tooltips = gtk.Tooltips() … … 126 129 self.__region_color.set_active(self.radialnet.get_region_color()) 127 130 128 self.__tbox. bw_attach_next(self.__jump_to)129 self.__tbox. bw_attach_next(self.__info)130 self.__tbox. bw_attach_next(self.__group)131 self.__tbox. bw_attach_next(self.__region)132 133 self.__vbox. bw_pack_start_noexpand_nofill(self.__tbox)134 self.__vbox. bw_pack_start_noexpand_nofill(self.__region_color)135 136 self. bw_add(self.__vbox)131 self.__tbox._attach_next(self.__jump_to) 132 self.__tbox._attach_next(self.__info) 133 self.__tbox._attach_next(self.__group) 134 self.__tbox._attach_next(self.__region) 135 136 self.__vbox._pack_noexpand_nofill(self.__tbox) 137 self.__vbox._pack_noexpand_nofill(self.__region_color) 138 139 self._add(self.__vbox) 137 140 138 141 self.__jump_to.set_active(True) … … 354 357 355 358 356 class ControlVariable( bw.BWHBox):359 class ControlVariable(HIGHBox): 357 360 """ 358 361 """ … … 360 363 """ 361 364 """ 362 bw.BWHBox.__init__(self, spacing=0)365 HIGHBox.__init__(self, spacing=0) 363 366 364 367 self.__increment_pass = increment … … 399 402 self.__right_button.connect('released', self.__released) 400 403 401 self. bw_pack_start_noexpand_nofill(self.__left_button)402 self. bw_pack_start_expand_fill(self.__control)403 self. bw_pack_start_noexpand_nofill(self.__right_button)404 self._pack_noexpand_nofill(self.__left_button) 405 self._pack_expand_fill(self.__control) 406 self._pack_noexpand_nofill(self.__right_button) 404 407 405 408 … … 432 435 433 436 434 class ControlFisheye( bw.BWVBox):437 class ControlFisheye(HIGVBox): 435 438 """ 436 439 """ … … 438 441 """ 439 442 """ 440 bw.BWVBox.__init__(self)443 HIGVBox.__init__(self) 441 444 self.set_border_width(6) 442 445 … … 450 453 """ 451 454 """ 452 self.__params = bw.BWHBox()455 self.__params = HIGHBox() 453 456 454 457 self.__fisheye_label = gtk.Label('<b>Fisheye</b> on ring') … … 477 480 self.__spread_spin.set_digits(2) 478 481 479 self.__params. bw_pack_start_noexpand_nofill(self.__fisheye_label)480 self.__params. bw_pack_start_noexpand_nofill(self.__ring_spin)481 self.__params. bw_pack_start_expand_fill(self.__ring_scale)482 self.__params. bw_pack_start_noexpand_nofill(self.__interest_label)483 self.__params. bw_pack_start_noexpand_nofill(self.__interest_spin)484 self.__params. bw_pack_start_noexpand_nofill(self.__spread_label)485 self.__params. bw_pack_start_noexpand_nofill(self.__spread_spin)486 487 self. bw_pack_start_noexpand_nofill(self.__params)482 self.__params._pack_noexpand_nofill(self.__fisheye_label) 483 self.__params._pack_noexpand_nofill(self.__ring_spin) 484 self.__params._pack_expand_fill(self.__ring_scale) 485 self.__params._pack_noexpand_nofill(self.__interest_label) 486 self.__params._pack_noexpand_nofill(self.__interest_spin) 487 self.__params._pack_noexpand_nofill(self.__spread_label) 488 self.__params._pack_noexpand_nofill(self.__spread_spin) 489 490 self._pack_noexpand_nofill(self.__params) 488 491 489 492 self.__ring.connect('value_changed', self.__change_ring) … … 578 581 579 582 580 class ControlInterpolation( bw.BWExpander):583 class ControlInterpolation(HIGExpanderRNet): 581 584 """ 582 585 """ … … 584 587 """ 585 588 """ 586 bw.BWExpander.__init__(self, 'Interpolation')589 HIGExpanderRNet.__init__(self, 'Interpolation') 587 590 588 591 self.radialnet = radialnet … … 594 597 """ 595 598 """ 596 self.__vbox = bw.BWVBox()599 self.__vbox = HIGVBox() 597 600 598 601 self.__cartesian_radio = gtk.RadioButton(None, 'Cartesian') … … 605 608 INTERPOLATION_POLAR) 606 609 607 self.__system_box = bw.BWHBox()608 self.__system_box. bw_pack_start_noexpand_nofill(self.__polar_radio)609 self.__system_box. bw_pack_start_noexpand_nofill(self.__cartesian_radio)610 611 self.__frames_box = bw.BWHBox()610 self.__system_box = HIGHBox() 611 self.__system_box._pack_noexpand_nofill(self.__polar_radio) 612 self.__system_box._pack_noexpand_nofill(self.__cartesian_radio) 613 614 self.__frames_box = HIGHBox() 612 615 self.__frames_label = gtk.Label('Frames') 613 616 self.__frames_label.set_alignment(0.0, 0.5) … … 618 621 self.__frames.connect('value_changed', self.__change_frames) 619 622 self.__frames_spin = gtk.SpinButton(self.__frames) 620 self.__frames_box. bw_pack_start_expand_fill(self.__frames_label)621 self.__frames_box. bw_pack_start_noexpand_nofill(self.__frames_spin)622 623 self.__vbox. bw_pack_start_noexpand_nofill(self.__frames_box)624 self.__vbox. bw_pack_start_noexpand_nofill(self.__system_box)625 626 self. bw_add(self.__vbox)623 self.__frames_box._pack_expand_fill(self.__frames_label) 624 self.__frames_box._pack_noexpand_nofill(self.__frames_spin) 625 626 self.__vbox._pack_noexpand_nofill(self.__frames_box) 627 self.__vbox._pack_noexpand_nofill(self.__system_box) 628 629 self._add(self.__vbox) 627 630 628 631 gobject.timeout_add(REFRESH_RATE, self.__update_animation) … … 665 668 666 669 667 class ControlLayout( bw.BWExpander):670 class ControlLayout(HIGExpanderRNet): 668 671 """ 669 672 """ … … 671 674 """ 672 675 """ 673 bw.BWExpander.__init__(self, 'Layout')676 HIGExpanderRNet.__init__(self, 'Layout') 674 677 675 678 self.radialnet = radialnet … … 681 684 """ 682 685 """ 683 self.__hbox = bw.BWHBox()686 self.__hbox = HIGHBox() 684 687 685 688 self.__layout = gtk.combo_box_new_text() … … 691 694 self.__force.connect('clicked', self.__force_update) 692 695 693 self.__hbox. bw_pack_start_expand_fill(self.__layout)694 self.__hbox. bw_pack_start_noexpand_nofill(self.__force)695 696 self. bw_add(self.__hbox)696 self.__hbox._pack_expand_fill(self.__layout) 697 self.__hbox._pack_noexpand_nofill(self.__force) 698 699 self._add(self.__hbox) 697 700 698 701 self.__check_layout() … … 729 732 730 733 731 class ControlRingGap( bw.BWVBox):734 class ControlRingGap(HIGVBox): 732 735 """ 733 736 """ … … 735 738 """ 736 739 """ 737 bw.BWVBox.__init__(self)740 HIGVBox.__init__(self) 738 741 739 742 self.radialnet = radialnet … … 758 761 self.__spin.connect('value_changed', self.__change_lower) 759 762 760 self.__lower_hbox = bw.BWHBox()761 self.__lower_hbox. bw_pack_start_expand_fill(self.__label)762 self.__lower_hbox. bw_pack_start_noexpand_nofill(self.__spin)763 764 self. bw_pack_start_noexpand_nofill(self.__radius)765 self. bw_pack_start_noexpand_nofill(self.__lower_hbox)763 self.__lower_hbox = HIGHBox() 764 self.__lower_hbox._pack_expand_fill(self.__label) 765 self.__lower_hbox._pack_noexpand_nofill(self.__spin) 766 767 self._pack_noexpand_nofill(self.__radius) 768 self._pack_noexpand_nofill(self.__lower_hbox) 766 769 767 770 … … 774 777 775 778 776 class ControlOptions( bw.BWScrolledWindow):779 class ControlOptions(HIGScrolledWindow): 777 780 """ 778 781 """ … … 780 783 """ 781 784 """ 782 bw.BWScrolledWindow.__init__(self)785 HIGScrolledWindow.__init__(self) 783 786 784 787 self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS) … … 875 878 876 879 877 class ControlView( bw.BWExpander):880 class ControlView(HIGExpanderRNet): 878 881 """ 879 882 """ … … 881 884 """ 882 885 """ 883 bw.BWExpander.__init__(self, 'View')886 HIGExpanderRNet.__init__(self, 'View') 884 887 self.set_expanded(True) 885 888 … … 892 895 """ 893 896 """ 894 self.__vbox = bw.BWVBox(spacing=0)897 self.__vbox = HIGVBox(spacing=0) 895 898 896 899 self.__zoom = ControlVariable('Zoom', … … 904 907 self.__options.set_border_width(0) 905 908 906 self.__vbox. bw_pack_start_expand_nofill(self.__options)907 self.__vbox. bw_pack_start_noexpand_nofill(self.__navigation)908 self.__vbox. bw_pack_start_noexpand_nofill(self.__zoom)909 self.__vbox. bw_pack_start_noexpand_nofill(self.__ring_gap)910 911 self. bw_add(self.__vbox)909 self.__vbox._pack_expand_nofill(self.__options) 910 self.__vbox._pack_noexpand_nofill(self.__navigation) 911 self.__vbox._pack_noexpand_nofill(self.__zoom) 912 self.__vbox._pack_noexpand_nofill(self.__ring_gap) 913 914 self._add(self.__vbox) 912 915 913 916
