X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/caef1a4da61f682659a1a17a68374574ba26afc9..03837c5c878d3e612e9c80dc46f37def0a0835d9:/wxPython/src/msw/_windows.py?ds=sidebyside diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index a1c2f721c4..7500a332fa 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -27,8 +27,6 @@ class Panel(_core.Window): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.Panel_Create(*args, **kwargs) @@ -112,8 +110,6 @@ class ScrolledWindow(Panel): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.ScrolledWindow_Create(*args, **kwargs) @@ -141,7 +137,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 +149,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 +210,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 @@ -373,9 +385,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 @@ -385,9 +397,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) @@ -533,9 +545,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 @@ -545,9 +557,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) @@ -597,6 +609,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): @@ -635,9 +650,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 @@ -647,9 +662,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) @@ -710,7 +725,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) @@ -741,6 +756,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,) @@ -753,7 +771,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): @@ -784,6 +802,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) @@ -1264,8 +1286,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) @@ -1276,8 +1298,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) @@ -1534,8 +1556,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) @@ -1546,8 +1568,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) @@ -1889,11 +1911,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): @@ -2150,7 +2172,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) @@ -2178,7 +2200,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) @@ -2490,7 +2512,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): @@ -2847,8 +2874,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 @@ -3135,8 +3164,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) @@ -3147,8 +3177,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) @@ -3216,8 +3247,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) @@ -3228,8 +3260,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) @@ -3296,8 +3329,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 @@ -3416,8 +3449,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 @@ -3536,8 +3569,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 @@ -3661,9 +3694,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 @@ -3859,9 +3895,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