Example #1
0
    def __init__(self, name, designer, parentCompanion, ctrl):
        CollectionIddDTC.__init__(self, name, designer, parentCompanion, ctrl)
        self.editors.update({'Text': StrConstrPropEdit,
                             'Help': StrConstrPropEdit,
                             'Kind': EnumConstrPropEdit,
                             'Menu': MenuEnumConstrPropEdit,
                            })

        self.names['Kind'] = ['wx.ITEM_NORMAL', 'wx.ITEM_CHECK', 'wx.ITEM_RADIO']
 def writeCollectionItems(self, output, stripFrmId=''):
     CollectionIddDTC.writeCollectionItems(self, output, stripFrmId)
     warn = 0
     for constr in self.textConstrLst:
         if 'control' in constr.params and constr.params['control'] == 'None':
             wx.LogWarning(_("Invalid None control for toolbar %s's AddControl")%(
                   self.parentCompanion.name))
             warn = 1
     if warn:
         wx.LogWarning(_('Control may not be None or the generated source will '
                         'be invalid outside the Designer.'))
Example #3
0
 def writeCollectionItems(self, output, stripFrmId=''):
     CollectionIddDTC.writeCollectionItems(self, output, stripFrmId)
     warn = 0
     for constr in self.textConstrLst:
         if constr.params.has_key('control') and constr.params['control'] == 'None':
             wx.LogWarning(_("Invalid None control for toolbar %s's AddControl")%(
                   self.parentCompanion.name))
             warn = 1
     if warn:
         wx.LogWarning(_('Control may not be None or the generated source will '
                         'be invalid outside the Designer.'))
 def __init__(self, name, designer, parentCompanion, ctrl):
     CollectionIddDTC.__init__(self, name, designer, parentCompanion, ctrl)
     self.editors.update({'Bitmap': BitmapConstrPropEdit,
                          'PushedBitmap': BitmapConstrPropEdit,
                          'BitmapDisabled': BitmapConstrPropEdit,
                          'IsToggle': BoolConstrPropEdit,
                          'Label': StrConstrPropEdit,
                          'ShortHelpString': StrConstrPropEdit,
                          'LongHelpString': StrConstrPropEdit,
                          'ShortHelp': StrConstrPropEdit,
                          'LongHelp': StrConstrPropEdit,
                          'Kind': EnumConstrPropEdit,
                          'Control': WinEnumConstrPropEdit})
     self.names['Kind'] = ['wx.ITEM_NORMAL', 'wx.ITEM_CHECK', 'wx.ITEM_RADIO']
Example #5
0
 def __init__(self, name, designer, parentCompanion, ctrl):
     CollectionIddDTC.__init__(self, name, designer, parentCompanion, ctrl)
     self.editors.update({'Bitmap': BitmapConstrPropEdit,
                          'PushedBitmap': BitmapConstrPropEdit,
                          'BitmapDisabled': BitmapConstrPropEdit,
                          'IsToggle': BoolConstrPropEdit,
                          'Label': StrConstrPropEdit,
                          'ShortHelpString': StrConstrPropEdit,
                          'LongHelpString': StrConstrPropEdit,
                          'ShortHelp': StrConstrPropEdit,
                          'LongHelp': StrConstrPropEdit,
                          'Kind': EnumConstrPropEdit,
                          'Control': WinEnumConstrPropEdit})
     self.names['Kind'] = ['wx.ITEM_NORMAL', 'wx.ITEM_CHECK', 'wx.ITEM_RADIO']
 def moveItem(self, idx, dir):
     newIdx = CollectionIddDTC.moveItem(self, idx, dir)
     if newIdx != idx:
         self.control.ClearTools()
         for crt in self.textConstrLst:
             self.applyDesignTimeDefaults(crt.params, crt.method)
     return newIdx
Example #7
0
 def moveItem(self, idx, dir):
     newIdx = CollectionIddDTC.moveItem(self, idx, dir)
     if newIdx != idx:
         menus = self.control.GetMenuItems()
         menu = self.control.RemoveItem(menus[idx])
         self.control.InsertItem(newIdx, menu)
     return newIdx
Example #8
0
 def moveItem(self, idx, dir):
     newIdx = CollectionIddDTC.moveItem(self, idx, dir)
     if newIdx != idx:
         self.control.ClearTools()
         for crt in self.textConstrLst:
             self.applyDesignTimeDefaults(crt.params, crt.method)
     return newIdx
 def properties(self):
     tcl = self.textConstrLst[self.index]
     if tcl.method in ('DoAddTool', 'AddTool'):
         return CollectionIddDTC.properties(self)
     elif tcl.method == 'AddSeparator':
         return {}
     elif tcl.method == 'AddControl':
         return {}
Example #10
0
 def properties(self):
     tcl = self.textConstrLst[self.index]
     if tcl.method in ('DoAddTool', 'AddTool'):
         return CollectionIddDTC.properties(self)
     elif tcl.method == 'AddSeparator':
         return {}
     elif tcl.method == 'AddControl':
         return {}
Example #11
0
    def properties(self):
        tcl = self.textConstrLst[self.index]
        if tcl.method in ('Append', 'AppendMenu'):
            props = CollectionIddDTC.properties(self)
            props.update(
                {'Text': ('IdRoute', wx.Menu.GetLabel, wx.Menu.SetLabel),
                 'Help': ('IdRoute', wx.Menu.GetHelpString, wx.Menu.SetHelpString)})
        elif tcl.method == 'AppendSeparator':
            props = {}

        return props
 def deleteItem(self, idx):
     CollectionIddDTC.deleteItem(self, idx)
     del self.textConstrLst[idx]
 def appendItem(self, method=None):
     CollectionIddDTC.appendItem(self, method)
     self.control.Realize()
Example #14
0
 def deleteItem(self, idx):
     CollectionIddDTC.deleteItem(self, idx)
     del self.textConstrLst[idx]
Example #15
0
 def appendItem(self, method=None):
     CollectionIddDTC.appendItem(self, method)
     self.control.Realize()