def __init__(self, name, parent, index, label): # Initialise parent classes ManagedBase.__init__(self, name, parent, index) EditStylesMixin.__init__(self) BitmapMixin.__init__(self) # initialise instance properties self.label = np.TextProperty(label, default_value="", multiline="grow") self.default = np.CheckBoxProperty(False, default_value=False) self.stockitem = np.ListBoxPropertyD(self.STOCKITEMS[0], choices=self.STOCKITEMS) self.bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.disabled_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.pressed_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.current_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.focus_bitmap = np.BitmapPropertyD(min_version=(3, 0)) values = [wx.LEFT, wx.RIGHT, wx.TOP, wx.BOTTOM] aliases = ["wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"] p = self.bitmap_dir = np.RadioProperty(wx.LEFT, values, columns=4, aliases=aliases, default_value=wx.LEFT) p.min_version = (3, 0) p.blocked = True
def __init__(self, name, parent, bmp_file, pos): ManagedBase.__init__(self, name, 'wxBitmapButton', parent, pos) EditStylesMixin.__init__(self) BitmapMixin.__init__(self) # initialise instance properties self.bitmap = np.BitmapProperty(bmp_file) self.disabled_bitmap = np.BitmapPropertyD("") self.pressed_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.current_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.focus_bitmap = np.BitmapPropertyD(min_version=(3, 0)) self.default = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, label, pos): ManagedBase.__init__(self, name, 'wxToggleButton', parent, pos) EditStylesMixin.__init__(self) # initialise instance variable self.label = np.TextProperty(label, multiline="grow") self.value = np.CheckBoxProperty(False, default_value=False) # bitmaps are only for >= 3.0 self.bitmap = np.BitmapPropertyD(min_version=(3,0)) self.disabled_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.pressed_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.current_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.focus_bitmap = np.BitmapPropertyD(min_version=(3,0))
def __init__(self, name, parent, label, pos): # Initialise parent classes ManagedBase.__init__(self, name, 'wxButton', parent, pos) EditStylesMixin.__init__(self) BitmapMixin.__init__(self) # initialise instance properties self.label = np.TextProperty(label, default_value="", multiline="grow") self.default = np.CheckBoxProperty(False, default_value=False) self.stockitem = np.ListBoxPropertyD(self.STOCKITEMS[0], choices=self.STOCKITEMS) self.bitmap = np.BitmapPropertyD(min_version=(3,0)) self.disabled_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.pressed_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.current_bitmap = np.BitmapPropertyD(min_version=(3,0)) self.focus_bitmap = np.BitmapPropertyD(min_version=(3,0))
def __init__(self, name, parent, id, title, style=wx.DEFAULT_DIALOG_STYLE, klass='wxDialog'): TopLevelBase.__init__(self, name, klass, parent, id, title=title) self.base = 'wxDialog' EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, id, bmp_file, sizer, pos): ManagedBase.__init__(self, name, 'wxBitmapButton', parent, id, sizer, pos) EditStylesMixin.__init__(self) BitmapMixin.__init__(self) # initialise instance properties filedialog_style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST # for the following two properties self.bitmap = np.BitmapProperty(bmp_file, style=filedialog_style) self.disabled_bitmap = np.BitmapPropertyD("", default_value="", style=filedialog_style) self.default = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, klass, title, style=wx.DEFAULT_FRAME_STYLE): #XXX style is not used TopLevelBase.__init__(self, name, parent, klass, title) EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False) self.menubar = BarProperty("MenuBar") self.toolbar = BarProperty("ToolBar") if "statusbar" in self.PROPERTIES: # not for MDIChildFrame self.statusbar = BarProperty("StatusBar")
def __init__(self, name, parent, klass, title, style=wx.DEFAULT_DIALOG_STYLE): TopLevelBase.__init__(self, name, parent, klass, title) EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.affirmative = AffirmativePropertyD("", default_value="OK") self.escape = AffirmativePropertyD("", default_value="CANCEL") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, id, title, style=wx.DEFAULT_FRAME_STYLE, klass='wxFrame'): #XXX style is not used TopLevelBase.__init__(self, name, klass, parent, id, title=title) self.base = 'wxFrame' EditStylesMixin.__init__(self) self.properties["style"].set(style) # initialise instance properties self.icon = np.BitmapPropertyD("") self.centered = np.CheckBoxProperty(False, default_value=False) self.sizehints = np.CheckBoxProperty(False, default_value=False) self.menubar = np.CheckBoxProperty(False, default_value=False) self.toolbar = np.CheckBoxProperty(False, default_value=False) if "statusbar" in self.PROPERTIES: self.statusbar = np.CheckBoxProperty(False, default_value=False) self._statusbar = None else: self.statusbar = None self._menubar = self._toolbar = None # these properties will hold the EditMenubar instances etc.