X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d0918205aae1b1a45267ad7ddfab8eb00185dce..2463329cd36c305f4007445049a89439fb7e62a9:/utils/wxPython/src/gtk/misc.py diff --git a/utils/wxPython/src/gtk/misc.py b/utils/wxPython/src/gtk/misc.py index 84945365e2..486aec9d0e 100644 --- a/utils/wxPython/src/gtk/misc.py +++ b/utils/wxPython/src/gtk/misc.py @@ -74,6 +74,12 @@ class wxRealPointPtr : def __del__(self,miscc=miscc): if self.thisown == 1 : miscc.delete_wxRealPoint(self) + def Set(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint_Set,(self,) + _args, _kwargs) + return val + def asTuple(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint_asTuple,(self,) + _args, _kwargs) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRealPoint_x_set(self,value) @@ -90,6 +96,8 @@ class wxRealPointPtr : raise AttributeError,name def __repr__(self): return "" % (self.this,) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) class wxRealPoint(wxRealPointPtr): def __init__(self,*_args,**_kwargs): self.this = apply(miscc.new_wxRealPoint,_args,_kwargs) @@ -188,6 +196,18 @@ class wxRectPtr : def GetRight(self, *_args, **_kwargs): val = apply(miscc.wxRect_GetRight,(self,) + _args, _kwargs) return val + def SetLeft(self, *_args, **_kwargs): + val = apply(miscc.wxRect_SetLeft,(self,) + _args, _kwargs) + return val + def SetRight(self, *_args, **_kwargs): + val = apply(miscc.wxRect_SetRight,(self,) + _args, _kwargs) + return val + def SetTop(self, *_args, **_kwargs): + val = apply(miscc.wxRect_SetTop,(self,) + _args, _kwargs) + return val + def SetBottom(self, *_args, **_kwargs): + val = apply(miscc.wxRect_SetBottom,(self,) + _args, _kwargs) + return val def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs) return val @@ -234,8 +254,11 @@ class wxPyTimerPtr : def __del__(self,miscc=miscc): if self.thisown == 1 : miscc.delete_wxPyTimer(self) - def Interval(self, *_args, **_kwargs): - val = apply(miscc.wxPyTimer_Interval,(self,) + _args, _kwargs) + def GetInterval(self, *_args, **_kwargs): + val = apply(miscc.wxPyTimer_GetInterval,(self,) + _args, _kwargs) + return val + def IsOneShot(self, *_args, **_kwargs): + val = apply(miscc.wxPyTimer_IsOneShot,(self,) + _args, _kwargs) return val def Start(self, *_args, **_kwargs): val = apply(miscc.wxPyTimer_Start,(self,) + _args, _kwargs) @@ -373,6 +396,9 @@ class wxRegionPtr : def ContainsRect(self, *_args, **_kwargs): val = apply(miscc.wxRegion_ContainsRect,(self,) + _args, _kwargs) return val + def ContainsRectDim(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_ContainsRectDim,(self,) + _args, _kwargs) + return val def GetBox(self, *_args, **_kwargs): val = apply(miscc.wxRegion_GetBox,(self,) + _args, _kwargs) if val: val = wxRectPtr(val) ; val.thisown = 1 @@ -380,15 +406,42 @@ class wxRegionPtr : def Intersect(self, *_args, **_kwargs): val = apply(miscc.wxRegion_Intersect,(self,) + _args, _kwargs) return val - def Subtract(self, *_args, **_kwargs): - val = apply(miscc.wxRegion_Subtract,(self,) + _args, _kwargs) + def IntersectRect(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_IntersectRect,(self,) + _args, _kwargs) + return val + def IntersectRegion(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_IntersectRegion,(self,) + _args, _kwargs) + return val + def IsEmpty(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_IsEmpty,(self,) + _args, _kwargs) return val def Union(self, *_args, **_kwargs): val = apply(miscc.wxRegion_Union,(self,) + _args, _kwargs) return val + def UnionRect(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_UnionRect,(self,) + _args, _kwargs) + return val + def UnionRegion(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_UnionRegion,(self,) + _args, _kwargs) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_Subtract,(self,) + _args, _kwargs) + return val + def SubtractRect(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_SubtractRect,(self,) + _args, _kwargs) + return val + def SubtractRegion(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_SubtractRegion,(self,) + _args, _kwargs) + return val def Xor(self, *_args, **_kwargs): val = apply(miscc.wxRegion_Xor,(self,) + _args, _kwargs) return val + def XorRect(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_XorRect,(self,) + _args, _kwargs) + return val + def XorRegion(self, *_args, **_kwargs): + val = apply(miscc.wxRegion_XorRegion,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxRegion(wxRegionPtr): @@ -451,6 +504,9 @@ class wxAcceleratorEntryPtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,miscc=miscc): + if self.thisown == 1 : + miscc.delete_wxAcceleratorEntry(self) def Set(self, *_args, **_kwargs): val = apply(miscc.wxAcceleratorEntry_Set,(self,) + _args, _kwargs) return val @@ -477,6 +533,9 @@ class wxAcceleratorTablePtr : def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,miscc=miscc): + if self.thisown == 1 : + miscc.delete_wxAcceleratorTable(self) def __repr__(self): return "" % (self.this,) class wxAcceleratorTable(wxAcceleratorTablePtr): @@ -487,27 +546,28 @@ class wxAcceleratorTable(wxAcceleratorTablePtr): +class wxBusyInfoPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,miscc=miscc): + if self.thisown == 1 : + miscc.delete_wxBusyInfo(self) + def __repr__(self): + return "" % (self.this,) +class wxBusyInfo(wxBusyInfoPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(miscc.new_wxBusyInfo,_args,_kwargs) + self.thisown = 1 -#-------------- FUNCTION WRAPPERS ------------------ - -wxFileSelector = miscc.wxFileSelector - -wxGetTextFromUser = miscc.wxGetTextFromUser - -wxGetSingleChoice = miscc.wxGetSingleChoice - -wxGetSingleChoiceIndex = miscc.wxGetSingleChoiceIndex -wxMessageBox = miscc.wxMessageBox -wxGetNumberFromUser = miscc.wxGetNumberFromUser -wxColourDisplay = miscc.wxColourDisplay -wxDisplayDepth = miscc.wxDisplayDepth +#-------------- FUNCTION WRAPPERS ------------------ -wxSetCursor = miscc.wxSetCursor +wxIntersectRect = miscc.wxIntersectRect wxNewId = miscc.wxNewId @@ -517,8 +577,6 @@ NewId = miscc.NewId RegisterId = miscc.RegisterId -wxBeginBusyCursor = miscc.wxBeginBusyCursor - wxBell = miscc.wxBell wxDisplaySize = miscc.wxDisplaySize @@ -527,12 +585,20 @@ wxEndBusyCursor = miscc.wxEndBusyCursor wxExecute = miscc.wxExecute +wxGetElapsedTime = miscc.wxGetElapsedTime + wxGetMousePosition = miscc.wxGetMousePosition wxIsBusy = miscc.wxIsBusy wxNow = miscc.wxNow +wxShell = miscc.wxShell + +wxStartTimer = miscc.wxStartTimer + +wxGetOsVersion = miscc.wxGetOsVersion + wxSleep = miscc.wxSleep wxYield = miscc.wxYield @@ -543,44 +609,7 @@ wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows wxGetResource = miscc.wxGetResource -wxResourceAddIdentifier = miscc.wxResourceAddIdentifier - -wxResourceClear = miscc.wxResourceClear - -def wxResourceCreateBitmap(*_args, **_kwargs): - val = apply(miscc.wxResourceCreateBitmap,_args,_kwargs) - if val: val = wxBitmapPtr(val); val.thisown = 1 - return val - -def wxResourceCreateIcon(*_args, **_kwargs): - val = apply(miscc.wxResourceCreateIcon,_args,_kwargs) - if val: val = wxIconPtr(val); val.thisown = 1 - return val - -def wxResourceCreateMenuBar(*_args, **_kwargs): - val = apply(miscc.wxResourceCreateMenuBar,_args,_kwargs) - if val: val = wxMenuBarPtr(val) - return val - -wxResourceGetIdentifier = miscc.wxResourceGetIdentifier - -wxResourceParseData = miscc.wxResourceParseData - -wxResourceParseFile = miscc.wxResourceParseFile - -wxResourceParseString = miscc.wxResourceParseString - -def wxSystemSettings_GetSystemColour(*_args, **_kwargs): - val = apply(miscc.wxSystemSettings_GetSystemColour,_args,_kwargs) - if val: val = wxColourPtr(val); val.thisown = 1 - return val - -def wxSystemSettings_GetSystemFont(*_args, **_kwargs): - val = apply(miscc.wxSystemSettings_GetSystemFont,_args,_kwargs) - if val: val = wxFontPtr(val); val.thisown = 1 - return val - -wxSystemSettings_GetSystemMetric = miscc.wxSystemSettings_GetSystemMetric +wxStripMenuCodes = miscc.wxStripMenuCodes @@ -608,89 +637,3 @@ wxAbsolute = miscc.wxAbsolute wxOutRegion = miscc.wxOutRegion wxPartRegion = miscc.wxPartRegion wxInRegion = miscc.wxInRegion -wxSYS_WHITE_BRUSH = miscc.wxSYS_WHITE_BRUSH -wxSYS_LTGRAY_BRUSH = miscc.wxSYS_LTGRAY_BRUSH -wxSYS_GRAY_BRUSH = miscc.wxSYS_GRAY_BRUSH -wxSYS_DKGRAY_BRUSH = miscc.wxSYS_DKGRAY_BRUSH -wxSYS_BLACK_BRUSH = miscc.wxSYS_BLACK_BRUSH -wxSYS_NULL_BRUSH = miscc.wxSYS_NULL_BRUSH -wxSYS_HOLLOW_BRUSH = miscc.wxSYS_HOLLOW_BRUSH -wxSYS_WHITE_PEN = miscc.wxSYS_WHITE_PEN -wxSYS_BLACK_PEN = miscc.wxSYS_BLACK_PEN -wxSYS_NULL_PEN = miscc.wxSYS_NULL_PEN -wxSYS_OEM_FIXED_FONT = miscc.wxSYS_OEM_FIXED_FONT -wxSYS_ANSI_FIXED_FONT = miscc.wxSYS_ANSI_FIXED_FONT -wxSYS_ANSI_VAR_FONT = miscc.wxSYS_ANSI_VAR_FONT -wxSYS_SYSTEM_FONT = miscc.wxSYS_SYSTEM_FONT -wxSYS_DEVICE_DEFAULT_FONT = miscc.wxSYS_DEVICE_DEFAULT_FONT -wxSYS_DEFAULT_PALETTE = miscc.wxSYS_DEFAULT_PALETTE -wxSYS_SYSTEM_FIXED_FONT = miscc.wxSYS_SYSTEM_FIXED_FONT -wxSYS_DEFAULT_GUI_FONT = miscc.wxSYS_DEFAULT_GUI_FONT -wxSYS_COLOUR_SCROLLBAR = miscc.wxSYS_COLOUR_SCROLLBAR -wxSYS_COLOUR_BACKGROUND = miscc.wxSYS_COLOUR_BACKGROUND -wxSYS_COLOUR_ACTIVECAPTION = miscc.wxSYS_COLOUR_ACTIVECAPTION -wxSYS_COLOUR_INACTIVECAPTION = miscc.wxSYS_COLOUR_INACTIVECAPTION -wxSYS_COLOUR_MENU = miscc.wxSYS_COLOUR_MENU -wxSYS_COLOUR_WINDOW = miscc.wxSYS_COLOUR_WINDOW -wxSYS_COLOUR_WINDOWFRAME = miscc.wxSYS_COLOUR_WINDOWFRAME -wxSYS_COLOUR_MENUTEXT = miscc.wxSYS_COLOUR_MENUTEXT -wxSYS_COLOUR_WINDOWTEXT = miscc.wxSYS_COLOUR_WINDOWTEXT -wxSYS_COLOUR_CAPTIONTEXT = miscc.wxSYS_COLOUR_CAPTIONTEXT -wxSYS_COLOUR_ACTIVEBORDER = miscc.wxSYS_COLOUR_ACTIVEBORDER -wxSYS_COLOUR_INACTIVEBORDER = miscc.wxSYS_COLOUR_INACTIVEBORDER -wxSYS_COLOUR_APPWORKSPACE = miscc.wxSYS_COLOUR_APPWORKSPACE -wxSYS_COLOUR_HIGHLIGHT = miscc.wxSYS_COLOUR_HIGHLIGHT -wxSYS_COLOUR_HIGHLIGHTTEXT = miscc.wxSYS_COLOUR_HIGHLIGHTTEXT -wxSYS_COLOUR_BTNFACE = miscc.wxSYS_COLOUR_BTNFACE -wxSYS_COLOUR_BTNSHADOW = miscc.wxSYS_COLOUR_BTNSHADOW -wxSYS_COLOUR_GRAYTEXT = miscc.wxSYS_COLOUR_GRAYTEXT -wxSYS_COLOUR_BTNTEXT = miscc.wxSYS_COLOUR_BTNTEXT -wxSYS_COLOUR_INACTIVECAPTIONTEXT = miscc.wxSYS_COLOUR_INACTIVECAPTIONTEXT -wxSYS_COLOUR_BTNHIGHLIGHT = miscc.wxSYS_COLOUR_BTNHIGHLIGHT -wxSYS_COLOUR_3DDKSHADOW = miscc.wxSYS_COLOUR_3DDKSHADOW -wxSYS_COLOUR_3DLIGHT = miscc.wxSYS_COLOUR_3DLIGHT -wxSYS_COLOUR_INFOTEXT = miscc.wxSYS_COLOUR_INFOTEXT -wxSYS_COLOUR_INFOBK = miscc.wxSYS_COLOUR_INFOBK -wxSYS_COLOUR_DESKTOP = miscc.wxSYS_COLOUR_DESKTOP -wxSYS_COLOUR_3DFACE = miscc.wxSYS_COLOUR_3DFACE -wxSYS_COLOUR_3DSHADOW = miscc.wxSYS_COLOUR_3DSHADOW -wxSYS_COLOUR_3DHIGHLIGHT = miscc.wxSYS_COLOUR_3DHIGHLIGHT -wxSYS_COLOUR_3DHILIGHT = miscc.wxSYS_COLOUR_3DHILIGHT -wxSYS_COLOUR_BTNHILIGHT = miscc.wxSYS_COLOUR_BTNHILIGHT -wxSYS_MOUSE_BUTTONS = miscc.wxSYS_MOUSE_BUTTONS -wxSYS_BORDER_X = miscc.wxSYS_BORDER_X -wxSYS_BORDER_Y = miscc.wxSYS_BORDER_Y -wxSYS_CURSOR_X = miscc.wxSYS_CURSOR_X -wxSYS_CURSOR_Y = miscc.wxSYS_CURSOR_Y -wxSYS_DCLICK_X = miscc.wxSYS_DCLICK_X -wxSYS_DCLICK_Y = miscc.wxSYS_DCLICK_Y -wxSYS_DRAG_X = miscc.wxSYS_DRAG_X -wxSYS_DRAG_Y = miscc.wxSYS_DRAG_Y -wxSYS_EDGE_X = miscc.wxSYS_EDGE_X -wxSYS_EDGE_Y = miscc.wxSYS_EDGE_Y -wxSYS_HSCROLL_ARROW_X = miscc.wxSYS_HSCROLL_ARROW_X -wxSYS_HSCROLL_ARROW_Y = miscc.wxSYS_HSCROLL_ARROW_Y -wxSYS_HTHUMB_X = miscc.wxSYS_HTHUMB_X -wxSYS_ICON_X = miscc.wxSYS_ICON_X -wxSYS_ICON_Y = miscc.wxSYS_ICON_Y -wxSYS_ICONSPACING_X = miscc.wxSYS_ICONSPACING_X -wxSYS_ICONSPACING_Y = miscc.wxSYS_ICONSPACING_Y -wxSYS_WINDOWMIN_X = miscc.wxSYS_WINDOWMIN_X -wxSYS_WINDOWMIN_Y = miscc.wxSYS_WINDOWMIN_Y -wxSYS_SCREEN_X = miscc.wxSYS_SCREEN_X -wxSYS_SCREEN_Y = miscc.wxSYS_SCREEN_Y -wxSYS_FRAMESIZE_X = miscc.wxSYS_FRAMESIZE_X -wxSYS_FRAMESIZE_Y = miscc.wxSYS_FRAMESIZE_Y -wxSYS_SMALLICON_X = miscc.wxSYS_SMALLICON_X -wxSYS_SMALLICON_Y = miscc.wxSYS_SMALLICON_Y -wxSYS_HSCROLL_Y = miscc.wxSYS_HSCROLL_Y -wxSYS_VSCROLL_X = miscc.wxSYS_VSCROLL_X -wxSYS_VSCROLL_ARROW_X = miscc.wxSYS_VSCROLL_ARROW_X -wxSYS_VSCROLL_ARROW_Y = miscc.wxSYS_VSCROLL_ARROW_Y -wxSYS_VTHUMB_Y = miscc.wxSYS_VTHUMB_Y -wxSYS_CAPTION_Y = miscc.wxSYS_CAPTION_Y -wxSYS_MENU_Y = miscc.wxSYS_MENU_Y -wxSYS_NETWORK_PRESENT = miscc.wxSYS_NETWORK_PRESENT -wxSYS_PENWINDOWS_PRESENT = miscc.wxSYS_PENWINDOWS_PRESENT -wxSYS_SHOW_SOUNDS = miscc.wxSYS_SHOW_SOUNDS -wxSYS_SWAP_BUTTONS = miscc.wxSYS_SWAP_BUTTONS