当前位置: 首页>>代码示例>>Python>>正文


Python Plugins.registerComponent方法代码示例

本文整理汇总了Python中Plugins.registerComponent方法的典型用法代码示例。如果您正苦于以下问题:Python Plugins.registerComponent方法的具体用法?Python Plugins.registerComponent怎么用?Python Plugins.registerComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugins的用法示例。


在下文中一共展示了Plugins.registerComponent方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: writeImports

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
    def writeImports(self):
        return 'import wx.lib.dragscroller'

#-------------------------------------------------------------------------------

def getDragScrollerData():
    return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x01QIDATH\x89\xb5V\xdb\x8d\xc3 \x10\x9c\x05\x17\xe0\x94c+i\xc0R\xaa\x8d\xe4\
\xcf\xdc\x87-(\xc7\x15$s\x1f\xb9\xe50\x81\xe0\\\xce+!\xc0Z\xcd\xb0\xb3\x0fY\
\xc4X\xeci\r\x00\xf0~\xe3\x1e\xe0b\xac4zq\x93\xfb\x08\xac?\xf5 \x1f\xef\xf4\
\xb3G\x7f\xea\x01\x00\xe6\x1d\x90\xe1<T}Ddu\xdfL0\x9c\x07\x8c\x97\xf1%\x89\
\x9f=\xdc\xe4p\xfd\xba\x86oM\xd1;\x03\xde\x1d\[email protected]^\xc6\'?\x95%\xb6j\x04\
\xfa\xe2\xe1<\xe0p8\xac\xee\xa9\x91\x84\x9b\\\xc8E\[email protected]\xc6\xcb\x18^\x1c\
\x9fS\x12?{t\xc7\x0e~\xf6u\x82\x92\x0c\xb1\xa59Q\xf0\xee\xd8\xfd:\xfd4\x1a\
\xdd\xe4\xc2j\xdb\x96nr$\xc9\xb6m\x8b\x8bd\xf0W\x0c\xfd\x06\x80bl\x9e &\xd1\
\xbdt\xd6\[email protected]\x00\xe7#\t\x14c\xcb\x12\xd5J2\'c.\x07"\xc6\x82\xf7\x1bK\x9d\
\xfc\x8a$\x06\xd7NV\x12\x11\x81\x18+\xd52\x8d\xabgY\x96\xd5=\xb5?E\x10G\xf2n\
\x93m\x8a \x8e\xa4V\xba$C\xb3\xa9\xbd5\xecj}\x01|0\xec\xb6Xn\xd8\x85\x1c\xfc\
\'Q\x00\x8fs\x90\xea\xa7C+\xb7\x97\xfc\xe3\xa5\xb6\x92(\xd6/\x9e+\xe9\x9e\
\xf3/Y H\xf5+\x81k\x8d\xe7\xf4\xce\xca\xb4w\x0ed\xef\xdf\x96o\x88zW)\xc2N\
\xbe\xfb\x00\x00\x00\x00IEND\xaeB`\x82' 

Plugins.registerComponent('Library', wx.lib.dragscroller.DragScroller, 
                          'wx.lib.dragscroller.DragScroller', DragScrollerDTC)

Preferences.IS.registerImage('Images/Palette/wx.lib.dragscroller.DragScroller.png', 
                             getDragScrollerData())
开发者ID:aricsanders,项目名称:boa,代码行数:31,代码来源:DragScroller.plug-in.py

示例2: events

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
            args['style'] |= wx.lib.flatnotebook.FNB_NO_X_BUTTON 
            args['style'] &= ~(wx.lib.flatnotebook.FNB_X_ON_TAB|wx.lib.flatnotebook.FNB_DCLICK_CLOSES_TABS)
        ctrl = BookCtrlDTC.designTimeControl(self, position, size, args)
        ctrl.Bind(wx.lib.flatnotebook.EVT_FLATNOTEBOOK_PAGE_CHANGED, 
              self.OnPageChanged, id=ctrl.GetId())
        ctrl.SetWindowStyleFlag = lambda s: None
        return ctrl        

    def events(self):
        return BookCtrlDTC.events(self) + ['FlatNotebookEvent']
    
    def writeImports(self):
        return '\n'.join( (BookCtrlDTC.writeImports(self), 'import wx.lib.flatnotebook'))


