X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bf584370bc0c7a2fef2b4d2fd2cfef8aa31d55f..72ef6efb1f1819e0b1187cedfd8989d4a37bf457:/wxPython/src/mac/_misc.py diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index d31c055491..a40b2584a2 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -273,6 +273,9 @@ def SystemOptions_IsFalse(*args, **kwargs): """SystemOptions_IsFalse(String name) -> bool""" return _misc_.SystemOptions_IsFalse(*args, **kwargs) +# Until the new native control for wxMac is up to par, still use the generic one. +SystemOptions.SetOptionInt("mac.listctrl.always_use_generic", 1) + #--------------------------------------------------------------------------- @@ -295,10 +298,18 @@ def IsStockID(*args, **kwargs): def IsStockLabel(*args, **kwargs): """IsStockLabel(int id, String label) -> bool""" return _misc_.IsStockLabel(*args, **kwargs) +STOCK_NOFLAGS = _misc_.STOCK_NOFLAGS +STOCK_WITH_MNEMONIC = _misc_.STOCK_WITH_MNEMONIC +STOCK_WITH_ACCELERATOR = _misc_.STOCK_WITH_ACCELERATOR def GetStockLabel(*args, **kwargs): - """GetStockLabel(int id, bool withCodes=True, String accelerator=EmptyString) -> String""" + """GetStockLabel(int id, long flags=STOCK_WITH_MNEMONIC) -> String""" return _misc_.GetStockLabel(*args, **kwargs) +STOCK_MENU = _misc_.STOCK_MENU + +def GetStockHelpString(*args, **kwargs): + """GetStockHelpString(int id, int client=STOCK_MENU) -> String""" + return _misc_.GetStockHelpString(*args, **kwargs) def Bell(*args): """Bell()""" @@ -783,6 +794,8 @@ class ToolTip(_core.Object): return _misc_.ToolTip_SetDelay(*args, **kwargs) SetDelay = staticmethod(SetDelay) + Tip = property(GetTip,SetTip,doc="See `GetTip` and `SetTip`") + Window = property(GetWindow,doc="See `GetWindow`") _misc_.ToolTip_swigregister(ToolTip) def ToolTip_Enable(*args, **kwargs): @@ -1001,6 +1014,10 @@ class FileHistory(_core.Object): return _misc_.FileHistory_GetCount(*args, **kwargs) GetNoHistoryFiles = GetCount + Count = property(GetCount,doc="See `GetCount`") + HistoryFile = property(GetHistoryFile,doc="See `GetHistoryFile`") + MaxFiles = property(GetMaxFiles,doc="See `GetMaxFiles`") + NoHistoryFiles = property(GetNoHistoryFiles,doc="See `GetNoHistoryFiles`") _misc_.FileHistory_swigregister(FileHistory) class SingleInstanceChecker(object): @@ -1094,6 +1111,10 @@ class PlatformInformation(object): """GetOSMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetOSMinorVersion(*args, **kwargs) + def CheckOSVersion(*args, **kwargs): + """CheckOSVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckOSVersion(*args, **kwargs) + def GetToolkitMajorVersion(*args, **kwargs): """GetToolkitMajorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMajorVersion(*args, **kwargs) @@ -1102,6 +1123,10 @@ class PlatformInformation(object): """GetToolkitMinorVersion(self) -> int""" return _misc_.PlatformInformation_GetToolkitMinorVersion(*args, **kwargs) + def CheckToolkitVersion(*args, **kwargs): + """CheckToolkitVersion(self, int major, int minor) -> bool""" + return _misc_.PlatformInformation_CheckToolkitVersion(*args, **kwargs) + def IsUsingUniversalWidgets(*args, **kwargs): """IsUsingUniversalWidgets(self) -> bool""" return _misc_.PlatformInformation_IsUsingUniversalWidgets(*args, **kwargs) @@ -1174,6 +1199,20 @@ class PlatformInformation(object): """IsOk(self) -> bool""" return _misc_.PlatformInformation_IsOk(*args, **kwargs) + ArchName = property(GetArchName,doc="See `GetArchName`") + Architecture = property(GetArchitecture,SetArchitecture,doc="See `GetArchitecture` and `SetArchitecture`") + Endianness = property(GetEndianness,SetEndianness,doc="See `GetEndianness` and `SetEndianness`") + EndiannessName = property(GetEndiannessName,doc="See `GetEndiannessName`") + OSMajorVersion = property(GetOSMajorVersion,doc="See `GetOSMajorVersion`") + OSMinorVersion = property(GetOSMinorVersion,doc="See `GetOSMinorVersion`") + OperatingSystemFamilyName = property(GetOperatingSystemFamilyName,doc="See `GetOperatingSystemFamilyName`") + OperatingSystemId = property(GetOperatingSystemId,SetOperatingSystemId,doc="See `GetOperatingSystemId` and `SetOperatingSystemId`") + OperatingSystemIdName = property(GetOperatingSystemIdName,doc="See `GetOperatingSystemIdName`") + PortId = property(GetPortId,SetPortId,doc="See `GetPortId` and `SetPortId`") + PortIdName = property(GetPortIdName,doc="See `GetPortIdName`") + PortIdShortName = property(GetPortIdShortName,doc="See `GetPortIdShortName`") + ToolkitMajorVersion = property(GetToolkitMajorVersion,doc="See `GetToolkitMajorVersion`") + ToolkitMinorVersion = property(GetToolkitMinorVersion,doc="See `GetToolkitMinorVersion`") _misc_.PlatformInformation_swigregister(PlatformInformation) @@ -1201,6 +1240,8 @@ class TipProvider(object): """PreprocessTip(self, String tip) -> String""" return _misc_.TipProvider_PreprocessTip(*args, **kwargs) + CurrentTip = property(GetCurrentTip,doc="See `GetCurrentTip`") + Tip = property(GetTip,doc="See `GetTip`") _misc_.TipProvider_swigregister(TipProvider) class PyTipProvider(TipProvider): @@ -1286,6 +1327,9 @@ class Timer(_core.EvtHandler): """NO-OP: Timers must be destroyed by normal reference counting""" pass + Id = property(GetId,doc="See `GetId`") + Interval = property(GetInterval,doc="See `GetInterval`") + Owner = property(GetOwner,SetOwner,doc="See `GetOwner` and `SetOwner`") _misc_.Timer_swigregister(Timer) # For backwards compatibility with 2.4 @@ -1313,6 +1357,7 @@ class TimerEvent(_core.Event): """GetInterval(self) -> int""" return _misc_.TimerEvent_GetInterval(*args, **kwargs) + Interval = property(GetInterval,doc="See `GetInterval`") _misc_.TimerEvent_swigregister(TimerEvent) class TimerRunner(object): @@ -1656,6 +1701,8 @@ class LogWindow(Log): """PassMessages(self, bool bDoPass)""" return _misc_.LogWindow_PassMessages(*args, **kwargs) + Frame = property(GetFrame,doc="See `GetFrame`") + OldLog = property(GetOldLog,doc="See `GetOldLog`") _misc_.LogWindow_swigregister(LogWindow) class LogChain(Log): @@ -1681,6 +1728,7 @@ class LogChain(Log): """GetOldLog(self) -> Log""" return _misc_.LogChain_GetOldLog(*args, **kwargs) + OldLog = property(GetOldLog,doc="See `GetOldLog`") _misc_.LogChain_swigregister(LogChain) class LogBuffer(Log): @@ -1694,6 +1742,7 @@ class LogBuffer(Log): """GetBuffer(self) -> String""" return _misc_.LogBuffer_GetBuffer(*args, **kwargs) + Buffer = property(GetBuffer,doc="See `GetBuffer`") _misc_.LogBuffer_swigregister(LogBuffer) @@ -1890,6 +1939,12 @@ class Process(_core.EvtHandler): """IsErrorAvailable(self) -> bool""" return _misc_.Process_IsErrorAvailable(*args, **kwargs) + ErrorStream = property(GetErrorStream,doc="See `GetErrorStream`") + InputStream = property(GetInputStream,doc="See `GetInputStream`") + OutputStream = property(GetOutputStream,doc="See `GetOutputStream`") + InputOpened = property(IsInputOpened) + InputAvailable = property(IsInputAvailable) + ErrorAvailable = property(IsErrorAvailable) _misc_.Process_swigregister(Process) def Process_Kill(*args, **kwargs): @@ -1921,6 +1976,8 @@ class ProcessEvent(_core.Event): m_pid = property(_misc_.ProcessEvent_m_pid_get, _misc_.ProcessEvent_m_pid_set) m_exitcode = property(_misc_.ProcessEvent_m_exitcode_get, _misc_.ProcessEvent_m_exitcode_set) + ExitCode = property(GetExitCode,doc="See `GetExitCode`") + Pid = property(GetPid,doc="See `GetPid`") _misc_.ProcessEvent_swigregister(ProcessEvent) wxEVT_END_PROCESS = _misc_.wxEVT_END_PROCESS @@ -2126,6 +2183,37 @@ class Joystick(object): return _misc_.Joystick_ReleaseCapture(*args, **kwargs) def __nonzero__(self): return self.IsOk() + ButtonState = property(GetButtonState,doc="See `GetButtonState`") + ManufacturerId = property(GetManufacturerId,doc="See `GetManufacturerId`") + MaxAxes = property(GetMaxAxes,doc="See `GetMaxAxes`") + MaxButtons = property(GetMaxButtons,doc="See `GetMaxButtons`") + MovementThreshold = property(GetMovementThreshold,SetMovementThreshold,doc="See `GetMovementThreshold` and `SetMovementThreshold`") + NumberAxes = property(GetNumberAxes,doc="See `GetNumberAxes`") + NumberButtons = property(GetNumberButtons,doc="See `GetNumberButtons`") + NumberJoysticks = property(GetNumberJoysticks,doc="See `GetNumberJoysticks`") + POVCTSPosition = property(GetPOVCTSPosition,doc="See `GetPOVCTSPosition`") + POVPosition = property(GetPOVPosition,doc="See `GetPOVPosition`") + PollingMax = property(GetPollingMax,doc="See `GetPollingMax`") + PollingMin = property(GetPollingMin,doc="See `GetPollingMin`") + Position = property(GetPosition,doc="See `GetPosition`") + ProductId = property(GetProductId,doc="See `GetProductId`") + ProductName = property(GetProductName,doc="See `GetProductName`") + RudderMax = property(GetRudderMax,doc="See `GetRudderMax`") + RudderMin = property(GetRudderMin,doc="See `GetRudderMin`") + RudderPosition = property(GetRudderPosition,doc="See `GetRudderPosition`") + UMax = property(GetUMax,doc="See `GetUMax`") + UMin = property(GetUMin,doc="See `GetUMin`") + UPosition = property(GetUPosition,doc="See `GetUPosition`") + VMax = property(GetVMax,doc="See `GetVMax`") + VMin = property(GetVMin,doc="See `GetVMin`") + VPosition = property(GetVPosition,doc="See `GetVPosition`") + XMax = property(GetXMax,doc="See `GetXMax`") + XMin = property(GetXMin,doc="See `GetXMin`") + YMax = property(GetYMax,doc="See `GetYMax`") + YMin = property(GetYMin,doc="See `GetYMin`") + ZMax = property(GetZMax,doc="See `GetZMax`") + ZMin = property(GetZMin,doc="See `GetZMin`") + ZPosition = property(GetZPosition,doc="See `GetZPosition`") _misc_.Joystick_swigregister(Joystick) wxEVT_JOY_BUTTON_DOWN = _misc_.wxEVT_JOY_BUTTON_DOWN @@ -2212,6 +2300,11 @@ class JoystickEvent(_core.Event): m_buttonState = property(GetButtonState, SetButtonState) m_joyStick = property(GetJoystick, SetJoystick) + ButtonChange = property(GetButtonChange,SetButtonChange,doc="See `GetButtonChange` and `SetButtonChange`") + ButtonState = property(GetButtonState,SetButtonState,doc="See `GetButtonState` and `SetButtonState`") + Joystick = property(GetJoystick,SetJoystick,doc="See `GetJoystick` and `SetJoystick`") + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") + ZPosition = property(GetZPosition,SetZPosition,doc="See `GetZPosition` and `SetZPosition`") _misc_.JoystickEvent_swigregister(JoystickEvent) EVT_JOY_BUTTON_DOWN = wx.PyEventBinder( wxEVT_JOY_BUTTON_DOWN ) @@ -2344,6 +2437,15 @@ class FileTypeInfo(object): """GetIconIndex(self) -> int""" return _misc_.FileTypeInfo_GetIconIndex(*args, **kwargs) + Description = property(GetDescription,doc="See `GetDescription`") + Extensions = property(GetExtensions,doc="See `GetExtensions`") + ExtensionsCount = property(GetExtensionsCount,doc="See `GetExtensionsCount`") + IconFile = property(GetIconFile,doc="See `GetIconFile`") + IconIndex = property(GetIconIndex,doc="See `GetIconIndex`") + MimeType = property(GetMimeType,doc="See `GetMimeType`") + OpenCommand = property(GetOpenCommand,doc="See `GetOpenCommand`") + PrintCommand = property(GetPrintCommand,doc="See `GetPrintCommand`") + ShortDesc = property(GetShortDesc,SetShortDesc,doc="See `GetShortDesc` and `SetShortDesc`") _misc_.FileTypeInfo_swigregister(FileTypeInfo) def FileTypeInfoSequence(*args, **kwargs): @@ -2418,6 +2520,15 @@ class FileType(object): return _misc_.FileType_ExpandCommand(*args, **kwargs) ExpandCommand = staticmethod(ExpandCommand) + AllCommands = property(GetAllCommands,doc="See `GetAllCommands`") + Description = property(GetDescription,doc="See `GetDescription`") + Extensions = property(GetExtensions,doc="See `GetExtensions`") + Icon = property(GetIcon,doc="See `GetIcon`") + IconInfo = property(GetIconInfo,doc="See `GetIconInfo`") + MimeType = property(GetMimeType,doc="See `GetMimeType`") + MimeTypes = property(GetMimeTypes,doc="See `GetMimeTypes`") + OpenCommand = property(GetOpenCommand,doc="See `GetOpenCommand`") + PrintCommand = property(GetPrintCommand,doc="See `GetPrintCommand`") _misc_.FileType_swigregister(FileType) def FileType_ExpandCommand(*args, **kwargs): @@ -2496,7 +2607,7 @@ class ArtProvider(object): their own wx.ArtProvider class and easily replace standard art with his/her own version. It is easy thing to do: all that is needed is to derive a class from wx.ArtProvider, override it's CreateBitmap - method and register the provider with wx.ArtProvider.PushProvider:: + method and register the provider with `wx.ArtProvider.Push`:: class MyArtProvider(wx.ArtProvider): def __init__(self): @@ -2520,7 +2631,7 @@ class ArtProvider(object): their own wx.ArtProvider class and easily replace standard art with his/her own version. It is easy thing to do: all that is needed is to derive a class from wx.ArtProvider, override it's CreateBitmap - method and register the provider with wx.ArtProvider.PushProvider:: + method and register the provider with `wx.ArtProvider.Push`:: class MyArtProvider(wx.ArtProvider): def __init__(self): @@ -2540,45 +2651,49 @@ class ArtProvider(object): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.ArtProvider__setCallbackInfo(*args, **kwargs) - def PushProvider(*args, **kwargs): + def Push(*args, **kwargs): """ - PushProvider(ArtProvider provider) + Push(ArtProvider provider) Add new provider to the top of providers stack. """ - return _misc_.ArtProvider_PushProvider(*args, **kwargs) + return _misc_.ArtProvider_Push(*args, **kwargs) - PushProvider = staticmethod(PushProvider) - def InsertProvider(*args, **kwargs): + Push = staticmethod(Push) + PushProvider = Push + def Insert(*args, **kwargs): """ - InsertProvider(ArtProvider provider) + Insert(ArtProvider provider) Add new provider to the bottom of providers stack. """ - return _misc_.ArtProvider_InsertProvider(*args, **kwargs) + return _misc_.ArtProvider_Insert(*args, **kwargs) - InsertProvider = staticmethod(InsertProvider) - def PopProvider(*args, **kwargs): + Insert = staticmethod(Insert) + InsertProvider = Insert + def Pop(*args, **kwargs): """ - PopProvider() -> bool + Pop() -> bool Remove latest added provider and delete it. """ - return _misc_.ArtProvider_PopProvider(*args, **kwargs) + return _misc_.ArtProvider_Pop(*args, **kwargs) - PopProvider = staticmethod(PopProvider) - def RemoveProvider(*args, **kwargs): + Pop = staticmethod(Pop) + PopProvider = Pop + def Delete(*args, **kwargs): """ - RemoveProvider(ArtProvider provider) -> bool + Delete(ArtProvider provider) -> bool Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_Delete(*args, **kwargs) args[1].thisown = 1 return val - RemoveProvider = staticmethod(RemoveProvider) + Delete = staticmethod(Delete) + RemoveProvider = Delete def GetBitmap(*args, **kwargs): """ GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap @@ -2673,38 +2788,38 @@ ART_QUIT = cvar.ART_QUIT ART_FIND = cvar.ART_FIND ART_FIND_AND_REPLACE = cvar.ART_FIND_AND_REPLACE -def ArtProvider_PushProvider(*args, **kwargs): +def ArtProvider_Push(*args, **kwargs): """ - ArtProvider_PushProvider(ArtProvider provider) + ArtProvider_Push(ArtProvider provider) Add new provider to the top of providers stack. """ - return _misc_.ArtProvider_PushProvider(*args, **kwargs) + return _misc_.ArtProvider_Push(*args, **kwargs) -def ArtProvider_InsertProvider(*args, **kwargs): +def ArtProvider_Insert(*args, **kwargs): """ - ArtProvider_InsertProvider(ArtProvider provider) + ArtProvider_Insert(ArtProvider provider) Add new provider to the bottom of providers stack. """ - return _misc_.ArtProvider_InsertProvider(*args, **kwargs) + return _misc_.ArtProvider_Insert(*args, **kwargs) -def ArtProvider_PopProvider(*args): +def ArtProvider_Pop(*args): """ - ArtProvider_PopProvider() -> bool + ArtProvider_Pop() -> bool Remove latest added provider and delete it. """ - return _misc_.ArtProvider_PopProvider(*args) + return _misc_.ArtProvider_Pop(*args) -def ArtProvider_RemoveProvider(*args, **kwargs): +def ArtProvider_Delete(*args, **kwargs): """ - ArtProvider_RemoveProvider(ArtProvider provider) -> bool + ArtProvider_Delete(ArtProvider provider) -> bool Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_Delete(*args, **kwargs) args[1].thisown = 1 return val @@ -4233,6 +4348,12 @@ class TimeSpan(object): def __str__(self): return self.Format().encode(wx.GetDefaultPyEncoding()) + Days = property(GetDays,doc="See `GetDays`") + Hours = property(GetHours,doc="See `GetHours`") + Milliseconds = property(GetMilliseconds,doc="See `GetMilliseconds`") + Minutes = property(GetMinutes,doc="See `GetMinutes`") + Seconds = property(GetSeconds,doc="See `GetSeconds`") + Weeks = property(GetWeeks,doc="See `GetWeeks`") _misc_.TimeSpan_swigregister(TimeSpan) def TimeSpan_Milliseconds(*args, **kwargs): @@ -4890,6 +5011,8 @@ class TextDataObject(DataObjectSimple): """ return _misc_.TextDataObject_SetText(*args, **kwargs) + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") + TextLength = property(GetTextLength,doc="See `GetTextLength`") _misc_.TextDataObject_swigregister(TextDataObject) class PyTextDataObject(TextDataObject): @@ -5022,6 +5145,7 @@ class FileDataObject(DataObjectSimple): """ return _misc_.FileDataObject_AddFile(*args, **kwargs) + Filenames = property(GetFilenames,doc="See `GetFilenames`") _misc_.FileDataObject_swigregister(FileDataObject) class CustomDataObject(DataObjectSimple): @@ -5107,6 +5231,7 @@ class URLDataObject(DataObject): """ return _misc_.URLDataObject_SetURL(*args, **kwargs) + URL = property(GetURL,SetURL,doc="See `GetURL` and `SetURL`") _misc_.URLDataObject_swigregister(URLDataObject) class MetafileDataObject(DataObjectSimple): @@ -5676,6 +5801,9 @@ class VideoMode(object): h = property(_misc_.VideoMode_h_get, _misc_.VideoMode_h_set) bpp = property(_misc_.VideoMode_bpp_get, _misc_.VideoMode_bpp_set) refresh = property(_misc_.VideoMode_refresh_get, _misc_.VideoMode_refresh_set) + Depth = property(GetDepth,doc="See `GetDepth`") + Height = property(GetHeight,doc="See `GetHeight`") + Width = property(GetWidth,doc="See `GetWidth`") _misc_.VideoMode_swigregister(VideoMode) class Display(object): @@ -5684,7 +5812,7 @@ class Display(object): __repr__ = _swig_repr def __init__(self, *args, **kwargs): """ - __init__(self, size_t index=0) -> Display + __init__(self, unsigned int index=0) -> Display Set up a Display instance with the specified display. The displays are numbered from 0 to GetCount() - 1, 0 is always the primary display @@ -5695,7 +5823,7 @@ class Display(object): __del__ = lambda self : None; def GetCount(*args, **kwargs): """ - GetCount() -> size_t + GetCount() -> unsigned int Return the number of available displays. """ @@ -5829,7 +5957,7 @@ DefaultVideoMode = cvar.DefaultVideoMode def Display_GetCount(*args): """ - Display_GetCount() -> size_t + Display_GetCount() -> unsigned int Return the number of available displays. """