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


Python Plugins.registerComponents方法代码示例

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


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

示例1: MessageDialogCDC

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
finally:
    dlg.Destroy()

'''

class MessageDialogCDC(MessagedCDC):
    def body(self):
        return '''dlg = wx.MessageDialog(self, 'Message',
  'Caption', wx.OK | wx.ICON_INFORMATION)
try:
    dlg.ShowModal()
finally:
    dlg.Destroy()

'''

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

import Plugins

Plugins.registerComponents('Dialogs',
      (wx.FontDialog, 'wx.FontDialog', FontDialogCDC),
      (wx.FileDialog, 'wx.FileDialog', FileDialogCDC),
      (wx.PrintDialog, 'wx.PrintDialog', PrintDialogCDC),
      (wx.PageSetupDialog, 'wx.PageSetupDialog', PageSetupDialogCDC),
      (wx.DirDialog, 'wx.DirDialog', DirDialogCDC),
      (wx.SingleChoiceDialog, 'wx.SingleChoiceDialog', SingleChoiceDialogCDC),
      (wx.TextEntryDialog, 'wx.TextEntryDialog', TextEntryDialogCDC),
      (wx.MessageDialog, 'wx.MessageDialog', MessageDialogCDC),
    )
开发者ID:cwt,项目名称:boa-constructor,代码行数:32,代码来源:DialogCompanions.py

示例2: hideDesignTime

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    def hideDesignTime(self):
        return FramePanelDTC.hideDesignTime(self) + ['Position', 'Size', 'ClientSize']


class WizardPageSimpleDTC(FramePanelDTC):
    defFrameSize = wx.Size(*wizardPageSize)
    defFrameStyle = wizardFrameStyle
    suppressWindowId = True
    def __init__(self, name, designer, frameCtrl):
        FramePanelDTC.__init__(self, name, designer, frameCtrl)

    def constructor(self):
        return {'Previous': 'prev', 'Next': 'next'}

    def designTimeSource(self):
        return {'prev': 'None', 'next': 'None'}

    def hideDesignTime(self):
        return FramePanelDTC.hideDesignTime(self) + ['Position', 'Size', 'ClientSize']


#-------------------------------------------------------------------------------
import Plugins

Plugins.registerComponents(None,
      (wx.wizard.Wizard, 'wx.wizard.Wizard', WizardDTC),
      (wx.wizard.PyWizardPage, 'wx.wizard.PyWizardPage', PyWizardPageDTC),
      (wx.wizard.WizardPageSimple, 'wx.wizard.WizardPageSimple', WizardPageSimpleDTC),
    )
开发者ID:cwt,项目名称:boa-constructor,代码行数:31,代码来源:WizardCompanions.py

示例3: _

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
                'wildcard': "'*.*'",
                'name': `self.name`}



#-------------------------------------------------------------------------------
import Plugins

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)
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:33,代码来源:ButtonCompanions.py

示例4: constructor

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
        BasicCompanions.TextCtrlDTC.__init__(self, name, designer, parent, ctrlClass)
        self.editors['CaptionAlignment'] = PropertyEditors.EnumPropEdit
        self.options['CaptionAlignment'] = [wx.TOP, wx.LEFT]
        self.names['CaptionAlignment'] = {'wx.TOP': wx.TOP, 'wx.LEFT': wx.LEFT}

    def constructor(self):
        return {'Value': 'value', 'Position': 'pos', 'Size': 'size',
                'Style': 'style', 'Name': 'name',
                'Caption': 'caption'}

    def writeImports(self):
        return 'import wx.lib.bcrtl.user.StaticTextCtrl'

    def designTimeSource(self, position = 'wx.DefaultPosition', size = 'wx.DefaultSize'):
        dts = BasicCompanions.TextCtrlDTC.designTimeSource(self, position, size)
        dts['caption'] = `self.name`
        return dts


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

import Plugins

# Register the components
Plugins.registerComponents('User',
      (wx.lib.bcrtl.user.ExampleST.ExampleStaticText,
       'ExampleStaticText', ExampleSTDTC),
      (wx.lib.bcrtl.user.StaticTextCtrl.StaticTextCtrl,
       'StaticTextCtrl', StaticTextCtrlDTC),
    )
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:32,代码来源:UserCompanions.plug-in.py

示例5: getattr

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
            newVal = (t[0], value)
        self.ownerCompn.textConstr.params[self.paramName] = `newVal`
        self.designer.inspector.constructorUpdate(self.propName)
        # XXX Setting to an existing position causes asserts and is wrong
        # XXX Not sure how to handle this everywhere in the GridBagSizer support
        getattr(self.ownerCompn.control, self.setterMethod)( obj, newVal )


class PositionRowColDTC(RowColDTC):
    propName = 'Position'
    paramName = 1
    setterMethod = 'SetItemPosition'

class SpanRowColDTC(RowColDTC):
    propName = 'Span'
    paramName = 'span'
    setterMethod = 'SetItemSpan'

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

import Plugins

Plugins.registerComponents('ContainersLayout',
      (wx.BoxSizer, 'wx.BoxSizer', BoxSizerDTC),
      (wx.GridSizer, 'wx.GridSizer', GridSizerDTC),
      (wx.FlexGridSizer, 'wx.FlexGridSizer', FlexGridSizerDTC),
      (wx.StaticBoxSizer, 'wx.StaticBoxSizer', StaticBoxSizerDTC),
#      (wx.NotebookSizer, 'wx.NotebookSizer', NotebookSizerDTC),
      (wx.GridBagSizer, 'wx.GridBagSizer', GridBagSizerDTC),
    )
开发者ID:aricsanders,项目名称:boa,代码行数:32,代码来源:SizerCompanions.py

示例6: hideDesignTime

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
                             'Visible': BoolPropEdit})
        self.names['CursorId'] = stockCursorIds

    def hideDesignTime(self):
        return ['Handle']
    def constructor(self):
        return {'CursorId': 'id'}
    def designTimeSource(self, position='wx.DefaultPosition', size='wx.DefaultSize'):
        return {'id': 'wx.CURSOR_ARROW'}


#-------------------------------------------------------------------------------
import Plugins

Plugins.registerPalettePage('Utilities (Data)', _('Utilities (Data)'))

Plugins.registerComponents('Utilities (Data)',
      (wx.MenuBar, 'wx.MenuBar', MenuBarDTC),
      (wx.Menu, 'wx.Menu', MenuDTC),
      (wx.ImageList, 'wx.ImageList', ImageListDTC),
      (wx.Timer, 'wx.Timer', TimerDTC),
      (wx.StockCursor, 'wx.StockCursor', StockCursorDTC),

      #(wx.AcceleratorTable, 'wx.AcceleratorTable', AcceleratorTableDTC),
      #(wxCursor: ['wx.Cursor', CursorDTC],

      # these objects need design time inheritance
      #(wxTextDropTarget, 'wx.TextDropTarget', NYIDTC),
      #(wxFileDropTarget, 'wx.FileDropTarget', NYIDTC),
    )
开发者ID:cwt,项目名称:boa-constructor,代码行数:32,代码来源:UtilCompanions.py

示例7: events

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    def events(self):
        return ContainerDTC.events(self) + ['CollapsiblePaneEvent']

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

import Plugins

Plugins.registerPalettePage('ContainersLayout', _('Containers/Layout'))

Plugins.registerComponents('ContainersLayout',
      (wx.Panel, 'wx.Panel', PanelDTC),
      (wx.ScrolledWindow, 'wx.ScrolledWindow', ScrolledWindowDTC),
      (wx.SplitterWindow, 'wx.SplitterWindow', SplitterWindowDTC),
      (wx.SashWindow, 'wx.SashWindow', SashWindowDTC),
      (wx.SashLayoutWindow, 'wx.SashLayoutWindow', SashLayoutWindowDTC),
      (wx.ToolBar, 'wx.ToolBar', ToolBarDTC),
      (wx.StatusBar, 'wx.StatusBar', StatusBarDTC),
      (wx.Window, 'wx.Window', ContainerDTC),
      (wx.Notebook, 'wx.Notebook', NotebookDTC),
      (wx.Listbook, 'wx.Listbook', ListbookDTC),
      (wx.Choicebook, 'wx.Choicebook', ChoicebookDTC),
    )

try:
    Plugins.registerComponents('ContainersLayout',
      (wx.Treebook, 'wx.Treebook', TreebookDTC),
      (wx.Toolbook, 'wx.Toolbook', ToolbookDTC),
#      (wx.CollapsiblePane, 'wx.CollapsiblePane', CollapsiblePaneDTC),
    )  
except AttributeError:
    pass
开发者ID:cwt,项目名称:boa-constructor,代码行数:33,代码来源:ContainerCompanions.py

示例8: _

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    

#-------------------------------------------------------------------------------
import Plugins

Plugins.registerPalettePage('BasicControls', _('Basic Controls'))

Plugins.registerComponents('BasicControls',
      (wx.StaticText, 'wx.StaticText', StaticTextDTC),
      (wx.TextCtrl, 'wx.TextCtrl', TextCtrlDTC),
      (wx.Choice, 'wx.Choice', ChoiceDTC),
      (wx.ComboBox, 'wx.ComboBox', ComboBoxDTC),
      (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
开发者ID:tinkertonyo,项目名称:boa-constructor,代码行数:33,代码来源:BasicCompanions.py

示例9: _

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
import wx.lib.masked.timectrl
import wx.lib.intctrl

import wx.lib.scrolledpanel
import wx.lib.hyperlink

import Plugins

Plugins.registerPalettePage('Library', _('Library'))

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
开发者ID:cbaeseman,项目名称:boa-constructor,代码行数:33,代码来源:LibCompanions.py

示例10: events

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    def events(self):
        return WindowDTC.events(self) + ['GridEvent']

    def writeImports(self):
        return '\n'.join( (WindowDTC.writeImports(self),
                           'import wx.grid') )

    def hideDesignTime(self):
        return WindowDTC.hideDesignTime(self) + \
              ['RowLabelAlignment', 'ColLabelAlignment', 'Table',
               'DefaultEditor', 'DefaultRenderer', 'TargetWindow', 'TargetRect',
               'DefaultCellAlignment']

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

import Plugins

Plugins.registerPalettePage('ListControls', _('List Controls'))

Plugins.registerComponents('ListControls',
      (wx.ListBox, 'wx.ListBox', ListBoxDTC),
      (wx.CheckListBox, 'wx.CheckListBox', CheckListBoxDTC),
      (wx.grid.Grid, 'wx.grid.Grid', GridDTC),
      (wx.ListCtrl, 'wx.ListCtrl', ListCtrlDTC),
      (wx.ListView, 'wx.ListView', ListViewDTC),
      (wx.TreeCtrl, 'wx.TreeCtrl', TreeCtrlDTC),
      (wx.RadioBox, 'wx.RadioBox', RadioBoxDTC),
      (wx.GenericDirCtrl, 'wx.GenericDirCtrl', GenericDirCtrlDTC),
    )
开发者ID:cwt,项目名称:boa-constructor,代码行数:31,代码来源:ListCompanions.py

示例11: events

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    def events(self):
        # skip frame events
        return ContainerDTC.events(self) + ['PanelEvent']

    def dependentProps(self):
        return BaseFrameDTC.dependentProps(self) + ['DefaultItem']

class wxFramePanel(wx.Panel): pass

#-------------------------------------------------------------------------------
import Plugins

Plugins.registerComponents(None,
      (wx.Frame, 'wx.Frame', FrameDTC),
      (wx.Dialog, 'wx.Dialog', DialogDTC),
      (wx.MiniFrame, 'wx.MiniFrame', MiniFrameDTC),
      (wx.MDIParentFrame, 'wx.MDIParentFrame', MDIParentFrameDTC),
      (wx.MDIChildFrame, 'wx.MDIChildFrame', MDIChildFrameDTC),
      (wxFramePanel, 'wx.FramePanel', FramePanelDTC),
    )

try:
    Plugins.registerComponents(None,
          (wxPopupWindow, 'wx.PopupWindow', PopupWindowDTC),
          (wxPopupTransientWindow, 'wx.PopupTransientWindow', PopupWindowDTC),
        )
except NameError:
    # wxMAC
    pass
开发者ID:jpelton107,项目名称:python,代码行数:31,代码来源:FrameCompanions.py

示例12: dependentProps

# 需要导入模块: import Plugins [as 别名]
# 或者: from Plugins import registerComponents [as 别名]
    def dependentProps(self):
        return BaseFrameDTC.dependentProps(self) + ["DefaultItem"]


class wxFramePanel(wx.Panel):
    pass


# -------------------------------------------------------------------------------
import Plugins

Plugins.registerComponents(
    None,
    (wx.Frame, "wx.Frame", FrameDTC),
    (wx.Dialog, "wx.Dialog", DialogDTC),
    (wx.MiniFrame, "wx.MiniFrame", MiniFrameDTC),
    (wx.MDIParentFrame, "wx.MDIParentFrame", MDIParentFrameDTC),
    (wx.MDIChildFrame, "wx.MDIChildFrame", MDIChildFrameDTC),
    (wxFramePanel, "wx.FramePanel", FramePanelDTC),
)

try:
    Plugins.registerComponents(
        None,
        (wxPopupWindow, "wx.PopupWindow", PopupWindowDTC),
        (wxPopupTransientWindow, "wx.PopupTransientWindow", PopupWindowDTC),
    )
except NameError:
    # wxMAC
    pass
开发者ID:nyimbi,项目名称:boa-constructor,代码行数:32,代码来源:FrameCompanions.py


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