equal
deleted
inserted
replaced
35 from dialogs import ArrayTypeDialog |
35 from dialogs import ArrayTypeDialog |
36 from EditorPanel import EditorPanel |
36 from EditorPanel import EditorPanel |
37 from util.BitmapLibrary import GetBitmap |
37 from util.BitmapLibrary import GetBitmap |
38 from util.TranslationCatalogs import NoTranslate |
38 from util.TranslationCatalogs import NoTranslate |
39 |
39 |
40 #------------------------------------------------------------------------------- |
40 # ------------------------------------------------------------------------------- |
41 # Helpers |
41 # Helpers |
42 #------------------------------------------------------------------------------- |
42 # ------------------------------------------------------------------------------- |
43 |
43 |
44 DIMENSION_MODEL = re.compile("([0-9]+)\.\.([0-9]+)$") |
44 DIMENSION_MODEL = re.compile("([0-9]+)\.\.([0-9]+)$") |
45 |
45 |
46 |
46 |
47 def AppendMenu(parent, help, id, kind, text): |
47 def AppendMenu(parent, help, id, kind, text): |
58 return [_("Directly"), _("Subrange"), _("Enumerated"), _("Array"), _("Structure")] |
58 return [_("Directly"), _("Subrange"), _("Enumerated"), _("Array"), _("Structure")] |
59 |
59 |
60 |
60 |
61 DATATYPE_TYPES_DICT = dict([(_(datatype), datatype) for datatype in GetDatatypeTypes()]) |
61 DATATYPE_TYPES_DICT = dict([(_(datatype), datatype) for datatype in GetDatatypeTypes()]) |
62 |
62 |
63 #------------------------------------------------------------------------------- |
63 # ------------------------------------------------------------------------------- |
64 # Structure Elements Table |
64 # Structure Elements Table |
65 #------------------------------------------------------------------------------- |
65 # ------------------------------------------------------------------------------- |
66 |
66 |
67 |
67 |
68 class ElementsTable(CustomTable): |
68 class ElementsTable(CustomTable): |
69 |
69 |
70 """ |
70 """ |
138 col_highlights = row_highlights.setdefault("initial value", []) |
138 col_highlights = row_highlights.setdefault("initial value", []) |
139 else: |
139 else: |
140 col_highlights = row_highlights.setdefault(infos[1], []) |
140 col_highlights = row_highlights.setdefault(infos[1], []) |
141 col_highlights.append(highlight_type) |
141 col_highlights.append(highlight_type) |
142 |
142 |
143 #------------------------------------------------------------------------------- |
143 # ------------------------------------------------------------------------------- |
144 # Datatype Editor class |
144 # Datatype Editor class |
145 #------------------------------------------------------------------------------- |
145 # ------------------------------------------------------------------------------- |
146 |
146 |
147 |
147 |
148 class DataTypeEditor(EditorPanel): |
148 class DataTypeEditor(EditorPanel): |
149 |
149 |
150 def _init_Editor(self, parent): |
150 def _init_Editor(self, parent): |
775 self.Controler.SetDataTypeInfos(self.TagName, infos) |
775 self.Controler.SetDataTypeInfos(self.TagName, infos) |
776 self.ParentWindow.RefreshTitle() |
776 self.ParentWindow.RefreshTitle() |
777 self.ParentWindow.RefreshFileMenu() |
777 self.ParentWindow.RefreshFileMenu() |
778 self.ParentWindow.RefreshEditMenu() |
778 self.ParentWindow.RefreshEditMenu() |
779 |
779 |
780 #------------------------------------------------------------------------------- |
780 # ------------------------------------------------------------------------------- |
781 # Highlights showing functions |
781 # Highlights showing functions |
782 #------------------------------------------------------------------------------- |
782 # ------------------------------------------------------------------------------- |
783 |
783 |
784 def OnRefreshHighlightsTimer(self, event): |
784 def OnRefreshHighlightsTimer(self, event): |
785 self.RefreshView() |
785 self.RefreshView() |
786 event.Skip() |
786 event.Skip() |
787 |
787 |