X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2dda882546d1149fef8a7e907718ded5a38f014..969d9b6fa963c0f14298e0ec8aa88b6d6292a6f8:/wxPython/docs/xml/wxPython-metadata.xml diff --git a/wxPython/docs/xml/wxPython-metadata.xml b/wxPython/docs/xml/wxPython-metadata.xml index 8c0171e6e4..82f5edf3df 100644 --- a/wxPython/docs/xml/wxPython-metadata.xml +++ b/wxPython/docs/xml/wxPython-metadata.xml @@ -3361,6 +3361,13 @@ class PyOnDemandOutputWindow: EVT_CLOSE(self.frame, self.OnCloseWindow) + def OnCloseWindow(self, event): + if self.frame is not None: + self.frame.Destroy() + self.frame = None + self.text = None + + # These methods provide the file-like output behaviour. def write(self, text): """ @@ -3385,11 +3392,6 @@ class PyOnDemandOutputWindow: wx.CallAfter(self.frame.Close) - def OnCloseWindow(self, event): - if self.frame is not None: - self.frame.Destroy() - self.frame = None - self.text = None #---------------------------------------------------------------------- @@ -3463,7 +3465,7 @@ your Mac.""" self.RestoreStdio() - def RedirectStdio(self, filename): + def RedirectStdio(self, filename=None): """Redirect sys.stdout and sys.stderr to a file or a popup window.""" if filename: _sys.stdout = _sys.stderr = open(filename, 'a') @@ -3744,122 +3746,6 @@ appear on screen themselves. __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window Construct and show a generic Window. - - Styles - - wx.SIMPLE_BORDER: Displays a thin border around the window. - - wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only. - - wx.SUNKEN_BORDER: Displays a sunken border. - - wx.RAISED_BORDER: Displays a raised border. - - wx.STATIC_BORDER: Displays a border suitable for a static - control. Windows only. - - wx.NO_BORDER: Displays no border, overriding the default - border style for the window. - - wx.TRANSPARENT_WINDOW: The window is transparent, that is, it - will not receive paint events. Windows only. - - wx.TAB_TRAVERSAL: Use this to enable tab traversal for - non-dialog windows. - - wx.WANTS_CHARS: Use this to indicate that the window - wants to get all char/key events for - all keys - even for keys like TAB or - ENTER which are usually used for - dialog navigation and which wouldn't - be generated without this style. If - you need to use this style in order to - get the arrows or etc., but would - still like to have normal keyboard - navigation take place, you should - create and send a wxNavigationKeyEvent - in response to the key events for Tab - and Shift-Tab. - - wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window - completely when its size is changed - - you will have to repaint the new - window area manually if you use this - style. As of version 2.5.1 this - style is on by default. Use - wx.FULL_REPAINT_ON_RESIZE to - deactivate it. - - wx.VSCROLL: Use this style to enable a vertical scrollbar. - - wx.HSCROLL: Use this style to enable a horizontal scrollbar. - - wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them - instead of hiding them when they are - not needed (i.e. when the size of the - window is big enough to not require - the scrollbars to navigate it). This - style is currently only implemented - for wxMSW and wxUniversal and does - nothing on the other platforms. - - wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by - the background being repainted, then - children being painted over - them. Windows only. - - wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete - redraw of the window whenever it is - resized instead of redrawing just the - part of the window affected by - resizing. Note that this was the - behaviour by default before 2.5.1 - release and that if you experience - redraw problems with the code which - previously used to work you may want - to try this. - - Extra Styles - - wx.WS_EX_VALIDATE_RECURSIVELY: By default, - Validate/TransferDataTo/FromWindow() - only work on direct children of - the window (compatible - behaviour). Set this flag to make - them recursively descend into all - subwindows. - - wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the - derived classes are forwarded to - the parent window and so on - recursively by default. Using this - flag for the given window allows - to block this propagation at this - window, i.e. prevent the events - from being propagated further - upwards. Dialogs have this flag on - by default. - - wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for - the other windows: this must be - used with transient windows as - otherwise there is the risk of - creating a dialog/frame with this - window as a parent which would - lead to a crash if the parent is - destroyed before the child. - - wx.WS_EX_PROCESS_IDLE: This window should always process idle - events, even if the mode set by - wx.IdleEvent.SetMode is - wx.IDLE_PROCESS_SPECIFIED. - - wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI - update events, even if the mode - set by wxUpdateUIEvent::SetMode is - wxUPDATE_UI_PROCESS_SPECIFIED. - - @@ -3872,122 +3758,6 @@ appear on screen themselves. PreWindow() -> Window Precreate a Window for 2-phase creation. - - Styles - - wx.SIMPLE_BORDER: Displays a thin border around the window. - - wx.DOUBLE_BORDER: Displays a double border. Windows and Mac only. - - wx.SUNKEN_BORDER: Displays a sunken border. - - wx.RAISED_BORDER: Displays a raised border. - - wx.STATIC_BORDER: Displays a border suitable for a static - control. Windows only. - - wx.NO_BORDER: Displays no border, overriding the default - border style for the window. - - wx.TRANSPARENT_WINDOW: The window is transparent, that is, it - will not receive paint events. Windows only. - - wx.TAB_TRAVERSAL: Use this to enable tab traversal for - non-dialog windows. - - wx.WANTS_CHARS: Use this to indicate that the window - wants to get all char/key events for - all keys - even for keys like TAB or - ENTER which are usually used for - dialog navigation and which wouldn't - be generated without this style. If - you need to use this style in order to - get the arrows or etc., but would - still like to have normal keyboard - navigation take place, you should - create and send a wxNavigationKeyEvent - in response to the key events for Tab - and Shift-Tab. - - wx.NO_FULL_REPAINT_ON_RESIZE: Disables repainting the window - completely when its size is changed - - you will have to repaint the new - window area manually if you use this - style. As of version 2.5.1 this - style is on by default. Use - wx.FULL_REPAINT_ON_RESIZE to - deactivate it. - - wx.VSCROLL: Use this style to enable a vertical scrollbar. - - wx.HSCROLL: Use this style to enable a horizontal scrollbar. - - wx.ALWAYS_SHOW_SB: If a window has scrollbars, disable them - instead of hiding them when they are - not needed (i.e. when the size of the - window is big enough to not require - the scrollbars to navigate it). This - style is currently only implemented - for wxMSW and wxUniversal and does - nothing on the other platforms. - - wx.CLIP_CHILDREN: Use this style to eliminate flicker caused by - the background being repainted, then - children being painted over - them. Windows only. - - wx.FULL_REPAINT_ON_RESIZE: Use this style to force a complete - redraw of the window whenever it is - resized instead of redrawing just the - part of the window affected by - resizing. Note that this was the - behaviour by default before 2.5.1 - release and that if you experience - redraw problems with the code which - previously used to work you may want - to try this. - - Extra Styles - - wx.WS_EX_VALIDATE_RECURSIVELY: By default, - Validate/TransferDataTo/FromWindow() - only work on direct children of - the window (compatible - behaviour). Set this flag to make - them recursively descend into all - subwindows. - - wx.WS_EX_BLOCK_EVENTS: wx.CommandEvents and the objects of the - derived classes are forwarded to - the parent window and so on - recursively by default. Using this - flag for the given window allows - to block this propagation at this - window, i.e. prevent the events - from being propagated further - upwards. Dialogs have this flag on - by default. - - wx.WS_EX_TRANSIENT Don't use this window as an implicit parent for - the other windows: this must be - used with transient windows as - otherwise there is the risk of - creating a dialog/frame with this - window as a parent which would - lead to a crash if the parent is - destroyed before the child. - - wx.WS_EX_PROCESS_IDLE: This window should always process idle - events, even if the mode set by - wx.IdleEvent.SetMode is - wx.IDLE_PROCESS_SPECIFIED. - - wx.WS_EX_PROCESS_UI_UPDATES This window should always process UI - update events, even if the mode - set by wxUpdateUIEvent::SetMode is - wxUPDATE_UI_PROCESS_SPECIFIED. - - Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, @@ -4070,26 +3840,38 @@ has been added to the list of windows pending real deletion. GetLabel() -> String - Generic way of getting a label from any window, for identification -purposes. The interpretation of this function differs from class to -class. For frames and dialogs, the value returned is the title. For -buttons or static text controls, it is the button text. This function -can be useful for meta-programs (such as testing tools or -special-needs access programs) which need to identify windows by name. + Generic way of getting a label from any window, for +identification purposes. The interpretation of this function +differs from class to class. For frames and dialogs, the value +returned is the title. For buttons or static text controls, it is +the button text. This function can be useful for meta-programs +(such as testing tools or special-needs access programs) which +need to identify windows by name. SetName(String name) - Sets the window's name. The window name is used for ressource setting -in X, it is not the same as the window title/label + Sets the window's name. The window name is used for ressource +setting in X, it is not the same as the window title/label GetName() -> String - Returns the window's name. This name is not guaranteed to be unique; -it is up to the programmer to supply an appropriate name in the window -constructor or via wx.Window.SetName. + Returns the window's name. This name is not guaranteed to be +unique; it is up to the programmer to supply an appropriate name +in the window constructor or via wx.Window.SetName. + + + SetWindowVariant(int variant) + Sets the variant of the window/font size to use for this window, +if the platform supports variants, (for example, wxMac.) + + + + + + GetWindowVariant() -> int SetId(int winid) @@ -4887,9 +4669,10 @@ colour. Does not cause an erase background event to be generated. Freeze() - Freezes the window or, in other words, prevents any updates from -taking place on screen, the window is not redrawn at all. Thaw must be -called to reenable window redrawing. + Freezes the window or, in other words, prevents any updates from taking place +on screen, the window is not redrawn at all. Thaw must be called to reenable +window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw +being delayed until all the nesting has been undone. This method is useful for visual appearance optimization (for example, it is a good idea to use it before inserting large amount of text into @@ -4899,7 +4682,9 @@ mandatory directive. Thaw() - Reenables window updating after a previous call to Freeze. + Reenables window updating after a previous call to Freeze. Calls to +Freeze/Thaw may be nested, so Thaw must be called the same number of times +that Freeze was before the window will be updated. PrepareDC(DC dc) @@ -4942,8 +4727,8 @@ exposed. - - isExposedRect(Rect rect) -> bool + + IsExposedRect(Rect rect) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been @@ -5015,7 +4800,7 @@ be reset back to default. GetFont() -> Font - Returns a reference to the font for this window. + Returns the default font used for this window. SetCaret(Caret caret) @@ -5496,9 +5281,10 @@ hierarchy. The search is recursive in both cases. - Window_FromHWND(unsigned long hWnd) -> Window + Window_FromHWND(Window parent, unsigned long _hWnd) -> Window - + + @@ -7533,6 +7319,8 @@ try: except NameError: __builtins__.True = 1==1 __builtins__.False = 1==0 + def bool(value): return not not value + __builtins__.bool = bool @@ -7644,7 +7432,7 @@ def CallAfter(callable, *args, **kw): class FutureCall: """ - A convenience class for wxTimer, that calls the given callable + A convenience class for wx.Timer, that calls the given callable object once after the given amount of milliseconds, passing any positional or keyword args. The return value of the callable is availbale after it has been run with the GetResult method. @@ -7661,6 +7449,7 @@ class FutureCall: self.callable = callable self.SetArgs(*args, **kwargs) self.runCount = 0 + self.running = False self.hasRun = False self.result = None self.timer = None @@ -7682,6 +7471,7 @@ class FutureCall: self.Stop() self.timer = wx.PyTimer(self.Notify) self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) + self.running = True Restart = Start @@ -7728,9 +7518,12 @@ class FutureCall: """ if self.callable and getattr(self.callable, 'im_self', True): self.runCount += 1 + self.running = False self.result = self.callable(*self.args, **self.kwargs) self.hasRun = True - wx.CallAfter(self.Stop) + if not self.running: + # if it wasn't restarted, then cleanup + wx.CallAfter(self.Stop) #---------------------------------------------------------------------------- @@ -8250,6 +8043,18 @@ to the bitmap. This function preserves bit depth and mask information. + + __eq__(Bitmap other) -> bool + + + + + + __ne__(Bitmap other) -> bool + + + + This class encapsulates a monochrome mask bitmap, where the masked area is @@ -11259,11 +11064,11 @@ the borders, scrollbars, other decorations...) - CreateStatusBar(int number=1, long style=ST_SIZEGRIP, int winid=0, - String name=StatusLineNameStr) -> StatusBar + CreateStatusBar(int number=1, long style=wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + int winid=0, String name=StatusLineNameStr) -> StatusBar - + @@ -11514,11 +11319,12 @@ the borders, scrollbars, other decorations...) - __init__(Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> StatusBar + __init__(Window parent, int id=-1, long style=wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + String name=StatusLineNameStr) -> StatusBar - + @@ -11599,10 +11405,60 @@ the borders, scrollbars, other decorations...) #--------------------------------------------------------------------------- + wx.SplitterWindow manages up to two subwindows or panes, +with an optional vertical or horizontal split which can be +used with the mouse or programmatically. + + + Styles + wx.SP_3D Draws a 3D effect border and sash. + wx.SP_3DSASH Draws a 3D effect sash. + wx.SP_3DBORDER Synonym for wxSP_BORDER. + wx.SP_BORDER Draws a standard border. + wx.SP_NOBORDER No border (default). + wx.SP_NO_XP_THEME Under Windows XP, switches off the + attempt to draw the splitter + using Windows XP theming, so the + borders and sash will take on the + pre-XP look. + wx.SP_PERMIT_UNSPLIT Always allow to unsplit, even with + the minimum pane size other than zero. + wx.SP_LIVE_UPDATE Don't draw XOR line but resize the + child windows immediately. + + Events + + EVT_SPLITTER_SASH_POS_CHANGING + The sash position is in the + process of being changed. May be + used to modify the position of + the tracking bar to properly + reflect the position that would + be set if the drag were to be + completed at this point. + + EVT_SPLITTER_SASH_POS_CHANGED + The sash position was + changed. May be used to modify + the sash position before it is + set, or to prevent the change + from taking place. + + EVT_SPLITTER_UNSPLIT The splitter has been just unsplit. + + EVT_SPLITTER_DCLICK The sash was double clicked. The + default behaviour is to unsplit + the window when this happens + (unless the minimum pane size has + been set to a value greater than + zero.) + + __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow + Constructor. Creates and shows a SplitterWindow. @@ -11614,10 +11470,12 @@ the borders, scrollbars, other decorations...) PreSplitterWindow() -> SplitterWindow + Precreate a SplitterWindow for 2-phase creation. Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> bool + Create the GUI part of the SplitterWindow for the 2-phase create. @@ -11629,27 +11487,55 @@ the borders, scrollbars, other decorations...) GetWindow1() -> Window + Gets the only or left/top pane. GetWindow2() -> Window + Gets the right/bottom pane. SetSplitMode(int mode) + Sets the split mode. The mode can be wx.SPLIT_VERTICAL or +wx.SPLIT_HORIZONTAL. This only sets the internal variable; +does not update the display. GetSplitMode() -> int + Gets the split mode Initialize(Window window) + Initializes the splitter window to have one pane. This +should be called if you wish to initially view only a single +pane in the splitter window. SplitVertically(Window window1, Window window2, int sashPosition=0) -> bool + Initializes the left and right panes of the splitter window. + + window1 The left pane. + window2 The right pane. + sashPosition The initial position of the sash. If this + value is positive, it specifies the size + of the left pane. If it is negative, it is + absolute value gives the size of the right + pane. Finally, specify 0 (default) to + choose the default position (half of the + total window width). + +Returns True if successful, False otherwise (the window was +already split). + +SplitVertically should be called if you wish to initially +view two panes. It can also be called at any subsequent +time, but the application should check that the window is +not currently split using IsSplit. @@ -11658,6 +11544,25 @@ the borders, scrollbars, other decorations...) SplitHorizontally(Window window1, Window window2, int sashPosition=0) -> bool + Initializes the top and bottom panes of the splitter window. + + window1 The top pane. + window2 The bottom pane. + sashPosition The initial position of the sash. If this + value is positive, it specifies the size + of the upper pane. If it is negative, it + is absolute value gives the size of the + lower pane. Finally, specify 0 (default) + to choose the default position (half of + the total window height). + +Returns True if successful, False otherwise (the window was +already split). + +SplitHorizontally should be called if you wish to initially +view two panes. It can also be called at any subsequent +time, but the application should check that the window is +not currently split using IsSplit. @@ -11666,40 +11571,81 @@ the borders, scrollbars, other decorations...) Unsplit(Window toRemove=None) -> bool + Unsplits the window. Pass the pane to remove, or None to +remove the right or bottom pane. Returns True if +successful, False otherwise (the window was not split). + +This function will not actually delete the pane being +removed; it sends EVT_SPLITTER_UNSPLIT which can be handled +for the desired behaviour. By default, the pane being +removed is only hidden. ReplaceWindow(Window winOld, Window winNew) -> bool + This function replaces one of the windows managed by the +SplitterWindow with another one. It is in general better to +use it instead of calling Unsplit() and then resplitting the +window back because it will provoke much less flicker. It is +valid to call this function whether the splitter has two +windows or only one. + +Both parameters should be non-None and winOld must specify +one of the windows managed by the splitter. If the +parameters are incorrect or the window couldn't be replaced, +False is returned. Otherwise the function will return True, +but please notice that it will not Destroy the replaced +window and you may wish to do it yourself. + + UpdateSize() + Causes any pending sizing of the sash and child panes to +take place immediately. + +Such resizing normally takes place in idle time, in order to +wait for layout to be completed. However, this can cause +unacceptable flicker as the panes are resized after the +window has been shown. To work around this, you can perform +window layout (for example by sending a size event to the +parent window), and then call this function, before showing +the top-level window. + IsSplit() -> bool + Is the window split? SetSashSize(int width) + Sets the sash size SetBorderSize(int width) + Sets the border size GetSashSize() -> int + Gets the sash size GetBorderSize() -> int + Gets the border size SetSashPosition(int position, bool redraw=True) + Sets the sash position, in pixels. If redraw is Ttrue then +the panes are resized and the sash and border are redrawn. @@ -11707,18 +11653,30 @@ the borders, scrollbars, other decorations...) GetSashPosition() -> int + Returns the surrent sash position. SetMinimumPaneSize(int min) + Sets the minimum pane size in pixels. + +The default minimum pane size is zero, which means that +either pane can be reduced to zero by dragging the sash, +thus removing one of the panes. To prevent this behaviour (and +veto out-of-range sash dragging), set a minimum size, +for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is +used when a splitter window is created, the window may be +unsplit even if minimum size is non-zero. GetMinimumPaneSize() -> int + Gets the minimum pane size in pixels. SashHitTest(int x, int y, int tolerance=5) -> bool + Tests for x, y over the sash @@ -11727,6 +11685,7 @@ the borders, scrollbars, other decorations...) SizeWindows() + Resizes subwindows SetNeedUpdating(bool needUpdating) @@ -11739,9 +11698,11 @@ the borders, scrollbars, other decorations...) + This class represents the events generated by a splitter control. __init__(wxEventType type=wxEVT_NULL, SplitterWindow splitter=(wxSplitterWindow *) NULL) -> SplitterEvent + This class represents the events generated by a splitter control. @@ -11749,21 +11710,38 @@ the borders, scrollbars, other decorations...) SetSashPosition(int pos) + This funciton is only meaningful during +EVT_SPLITTER_SASH_POS_CHANGING and +EVT_SPLITTER_SASH_POS_CHANGED events. In the case of +_CHANGED events, sets the the new sash position. In the case +of _CHANGING events, sets the new tracking bar position so +visual feedback during dragging will represent that change +that will actually take place. Set to -1 from the event +handler code to prevent repositioning. GetSashPosition() -> int + Returns the new sash position while in +EVT_SPLITTER_SASH_POS_CHANGING and +EVT_SPLITTER_SASH_POS_CHANGED events. GetWindowBeingRemoved() -> Window + Returns a pointer to the window being removed when a +splitter window is unsplit. GetX() -> int + Returns the x coordinate of the double-click point in a +EVT_SPLITTER_DCLICK event. GetY() -> int + Returns the y coordinate of the double-click point in a +EVT_SPLITTER_DCLICK event. @@ -11771,6 +11749,7 @@ EVT_SPLITTER_SASH_POS_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_SASH_PO EVT_SPLITTER_SASH_POS_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 1 ) EVT_SPLITTER_DOUBLECLICKED = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 1 ) EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 ) +EVT_SPLITTER_DCLICK = EVT_SPLITTER_DOUBLECLICKED #--------------------------------------------------------------------------- @@ -12650,12 +12629,6 @@ will be copied to the colour dialog's internal ColourData instance. Point pos=DefaultPosition, Size size=DefaultSize, String name=DirDialogNameStr) -> DirDialog Constructor. Use ShowModal method to show the dialog. - - Styles - wxDD_NEW_DIR_BUTTON Add "Create new directory" button and allow - directory names to be editable. On Windows the new - directory button is only available with recent - versions of the common dialogs. @@ -12735,39 +12708,6 @@ for each, such as: String wildcard=FileSelectorDefaultWildcardStr, long style=0, Point pos=DefaultPosition) -> FileDialog Constructor. Use ShowModal method to show the dialog. - -In Windows, this is the common file selector dialog. In X, this is a file -selector box with somewhat less functionality. The path and filename are -distinct elements of a full file pathname. If path is "", the current -directory will be used. If filename is "", no default filename will be -supplied. The wildcard determines what files are displayed in the file -selector, and file extension supplies a type extension for the required -filename. - -Both the X and Windows versions implement a wildcard filter. Typing a filename -containing wildcards (*, ?) in the filename text item, and clicking on Ok, -will result in only those files matching the pattern being displayed. The -wildcard may be a specification for multiple types of file with a description -for each, such as: - - "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" - - Styles - wx.OPEN This is an open dialog. - - wx.SAVE This is a save dialog. - - wx.HIDE_READONLY For open dialog only: hide the checkbox allowing to - open the file in read-only mode. - - wx.OVERWRITE_PROMPT For save dialog only: prompt for a confirmation if a - file will be overwritten. - - wx.MULTIPLE For open dialog only: allows selecting multiple files. - - wx.CHANGE_DIR Change the current working directory to the directory - where the file(s) chosen by the user are. - @@ -13112,30 +13052,6 @@ a choice of OK, Yes, No and Cancel buttons. Point pos=DefaultPosition) -> MessageDialog This class provides a dialog that shows a single or multi-line message, with a choice of OK, Yes, No and Cancel buttons. - - Styles - wx.OK: Show an OK button. - - wx.CANCEL: Show a Cancel button. - - wx.YES_NO: Show Yes and No buttons. - - wx.YES_DEFAULT: Used with wxYES_NO, makes Yes button the default - which is the default behaviour. - - wx.NO_DEFAULT: Used with wxYES_NO, makes No button the default. - - wx.ICON_EXCLAMATION: Shows an exclamation mark icon. - - wx.ICON_HAND: Shows an error icon. - - wx.ICON_ERROR: Shows an error icon - the same as wxICON_HAND. - - wx.ICON_QUESTION: Shows a question mark icon. - - wx.ICON_INFORMATION: Shows an information (i) icon. - - wx.STAY_ON_TOP: The message box stays on top of all other window, even those of the other applications (Windows only). - @@ -13180,32 +13096,6 @@ display an ABORT button. int style=wxPD_AUTO_HIDE|wxPD_APP_MODAL) -> ProgressDialog Constructor. Creates the dialog, displays it and disables user input for other windows, or, if wxPD_APP_MODAL flag is not given, for its parent window only. - - Styles - - wx.PD_APP_MODAL: Make the progress dialog modal. If this flag is - not given, it is only "locally" modal - that is - the input to the parent window is disabled, - but not to the other ones. - - wx.PD_AUTO_HIDE: Causes the progress dialog to disappear from screen - as soon as the maximum value of the progress - meter has been reached. - - wx.PD_CAN_ABORT: This flag tells the dialog that it should have - a "Cancel" button which the user may press. If - this happens, the next call to Update() will - return false. - - wx.PD_ELAPSED_TIME: This flag tells the dialog that it should show - elapsed time (since creating the dialog). - - wx.PD_ESTIMATED_TIME: This flag tells the dialog that it should show - estimated time. - - wx.PD_REMAINING_TIME: This flag tells the dialog that it should show - remaining time. - @@ -13382,16 +13272,6 @@ implementation, modeless. int style=0) -> FindReplaceDialog Create a FindReplaceDialog. The parent and data parameters must be non-None. Use Show to display the dialog. - - Styles - wx.FR_REPLACEDIALOG: replace dialog (otherwise find dialog) - - wx.FR_NOUPDOWN: don't allow changing the search direction - - wx.FR_NOMATCHCASE: don't allow case sensitive searching - - wx.FR_NOWHOLEWORD: don't allow whole word searching - @@ -13402,16 +13282,6 @@ non-None. Use Show to display the dialog. PreFindReplaceDialog() -> FindReplaceDialog Precreate a FindReplaceDialog for 2-phase creation - - Styles - wx.FR_REPLACEDIALOG: replace dialog (otherwise find dialog) - - wx.FR_NOUPDOWN: don't allow changing the search direction - - wx.FR_NOMATCHCASE: don't allow case sensitive searching - - wx.FR_NOWHOLEWORD: don't allow whole word searching - Create(Window parent, FindReplaceData data, String title, @@ -14161,8 +14031,13 @@ non-None. Use Show to display the dialog. - - __init__() -> PrintDialogData + + + __init__() -> PrintDialogData +__init__(PrintData printData) -> PrintDialogData + + + __del__() @@ -14599,12 +14474,20 @@ non-None. Use Show to display the dialog. - - __init__(Printout printout, Printout printoutForPrinting, PrintData data=None) -> PrintPreview + + + + + + + + + __init__(Printout printout, Printout printoutForPrinting, PrintDialogData data=None) -> PrintPreview +__init__(Printout printout, Printout printoutForPrinting, PrintData data) -> PrintPreview - + @@ -14711,12 +14594,20 @@ non-None. Use Show to display the dialog. - - __init__(Printout printout, Printout printoutForPrinting, PrintData data=None) -> PyPrintPreview + + + + + + + + + __init__(Printout printout, Printout printoutForPrinting, PrintDialogData data=None) -> PyPrintPreview +__init__(Printout printout, Printout printoutForPrinting, PrintData data) -> PyPrintPreview - + @@ -14926,6 +14817,23 @@ single bitmap, and wxWindows will draw all button states using this bitmap. If the application needs more control, additional bitmaps for the selected state, unpressed focused state, and greyed-out state may be supplied. + + Styles + wx.BU_AUTODRAW: If this is specified, the button will be drawn + automatically using the label bitmap only, providing a + 3D-look border. If this style is not specified, the button + will be drawn without borders and using all provided + bitmaps. WIN32 only. + wx.BU_LEFT: Left-justifies the label. WIN32 only. + wx.BU_TOP: Aligns the label to the top of the button. WIN32 only. + wx.BU_RIGHT: Right-justifies the bitmap label. WIN32 only. + wx.BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. + wx.BU_EXACTFIT: Creates the button as small as possible instead of making + it of the standard size (which is the default behaviour.) + + Events + EVT_BUTTON: Sent when the button is clicked. + __init__(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, @@ -15052,20 +14960,6 @@ state. Often this is used as a "Does Not Apply" state. Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox Creates and shows a CheckBox control - - Styles - wx.CHK_2STATE: Create a 2-state checkbox. This is the default. - wx.CHK_3STATE: Create a 3-state checkbox. - wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state - checkbox to the third state. It can only - be done from code. Using this flags - allows the user to set the checkbox to - the third state by clicking. - wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox. - - Events - EVT_CHECKBOX: Sent when checkbox is clicked. - @@ -15080,20 +14974,6 @@ state. Often this is used as a "Does Not Apply" state. PreCheckBox() -> CheckBox Precreate a CheckBox for 2-phase creation. - - Styles - wx.CHK_2STATE: Create a 2-state checkbox. This is the default. - wx.CHK_3STATE: Create a 3-state checkbox. - wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state - checkbox to the third state. It can only - be done from code. Using this flags - allows the user to set the checkbox to - the third state by clicking. - wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox. - - Events - EVT_CHECKBOX: Sent when checkbox is clicked. - Create(Window parent, int id, String label, Point pos=DefaultPosition, @@ -15170,10 +15050,6 @@ only the selection is visible until the user pulls down the menu of choices. Create and show a Choice control - - Events - EVT_CHOICE: Sent when an item in the list is selected. - @@ -15188,10 +15064,6 @@ only the selection is visible until the user pulls down the menu of choices. PreChoice() -> Choice Precreate a Choice control for 2-phase creation. - - Events - EVT_CHOICE: Sent when an item in the list is selected. - Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, @@ -15266,25 +15138,6 @@ list with text field. List choices=[], long style=0, Validator validator=DefaultValidator, String name=ComboBoxNameStr) -> ComboBox Constructor, creates and shows a ComboBox control. - - Styles - wx.CB_SIMPLE: Creates a combobox with a permanently displayed list. - Windows only. - - wx.CB_DROPDOWN: Creates a combobox with a drop-down list. - - wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as - the combobox choices can be selected, it is impossible - to select (even from a program) a string which is not in - the choices list. - - wx.CB_SORT: Sorts the entries in the list alphabetically. - - Events - - EVT_COMBOBOX: Sent when an item on the list is selected. - EVT_TEXT: Sent when the combobox text changes. - @@ -15300,25 +15153,6 @@ list with text field. PreComboBox() -> ComboBox Precreate a ComboBox control for 2-phase creation. - - Styles - wx.CB_SIMPLE: Creates a combobox with a permanently displayed list. - Windows only. - - wx.CB_DROPDOWN: Creates a combobox with a drop-down list. - - wx.CB_READONLY: Same as wxCB_DROPDOWN but only the strings specified as - the combobox choices can be selected, it is impossible - to select (even from a program) a string which is not in - the choices list. - - wx.CB_SORT: Sorts the entries in the list alphabetically. - - Events - - EVT_COMBOBOX: Sent when an item on the list is selected. - EVT_TEXT: Sent when the combobox text changes. - Create(Window parent, int id, String value=EmptyString, @@ -17108,11 +16942,11 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=NOTEBOOK_NAME) -> Notebook + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> Notebook - + @@ -17219,11 +17053,11 @@ class NotebookPage(wx.Panel): - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=EmptyString) -> Listbook + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=EmptyString) -> Listbook - + @@ -18065,30 +17899,13 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED - SetForegroundColour(Colour col) -> bool - Sets the foreground colour of the window. Returns True is the colour -was changed. The interpretation of foreground colour is dependent on -the window class; it may be the text colour or other colour, or it may -not be used at all. - - - - - - SetBackgroundColour(Colour col) -> bool - Sets the background colour of the window. Returns True if the colour -was changed. The background colour is usually painted by the default -EVT_ERASE_BACKGROUND event handler function under Windows and -automatically under GTK. - -Note that setting the background colour does not cause an immediate -refresh, so you may wish to call ClearBackground or Refresh after -calling this function. - -Use this function with care under GTK+ as the new appearance of the -window might not look equally well when used with themes, i.e GTK+'s -ability to change its look as the user wishes with run-time loadable -modules. + SetForegroundColour(Colour col) -> bool + + + + + + SetBackgroundColour(Colour col) -> bool @@ -18291,6 +18108,9 @@ after changing the others for the change to take place immediately. + + InReportView() -> bool + IsVirtual() -> bool @@ -20602,10 +20422,11 @@ associated with the control (if any) in a tooltip. __del__() - _setCallbackInfo(PyObject self, PyObject _class) + _setCallbackInfo(PyObject self, PyObject _class, int incref=1) + @@ -20638,7 +20459,7 @@ associated with the control (if any) in a tooltip. GetId() -> int - + # For backwards compatibility with 2.4 class PyTimer(Timer): def __init__(self, notify): @@ -20651,7 +20472,7 @@ class PyTimer(Timer): EVT_TIMER = wx.PyEventBinder( wxEVT_TIMER, 1 ) - + @@ -21700,18 +21521,19 @@ classes. It can not be used by itself (it is an abstract base class) and you will always use one of its derivations: wx.Config or wx.FileConfig. -wx.ConfigBase organizes the items in a tree-like structure -(modeled after the Unix/Dos filesystem). There are groups -(directories) and keys (files). There is always one current -group given by the current path. As in the file system case, to -specify a key in the config class you must use a path to it. -Config classes also support the notion of the current group, -which makes it possible to use relative paths. - -Keys are pairs "key_name = value" where value may be of string, integer -floating point or boolean, you can not store binary data without first -encoding it as a string. For performance reasons items should be kept small, -no more than a couple kilobytes. +wx.ConfigBase organizes the items in a tree-like structure, +modeled after the Unix/Dos filesystem. There are groups that act +like directories and entries, key/value pairs that act like +files. There is always one current group given by the current +path. As in the file system case, to specify a key in the config +class you must use a path to it. Config classes also support the +notion of the current group, which makes it possible to use +relative paths. + +Keys are pairs "key_name = value" where value may be of string, +integer floating point or boolean, you can not store binary data +without first encoding it as a string. For performance reasons +items should be kept small, no more than a couple kilobytes. __del__() @@ -22007,13 +21829,13 @@ and will be a wx.FileConfig on other platforms. __init__(String appName=EmptyString, String vendorName=EmptyString, String localFilename=EmptyString, String globalFilename=EmptyString, - long style=0) -> Config + long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> Config - + @@ -22026,13 +21848,13 @@ and will be a wx.FileConfig on other platforms. __init__(String appName=EmptyString, String vendorName=EmptyString, String localFilename=EmptyString, String globalFilename=EmptyString, - long style=0) -> FileConfig + long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> FileConfig - + @@ -23791,6 +23613,151 @@ the locker is destroyed. successfully opened. + +#--------------------------------------------------------------------------- + + + A simple struct containing video mode parameters for a display + + __init__(int width=0, int height=0, int depth=0, int freq=0) -> VideoMode + A simple struct containing video mode parameters for a display + + + + + + + + + __del__() + + + Matches(VideoMode other) -> bool + Returns true if this mode matches the other one in the sense that +all non zero fields of the other mode have the same value in this +one (except for refresh which is allowed to have a greater value) + + + + + + GetWidth() -> int + Returns the screen width in pixels (e.g. 640*480), 0 means +unspecified + + + GetHeight() -> int + Returns the screen width in pixels (e.g. 640*480), 0 means +unspecified + + + GetDepth() -> int + Returns the screen's bits per pixel (e.g. 32), 1 is monochrome +and 0 means unspecified/known + + + IsOk() -> bool + returns true if the object has been initialized + + + __eq__(VideoMode other) -> bool + + + + + + __ne__(VideoMode other) -> bool + + + + + + + + + + + Represents a display/monitor attached to the system + + __init__(size_t 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 and the only one which is always supported + + + + + + __del__() + + + GetCount() -> size_t + Return the number of available displays. + + + GetFromPoint(Point pt) -> int + Find the display where the given point lies, return wx.NOT_FOUND +if it doesn't belong to any display + + + + + + GetFromWindow(Window window) -> int + Find the display where the given window lies, return wx.NOT_FOUND +if it is not shown at all. + + + + + + IsOk() -> bool + Return true if the object was initialized successfully + + + GetGeometry() -> Rect + Returns the bounding rectangle of the display whose index was +passed to the constructor. + + + GetName() -> String + Returns the display's name. A name is not available on all platforms. + + + IsPrimary() -> bool + Returns true if the display is the primary display. The primary +display is the one whose index is 0. + + + GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...] + Enumerate all video modes supported by this display matching the +given one (in the sense of VideoMode.Match()). + +As any mode matches the default value of the argument and there +is always at least one video mode supported by display, the +returned array is only empty for the default value of the +argument if this function is not supported at all on this +platform. + + + + + + GetCurrentMode() -> VideoMode + Get the current video mode. + + + ChangeMode(VideoMode mode=DefaultVideoMode) -> bool + Change current mode, return true if succeeded, false otherwise + + + + + + ResetMode() + Restore the default video mode (just a more readable synonym) + + @@ -23972,52 +23939,6 @@ EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED event. long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS, String name=CalendarNameStr) -> CalendarCtrl Create and show a calendar control. - The CalendarCtrl displays a window containing several parts: the control to -pick the month and the year at the top (either or both of them may be -disabled) and a month area below them which shows all the days in the -month. The user can move the current selection using the keyboard and select -the date (generating EVT_CALENDAR event) by pressing <Return> or double -clicking it. - -It has advanced possibilities for the customization of its display. All global -settings (such as colours and fonts used) can, of course, be changed. But -also, the display style for each day in the month can be set independently -using CalendarDateAttr class. - -An item without custom attributes is drawn with the default colours and font -and without border, but setting custom attributes with SetAttr allows to -modify its appearance. Just create a custom attribute object and set it for -the day you want to be displayed specially A day may be marked as being a -holiday, (even if it is not recognized as one by wx.DateTime) by using the -SetHoliday method. - -As the attributes are specified for each day, they may change when the month -is changed, so you will often want to update them in an EVT_CALENDAR_MONTH -event handler. - - Styles - CAL_SUNDAY_FIRST: Show Sunday as the first day in the week - CAL_MONDAY_FIRST: Show Monday as the first day in the week - CAL_SHOW_HOLIDAYS: Highlight holidays in the calendar - CAL_NO_YEAR_CHANGE: Disable the year changing - CAL_NO_MONTH_CHANGE: Disable the month (and, implicitly, the year) changing - CAL_SHOW_SURROUNDING_WEEKS: Show the neighbouring weeks in the previous and next months - CAL_SEQUENTIAL_MONTH_SELECTION: Use alternative, more compact, style for the month and year selection controls. - -The default calendar style is wxCAL_SHOW_HOLIDAYS. - - Events - EVT_CALENDAR: A day was double clicked in the calendar. - EVT_CALENDAR_SEL_CHANGED: The selected date changed. - EVT_CALENDAR_DAY: The selected day changed. - EVT_CALENDAR_MONTH: The selected month changed. - EVT_CALENDAR_YEAR: The selected year changed. - EVT_CALENDAR_WEEKDAY_CLICKED: User clicked on the week day header - -Note that changing the selected date will result in either of -EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED event. - - @@ -24031,52 +23952,6 @@ EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED event. PreCalendarCtrl() -> CalendarCtrl Precreate a CalendarCtrl for 2-phase creation. - The CalendarCtrl displays a window containing several parts: the control to -pick the month and the year at the top (either or both of them may be -disabled) and a month area below them which shows all the days in the -month. The user can move the current selection using the keyboard and select -the date (generating EVT_CALENDAR event) by pressing <Return> or double -clicking it. - -It has advanced possibilities for the customization of its display. All global -settings (such as colours and fonts used) can, of course, be changed. But -also, the display style for each day in the month can be set independently -using CalendarDateAttr class. - -An item without custom attributes is drawn with the default colours and font -and without border, but setting custom attributes with SetAttr allows to -modify its appearance. Just create a custom attribute object and set it for -the day you want to be displayed specially A day may be marked as being a -holiday, (even if it is not recognized as one by wx.DateTime) by using the -SetHoliday method. - -As the attributes are specified for each day, they may change when the month -is changed, so you will often want to update them in an EVT_CALENDAR_MONTH -event handler. - - Styles - CAL_SUNDAY_FIRST: Show Sunday as the first day in the week - CAL_MONDAY_FIRST: Show Monday as the first day in the week - CAL_SHOW_HOLIDAYS: Highlight holidays in the calendar - CAL_NO_YEAR_CHANGE: Disable the year changing - CAL_NO_MONTH_CHANGE: Disable the month (and, implicitly, the year) changing - CAL_SHOW_SURROUNDING_WEEKS: Show the neighbouring weeks in the previous and next months - CAL_SEQUENTIAL_MONTH_SELECTION: Use alternative, more compact, style for the month and year selection controls. - -The default calendar style is wxCAL_SHOW_HOLIDAYS. - - Events - EVT_CALENDAR: A day was double clicked in the calendar. - EVT_CALENDAR_SEL_CHANGED: The selected date changed. - EVT_CALENDAR_DAY: The selected day changed. - EVT_CALENDAR_MONTH: The selected month changed. - EVT_CALENDAR_YEAR: The selected year changed. - EVT_CALENDAR_WEEKDAY_CLICKED: User clicked on the week day header - -Note that changing the selected date will result in either of -EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED event. - - Create(Window parent, int id, DateTime date=DefaultDateTime, @@ -25543,16 +25418,6 @@ validity of the remaining two values. The result codes are: ForceRefresh() - - Refresh(bool eraseb=True, Rect rect=None) - Mark the specified rectangle (or the whole window) as "dirty" so it -will be repainted. Causes an EVT_PAINT event to be generated and sent -to the window. - - - - - IsEditable() -> bool @@ -27158,6 +27023,9 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) GetDescent() -> int + + GetMaxTotalWidth() -> int + GetId() -> String @@ -27551,7 +27419,6 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) SetTitle(String title) - Sets the window's title. Applicable only to frames and dialogs. @@ -35738,9 +35605,148 @@ ControlPoint = PyControlPoint + + LineDown() + This is just a wrapper for ScrollLines(1). + + + LineDownExtend() + + + LineUp() + This is just a wrapper for ScrollLines(-1). + + + LineUpExtend() + + + CharLeft() + + + CharLeftExtend() + + + CharRight() + + + CharRightExtend() + + + WordLeft() + + + WordLeftExtend() + + + WordRight() + + + WordRightExtend() + + + Home() + + + HomeExtend() + + + LineEnd() + + + LineEndExtend() + + + DocumentStart() + + + DocumentStartExtend() + + + DocumentEnd() + + + DocumentEndExtend() + + + PageUp() + This is just a wrapper for ScrollPages(-1). + + + PageUpExtend() + + + PageDown() + This is just a wrapper for ScrollPages(1). + + + PageDownExtend() + + + EditToggleOvertype() + + + Cancel() + + + DeleteBack() + + + Tab() + + + BackTab() + + + NewLine() + + + FormFeed() + + + VCHome() + + + VCHomeExtend() + + + ZoomIn() + + + ZoomOut() + + + DelWordLeft() + + + DelWordRight() + + + LineCut() + + + LineDelete() + + + LineTranspose() + LineDuplicate() + + LowerCase() + + + UpperCase() + + + LineScrollDown() + + + LineScrollUp() + + + DeleteBackNotLine() + HomeDisplay() @@ -35753,6 +35759,24 @@ ControlPoint = PyControlPoint LineEndDisplayExtend() + + HomeWrap() + + + HomeWrapExtend() + + + LineEndWrap() + + + LineEndWrapExtend() + + + VCHomeWrap() + + + VCHomeWrapExtend() + LineCopy() @@ -36022,6 +36046,18 @@ ControlPoint = PyControlPoint + + ParaDown() + + + ParaDownExtend() + + + ParaUp() + + + ParaUpExtend() + PositionBefore(int pos) -> int @@ -36069,6 +36105,57 @@ ControlPoint = PyControlPoint + + LineDownRectExtend() + + + LineUpRectExtend() + + + CharLeftRectExtend() + + + CharRightRectExtend() + + + HomeRectExtend() + + + VCHomeRectExtend() + + + LineEndRectExtend() + + + PageUpRectExtend() + + + PageDownRectExtend() + + + StutteredPageUp() + + + StutteredPageUpExtend() + + + StutteredPageDown() + + + StutteredPageDownExtend() + + + WordLeftEnd() + + + WordLeftEndExtend() + + + WordRightEnd() + + + WordRightEndExtend() + SetWhitespaceChars(String characters)