Plugins.registerComponent('Library', wx.lib.flatnotebook.FlatNotebook, 
      'wx.lib.flatnotebook.FlatNotebook', FlatNotebookDTC)

def getFlatNotebookData():
    return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00\x9bIDATH\x89cddbf\xa0%`\xa2\xa9\xe9\xf4\xb0\x80\x05\xc6\xf8\xf7\xf7\xcf\
\x7f\xbc.afa$\xc7\x02FF&f\x86\x7f\x7f\xff\xfc?~\xe48^\x85\xfb\xf6\xefc\xa8\
\xae\xad\xc6j16\xc7\xc1\x1c\xc4\x82\xa1\x03\x0f\xc0\xe6\x88\xe6\x86F\xac\x8e\
knh\xfc_\xdbP\xcf\x88\x12\x07V\xb6Vp\x1a\x99M\[email protected]\xf1\xc1\xb1\xc3\xc7Pht\xb6\
\xa5\x8d%\x86\x01\xd8\xc4\x18\x18 A\x8aa\x01>\xe0\xe4\xe8\x845\x88\x08\x81\
\xa1\x9f\x0fF-\x18\xb5\x80r\x00\xcfh\xb0\x9cGm\xc08Z\xa3\[email protected]\x00\x006M0\
\x0b(3z\x16\x00\x00\x00\x00IEND\xaeB`\x82' 

Preferences.IS.registerImage('Images/Palette/wx.lib.flatnotebook.FlatNotebook.png', getFlatNotebookData())
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:33,代码来源:FlatNotebook.plug-in.py

示例3: _

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
Plugins.registerPalettePage('Buttons', _('Buttons'))
Plugins.registerComponents('Buttons',
      (wx.Button, 'wx.Button', ButtonDTC),
      (wx.BitmapButton, 'wx.BitmapButton', BitmapButtonDTC),
      (wx.SpinButton, 'wx.SpinButton', SpinButtonDTC),
      (wx.SpinCtrl, 'wx.SpinCtrl', SpinCtrlDTC),
      (wx.lib.buttons.GenButton, 'wx.lib.buttons.GenButton', GenButtonDTC),
      (wx.lib.buttons.GenBitmapButton, 'wx.lib.buttons.GenBitmapButton', GenBitmapButtonDTC),
      (wx.lib.buttons.GenToggleButton, 'wx.lib.buttons.GenToggleButton', GenToggleButtonDTC),
      (wx.lib.buttons.GenBitmapToggleButton, 'wx.lib.buttons.GenBitmapToggleButton', GenBitmapToggleButtonDTC),
      (wx.lib.buttons.GenBitmapTextButton, 'wx.lib.buttons.GenBitmapTextButton', GenBitmapTextButtonDTC),
      (wx.lib.buttons.GenBitmapTextToggleButton, 'wx.lib.buttons.GenBitmapTextToggleButton', GenBitmapTextToggleButtonDTC),
      (wx.ContextHelpButton, 'wx.ContextHelpButton', ContextHelpButtonDTC),
    )

try:
    Plugins.registerComponent('Buttons', wx.ToggleButton, 'wx.ToggleButton', ToggleButtonDTC)
except AttributeError:
    # MacOS X
    pass

try:
    Plugins.registerComponent('Buttons', wx.ColourPickerCtrl, 'wx.ColourPickerCtrl', ColourPickerCtrlDTC)
    Plugins.registerComponent('Buttons', wx.FontPickerCtrl, 'wx.FontPickerCtrl', FontPickerCtrlDTC)
    Plugins.registerComponent('Buttons', wx.DirPickerCtrl, 'wx.DirPickerCtrl', DirPickerCtrlDTC)
    Plugins.registerComponent('Buttons', wx.FilePickerCtrl, 'wx.FilePickerCtrl', FilePickerCtrlDTC)
except AttributeError:
    pass
    
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:30,代码来源:ButtonCompanions.py

