def __init__(self, parent, options): self.parent = parent self.options = options self.activities_count = len(creche.activites) - len(creche.GetActivitesSansHoraires()) self.activites = {} self.activites_sans_horaires = {} BufferedWindow.__init__(self, parent, size=(-1, 2+20*self.activities_count))
def __init__(self, parent, options): self.parent = parent self.options = options self.activities_count = 0 self.activites = {} self.activites_sans_horaires = {} BufferedWindow.__init__(self, parent, size=(-1, 2+20*self.activities_count))
def __init__(self, parent, data, screen = False, id = -1, style = wx.WANTS_CHARS): ## Any data the Draw() function needs must be initialized before ## calling BufferedWindow.__init__, as it will call the Draw ## function. self.data = data self.data.AddEventListener("front",self) self.data.AddEventListener("tray",self) self.keyListeners = [] self.wells = {} self.drops = [] self.noCols = data.noCols self.noRows = data.noRows self.noWells = self.noCols * self.noRows self.isScreen = screen self.activeDrop = None self.init() self.collectDrops() self.alphabet = {1:"A", 2:"B", 3:"C", 4:"D", 5:"E", 6:"F", 7:"G",\ 8:"H", 9:"I", 10:"J", 11:"K", 12:"L", 13:"M", 14:"N",\ 15:"O", 16:"P", 17:"Q", 18:"R", 19:"S", 20:"T", 21:"U",\ 22:"V", 23:"W", 24:"X", 25:"Y", 26:"Z"} self.printInfo = 0 if wx.Platform == '__WXGTK__': self.font = wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL) else: self.font = wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL) BufferedWindow.__init__(self, parent, id) self.Bind(wx.EVT_LEFT_UP, self.OnClick) self.Bind(wx.EVT_KEY_DOWN, self.OnKey) self.Bind(wx.EVT_RIGHT_UP, self.OnRightClick)
def __init__(self, parent, cam, id = -1): ## The videocapture camera device self.parent = parent self.cam = cam self.aspectRatio = float(self.cam.getImage().size[0])/self.cam.getImage().size[1] BufferedWindow.__init__(self, parent, id) self.UpdateDrawing() self.SetSize(self.cam.getImage().size)
def __init__(self, parent, line, pos): self.parent = parent self.line = line self.temp_line = None self.options = parent.parent.options self.activity_combobox = parent.parent.activity_combobox self.value, self.state = None, None self.width = GetPlanningWidth() + 1 BufferedWindow.__init__(self, parent, pos=pos, size=(self.width, LINE_HEIGHT)) self.SetBackgroundColour(wx.WHITE) if not (self.options & READ_ONLY or config.readonly): self.SetCursor(wx.StockCursor(wx.CURSOR_PENCIL)) self.Bind(wx.EVT_LEFT_DOWN, self.onLeftButtonDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftButtonUp) self.Bind(wx.EVT_MOTION, self.onLeftButtonDragging)
def __init__(self, parent, line, pos): self.parent = parent self.line = line self.temp_line = None self.options = parent.parent.options self.check_line = parent.parent.check_line self.activity_combobox = parent.parent.activity_combobox self.value, self.state = None, None if self.options & DRAW_NUMBERS: self.draw_line = self.DrawNumbersLine else: self.draw_line = self.DrawActivitiesLine self.width = GetPlanningWidth() + 1 BufferedWindow.__init__(self, parent, pos=pos, size=(self.width, LINE_HEIGHT)) self.SetBackgroundColour(wx.WHITE) if not (self.options & READ_ONLY or readonly): self.SetCursor(wx.StockCursor(wx.CURSOR_PENCIL)) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftButtonDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftButtonUp) self.Bind(wx.EVT_MOTION, self.OnLeftButtonDragging)
def __init__(self, parent, activity_combobox, options): self.options = options self.info = "" self.plages_fermeture = creche.GetPlagesArray(PLAGE_FERMETURE, conversion=True) self.plages_insecables = creche.GetPlagesArray(PLAGE_INSECABLE, conversion=True) self.last_plages_observer = None self.lines = [] BufferedWindow.__init__(self, parent, size=((creche.affichage_max-creche.affichage_min) * 4 * COLUMN_WIDTH + 1, -1)) # self.SetBackgroundColour(wx.WHITE) self.activity_combobox = activity_combobox self.value, self.state = None, None if options & DRAW_NUMBERS: self.draw_line = self.DrawNumbersLine else: self.draw_line = self.DrawActivitiesLine if not (options & READ_ONLY or readonly): self.SetCursor(wx.StockCursor(wx.CURSOR_PENCIL)) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftButtonDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftButtonUp) self.Bind(wx.EVT_MOTION, self.OnLeftButtonDragging)
def __init__(self, parent, img, imgSize, id = -1): self.image = img self.imageSize = imgSize BufferedWindow.__init__(self, parent, id, wx.DefaultPosition, imgSize)