def __init__(self, red, green, blue, alpha): ''' Constructs a colour from red, green, blue and alpha values. ''' theClass = 'Color' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) try: self.theFirstCallerName != theClass except AttributeError: self.theFirstCallerName = theClass self.tsBeginClassRegistration(theClass, wx.ID_ANY) self.ts_Alpha = alpha self.ts_Blue = blue self.ts_Green = green self.ts_Red = red ## if TheColourDatabase == {}: ## TheColourDatabase = ColorListRGB self.tsEndClassRegistration(theClass)
def __init__(self, cursorName, type, hotSpotX=0, hotSpotY=0): ''' Associate a curses cursor visibility mode with a wxPython cursor name instead of the following. Construct a Cursor from a file. Specify the type of file using wx.BITMAP_TYPE* constants, and specify the hotspot if not using a .cur file. :see: Alternate constructors wx.StockCursor, `wx.CursorFromImage` ''' theClass = 'Cursor' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) try: self.theFirstCallerName != theClass except AttributeError: self.theFirstCallerName = theClass self.tsBeginClassRegistration(theClass, wx.ID_ANY) try: self.logger = tsLogger.TsLogger(threshold=tsLogger.ERROR, start=time.time(), name=tsLogger.StandardOutputFile) except AttributeError, e: self.logger = None msg = 'tsWxCursor.__init__: Exception = %s' % e raise tse.ProgramException(tse.APPLICATION_TRAP, msg)
def __init__(self, size, isShown=True): ''' Constructs an empty wx.SizerSpacer. ''' theClass = 'SizerSpacer' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) self.tsBeginClassRegistration(theClass, wx.ID_ANY) # Set Default Values self.ts_Size = self.SetSize(size) self.ts_IsShown = isShown ## self.ts_Children = [] self.tsEndClassRegistration(theClass)
def __init__(self, entries): ''' ''' theClass = 'AcceleratorTable' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) self.tsBeginClassRegistration(theClass, wx.ID_ANY) self.ts_AceleratorTable = wx.NullAcceleratorTable for anEntry in entries: self.ts_AceleratorTable += [anEntry] self.tsEndClassRegistration(theClass)
def __init__(self, id=wx.ID_ANY, callbackUserData=None, canVeto=False, eventCategory=wxEVT_CATEGORY_UI, eventCriteria=None, eventData=None, eventObject=None, # added eventSource=None, # Deprecated ??? eventType=None, handlerToProcessOnlyIn=None, # added isCommandEvent=False, propagationLevel=wxEVENT_PROPAGATE_NONE, skipped=False, timeStamp=0, veto=False, wasProcessed=False): ''' Constructor. ''' theClass = 'Event' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) self.tsBeginClassRegistration(theClass, wx.ID_ANY) self.ts_id = id self.ts_CanVeto = canVeto self.ts_Veto = veto self.ts_callbackUserData = callbackUserData self.ts_EventCategory = eventCategory self.ts_EventCriteria = eventCriteria self.ts_EventData = eventData self.ts_EventSource = eventSource self.ts_EventType = eventType self.ts_isCommandEvent = False # Indicates how many levels the event can propagate. # This member is protected and should typically only be set in the # constructors of the derived classes. It may be temporarily changed # by StopPropagation() and ResumePropagation() and tested with # ShouldPropagate(). # # The initial value is set to either wxEVENT_PROPAGATE_NONE # (by default) meaning that the event shouldn't be propagated at all # or to wxEVENT_PROPAGATE_MAX (for command events) meaning that it # should be propagated as much as necessary. # # Any positive number means that the event should be propagated but # no more than the given number of times. E.g. the propagation level # may be set to 1 to propagate the event to its parent only, but not # to its grandparent. self.ts_propagationLevel = wxEVENT_PROPAGATE_NONE self.ts_skipped = skipped self.ts_timeStamp = timeStamp self.ts_wasProcessed = wasProcessed ## self.thisown = theClass self.tsEndClassRegistration(theClass)
eventType=None, handlerToProcessOnlyIn=None, # added isCommandEvent=False, propagationLevel=wxEVENT_PROPAGATE_NONE, skipped=False, timeStamp=0L, veto=False, wasProcessed=False): ''' Constructor. ''' theClass = 'Event' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) self.tsBeginClassRegistration(theClass, wx.ID_ANY) self.ts_id = id self.ts_CanVeto = canVeto self.ts_Veto = veto self.ts_callbackUserData = callbackUserData self.ts_EventCategory = eventCategory self.ts_EventCriteria = eventCriteria self.ts_EventData = eventData self.ts_EventSource = eventSource self.ts_EventType = eventType self.ts_isCommandEvent = False
def __init__(self, cursorName, type, hotSpotX=0, hotSpotY=0): ''' Associate a curses cursor visibility mode with a wxPython cursor name instead of the following. Construct a Cursor from a file. Specify the type of file using wx.BITMAP_TYPE* constants, and specify the hotspot if not using a .cur file. :see: Alternate constructors wx.StockCursor, `wx.CursorFromImage` ''' theClass = 'Cursor' wx.RegisterFirstCallerClassName(self, theClass) Object.__init__(self) try: self.theFirstCallerName != theClass except AttributeError: self.theFirstCallerName = theClass self.tsBeginClassRegistration(theClass, wx.ID_ANY) try: self.logger = tsLogger.TsLogger(threshold=tsLogger.ERROR, start=time.time(), name=tsLogger.StandardOutputFile) except AttributeError as e: self.logger = None msg = 'tsWxCursor.__init__: Exception = %s' % e raise tse.ProgramException(tse.APPLICATION_TRAP, msg) if tsGTUI: self.ts_CursorName = cursorName self.ts_CursorHotSpotX = hotSpotX self.ts_CursorHotSpotY = hotSpotY if cursorName == wx.CURSOR_BLANK_NAME: self.ts_CursorType = cursesInvisibleCursorMode elif cursorName == wx.CURSOR_CHAR_NAME: self.ts_CursorType = cursesVeryVisibleCursorMode else: # cursorName == wx.CURSOR_DEFAULT_NAME self.ts_CursorType = cursesUnderlineCursorMode tsGTUI.tsSetCursesCursor(self.ts_CursorType) else: self.ts_CursorName = cursorName self.ts_CursorType = type self.ts_CursorHotSpotX = hotSpotX self.ts_CursorHotSpotY = hotSpotY self.tsEndClassRegistration(theClass)