45 |
45 |
46 [TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, |
46 [TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, |
47 POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES |
47 POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES |
48 ] = range(10) |
48 ] = range(10) |
49 |
49 |
|
50 |
50 def GetVariableTableColnames(location): |
51 def GetVariableTableColnames(location): |
51 _ = lambda x : x |
52 _ = lambda x : x |
52 if location: |
53 if location: |
53 return ["#", _("Name"), _("Class"), _("Type"), _("Location"), _("Initial Value"), _("Option"), _("Documentation")] |
54 return ["#", _("Name"), _("Class"), _("Type"), _("Location"), _("Initial Value"), _("Option"), _("Documentation")] |
54 return ["#", _("Name"), _("Class"), _("Type"), _("Initial Value"), _("Option"), _("Documentation")] |
55 return ["#", _("Name"), _("Class"), _("Type"), _("Initial Value"), _("Option"), _("Documentation")] |
|
56 |
55 |
57 |
56 def GetOptions(constant=True, retain=True, non_retain=True): |
58 def GetOptions(constant=True, retain=True, non_retain=True): |
57 _ = lambda x : x |
59 _ = lambda x : x |
58 options = [""] |
60 options = [""] |
59 if constant: |
61 if constant: |
63 if non_retain: |
65 if non_retain: |
64 options.append(_("Non-Retain")) |
66 options.append(_("Non-Retain")) |
65 return options |
67 return options |
66 OPTIONS_DICT = dict([(_(option), option) for option in GetOptions()]) |
68 OPTIONS_DICT = dict([(_(option), option) for option in GetOptions()]) |
67 |
69 |
|
70 |
68 def GetFilterChoiceTransfer(): |
71 def GetFilterChoiceTransfer(): |
69 _ = lambda x : x |
72 _ = lambda x : x |
70 return {_("All"): _("All"), _("Interface"): _("Interface"), |
73 return {_("All"): _("All"), _("Interface"): _("Interface"), |
71 _(" Input"): _("Input"), _(" Output"): _("Output"), _(" InOut"): _("InOut"), |
74 _(" Input"): _("Input"), _(" Output"): _("Output"), _(" InOut"): _("InOut"), |
72 _(" External"): _("External"), _("Variables"): _("Variables"), _(" Local"): _("Local"), |
75 _(" External"): _("External"), _("Variables"): _("Variables"), _(" Local"): _("Local"), |
87 VARIABLE_NAME_SUFFIX_MODEL = re.compile("([0-9]*)$") |
90 VARIABLE_NAME_SUFFIX_MODEL = re.compile("([0-9]*)$") |
88 |
91 |
89 #------------------------------------------------------------------------------- |
92 #------------------------------------------------------------------------------- |
90 # Variables Panel Table |
93 # Variables Panel Table |
91 #------------------------------------------------------------------------------- |
94 #------------------------------------------------------------------------------- |
|
95 |
92 |
96 |
93 class VariableTable(CustomTable): |
97 class VariableTable(CustomTable): |
94 |
98 |
95 """ |
99 """ |
96 A custom wx.grid.Grid Table using user supplied data |
100 A custom wx.grid.Grid Table using user supplied data |
224 self.ResizeRow(grid, row) |
228 self.ResizeRow(grid, row) |
225 |
229 |
226 #------------------------------------------------------------------------------- |
230 #------------------------------------------------------------------------------- |
227 # Variable Panel Drop Target |
231 # Variable Panel Drop Target |
228 #------------------------------------------------------------------------------- |
232 #------------------------------------------------------------------------------- |
|
233 |
229 |
234 |
230 class VariableDropTarget(wx.TextDropTarget): |
235 class VariableDropTarget(wx.TextDropTarget): |
231 ''' |
236 ''' |
232 This allows dragging a variable location from somewhere to the Location |
237 This allows dragging a variable location from somewhere to the Location |
233 column of a variable row. |
238 column of a variable row. |
405 |
410 |
406 #------------------------------------------------------------------------------- |
411 #------------------------------------------------------------------------------- |
407 # Variable Panel |
412 # Variable Panel |
408 #------------------------------------------------------------------------------- |
413 #------------------------------------------------------------------------------- |
409 |
414 |
|
415 |
410 class VariablePanel(wx.Panel): |
416 class VariablePanel(wx.Panel): |
411 |
417 |
412 def __init__(self, parent, window, controler, element_type, debug=False): |
418 def __init__(self, parent, window, controler, element_type, debug=False): |
413 wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL) |
419 wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL) |
414 |
420 |