示例4:

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
      (wx.CheckBox, 'wx.CheckBox', CheckBoxDTC),
      (wx.RadioButton, 'wx.RadioButton', RadioButtonDTC),
      (wx.Slider, 'wx.Slider', SliderDTC),
      (wx.Gauge, 'wx.Gauge', GaugeDTC),
      (wx.StaticBitmap, 'wx.StaticBitmap', StaticBitmapDTC),
      (wx.ScrollBar, 'wx.ScrollBar', ScrollBarDTC),
      (wx.StaticBox, 'wx.StaticBox', StaticBoxDTC),
      (wx.StaticLine, 'wx.StaticLine', StaticLineDTC),
      (wx.html.HtmlWindow, 'wx.html.HtmlWindow', HtmlWindowDTC),
      (wx.stc.StyledTextCtrl, 'wx.stc.StyledTextCtrl', StyledTextCtrlDTC),
      (wx.animate.GIFAnimationCtrl, 'wx.animate.GIFAnimationCtrl', GIFAnimationCtrlDTC),
      (wx.media.MediaCtrl, 'wx.media.MediaCtrl', MediaCtrlDTC),
    )

try:
    import wx.richtext
    Plugins.registerComponent('BasicControls', wx.richtext.RichTextCtrl, 'wx.richtext.RichTextCtrl', RichTextCtrlDTC)
except ImportError:
    pass

try:
    import wx.combo
#    Plugins.registerComponent('BasicControls', wx.combo.ComboCtrl, 'wx.combo.ComboCtrl', ComboCtrlDTC)
    Plugins.registerComponent('BasicControls', wx.combo.BitmapComboBox, 'wx.combo.BitmapComboBox', BitmapComboBoxDTC)
except ImportError:
    pass

try:
    Plugins.registerComponent('BasicControls', wx.SearchCtrl, 'wx.SearchCtrl', SearchCtrlDTC)
except AttributeError:
    pass
开发者ID:tinkertonyo,项目名称:boa-constructor,代码行数:33,代码来源:BasicCompanions.py

示例5: _

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
                    else:
                        raise Exception, 'Cancelled!'
                finally:
                    dlg.Destroy()
            else:
                raise Exception, _('No wx.xrc.XmlResource objects found')
        else:
            self.xmlResource = self.textConstr.factory[0]

        self.textConstr = methodparse.ConstructorParse(
            'self.%s = self.%s.LoadPanel(%s)'%(self.name, self.xmlResource,
            ', '.join(paramStrs)))

        self.designer.addCtrlToObjectCollection(self.textConstr)

    def designTimeSource(self, position = 'wx.DefaultPosition', size = 'wx.DefaultSize'):
        return {'name':  `self.name`}


class XrcPanel(wx.Panel):
    pass

#-------------------------------------------------------------------------------

import Plugins

Plugins.registerComponent('Utilities (Data)', wx.xrc.XmlResource,
                          'wx.xrc.XmlResource', XmlResourceDTC)
Plugins.registerComponent('ContainersLayout', XrcPanel,
                          'XrcPanel', XrcPanelDTC)
开发者ID:aricsanders,项目名称:boa,代码行数:32,代码来源:XRCSupport.plug-in.py

示例6: except

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
Plugins.registerComponents('Library',
      (wx.lib.stattext.GenStaticText, 'wx.lib.stattext.GenStaticText', GenStaticTextDTC),
      (wx.lib.masked.textctrl.TextCtrl, 'wx.lib.masked.textctrl.TextCtrl', MaskedTextCtrlDTC),
      (wx.lib.masked.ipaddrctrl.IpAddrCtrl, 'wx.lib.masked.ipaddrctrl.IpAddrCtrl', IpAddrCtrlDTC),
      (wx.lib.masked.combobox.ComboBox, 'wx.lib.masked.combobox.ComboBox', MaskedComboBoxDTC),
      (wx.lib.masked.numctrl.NumCtrl, 'wx.lib.masked.numctrl.NumCtrl', MaskedNumCtrlDTC),
      (wx.lib.masked.timectrl.TimeCtrl, 'wx.lib.masked.timectrl.TimeCtrl', TimeCtrlDTC),
      (wx.lib.intctrl.IntCtrl, 'wx.lib.intctrl.IntCtrl', IntCtrlDTC),
      (wx.lib.scrolledpanel.ScrolledPanel, 'wx.lib.scrolledpanel.ScrolledPanel', ScrolledPanelDTC),
      (wx.lib.hyperlink.HyperLinkCtrl, 'wx.lib.hyperlink.HyperLinkCtrl', HyperLinkCtrlDTC),       
    )

try:
    import wx.lib.splitter
    Plugins.registerComponent('Library', wx.lib.splitter.MultiSplitterWindow, 'wx.lib.splitter.MultiSplitterWindow', MultiSplitterWindowDTC)
except ImportError: pass

try:
    import wx.lib.analogclock
    Plugins.registerComponent('Library', wx.lib.analogclock.AnalogClock, 'wx.lib.analogclock.AnalogClock', AnalogClockDTC)
except (ImportError, AttributeError): pass
    
try:
    import wx.lib.filebrowsebutton 
    Plugins.registerComponents('Library',
      (wx.lib.filebrowsebutton.FileBrowseButton, 'wx.lib.filebrowsebutton.FileBrowseButton', FileBrowseButtonDTC),
      (wx.lib.filebrowsebutton.FileBrowseButtonWithHistory, 'wx.lib.filebrowsebutton.FileBrowseButtonWithHistory', FileBrowseButtonWithHistoryDTC),
      (wx.lib.filebrowsebutton.DirBrowseButton, 'wx.lib.filebrowsebutton.DirBrowseButton', DirBrowseButtonDTC))
except ImportError: pass
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:31,代码来源:LibCompanions.py

示例7: properties

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
    def properties(self):
        props = BaseCompanions.CollectionDTC.properties(self)
        props.update({'Text':  ('IndexRoute', wx.gizmos.TreeListCtrl.GetColumnText,
                                              wx.gizmos.TreeListCtrl.SetColumnText)})
        return props

    def designTimeSource(self, wId, method=None):
        return {'text': `'%s%d'%(self.propName, wId)`}

    def moveItem(self, idx, dir):
        newIdx = BaseCompanions.CollectionDTC.moveItem(self, idx, dir)
        if newIdx != idx:
            txt = self.control.GetColumnText(idx)
            self.control.RemoveColumn(idx)
            self.control.InsertColumn(newIdx, txt)
        return newIdx



#-------------------------------------------------------------------------------

import Plugins
Plugins.registerComponent('ContainersLayout', wx.gizmos.DynamicSashWindow,
                          'wx.gizmos.DynamicSashWindow', DynamicSashWindowDTC)
Plugins.registerComponent('BasicControls', wx.gizmos.LEDNumberCtrl,
                          'wx.gizmos.LEDNumberCtrl', LEDNumberCtrlDTC)
Plugins.registerComponent('ListControls', wx.gizmos.EditableListBox,
                          'wx.gizmos.EditableListBox', EditableListBoxDTC)
Plugins.registerComponent('ListControls', wx.gizmos.TreeListCtrl,
                          'wx.gizmos.TreeListCtrl', TreeListCtrlDTC)
开发者ID:cwt,项目名称:boa-constructor,代码行数:32,代码来源:GizmoCompanions.py

示例8: writeImports

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
    def writeImports(self):
        return 'import wx.lib.plot'

    def onlyPersistProps(self):
        return BaseCompanions.WindowDTC.onlyPersistProps(self) + \
               ['EnableZoom']

    def applyRunTime(self):
        return BaseCompanions.WindowDTC.applyRunTime(self) + \
               ['EnableZoom']

#-------------------------------------------------------------------------------

import Plugins

Plugins.registerComponent('Library', wx.lib.plot.PlotCanvas, 
                          'wx.lib.plot.PlotCanvas', PlotCanvasDTC)

