def __init__(self, name, klass, parent, id): EditBase.__init__(self, name, klass, parent, id) self.window_id = np.TextPropertyD("wxID_ANY", name="id", default_value=None) self.size = np.SizePropertyD("-1, -1", default_value="-1, -1") self.sel_marker = None # selection markers (a SelectionMarker instance) # background, foreground, font properties # their actual values will be stored/modified after widget creation in 'finish_widget_creation' # before that, the actual values will be stored in this dict from the actual values of the widget: self._original = {'font': None} # colors self.background = np.ColorPropertyD(None) self.foreground = np.ColorPropertyD(None) # font if "font" in self.PROPERTIES: self._font_changed = False # this is True if the user has selected a custom font if config.use_gui: font = self._build_from_font( compat.wx_SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)) font[1] = 'default' else: font = (9, 'default', 'normal', 'normal', 0, 'Segoe UI') self.font = np.FontPropertyD(tuple(font)) # tooltip, focused, hiden self.tooltip = np.TextPropertyD(multiline="grow") self.disabled = np.CheckBoxProperty(False, default_value=False) self.focused = np.CheckBoxProperty(False, default_value=False) self.hidden = np.CheckBoxProperty(False, default_value=False)
def __init__(self, name, parent, index, klass, title, style=wx.DEFAULT_FRAME_STYLE): TopLevelBase.__init__(self, name, parent, index, 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") self.min_size = np.SizePropertyD( "-1, -1", default_value="-1, -1" )