| 722 | __ref_widget = None #The reference widget set by set_widget |
| 723 | |
| 724 | def __init__(self, appInstance, **kwargs): |
| 725 | super(EditorAttributes, self).__init__(**kwargs) |
| 726 | self.appInstance = appInstance |
| 727 | #self.style['overflow-y'] = 'scroll' |
| 728 | self.style['justify-content'] = 'flex-start' |
| 729 | self.style['-webkit-justify-content'] = 'flex-start' |
| 730 | self.titleLabel = gui.Label('Attributes editor', width='100%', height=20) |
| 731 | self.titleLabel.add_class("DialogTitle") |
| 732 | self.infoLabel = gui.Label('Selected widget: None', height=25) |
| 733 | self.infoLabel.style['font-weight'] = 'bold' |
| 734 | |
| 735 | self.attributes_groups_container = gui.VBox(width="100%", height="calc(100% - 45px)") |
| 736 | self.attributes_groups_container.css_overflow = 'auto' |
| 737 | self.attributes_groups_container.css_align_items = "flex-start" |
| 738 | self.attributes_groups_container.css_justify_content = "flex-start" |
| 739 | |
| 740 | self.append([self.titleLabel, self.infoLabel, self.attributes_groups_container]) |
| 741 | |
| 742 | self.titleLabel.style['order'] = '-1' |
| 743 | self.titleLabel.style['-webkit-order'] = '-1' |
| 744 | self.infoLabel.style['order'] = '0' |
| 745 | self.infoLabel.style['-webkit-order'] = '0' |
| 746 | self.attributes_groups_container.style['order'] = '1' |
| 747 | self.attributes_groups_container.style['-webkit-order'] = '1' |
| 748 | |
| 749 | self.group_orders = { |
| 750 | 'Generic': '2', 'WidgetSpecific': '3', 'Geometry': '4', 'Background': '5', 'Transformation': '6'} |
| 751 | |
| 752 | self.attributesInputs = list() |
| 753 | # load editable attributes |
| 754 | self.attributeGroups = {} |
| 755 | |
| 756 | def update_widget(self): |
| 757 | for x, y in inspect.getmembers(self.__ref_widget.__class__): |