def __init__(self, parent, tasks, onSelect, onEdit, onCreate, popupMenu, **kwargs): self.__onDropURLCallback = kwargs.pop('onDropURL', None) self.__onDropFilesCallback = kwargs.pop('onDropFiles', None) self.__onDropMailCallback = kwargs.pop('onDropMail', None) self.__taskList = tasks self.__onSelect = onSelect self.__onEdit = onEdit self.__onCreate = onCreate self.__popupMenu = popupMenu self.__calFormat = self.CAL_WEEKLY self.__hdrFormat = self.HDR_DATE self.__drawNow = True self.__adapter = parent self.getItemTooltipData = parent.getItemTooltipData super(HierarchicalCalendar, self).__init__(parent, **kwargs) self.SetCalendarFormat( self.__calFormat ) # This calls _Invalidate() so no need to call SetHeaderFormat self.__tip = tooltip.SimpleToolTip(self) self.__dropTarget = draganddrop.DropTarget(self.OnDropURL, self.OnDropFiles, self.OnDropMail) self.SetDropTarget(self.__dropTarget) EVT_EVENT_SELECTION_CHANGED(self, self._OnSelectionChanged) EVT_EVENT_DATES_CHANGED(self, self._OnDatesChanged) wx.EVT_LEFT_DCLICK(self, self._OnLeftDClick) wx.EVT_RIGHT_UP(self, self._OnRightUp)
def __init__(self, parent, rootNode, onSelect, onEdit, popupMenu): self.__selection = [] self.getItemTooltipData = parent.getItemTooltipData super(Timeline, self).__init__(parent, model=rootNode, adapter=parent) self.__tip = tooltip.SimpleToolTip(self) self.selectCommand = onSelect self.Bind(timeline.EVT_TIMELINE_SELECTED, self.onSelect) self.editCommand = onEdit self.Bind(timeline.EVT_TIMELINE_ACTIVATED, self.onEdit) self.popupMenu = popupMenu self.Bind(wx.EVT_RIGHT_DOWN, self.onPopup)
def __init__(self, parent, rootNode, onSelect, onEdit, popupMenu): self.__selection = [] self.getItemTooltipData = parent.getItemTooltipData super(SquareMap, self).__init__(parent, model=rootNode, adapter=parent, highlight=False) self.__tip = tooltip.SimpleToolTip(self) self.selectCommand = onSelect self.Bind(squaremap.EVT_SQUARE_SELECTED, self.onSelect) self.editCommand = onEdit self.Bind(squaremap.EVT_SQUARE_ACTIVATED, self.onEdit) self.popupMenu = popupMenu self.Bind(wx.EVT_RIGHT_DOWN, self.onPopup)
def __init__(self, parent, taskList, iconProvider, onSelect, onEdit, onCreate, onChangeConfig, popupMenu, *args, **kwargs): self.getItemTooltipData = parent.getItemTooltipData self.__onDropURLCallback = kwargs.pop('onDropURL', None) self.__onDropFilesCallback = kwargs.pop('onDropFiles', None) self.__onDropMailCallback = kwargs.pop('onDropMail', None) self.dropTarget = draganddrop.DropTarget(self.OnDropURL, self.OnDropFiles, self.OnDropMail) super(_CalendarContent, self).__init__(parent, wx.ID_ANY, *args, **kwargs) self.SetDropTarget(self.dropTarget) self.selectCommand = onSelect self.iconProvider = iconProvider self.editCommand = onEdit self.createCommand = onCreate self.changeConfigCb = onChangeConfig self.popupMenu = popupMenu self.__tip = tooltip.SimpleToolTip(self) self.__selection = [] self.__showNoPlannedStartDate = False self.__showNoDueDate = False self.__showUnplanned = False self.SetShowWorkHour(False) self.SetResizable(True) self.taskList = taskList self.RefreshAllItems(0) EVT_SCHEDULE_ACTIVATED(self, self.OnActivation) EVT_SCHEDULE_RIGHT_CLICK(self, self.OnPopup) EVT_SCHEDULE_DCLICK(self, self.OnEdit) EVT_PERIODWIDTH_CHANGED(self, self.OnChangeConfig) wxTimeFormat.SetFormatFunction(self.__formatTime)
def __init__(self, *args, **kwargs): super(CtrlWithToolTipMixin, self).__init__(*args, **kwargs) self.__tip = tooltip.SimpleToolTip(self)