def getPlotCanvasData():
    return \
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x18\x08\x06\
\x00\x00\x00\xe0w=\xf8\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00\xc8IDATx\x9c\xb5VY\x0e\x85 \x10k\x89\xf7\xbf\x13'\xeb\xfbq\xe1\x01\xb3\
\xb80\x891\x08\xb6\xa53\x8cR\x92\xb00\xca*\xe0Z\xeb:\x82\x03\x1c\x00\xb6\xcc\
\x0b$\xcd\xb9\xc8\xe1\x14\xc1\x9b4\r\x04\x87ZI\xae\xf2\xac\x90\x81\xa0_\x94U\
o\x89)\xd1\x82\x1c\xb8=7T\x11I\x9b\x8c\xbc\xae\xe6\x91\xb7\xc9\xd0\xa2A\xa6t\
\x92\x10r\xc1\x81\xec9h\xc1\xf7;!\x08\xb1\xad\xb1E=8:[\x82\xdc\xc5\x16u\xe3?\
\xf0\xc6.+n\xb5\x8aiB%7\xcb\xe5Z\xa7\x1dd^EQ\xb5X\x11Z\xc4\xae$_\x13xdO\xc2%\
h\xd5\xf7\xbdi6\xbeM\x10\xf5\xa5\xcc\x0eS\xed\x1a\x98\xf7\xaaO\t\x9e\xe6\xe3\
$h?s_FY\t\x0e\x00\\\xfd\xdb\xf2\x03D\x18iL\x82$\x10\xc0\x00\x00\x00\x00IEND\
\xaeB`\x82"
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:33,代码来源:PyPlot.plug-in.py

示例9: constructor

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
        self.windowStyles = [
            "wx.DP_SPIN",
            "wx.DP_DROPDOWN",
            "wx.DP_DEFAULT",
            "wx.DP_ALLOWNONE",
            "wx.DP_SHOWCENTURY",
        ] + self.windowStyles

    def constructor(self):
        return {"Position": "pos", "Size": "size", "Style": "style", "Name": "name"}

    def designTimeSource(self, position="wx.DefaultPosition", size="wx.DefaultSize"):
        return {"pos": position, "size": size, "style": "wx.DP_SHOWCENTURY", "name": ` self.name `}

    def events(self):
        return BaseCompanions.WindowDTC.events(self) + ["DatePickerCtrlEvent"]


# -------------------------------------------------------------------------------

import Plugins

Plugins.registerComponent("BasicControls", wx.calendar.CalendarCtrl, "wx.calendar.CalendarCtrl", CalendarDTC)
try:
    Plugins.registerComponent("BasicControls", wx.DatePickerCtrl, "wx.DatePickerCtrl", DatePickerCtrlDTC)
except AttributeError:
    pass


PropertyEditors.registeredTypes.extend([("Class", wx.DateTime, [DateTimePropEditor])])
开发者ID:nyimbi,项目名称:boa-constructor,代码行数:32,代码来源:DateTimeCompanions.py

示例10: constructor

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponent [as 别名]
    def constructor(self):
        return {'Position': 'pos', 'Size': 'size',
                'Style': 'style', 'Name': 'name'}

    def designTimeSource(self, position = 'wx.DefaultPosition', size = 'wx.DefaultSize'):
        return {'pos': position,
                'size': size,
                'style': 'wx.DP_SHOWCENTURY',
                'name': `self.name`}

    def events(self):
        return BaseCompanions.WindowDTC.events(self) + ['DatePickerCtrlEvent']

#-------------------------------------------------------------------------------

import Plugins

Plugins.registerComponent('BasicControls', wx.calendar.CalendarCtrl,
                          'wx.calendar.CalendarCtrl', CalendarDTC)
try:
    Plugins.registerComponent('BasicControls',
          wx.DatePickerCtrl, 'wx.DatePickerCtrl', DatePickerCtrlDTC)
except AttributeError:
    pass


PropertyEditors.registeredTypes.extend( [
    ('Class', wx.DateTime, [DateTimePropEditor]),
])
开发者ID:aricsanders,项目名称:boa,代码行数:31,代码来源:DateTimeCompanions.py


注:本文中的Plugins.registerComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。