]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/py/wxd/Functions.py
1 """Decorator classes for documentation and shell scripting.
4 __author__
= "Patrick K. O'Brien <pobrien@orbtech.com>"
6 __revision__
= "$Revision$"[11:-2]
9 # These are not the real wxPython classes. These are Python versions
10 # for documentation purposes. They are also used to apply docstrings
11 # to the real wxPython classes, which are SWIG-generated wrappers for
15 import Parameters
as wx
18 def ArtProvider_GetBitmap():
22 def ArtProvider_GetIcon():
26 def ArtProvider_PopProvider():
30 def ArtProvider_PushProvider():
34 def ArtProvider_RemoveProvider():
38 def BeginBusyCursor():
54 def BitmapFromImage():
58 def BitmapFromXPMData():
62 def BufferedDCInternalBuffer():
66 def Button_GetDefaultSize():
70 def CallAfter(callable, *args
, **kw
):
71 """Call the specified function after the current and pending event
72 handlers have been completed. This is also good for making GUI
73 method calls from non-GUI threads."""
76 def Caret_GetBlinkTime():
80 def Caret_SetBlinkTime():
84 def ClientDisplayRect():
92 def ConfigBase_Create():
96 def ConfigBase_DontCreateOnDemand():
100 def ConfigBase_Get():
104 def ConfigBase_Set():
108 def CreateFileTipProvider():
112 def CustomDataFormat():
132 def DateSpan_Month():
136 def DateSpan_Months():
144 def DateSpan_Weeks():
152 def DateSpan_Years():
156 def DateTimeFromDMY():
160 def DateTimeFromHMS():
164 def DateTimeFromJDN():
168 def DateTimeFromTimeT():
172 def DateTime_ConvertYearToBC():
176 def DateTime_GetAmPmStrings():
180 def DateTime_GetBeginDST():
184 def DateTime_GetCentury():
188 def DateTime_GetCountry():
192 def DateTime_GetCurrentMonth():
196 def DateTime_GetCurrentYear():
200 def DateTime_GetEndDST():
204 def DateTime_GetMonthName():
208 def DateTime_GetNumberOfDaysInMonth():
212 def DateTime_GetNumberOfDaysinYear():
216 def DateTime_GetWeekDayName():
220 def DateTime_IsDSTApplicable():
224 def DateTime_IsLeapYear():
228 def DateTime_IsWestEuropeanCountry():
236 def DateTime_SetCountry():
240 def DateTime_Today():
292 def EnableTopLevelWindows():
296 def EncodingConverter_GetAllEquivalents():
300 def EncodingConverter_GetPlatformEquivalents():
316 def FileSystem_AddHandler():
320 def FileSystem_CleanUpHandlers():
324 def FileTypeInfoSequence():
328 def FileType_ExpandCommand():
332 def FindWindowAtPoint():
336 def FindWindowById(id, parent
=wx
.NULL
):
340 def FindWindowByLabel(label
, parent
=wx
.NULL
):
344 def FindWindowByName(name
, parent
=wx
.NULL
):
348 def FontFromNativeInfo():
352 def FontMapper_Get():
356 def FontMapper_GetDefaultConfigPath():
360 def FontMapper_GetEncodingDescription():
364 def FontMapper_GetEncodingName():
368 def FontMapper_Set():
372 def Font_GetDefaultEncoding():
376 def Font_SetDefaultEncoding():
380 def GenericFindWindowAtPoint():
384 def GetAccelFromString():
388 def GetActiveWindow():
396 def GetClientDisplayRect():
404 def GetCurrentTime():
408 def GetDisplayDepth():
412 def GetDisplaySize():
416 def GetDisplaySizeMM():
420 def GetElapsedTime():
424 def GetEmailAddress():
428 def GetFullHostName():
444 def GetLocalTimeMillis():
452 def GetMousePosition():
456 def GetNumberFromUser():
460 def GetOsDescription():
468 def GetPasswordFromUser():
476 def GetSingleChoice():
480 def GetSingleChoiceIndex():
484 def GetTextFromUser():
488 def GetTopLevelParent():
492 def GetTranslation():
512 def IconBundleFromFile():
516 def IconBundleFromIcon():
520 def IconFromBitmap():
524 def IconFromXPMData():
528 def ImageFromBitmap():
540 def ImageFromStream():
544 def ImageFromStreamMime():
548 def Image_AddHandler():
556 def Image_CanReadStream():
560 def Image_GetImageCount():
564 def Image_InsertHandler():
568 def Image_RemoveHandler():
572 def InitAllImageHandlers():
584 def IsDragResultOk():
588 def LoadFileSelector():
592 def Locale_AddCatalogLookupPathPrefix():
596 def Locale_AddLanguage():
600 def Locale_GetLanguageInfo():
604 def Locale_GetSystemEncoding():
608 def Locale_GetSystemEncodingName():
612 def Locale_GetSystemLanguage():
644 def LogStatusFrame():
668 def Log_AddTraceMask():
672 def Log_ClearTraceMasks():
676 def Log_DontCreateOnDemand():
680 def Log_EnableLogging():
684 def Log_FlushActive():
688 def Log_GetActiveTarget():
692 def Log_GetLogLevel():
696 def Log_GetTimestamp():
700 def Log_GetTraceMask():
704 def Log_GetTraceMasks():
708 def Log_IsAllowedTraceMask():
720 def Log_RemoveTraceMask():
728 def Log_SetActiveTarget():
732 def Log_SetLogLevel():
736 def Log_SetTimestamp():
740 def Log_SetTraceMask():
744 def Log_SetVerbose():
756 def MemoryDCFromDC():
760 def MemoryFSHandler_AddFile():
764 def MemoryFSHandler_RemoveFile():
768 def MenuItem_GetLabelFromText():
776 def MimeTypesManager_IsOfType():
808 def NullFileTypeInfo():
812 def Point2DDoubleCopy():
816 def Point2DDoubleFromPoint():
824 def PostScriptDC_GetResolution():
828 def PostScriptDC_SetResolution():
832 def PreBitmapButton():
844 def PreCheckListBox():
864 def PreDirFilterListCtrl():
868 def PreFindReplaceDialog():
880 def PreGenericDirCtrl():
896 def PreMDIChildFrame():
900 def PreMDIClientWindow():
904 def PreMDIParentFrame():
920 def PrePopupTransientWindow():
924 def PrePopupWindow():
932 def PreRadioButton():
936 def PreSashLayoutWindow():
948 def PreScrolledWindow():
952 def PreSingleInstanceChecker():
968 def PreSplitterWindow():
972 def PreStaticBitmap():
996 def PreToggleButton():
1004 def PreToolBarSimple():
1008 def PreTopLevelWindow():
1020 def Process_Exists():
1032 def PyTypeCast(obj
, typeStr
):
1033 """This helper function will take a wxPython object and convert it
1034 to another wxPython object type. This will not be able to create
1035 objects that are derived from wxPython classes by the user, only
1036 those that are actually part of wxPython and directly corespond to
1039 This is useful in situations where some method returns a generic
1040 type such as wxWindow, but you know that it is actually some
1041 derived type such as a TextCtrl. You can't call TextCtrl
1042 specific methods on a Window object, but you can use this
1043 function to create a TextCtrl object that will pass the same
1044 pointer to the C++ code. You use it like this:
1046 textCtrl = PyTypeCast(window, "TextCtrl")
1048 WARNING: Using this function to type cast objects into types that
1049 they are not is not recommended and is likely to cause
1050 your program to crash... Hard."""
1053 def Py_isinstance(obj
, klasses
):
1054 """An isinstance for Python < 2.2 that can check a sequence of
1055 class objects like the one in 2.2 can."""
1058 def RegionFromPoints():
1066 ## def RunLater(callable, *args, **kw):
1067 ## """An alias for CallAfter."""
1070 RunLater
= CallAfter
1072 def SafeShowMessage():
1080 def SaveFileSelector():
1112 def StripMenuCodes():
1124 def SystemSettings_GetColour():
1128 def SystemSettings_GetFont():
1132 def SystemSettings_GetMetric():
1136 def SystemSettings_GetScreenType():
1140 def SystemSettings_GetColour():
1144 def SystemSettings_GetFont():
1148 def SystemSettings_GetMetric():
1152 def SystemSettings_HasFeature():
1156 def SystemSettings_SetScreenType():
1160 def TextAttr_Combine():
1164 def Thread_IsMain():
1172 def TimeSpan_Days():
1176 def TimeSpan_Hour():
1180 def TimeSpan_Hours():
1184 def TimeSpan_Minute():
1188 def TimeSpan_Minutes():
1192 def TimeSpan_Second():
1196 def TimeSpan_Seconds():
1200 def TimeSpan_Week():
1204 def TimeSpan_Weeks():
1208 def ToolTip_Enable():
1212 def ToolTip_SetDelay():
1220 def Validator_IsSilent():
1224 def Validator_SetBellOnError():
1236 def Window_FindFocus():
1240 def Window_GetCapture():
1244 def Window_NewControlId():
1248 def Window_NextControlId():
1252 def Window_PrevControlId():
1260 def YieldIfNeeded():