def __init__(self, name, klass, parent): custom_class = parent is None EditBase.__init__(self, name, 'wxToolBar', parent, wx.NewId(), custom_class=custom_class) EditStylesMixin.__init__(self) # initialise instance properties self.bitmapsize = np.IntPairPropertyD('16, 15', default_value='16, 15') self.margins = np.IntPairPropertyD('0, 0', default_value='0, 0') self.packing = np.SpinPropertyD(1, val_range=(0, 100), default_value=1, immediate=True) self.separation = np.SpinPropertyD(5, val_range=(0, 100), default_value=5, immediate=True) self.tools = ToolsProperty() # incl. the Edit button self.window_id = None # just a dummy for code generation self.widget = self._tb = None # a panel and the actual ToolBar if not self.parent: PreviewMixin.__init__(self) # add a preview button self._is_toplevel = True else: self.preview = None self._is_toplevel = False
def __init__(self, name, klass, parent): if parent.IS_ROOT: self.__dict__["IS_TOPLEVEL"] = True if self.IS_TOPLEVEL: custom_class = True pos = None else: custom_class = False pos = "_toolbar" EditBase.__init__(self, name, 'wxToolBar', parent, custom_class, pos) EditStylesMixin.__init__(self) # initialise instance properties self.bitmapsize = np.IntPairPropertyD('16, 15', default_value='16, 15') self.margins = np.IntPairPropertyD('0, 0', default_value='0, 0') self.packing = np.SpinPropertyD(1, val_range=(0, 100), default_value=1, immediate=True) self.separation = np.SpinPropertyD(5, val_range=(0, 100), default_value=5, immediate=True) self.tools = ToolsProperty() # incl. the Edit button self.window_id = None # just a dummy for code generation self.widget = self._tb = None # a panel and the actual ToolBar if self.IS_TOPLEVEL: PreviewMixin.__init__(self) # add a preview button else: self.preview = None
def _init_properties(self): self.tools = ToolsProperty() # incl. the Edit button self.bitmapsize = np.IntPairPropertyD('16, 15', default_value='16, 15') self.margins = np.IntPairPropertyD('0, 0', default_value='0, 0') self.packing = np.SpinPropertyD(1, val_range=(0,100), default_value=1, immediate=True) self.separation = np.SpinPropertyD(5, val_range=(0,100), default_value=5, immediate=True) self.window_id = None # just a dummy for code generation self.widget = self._tb = None # a panel and the actual ToolBar
def __init__(self, style='wxTAB_TRAVERSAL'): "Class to handle wxPanel objects" EditStylesMixin.__init__(self, style, 'wxPanel') # initialise properties self.scrollable = np.CheckBoxProperty(False, default_value=False) self.scroll_rate = prop = np.IntPairPropertyD( "10, 10" ) prop.set_blocked(True)
def __init__(self, style='wxTAB_TRAVERSAL'): "Class to handle wxPanel objects" # initialise instance logger self._logger = logging.getLogger(self.__class__.__name__) # initialise instance EditStylesMixin.__init__(self, 'wxPanel') # initialise properties self.no_custom_class = np.CheckBoxProperty(False, default_value=False) self.scrollable = np.CheckBoxProperty(False, default_value=False) self.scroll_rate = prop = np.IntPairPropertyD("10, 10") prop.set_blocked(True) if style: self.properties["style"].set(style)