home *** CD-ROM | disk | FTP | other *** search
/ Freelog 116 / FreelogNo116-JuilletSeptembre2013.iso / GestionFichiers / metamorphose / metamorphose2_0.8.2_setup.exe / metamorphose2.exe / wx / calendar.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2011-01-12  |  18KB  |  405 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. import _calendar
  5. import new
  6. new_instancemethod = new.instancemethod
  7.  
  8. def _swig_setattr_nondynamic(self, class_type, name, value, static = 1):
  9.     if name == 'thisown':
  10.         return self.this.own(value)
  11.     method = class_type.__swig_setmethods__.get(name, None)
  12.     if method:
  13.         return method(self, value)
  14.     if not static or hasattr(self, name):
  15.         self.__dict__[name] = value
  16.     else:
  17.         raise AttributeError('You cannot add attributes to %s' % self)
  18.     return method
  19.  
  20.  
  21. def _swig_setattr(self, class_type, name, value):
  22.     return _swig_setattr_nondynamic(self, class_type, name, value, 0)
  23.  
  24.  
  25. def _swig_getattr(self, class_type, name):
  26.     if name == 'thisown':
  27.         return self.this.own()
  28.     method = class_type.__swig_getmethods__.get(name, None)
  29.     if method:
  30.         return method(self)
  31.     raise AttributeError, name
  32.  
  33.  
  34. def _swig_repr(self):
  35.     
  36.     try:
  37.         strthis = 'proxy of ' + self.this.__repr__()
  38.     except:
  39.         strthis = ''
  40.  
  41.     return '<%s.%s; %s >' % (self.__class__.__module__, self.__class__.__name__, strthis)
  42.  
  43. import types
  44.  
  45. try:
  46.     _object = types.ObjectType
  47.     _newclass = 1
  48. except AttributeError:
  49.     
  50.     class _object:
  51.         pass
  52.  
  53.     _newclass = 0
  54.  
  55. del types
  56.  
  57. def _swig_setattr_nondynamic_method(set):
  58.     
  59.     def set_attr(self, name, value):
  60.         if name == 'thisown':
  61.             return self.this.own(value)
  62.         if hasattr(self, name) or name == 'this':
  63.             set(self, name, value)
  64.         else:
  65.             raise AttributeError('You cannot add attributes to %s' % self)
  66.         return name == 'thisown'
  67.  
  68.     return set_attr
  69.  
  70. import _misc
  71. import _core
  72. wx = _core
  73. __docfilter__ = wx.__DocFilter(globals())
  74. CAL_SUNDAY_FIRST = _calendar.CAL_SUNDAY_FIRST
  75. CAL_MONDAY_FIRST = _calendar.CAL_MONDAY_FIRST
  76. CAL_SHOW_HOLIDAYS = _calendar.CAL_SHOW_HOLIDAYS
  77. CAL_NO_YEAR_CHANGE = _calendar.CAL_NO_YEAR_CHANGE
  78. CAL_NO_MONTH_CHANGE = _calendar.CAL_NO_MONTH_CHANGE
  79. CAL_SEQUENTIAL_MONTH_SELECTION = _calendar.CAL_SEQUENTIAL_MONTH_SELECTION
  80. CAL_SHOW_SURROUNDING_WEEKS = _calendar.CAL_SHOW_SURROUNDING_WEEKS
  81. CAL_HITTEST_NOWHERE = _calendar.CAL_HITTEST_NOWHERE
  82. CAL_HITTEST_HEADER = _calendar.CAL_HITTEST_HEADER
  83. CAL_HITTEST_DAY = _calendar.CAL_HITTEST_DAY
  84. CAL_HITTEST_INCMONTH = _calendar.CAL_HITTEST_INCMONTH
  85. CAL_HITTEST_DECMONTH = _calendar.CAL_HITTEST_DECMONTH
  86. CAL_HITTEST_SURROUNDING_WEEK = _calendar.CAL_HITTEST_SURROUNDING_WEEK
  87. CAL_BORDER_NONE = _calendar.CAL_BORDER_NONE
  88. CAL_BORDER_SQUARE = _calendar.CAL_BORDER_SQUARE
  89. CAL_BORDER_ROUND = _calendar.CAL_BORDER_ROUND
  90.  
  91. class CalendarDateAttr(object):
  92.     thisown = property((lambda x: x.this.own()), (lambda x, v: x.this.own(v)), doc = 'The membership flag')
  93.     __repr__ = _swig_repr
  94.     
  95.     def __init__(self, *args, **kwargs):
  96.         _calendar.CalendarDateAttr_swiginit(self, _calendar.new_CalendarDateAttr(*args, **kwargs))
  97.  
  98.     __swig_destroy__ = _calendar.delete_CalendarDateAttr
  99.     
  100.     __del__ = lambda self: pass
  101.     
  102.     def SetTextColour(*args, **kwargs):
  103.         return _calendar.CalendarDateAttr_SetTextColour(*args, **kwargs)
  104.  
  105.     
  106.     def SetBackgroundColour(*args, **kwargs):
  107.         return _calendar.CalendarDateAttr_SetBackgroundColour(*args, **kwargs)
  108.  
  109.     
  110.     def SetBorderColour(*args, **kwargs):
  111.         return _calendar.CalendarDateAttr_SetBorderColour(*args, **kwargs)
  112.  
  113.     
  114.     def SetFont(*args, **kwargs):
  115.         return _calendar.CalendarDateAttr_SetFont(*args, **kwargs)
  116.  
  117.     
  118.     def SetBorder(*args, **kwargs):
  119.         return _calendar.CalendarDateAttr_SetBorder(*args, **kwargs)
  120.  
  121.     
  122.     def SetHoliday(*args, **kwargs):
  123.         return _calendar.CalendarDateAttr_SetHoliday(*args, **kwargs)
  124.  
  125.     
  126.     def HasTextColour(*args, **kwargs):
  127.         return _calendar.CalendarDateAttr_HasTextColour(*args, **kwargs)
  128.  
  129.     
  130.     def HasBackgroundColour(*args, **kwargs):
  131.         return _calendar.CalendarDateAttr_HasBackgroundColour(*args, **kwargs)
  132.  
  133.     
  134.     def HasBorderColour(*args, **kwargs):
  135.         return _calendar.CalendarDateAttr_HasBorderColour(*args, **kwargs)
  136.  
  137.     
  138.     def HasFont(*args, **kwargs):
  139.         return _calendar.CalendarDateAttr_HasFont(*args, **kwargs)
  140.  
  141.     
  142.     def HasBorder(*args, **kwargs):
  143.         return _calendar.CalendarDateAttr_HasBorder(*args, **kwargs)
  144.  
  145.     
  146.     def IsHoliday(*args, **kwargs):
  147.         return _calendar.CalendarDateAttr_IsHoliday(*args, **kwargs)
  148.  
  149.     
  150.     def GetTextColour(*args, **kwargs):
  151.         return _calendar.CalendarDateAttr_GetTextColour(*args, **kwargs)
  152.  
  153.     
  154.     def GetBackgroundColour(*args, **kwargs):
  155.         return _calendar.CalendarDateAttr_GetBackgroundColour(*args, **kwargs)
  156.  
  157.     
  158.     def GetBorderColour(*args, **kwargs):
  159.         return _calendar.CalendarDateAttr_GetBorderColour(*args, **kwargs)
  160.  
  161.     
  162.     def GetFont(*args, **kwargs):
  163.         return _calendar.CalendarDateAttr_GetFont(*args, **kwargs)
  164.  
  165.     
  166.     def GetBorder(*args, **kwargs):
  167.         return _calendar.CalendarDateAttr_GetBorder(*args, **kwargs)
  168.  
  169.     BackgroundColour = property(GetBackgroundColour, SetBackgroundColour, doc = 'See `GetBackgroundColour` and `SetBackgroundColour`')
  170.     Border = property(GetBorder, SetBorder, doc = 'See `GetBorder` and `SetBorder`')
  171.     BorderColour = property(GetBorderColour, SetBorderColour, doc = 'See `GetBorderColour` and `SetBorderColour`')
  172.     Font = property(GetFont, SetFont, doc = 'See `GetFont` and `SetFont`')
  173.     TextColour = property(GetTextColour, SetTextColour, doc = 'See `GetTextColour` and `SetTextColour`')
  174.  
  175. _calendar.CalendarDateAttr_swigregister(CalendarDateAttr)
  176.  
  177. class CalendarEvent(_core.DateEvent):
  178.     thisown = property((lambda x: x.this.own()), (lambda x, v: x.this.own(v)), doc = 'The membership flag')
  179.     __repr__ = _swig_repr
  180.     
  181.     def __init__(self, *args, **kwargs):
  182.         _calendar.CalendarEvent_swiginit(self, _calendar.new_CalendarEvent(*args, **kwargs))
  183.  
  184.     
  185.     def SetWeekDay(*args, **kwargs):
  186.         return _calendar.CalendarEvent_SetWeekDay(*args, **kwargs)
  187.  
  188.     
  189.     def GetWeekDay(*args, **kwargs):
  190.         return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs)
  191.  
  192.     
  193.     def PySetDate(self, date):
  194.         self.SetDate(_pydate2wxdate(date))
  195.  
  196.     
  197.     def PyGetDate(self):
  198.         return _wxdate2pydate(self.GetDate())
  199.  
  200.     WeekDay = property(GetWeekDay, SetWeekDay, doc = 'See `GetWeekDay` and `SetWeekDay`')
  201.  
  202. _calendar.CalendarEvent_swigregister(CalendarEvent)
  203. wxEVT_CALENDAR_DOUBLECLICKED = _calendar.wxEVT_CALENDAR_DOUBLECLICKED
  204. wxEVT_CALENDAR_SEL_CHANGED = _calendar.wxEVT_CALENDAR_SEL_CHANGED
  205. wxEVT_CALENDAR_DAY_CHANGED = _calendar.wxEVT_CALENDAR_DAY_CHANGED
  206. wxEVT_CALENDAR_MONTH_CHANGED = _calendar.wxEVT_CALENDAR_MONTH_CHANGED
  207. wxEVT_CALENDAR_YEAR_CHANGED = _calendar.wxEVT_CALENDAR_YEAR_CHANGED
  208. wxEVT_CALENDAR_WEEKDAY_CLICKED = _calendar.wxEVT_CALENDAR_WEEKDAY_CLICKED
  209. EVT_CALENDAR = wx.PyEventBinder(wxEVT_CALENDAR_DOUBLECLICKED, 1)
  210. EVT_CALENDAR_SEL_CHANGED = wx.PyEventBinder(wxEVT_CALENDAR_SEL_CHANGED, 1)
  211. EVT_CALENDAR_DAY = wx.PyEventBinder(wxEVT_CALENDAR_DAY_CHANGED, 1)
  212. EVT_CALENDAR_MONTH = wx.PyEventBinder(wxEVT_CALENDAR_MONTH_CHANGED, 1)
  213. EVT_CALENDAR_YEAR = wx.PyEventBinder(wxEVT_CALENDAR_YEAR_CHANGED, 1)
  214. EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder(wxEVT_CALENDAR_WEEKDAY_CLICKED, 1)
  215.  
  216. class CalendarCtrl(_core.Control):
  217.     thisown = property((lambda x: x.this.own()), (lambda x, v: x.this.own(v)), doc = 'The membership flag')
  218.     __repr__ = _swig_repr
  219.     
  220.     def __init__(self, *args, **kwargs):
  221.         _calendar.CalendarCtrl_swiginit(self, _calendar.new_CalendarCtrl(*args, **kwargs))
  222.         self._setOORInfo(self)
  223.  
  224.     
  225.     def Create(*args, **kwargs):
  226.         return _calendar.CalendarCtrl_Create(*args, **kwargs)
  227.  
  228.     
  229.     def SetDate(*args, **kwargs):
  230.         return _calendar.CalendarCtrl_SetDate(*args, **kwargs)
  231.  
  232.     
  233.     def GetDate(*args, **kwargs):
  234.         return _calendar.CalendarCtrl_GetDate(*args, **kwargs)
  235.  
  236.     
  237.     def SetLowerDateLimit(*args, **kwargs):
  238.         return _calendar.CalendarCtrl_SetLowerDateLimit(*args, **kwargs)
  239.  
  240.     
  241.     def SetUpperDateLimit(*args, **kwargs):
  242.         return _calendar.CalendarCtrl_SetUpperDateLimit(*args, **kwargs)
  243.  
  244.     
  245.     def GetLowerDateLimit(*args, **kwargs):
  246.         return _calendar.CalendarCtrl_GetLowerDateLimit(*args, **kwargs)
  247.  
  248.     
  249.     def GetUpperDateLimit(*args, **kwargs):
  250.         return _calendar.CalendarCtrl_GetUpperDateLimit(*args, **kwargs)
  251.  
  252.     
  253.     def SetDateRange(*args, **kwargs):
  254.         return _calendar.CalendarCtrl_SetDateRange(*args, **kwargs)
  255.  
  256.     
  257.     def EnableYearChange(*args, **kwargs):
  258.         return _calendar.CalendarCtrl_EnableYearChange(*args, **kwargs)
  259.  
  260.     
  261.     def EnableMonthChange(*args, **kwargs):
  262.         return _calendar.CalendarCtrl_EnableMonthChange(*args, **kwargs)
  263.  
  264.     
  265.     def EnableHolidayDisplay(*args, **kwargs):
  266.         return _calendar.CalendarCtrl_EnableHolidayDisplay(*args, **kwargs)
  267.  
  268.     
  269.     def SetHeaderColours(*args, **kwargs):
  270.         return _calendar.CalendarCtrl_SetHeaderColours(*args, **kwargs)
  271.  
  272.     
  273.     def GetHeaderColourFg(*args, **kwargs):
  274.         return _calendar.CalendarCtrl_GetHeaderColourFg(*args, **kwargs)
  275.  
  276.     
  277.     def GetHeaderColourBg(*args, **kwargs):
  278.         return _calendar.CalendarCtrl_GetHeaderColourBg(*args, **kwargs)
  279.  
  280.     
  281.     def SetHighlightColours(*args, **kwargs):
  282.         return _calendar.CalendarCtrl_SetHighlightColours(*args, **kwargs)
  283.  
  284.     
  285.     def GetHighlightColourFg(*args, **kwargs):
  286.         return _calendar.CalendarCtrl_GetHighlightColourFg(*args, **kwargs)
  287.  
  288.     
  289.     def GetHighlightColourBg(*args, **kwargs):
  290.         return _calendar.CalendarCtrl_GetHighlightColourBg(*args, **kwargs)
  291.  
  292.     
  293.     def SetHolidayColours(*args, **kwargs):
  294.         return _calendar.CalendarCtrl_SetHolidayColours(*args, **kwargs)
  295.  
  296.     
  297.     def GetHolidayColourFg(*args, **kwargs):
  298.         return _calendar.CalendarCtrl_GetHolidayColourFg(*args, **kwargs)
  299.  
  300.     
  301.     def GetHolidayColourBg(*args, **kwargs):
  302.         return _calendar.CalendarCtrl_GetHolidayColourBg(*args, **kwargs)
  303.  
  304.     
  305.     def GetAttr(*args, **kwargs):
  306.         return _calendar.CalendarCtrl_GetAttr(*args, **kwargs)
  307.  
  308.     
  309.     def SetAttr(*args, **kwargs):
  310.         return _calendar.CalendarCtrl_SetAttr(*args, **kwargs)
  311.  
  312.     
  313.     def SetHoliday(*args, **kwargs):
  314.         return _calendar.CalendarCtrl_SetHoliday(*args, **kwargs)
  315.  
  316.     
  317.     def ResetAttr(*args, **kwargs):
  318.         return _calendar.CalendarCtrl_ResetAttr(*args, **kwargs)
  319.  
  320.     
  321.     def HitTest(*args, **kwargs):
  322.         return _calendar.CalendarCtrl_HitTest(*args, **kwargs)
  323.  
  324.     
  325.     def GetMonthControl(*args, **kwargs):
  326.         return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs)
  327.  
  328.     
  329.     def GetYearControl(*args, **kwargs):
  330.         return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs)
  331.  
  332.     
  333.     def GetClassDefaultAttributes(*args, **kwargs):
  334.         return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
  335.  
  336.     GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
  337.     
  338.     def PySetDate(self, date):
  339.         self.SetDate(_pydate2wxdate(date))
  340.  
  341.     
  342.     def PyGetDate(self):
  343.         return _wxdate2pydate(self.GetDate())
  344.  
  345.     
  346.     def PySetLowerDateLimit(self, date):
  347.         self.SetLowerDateLimit(_pydate2wxdate(date))
  348.  
  349.     
  350.     def PySetUpperDateLimit(self, date):
  351.         self.SetUpperDateLimit(_pydate2wxdate(date))
  352.  
  353.     
  354.     def PySetDateRange(self, lowerdate, upperdate):
  355.         self.PySetLowerDateLimit(lowerdate)
  356.         self.PySetUpperDateLimit(upperdate)
  357.  
  358.     
  359.     def PyGetLowerDateLimit(self):
  360.         return _wxdate2pydate(self.GetLowerDateLimit())
  361.  
  362.     
  363.     def PyGetUpperDateLimit(self):
  364.         return _wxdate2pydate(self.GetUpperDateLimit())
  365.  
  366.     Date = property(GetDate, SetDate, doc = 'See `GetDate` and `SetDate`')
  367.     HeaderColourBg = property(GetHeaderColourBg, doc = 'See `GetHeaderColourBg`')
  368.     HeaderColourFg = property(GetHeaderColourFg, doc = 'See `GetHeaderColourFg`')
  369.     HighlightColourBg = property(GetHighlightColourBg, doc = 'See `GetHighlightColourBg`')
  370.     HighlightColourFg = property(GetHighlightColourFg, doc = 'See `GetHighlightColourFg`')
  371.     HolidayColourBg = property(GetHolidayColourBg, doc = 'See `GetHolidayColourBg`')
  372.     HolidayColourFg = property(GetHolidayColourFg, doc = 'See `GetHolidayColourFg`')
  373.     LowerDateLimit = property(GetLowerDateLimit, SetLowerDateLimit, doc = 'See `GetLowerDateLimit` and `SetLowerDateLimit`')
  374.     MonthControl = property(GetMonthControl, doc = 'See `GetMonthControl`')
  375.     UpperDateLimit = property(GetUpperDateLimit, SetUpperDateLimit, doc = 'See `GetUpperDateLimit` and `SetUpperDateLimit`')
  376.     YearControl = property(GetYearControl, doc = 'See `GetYearControl`')
  377.  
  378. _calendar.CalendarCtrl_swigregister(CalendarCtrl)
  379. cvar = _calendar.cvar
  380. CalendarNameStr = cvar.CalendarNameStr
  381.  
  382. def PreCalendarCtrl(*args, **kwargs):
  383.     val = _calendar.new_PreCalendarCtrl(*args, **kwargs)
  384.     return val
  385.  
  386.  
  387. def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs):
  388.     return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
  389.  
  390.  
  391. def _pydate2wxdate(date):
  392.     import datetime as datetime
  393.     tt = date.timetuple()
  394.     dmy = (tt[2], tt[1] - 1, tt[0])
  395.     return wx.DateTimeFromDMY(*dmy)
  396.  
  397.  
  398. def _wxdate2pydate(date):
  399.     import datetime
  400.     if date.IsValid():
  401.         ymd = map(int, date.FormatISODate().split('-'))
  402.         return datetime.date(*ymd)
  403.     return None
  404.  
  405.