X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5ee0656c2cee1cb835a0eab4a82bc4948ba05fc..976f924083419b6a7feb1ff7d597c746a70abf1a:/wxPython/src/mac/_windows.py diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 99f953b6dd..961a3a49ca 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -141,7 +141,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_SetScrollRate(*args, **kwargs) def GetScrollPixelsPerUnit(*args, **kwargs): - """GetScrollPixelsPerUnit() -> (xUnit, yUnit)""" + """ + GetScrollPixelsPerUnit() -> (xUnit, yUnit) + + Get the size of one logical unit in physical units. + """ return _windows_.ScrolledWindow_GetScrollPixelsPerUnit(*args, **kwargs) def EnableScrolling(*args, **kwargs): @@ -149,7 +153,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_EnableScrolling(*args, **kwargs) def GetViewStart(*args, **kwargs): - """GetViewStart() -> (x,y)""" + """ + GetViewStart() -> (x,y) + + Get the view start + """ return _windows_.ScrolledWindow_GetViewStart(*args, **kwargs) def SetScale(*args, **kwargs): @@ -206,6 +214,14 @@ class ScrolledWindow(Panel): """GetTargetRect(self) -> Rect""" return _windows_.ScrolledWindow_GetTargetRect(*args, **kwargs) + def DoPrepareDC(*args, **kwargs): + """ + DoPrepareDC(self, DC dc) + + Normally what is called by `PrepareDC`. + """ + return _windows_.ScrolledWindow_DoPrepareDC(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes @@ -289,6 +305,8 @@ FULLSCREEN_NOBORDER = _windows_.FULLSCREEN_NOBORDER FULLSCREEN_NOCAPTION = _windows_.FULLSCREEN_NOCAPTION FULLSCREEN_ALL = _windows_.FULLSCREEN_ALL TOPLEVEL_EX_DIALOG = _windows_.TOPLEVEL_EX_DIALOG +USER_ATTENTION_INFO = _windows_.USER_ATTENTION_INFO +USER_ATTENTION_ERROR = _windows_.USER_ATTENTION_ERROR class TopLevelWindow(_core.Window): def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): @@ -353,6 +371,10 @@ class TopLevelWindow(_core.Window): """SetShape(self, Region region) -> bool""" return _windows_.TopLevelWindow_SetShape(*args, **kwargs) + def RequestUserAttention(*args, **kwargs): + """RequestUserAttention(self, int flags=USER_ATTENTION_INFO)""" + return _windows_.TopLevelWindow_RequestUserAttention(*args, **kwargs) + def MacSetMetalAppearance(*args, **kwargs): """MacSetMetalAppearance(self, bool on)""" return _windows_.TopLevelWindow_MacSetMetalAppearance(*args, **kwargs) @@ -381,9 +403,9 @@ class Frame(TopLevelWindow): return "<%s.%s; proxy of C++ wxFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> Frame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame """ newobj = _windows_.new_Frame(*args, **kwargs) self.this = newobj.this @@ -393,9 +415,9 @@ class Frame(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.Frame_Create(*args, **kwargs) @@ -541,9 +563,9 @@ class Dialog(TopLevelWindow): return "<%s.%s; proxy of C++ wxDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> Dialog + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> Dialog """ newobj = _windows_.new_Dialog(*args, **kwargs) self.this = newobj.this @@ -553,9 +575,9 @@ class Dialog(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> bool """ return _windows_.Dialog_Create(*args, **kwargs) @@ -605,6 +627,9 @@ class Dialog(TopLevelWindow): return _windows_.Dialog_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) + def SendSizeEvent(self): + self.ProcessEvent(wx.SizeEvent((-1,-1))) + class DialogPtr(Dialog): def __init__(self, this): @@ -643,9 +668,9 @@ class MiniFrame(Frame): return "<%s.%s; proxy of C++ wxMiniFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> MiniFrame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MiniFrame """ newobj = _windows_.new_MiniFrame(*args, **kwargs) self.this = newobj.this @@ -655,9 +680,9 @@ class MiniFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MiniFrame_Create(*args, **kwargs) @@ -718,7 +743,7 @@ class SplashScreen(Frame): def __init__(self, *args, **kwargs): """ __init__(self, Bitmap bitmap, long splashStyle, int milliseconds, - Window parent, int id, Point pos=DefaultPosition, + Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP) -> SplashScreen """ newobj = _windows_.new_SplashScreen(*args, **kwargs) @@ -749,6 +774,9 @@ _windows_.SplashScreen_swigregister(SplashScreenPtr) #--------------------------------------------------------------------------- +SB_NORMAL = _windows_.SB_NORMAL +SB_FLAT = _windows_.SB_FLAT +SB_RAISED = _windows_.SB_RAISED class StatusBar(_core.Window): def __repr__(self): return "<%s.%s; proxy of C++ wxStatusBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -761,7 +789,7 @@ class StatusBar(_core.Window): self._setOORInfo(self) def Create(*args, **kwargs): - """Create(self, Window parent, int id, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" + """Create(self, Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" return _windows_.StatusBar_Create(*args, **kwargs) def SetFieldsCount(*args, **kwargs): @@ -792,6 +820,10 @@ class StatusBar(_core.Window): """SetStatusWidths(self, int widths, int widths_field)""" return _windows_.StatusBar_SetStatusWidths(*args, **kwargs) + def SetStatusStyles(*args, **kwargs): + """SetStatusStyles(self, int styles, int styles_field)""" + return _windows_.StatusBar_SetStatusStyles(*args, **kwargs) + def GetFieldRect(*args, **kwargs): """GetFieldRect(self, int i) -> Rect""" return _windows_.StatusBar_GetFieldRect(*args, **kwargs) @@ -1272,8 +1304,8 @@ class SashWindow(_core.Window): return "<%s.%s; proxy of C++ wxSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> SashWindow """ newobj = _windows_.new_SashWindow(*args, **kwargs) @@ -1284,8 +1316,8 @@ class SashWindow(_core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> bool """ return _windows_.SashWindow_Create(*args, **kwargs) @@ -1542,8 +1574,8 @@ class SashLayoutWindow(SashWindow): return "<%s.%s; proxy of C++ wxSashLayoutWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> SashLayoutWindow """ newobj = _windows_.new_SashLayoutWindow(*args, **kwargs) @@ -1554,8 +1586,8 @@ class SashLayoutWindow(SashWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> bool """ return _windows_.SashLayoutWindow_Create(*args, **kwargs) @@ -1769,13 +1801,13 @@ class VScrolledWindow(Panel): """RefreshLines(self, size_t from, size_t to)""" return _windows_.VScrolledWindow_RefreshLines(*args, **kwargs) - def HitTestXT(*args, **kwargs): + def HitTestXY(*args, **kwargs): """ - HitTestXT(self, int x, int y) -> int + HitTestXY(self, int x, int y) -> int Test where the given (in client coords) point lies """ - return _windows_.VScrolledWindow_HitTestXT(*args, **kwargs) + return _windows_.VScrolledWindow_HitTestXY(*args, **kwargs) def HitTest(*args, **kwargs): """ @@ -1869,11 +1901,11 @@ class VListBox(VScrolledWindow): return _windows_.VListBox_GetSelectedCount(*args, **kwargs) def GetFirstSelected(*args, **kwargs): - """GetFirstSelected(self, unsigned long cookie) -> int""" + """GetFirstSelected(self) -> PyObject""" return _windows_.VListBox_GetFirstSelected(*args, **kwargs) def GetNextSelected(*args, **kwargs): - """GetNextSelected(self, unsigned long cookie) -> int""" + """GetNextSelected(self, unsigned long cookie) -> PyObject""" return _windows_.VListBox_GetNextSelected(*args, **kwargs) def GetMargins(*args, **kwargs): @@ -2109,7 +2141,7 @@ class ColourData(_core.Object): Gets the i'th custom colour associated with the colour dialog. i should be an integer between 0 and 15. The default custom colours are - all white. + all invalid colours. """ return _windows_.ColourData_GetCustomColour(*args, **kwargs) @@ -2137,7 +2169,7 @@ class ColourData(_core.Object): SetCustomColour(self, int i, Colour colour) Sets the i'th custom colour for the colour dialog. i should be an - integer between 0 and 15. The default custom colours are all white. + integer between 0 and 15. The default custom colours are all invalid colours. """ return _windows_.ColourData_SetCustomColour(*args, **kwargs) @@ -2449,7 +2481,12 @@ class MultiChoiceDialog(Dialog): self._setOORInfo(self) def SetSelections(*args, **kwargs): - """SetSelections(List selections)""" + """ + SetSelections(List selections) + + Specify the items in the list that should be selected, using a list of + integers. + """ return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs) def GetSelections(*args, **kwargs): @@ -2806,8 +2843,10 @@ class ProgressDialog(Frame): Update(self, int value, String newmsg=EmptyString) -> bool Updates the dialog, setting the progress bar to the new value and, if - given changes the message above it. Returns true unless the Cancel - button has been pressed. + given changes the message above it. The value given should be less + than or equal to the maximum value given to the constructor and the + dialog is closed if it is equal to the maximum. Returns true unless + the Cancel button has been pressed. If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is @@ -3094,8 +3133,9 @@ class MDIParentFrame(Frame): return "<%s.%s; proxy of C++ wxMDIParentFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> MDIParentFrame """ newobj = _windows_.new_MDIParentFrame(*args, **kwargs) @@ -3106,8 +3146,9 @@ class MDIParentFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> bool """ return _windows_.MDIParentFrame_Create(*args, **kwargs) @@ -3163,8 +3204,9 @@ class MDIChildFrame(Frame): return "<%s.%s; proxy of C++ wxMDIChildFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + __init__(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MDIChildFrame """ newobj = _windows_.new_MDIChildFrame(*args, **kwargs) @@ -3175,8 +3217,9 @@ class MDIChildFrame(Frame): def Create(*args, **kwargs): """ - Create(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + Create(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MDIChildFrame_Create(*args, **kwargs) @@ -3243,8 +3286,8 @@ class PyWindow(_core.Window): return "<%s.%s; proxy of C++ wxPyWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ newobj = _windows_.new_PyWindow(*args, **kwargs) self.this = newobj.this @@ -3363,8 +3406,8 @@ class PyPanel(Panel): return "<%s.%s; proxy of C++ wxPyPanel instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyPanel + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ newobj = _windows_.new_PyPanel(*args, **kwargs) self.this = newobj.this @@ -3483,8 +3526,8 @@ class PyScrolledWindow(ScrolledWindow): return "<%s.%s; proxy of C++ wxPyScrolledWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyScrolledWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ newobj = _windows_.new_PyScrolledWindow(*args, **kwargs) self.this = newobj.this @@ -3608,9 +3651,12 @@ PRINT_MODE_STREAM = _windows_.PRINT_MODE_STREAM class PrintData(_core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxPrintData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> PrintData""" - newobj = _windows_.new_PrintData(*args, **kwargs) + def __init__(self, *args): + """ + __init__(self) -> PrintData + __init__(self, PrintData data) -> PrintData + """ + newobj = _windows_.new_PrintData(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown @@ -3806,9 +3852,12 @@ PreviewCanvasNameStr = cvar.PreviewCanvasNameStr class PageSetupDialogData(_core.Object): def __repr__(self): return "<%s.%s; proxy of C++ wxPageSetupDialogData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> PageSetupDialogData""" - newobj = _windows_.new_PageSetupDialogData(*args, **kwargs) + def __init__(self, *args): + """ + __init__(self) -> PageSetupDialogData + __init__(self, PageSetupDialogData data) -> PageSetupDialogData + """ + newobj = _windows_.new_PageSetupDialogData(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown