controls/VariablePanel.py
changeset 1737 a39c2918c015
parent 1736 7e61baa047f0
child 1738 d2e979738700
equal deleted inserted replaced
1736:7e61baa047f0 1737:a39c2918c015
    71 def GetFilterChoiceTransfer():
    71 def GetFilterChoiceTransfer():
    72     _ = lambda x : x
    72     _ = lambda x : x
    73     return {_("All"): _("All"), _("Interface"): _("Interface"),
    73     return {_("All"): _("All"), _("Interface"): _("Interface"),
    74             _("   Input"): _("Input"), _("   Output"): _("Output"), _("   InOut"): _("InOut"),
    74             _("   Input"): _("Input"), _("   Output"): _("Output"), _("   InOut"): _("InOut"),
    75             _("   External"): _("External"), _("Variables"): _("Variables"), _("   Local"): _("Local"),
    75             _("   External"): _("External"), _("Variables"): _("Variables"), _("   Local"): _("Local"),
    76             _("   Temp"): _("Temp"), _("Global"): _("Global")}#, _("Access") : _("Access")}
    76             _("   Temp"): _("Temp"), _("Global"): _("Global")}  #, _("Access") : _("Access")}
    77 VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()])
    77 VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()])
    78 VARIABLE_CLASSES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().itervalues()])
    78 VARIABLE_CLASSES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().itervalues()])
    79 
    79 
    80 CheckOptionForClass = {"Local": lambda x: x,
    80 CheckOptionForClass = {"Local": lambda x: x,
    81                        "Temp": lambda x: "",
    81                        "Temp": lambda x: "",
   499         or element_type in ["program", "transition", "action"]:
   499         or element_type in ["program", "transition", "action"]:
   500             # this is an element that can have located variables
   500             # this is an element that can have located variables
   501             self.Table = VariableTable(self, [], GetVariableTableColnames(True))
   501             self.Table = VariableTable(self, [], GetVariableTableColnames(True))
   502 
   502 
   503             if element_type in ["config", "resource"]:
   503             if element_type in ["config", "resource"]:
   504                 self.FilterChoices = ["All", "Global"]#,"Access"]
   504                 self.FilterChoices = ["All", "Global"]  #,"Access"]
   505             else:
   505             else:
   506                 self.FilterChoices = ["All",
   506                 self.FilterChoices = ["All",
   507                                         "Interface", "   Input", "   Output", "   InOut", "   External",
   507                                         "Interface", "   Input", "   Output", "   InOut", "   External",
   508                                         "Variables", "   Local", "   Temp"]#,"Access"]
   508                                         "Variables", "   Local", "   Temp"]  #,"Access"]
   509 
   509 
   510             # these condense the ColAlignements list
   510             # these condense the ColAlignements list
   511             l = wx.ALIGN_LEFT
   511             l = wx.ALIGN_LEFT
   512             c = wx.ALIGN_CENTER
   512             c = wx.ALIGN_CENTER
   513 
   513