X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cff531b1a85a05ea1cec6e13a543ddd6a7fb0ab3..64ff2615ae052f1d698d52f0e7df5497176eac79:/wxPython/docs/xml/wxPython-metadata.xml?ds=sidebyside diff --git a/wxPython/docs/xml/wxPython-metadata.xml b/wxPython/docs/xml/wxPython-metadata.xml index 0c7460d458..8c0171e6e4 100644 --- a/wxPython/docs/xml/wxPython-metadata.xml +++ b/wxPython/docs/xml/wxPython-metadata.xml @@ -890,16 +890,16 @@ it is moved to the left or top respectively. FindNext() -> String - FileSystem.AddHandler(CPPFileSystemHandler handler) + AddHandler(CPPFileSystemHandler handler) - FileSystem.CleanUpHandlers() + CleanUpHandlers() - FileSystem.FileNameToURL(String filename) -> String + FileNameToURL(String filename) -> String @@ -998,7 +998,7 @@ def MemoryFSHandler_AddFile(filename, a, b=''): __init__() -> MemoryFSHandler - MemoryFSHandler.RemoveFile(String filename) + RemoveFile(String filename) @@ -1080,7 +1080,7 @@ def MemoryFSHandler_AddFile(filename, a, b=''): __init__() -> ImageHistogram - ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long + MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long Get the key in the histogram for the given RGB values @@ -1267,13 +1267,13 @@ values. - Image.CanRead(String name) -> bool + CanRead(String name) -> bool - Image.GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int + GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int @@ -1310,7 +1310,7 @@ values. - Image.CanReadStream(InputStream stream) -> bool + CanReadStream(InputStream stream) -> bool @@ -1506,25 +1506,25 @@ values. - Image.AddHandler(ImageHandler handler) + AddHandler(ImageHandler handler) - Image.InsertHandler(ImageHandler handler) + InsertHandler(ImageHandler handler) - Image.RemoveHandler(String name) -> bool + RemoveHandler(String name) -> bool - Image.GetImageExtWildcard() -> String + GetImageExtWildcard() -> String ConvertToBitmap() -> Bitmap @@ -2761,31 +2761,31 @@ EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) - UpdateUIEvent.SetUpdateInterval(long updateInterval) + SetUpdateInterval(long updateInterval) - UpdateUIEvent.GetUpdateInterval() -> long + GetUpdateInterval() -> long - UpdateUIEvent.CanUpdate(Window win) -> bool + CanUpdate(Window win) -> bool - UpdateUIEvent.ResetUpdateTime() + ResetUpdateTime() - UpdateUIEvent.SetMode(int mode) + SetMode(int mode) - UpdateUIEvent.GetMode() -> int + GetMode() -> int @@ -2968,16 +2968,16 @@ EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) MoreRequested() -> bool - IdleEvent.SetMode(int mode) + SetMode(int mode) - IdleEvent.GetMode() -> int + GetMode() -> int - IdleEvent.CanSend(Window win) -> bool + CanSend(Window win) -> bool @@ -3037,6 +3037,7 @@ EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) __init__() -> PyApp + Create a new application object, starting the bootstrap process. __del__() @@ -3227,46 +3228,46 @@ may be or'd together: Get the current OnAssert behaviour setting. - PyApp.GetMacSupportPCMenuShortcuts() -> bool + GetMacSupportPCMenuShortcuts() -> bool - PyApp.GetMacAboutMenuItemId() -> long + GetMacAboutMenuItemId() -> long - PyApp.GetMacPreferencesMenuItemId() -> long + GetMacPreferencesMenuItemId() -> long - PyApp.GetMacExitMenuItemId() -> long + GetMacExitMenuItemId() -> long - PyApp.GetMacHelpMenuTitleName() -> String + GetMacHelpMenuTitleName() -> String - PyApp.SetMacSupportPCMenuShortcuts(bool val) + SetMacSupportPCMenuShortcuts(bool val) - PyApp.SetMacAboutMenuItemId(long val) + SetMacAboutMenuItemId(long val) - PyApp.SetMacPreferencesMenuItemId(long val) + SetMacPreferencesMenuItemId(long val) - PyApp.SetMacExitMenuItemId(long val) + SetMacExitMenuItemId(long val) - PyApp.SetMacHelpMenuTitleName(String val) + SetMacHelpMenuTitleName(String val) @@ -3276,7 +3277,7 @@ may be or'd together: For internal use only - PyApp.GetComCtl32Version() -> int + GetComCtl32Version() -> int Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn't found at all. Raises an exception on non-Windows platforms. @@ -3616,10 +3617,249 @@ _sys.__wxPythonCleanup = __wxPyCleanup() #--------------------------------------------------------------------------- + +wx.Window is the base class for all windows and represents any visible +object on the screen. All controls, top level windows and so on are +wx.Windows. Sizers and device contexts are not however, as they don't +appear on screen themselves. + + + 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. + + __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. + + @@ -3631,10 +3871,128 @@ _sys.__wxPythonCleanup = __wxPyCleanup() 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, long style=0, String name=PanelNameStr) -> bool + Create the GUI part of the Window for 2-phase creation mode. @@ -3646,79 +4004,146 @@ _sys.__wxPythonCleanup = __wxPyCleanup() Close(bool force=False) -> bool + This function simply generates a EVT_CLOSE event whose handler usually +tries to close the window. It doesn't close the window itself, +however. If force is False (the default) then the window's close +handler will be allowed to veto the destruction of the window. + +Usually Close is only used with the top level windows (wx.Frame and +wx.Dialog classes) as the others are not supposed to have any special +EVT_CLOSE logic. + +The close handler should check whether the window is being deleted +forcibly, using wx.CloseEvent.GetForce, in which case it should +destroy the window using wx.Window.Destroy. + +Note that calling Close does not guarantee that the window will be +destroyed; but it provides a way to simulate a manual close of a +window, which may or may not be implemented by destroying the +window. The default EVT_CLOSE handler for wx.Dialog does not +necessarily delete the dialog, since it will simply simulate an +wxID_CANCEL event which is handled by the appropriate button event +handler and may do anything at all. + +To guarantee that the window will be destroyed, call wx.Window.Destroy +instead. Destroy() -> bool - Deletes the C++ object this Python object is a proxy for. + Destroys the window safely. Frames and dialogs are not destroyed +immediately when this function is called -- they are added to a list +of windows to be deleted on idle time, when all the window's events +have been processed. This prevents problems with events being sent to +non-existent windows. + +Returns True if the window has either been successfully deleted, or it +has been added to the list of windows pending real deletion. DestroyChildren() -> bool + Destroys all children of a window. Called automatically by the destructor. IsBeingDeleted() -> bool + Is the window in the process of being deleted? SetTitle(String title) + Sets the window's title. Applicable only to frames and dialogs. GetTitle() -> String + Gets the window's title. Applicable only to frames and dialogs. SetLabel(String label) + Set the text which the window shows in its label if applicable. 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. 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 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. SetId(int winid) + Sets the identifier of the window. Each window has an integer +identifier. If the application has not provided one, an identifier +will be generated. Normally, the identifier should be provided on +creation and should not be modified subsequently. GetId() -> int + Returns the identifier of the window. Each window has an integer +identifier. If the application has not provided one (or the default Id +-1 is used) then an unique identifier with a negative value will be +generated. - Window.NewControlId() -> int + NewControlId() -> int + Generate a control id for the controls which were not given one. - Window.NextControlId(int winid) -> int + NextControlId(int winid) -> int + Get the id of the control following the one with the given +(autogenerated) id - Window.PrevControlId(int winid) -> int + PrevControlId(int winid) -> int + Get the id of the control preceding the one with the given +(autogenerated) id SetSize(Size size) + Sets the size of the window in pixels. SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) + Sets the position and size of the window in pixels. The sizeFlags +parameter indicates the interpretation of the other params if they are +-1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default +shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be +used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow +dimensions of -1 and less to be interpreted as real dimensions, not +default values. @@ -3729,6 +4154,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() SetRect(Rect rect, int sizeFlags=SIZE_AUTO) + Sets the position and size of the window in pixels using a wx.Rect. @@ -3736,6 +4162,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() SetSizeWH(int width, int height) + Sets the size of the window in pixels. @@ -3743,6 +4170,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() Move(Point pt, int flags=SIZE_USE_EXISTING) + Moves the window to the given position. @@ -3750,6 +4178,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() MoveXY(int x, int y, int flags=SIZE_USE_EXISTING) + Moves the window to the given position. @@ -3758,18 +4187,32 @@ _sys.__wxPythonCleanup = __wxPyCleanup() Raise() + Raises the window to the top of the window hierarchy if it is a +managed window (dialog or frame). Lower() + Lowers the window to the bottom of the window hierarchy if it is a +managed window (dialog or frame). SetClientSize(Size size) + This sets the size of the window client area in pixels. Using this +function to size a window tends to be more device-independent than +wx.Window.SetSize, since the application need not worry about what +dimensions the border or title bar have when trying to fit the window +around panel items, for example. SetClientSizeWH(int width, int height) + This sets the size of the window client area in pixels. Using this +function to size a window tends to be more device-independent than +wx.Window.SetSize, since the application need not worry about what +dimensions the border or title bar have when trying to fit the window +around panel items, for example. @@ -3777,6 +4220,11 @@ _sys.__wxPythonCleanup = __wxPyCleanup() SetClientRect(Rect rect) + This sets the size of the window client area in pixels. Using this +function to size a window tends to be more device-independent than +wx.Window.SetSize, since the application need not worry about what +dimensions the border or title bar have when trying to fit the window +around panel items, for example. @@ -3807,14 +4255,19 @@ _sys.__wxPythonCleanup = __wxPyCleanup() GetRect() -> Rect + Returns the size and position of the window as a wx.Rect object. GetClientSize() -> Size - Get the window's client size. + This gets the size of the window's 'client area' in pixels. The client +area is the area which may be drawn on by the programmer, excluding +title bar, border, scrollbars, etc. GetClientSizeTuple() -> (width, height) - Get the window's client size. + This gets the size of the window's 'client area' in pixels. The client +area is the area which may be drawn on by the programmer, excluding +title bar, border, scrollbars, etc. @@ -3822,19 +4275,31 @@ _sys.__wxPythonCleanup = __wxPyCleanup() GetClientAreaOrigin() -> Point + Get the origin of the client area of the window relative to the +window's top left corner (the client area may be shifted because of +the borders, scrollbars, other decorations...) GetClientRect() -> Rect + Get the client area position and size as a wx.Rect object. GetBestSize() -> Size - Get the size best suited for the window (in fact, minimal acceptable size -using which it will still look "nice") + This functions returns the best acceptable minimal size for the +window, if applicable. For example, for a static text control, it will be +the minimal size such that the control label is not truncated. For +windows containing subwindows (suzh aswx.Panel), the size returned +by this function will be the same as the size the window would have +had after calling Fit. GetBestSizeTuple() -> (width, height) - Get the size best suited for the window (in fact, minimal acceptable size -using which it will still look "nice") + This functions returns the best acceptable minimal size for the +window, if applicable. For example, for a static text control, it will be +the minimal size such that the control label is not truncated. For +windows containing subwindows (suzh aswx.Panel), the size returned +by this function will be the same as the size the window would have +had after calling Fit. @@ -3842,34 +4307,65 @@ using which it will still look "nice") GetAdjustedBestSize() -> Size + This method is similar to GetBestSize, except in one +thing. GetBestSize should return the minimum untruncated size of the +window, while this method will return the largest of BestSize and any +user specified minimum size. ie. it is the minimum size the window +should currently be drawn at, not the minimal size it can possibly +tolerate. Center(int direction=BOTH) + Centers the window. The parameter specifies the direction for +cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may +also include wx.CENTER_ON_SCREEN flag if you want to center the window +on the entire screen and not on its parent window. If it is a +top-level window and has no parent then it will always be centered +relative to the screen. CenterOnScreen(int dir=BOTH) + Center on screen (only works for top level windows) CenterOnParent(int dir=BOTH) + Center with respect to the the parent window Fit() + Sizes the window so that it fits around its subwindows. This function +won't do anything if there are no subwindows and will only really work +correctly if sizers are used for the subwindows layout. Also, if the +window has exactly one subwindow it is better (faster and the result +is more precise as Fit adds some margin to account for fuzziness of +its calculations) to call window.SetClientSize(child.GetSize()) +instead of calling Fit. FitInside() + Similar to Fit, but sizes the interior (virtual) size of a +window. Mainly useful with scrolled windows to reset scrollbars after +sizing changes that do not trigger a size event, and/or scrolled +windows without an interior sizer. This function similarly won't do +anything if there are no subwindows. SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) + Allows specification of minimum and maximum window sizes, and window +size increments. If a pair of values is not set (or set to -1), the +default values will be used. If this function is called, the user +will not be able to size the window outside the given bounds. The +resizing increments are only significant under Motif or Xt. @@ -3881,6 +4377,10 @@ using which it will still look "nice") SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1) + Allows specification of minimum and maximum virtual window sizes. If a +pair of values is not set (or set to -1), the default values will be +used. If this function is called, the user will not be able to size +the virtual area of the window outside the given bounds. @@ -3905,18 +4405,18 @@ using which it will still look "nice") SetVirtualSize(Size size) - Set the the virtual size of a window. For most windows this is just the -client area of the window, but for some like scrolled windows it is more or -less independent of the screen window size. + Set the the virtual size of a window in pixels. For most windows this +is just the client area of the window, but for some like scrolled +windows it is more or less independent of the screen window size. SetVirtualSizeWH(int w, int h) - Set the the virtual size of a window. For most windows this is just the -client area of the window, but for some like scrolled windows it is more or -less independent of the screen window size. + Set the the virtual size of a window in pixels. For most windows this +is just the client area of the window, but for some like scrolled +windows it is more or less independent of the screen window size. @@ -3924,15 +4424,15 @@ less independent of the screen window size. GetVirtualSize() -> Size - Get the the virtual size of the window. For most windows this is just -the client area of the window, but for some like scrolled windows it is -more or less independent of the screen window size. + Get the the virtual size of the window in pixels. For most windows +this is just the client area of the window, but for some like scrolled +windows it is more or less independent of the screen window size. GetVirtualSizeTuple() -> (width, height) - Get the the virtual size of the window. For most windows this is just -the client area of the window, but for some like scrolled windows it is -more or less independent of the screen window size. + Get the the virtual size of the window in pixels. For most windows +this is just the client area of the window, but for some like scrolled +windows it is more or less independent of the screen window size. @@ -3940,204 +4440,311 @@ more or less independent of the screen window size. GetBestVirtualSize() -> Size + Return the largest of ClientSize and BestSize (as determined by a +sizer, interior children, or other means) Show(bool show=True) -> bool + Shows or hides the window. You may need to call Raise for a top level +window if you want to bring it to top, although this is not needed if +Show is called immediately after the frame creation. Returns True if +the window has been shown or hidden or False if nothing was done +because it already was in the requested state. Hide() -> bool + Equivalent to calling Show(False). Enable(bool enable=True) -> bool + Enable or disable the window for user input. Note that when a parent +window is disabled, all of its children are disabled as well and they +are reenabled again when the parent is. Returns true if the window +has been enabled or disabled, false if nothing was done, i.e. if the +window had already been in the specified state. Disable() -> bool + Disables the window, same as Enable(false). IsShown() -> bool + Returns true if the window is shown, false if it has been hidden. IsEnabled() -> bool + Returns true if the window is enabled for input, false otherwise. SetWindowStyleFlag(long style) + Sets the style of the window. Please note that some styles cannot be +changed after the window creation and that Refresh() might be called +after changing the others for the change to take place immediately. GetWindowStyleFlag() -> long - - - SetWindowStyle(long style) - - - - - - GetWindowStyle() -> long + Gets the window style that was passed to the constructor or Create +method. HasFlag(int flag) -> bool + Test if the given style is set for this window. IsRetained() -> bool + Returns true if the window is retained, false otherwise. Retained +windows are only available on X platforms. SetExtraStyle(long exStyle) + Sets the extra style bits for the window. Extra styles are the less +often used style bits which can't be set with the constructor or with +SetWindowStyleFlag() GetExtraStyle() -> long + Returns the extra style bits for the window. MakeModal(bool modal=True) + Disables all other windows in the application so that the user can +only interact with this window. Passing False will reverse this +effect. SetThemeEnabled(bool enableTheme) + This function tells a window if it should use the system's "theme" + code to draw the windows' background instead if its own background + drawing code. This will only have an effect on platforms that support + the notion of themes in user defined windows. One such platform is + GTK+ where windows can have (very colourful) backgrounds defined by a + user's selected theme. + +Dialogs, notebook pages and the status bar have this flag set to true +by default so that the default look and feel is simulated best. GetThemeEnabled() -> bool - - - ShouldInheritColours() -> bool + Return the themeEnabled flag. SetFocus() + Set's the focus to this window, allowing it to receive keyboard input. SetFocusFromKbd() + Set focus to this window as the result of a keyboard action. Normally +only called internally. - Window.FindFocus() -> Window + FindFocus() -> Window + Returns the window or control that currently has the keyboard focus, +or None. AcceptsFocus() -> bool + Can this window have focus? AcceptsFocusFromKeyboard() -> bool + Can this window be given focus by keyboard navigation? if not, the +only way to give it focus (provided it accepts it at all) is to click +it. GetDefaultItem() -> Window + Get the default child of this parent, i.e. the one which is activated +by pressing <Enter> such as the OK button on a wx.Dialog. SetDefaultItem(Window child) -> Window + Set this child as default, return the old default. SetTmpDefaultItem(Window win) + Set this child as temporary default GetChildren() -> PyObject + Returns a list of the window's children. NOTE: Currently this is a +copy of the child window list maintained by the window, so the return +value of this function is only valid as long as the window's children +do not change. GetParent() -> Window + Returns the parent window of this window, or None if there isn't one. GetGrandParent() -> Window + Returns the parent of the parent of this window, or None if there isn't one. IsTopLevel() -> bool + Returns true if the given window is a top-level one. Currently all +frames and dialogs are always considered to be top-level windows (even +if they have a parent window). Reparent(Window newParent) -> bool + Reparents the window, i.e the window will be removed from its current +parent window (e.g. a non-standard toolbar in a wxFrame) and then +re-inserted into another. Available on Windows and GTK. Returns True +if the parent was changed, False otherwise (error or newParent == +oldParent) AddChild(Window child) + Adds a child window. This is called automatically by window creation +functions so should not be required by the application programmer. RemoveChild(Window child) + Removes a child window. This is called automatically by window +deletion functions so should not be required by the application +programmer. FindWindowById(long winid) -> Window + Find a chld of this window by window ID FindWindowByName(String name) -> Window + Find a child of this window by name GetEventHandler() -> EvtHandler + Returns the event handler for this window. By default, the window is +its own event handler. SetEventHandler(EvtHandler handler) + Sets the event handler for this window. An event handler is an object +that is capable of processing the events sent to a window. By default, +the window is its own event handler, but an application may wish to +substitute another, for example to allow central implementation of +event-handling for a variety of different window classes. + +It is usually better to use wx.Window.PushEventHandler since this sets +up a chain of event handlers, where an event not handled by one event +handler is handed to the next one in the chain. PushEventHandler(EvtHandler handler) + Pushes this event handler onto the event handler stack for the window. +An event handler is an object that is capable of processing the events +sent to a window. By default, the window is its own event handler, but +an application may wish to substitute another, for example to allow +central implementation of event-handling for a variety of different +window classes. + +wx.Window.PushEventHandler allows an application to set up a chain of +event handlers, where an event not handled by one event handler is +handed to the next one in the chain. Use wx.Window.PopEventHandler to +remove the event handler. PopEventHandler(bool deleteHandler=False) -> EvtHandler + Removes and returns the top-most event handler on the event handler +stack. If deleteHandler is True then the wx.EvtHandler object will be +destroyed after it is popped. RemoveEventHandler(EvtHandler handler) -> bool + Find the given handler in the event handler chain and remove (but +not delete) it from the event handler chain, return True if it was +found and False otherwise (this also results in an assert failure so +this function should only be called when the handler is supposed to +be there.) SetValidator(Validator validator) + Deletes the current validator (if any) and sets the window validator, +having called wx.Validator.Clone to create a new validator of this +type. GetValidator() -> Validator + Returns a pointer to the current validator for the window, or None if +there is none. SetAcceleratorTable(AcceleratorTable accel) + Sets the accelerator table for this window. GetAcceleratorTable() -> AcceleratorTable + Gets the accelerator table for this window. RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool + Registers a system wide hotkey. Every time the user presses the hotkey +registered here, this window will receive a hotkey event. It will +receive the event even if the application is in the background and +does not have the input focus because the user is working with some +other application. To bind an event handler function to this hotkey +use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the +hotkey was registered successfully. @@ -4146,30 +4753,55 @@ more or less independent of the screen window size. UnregisterHotKey(int hotkeyId) -> bool + Unregisters a system wide hotkey. ConvertDialogPointToPixels(Point pt) -> Point + Converts a point or size from dialog units to pixels. Dialog units +are used for maintaining a dialog's proportions even if the font +changes. For the x dimension, the dialog units are multiplied by the +average character width and then divided by 4. For the y dimension, +the dialog units are multiplied by the average character height and +then divided by 8. ConvertDialogSizeToPixels(Size sz) -> Size + Converts a point or size from dialog units to pixels. Dialog units +are used for maintaining a dialog's proportions even if the font +changes. For the x dimension, the dialog units are multiplied by the +average character width and then divided by 4. For the y dimension, +the dialog units are multiplied by the average character height and +then divided by 8. DLG_PNT(Point pt) -> Point + Converts a point or size from dialog units to pixels. Dialog units +are used for maintaining a dialog's proportions even if the font +changes. For the x dimension, the dialog units are multiplied by the +average character width and then divided by 4. For the y dimension, +the dialog units are multiplied by the average character height and +then divided by 8. DLG_SZE(Size sz) -> Size + Converts a point or size from dialog units to pixels. Dialog units +are used for maintaining a dialog's proportions even if the font +changes. For the x dimension, the dialog units are multiplied by the +average character width and then divided by 4. For the y dimension, +the dialog units are multiplied by the average character height and +then divided by 8. @@ -4188,6 +4820,10 @@ more or less independent of the screen window size. WarpPointer(int x, int y) + Moves the pointer to the given position on the window. + +NOTE: This function is not supported under Mac because Apple Human +Interface Guidelines forbid moving the mouse cursor programmatically. @@ -4195,18 +4831,32 @@ more or less independent of the screen window size. CaptureMouse() + Directs all mouse input to this window. Call wx.Window.ReleaseMouse to +release the capture. + +Note that wxWindows maintains the stack of windows having captured the +mouse and when the mouse is released the capture returns to the window +which had had captured it previously and it is only really released if +there were no previous window. In particular, this means that you must +release the mouse as many times as you capture it. ReleaseMouse() + Releases mouse input captured with wx.Window.CaptureMouse. - Window.GetCapture() -> Window + GetCapture() -> Window + Returns the window which currently captures the mouse or None HasCapture() -> bool + Returns true if this window has the current mouse capture. Refresh(bool eraseBackground=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. @@ -4214,36 +4864,67 @@ more or less independent of the screen window size. RefreshRect(Rect rect) + Redraws the contents of the given rectangle: the area inside it will +be repainted. This is the same as Refresh but has a nicer syntax. Update() + Calling this method immediately repaints the invalidated area of the +window instead of waiting for the EVT_PAINT event to happen, (normally +this would usually only happen when the flow of control returns to the +event loop.) Notice that this function doesn't refresh the window and +does nothing if the window has been already repainted. Use Refresh +first if you want to immediately redraw the window (or some portion of +it) unconditionally. ClearBackground() + Clears the window by filling it with the current background +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. + +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 +a wxTextCtrl under wxGTK) but is not implemented on all platforms nor +for all controls so it is mostly just a hint to wxWindows and not a +mandatory directive. Thaw() + Reenables window updating after a previous call to Freeze. PrepareDC(DC dc) + Call this function to prepare the device context for drawing a +scrolled image. It sets the device origin according to the current +scroll position. GetUpdateRegion() -> Region + Returns the region specifying which parts of the window have been +damaged. Should only be called within an EVT_PAINT handler. GetUpdateClientRect() -> Rect + Get the update rectangle region bounding box in client coords. IsExposed(int x, int y, int w=1, int h=1) -> 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 +exposed. @@ -4253,66 +4934,107 @@ more or less independent of the screen window size. IsExposedPoint(Point pt) -> 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 +exposed. 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 +exposed. SetBackgroundColour(Colour colour) -> 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 colour) -> 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. GetBackgroundColour() -> Colour + Returns the background colour of the window. GetForegroundColour() -> Colour + Returns the foreground colour of the window. 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. SetCursor(Cursor cursor) -> bool + Sets the window's cursor. Notice that the window cursor also sets it +for the children of the window implicitly. + +The cursor may be wx.NullCursor in which case the window cursor will +be reset back to default. GetCursor() -> Cursor + Return the cursor associated with this window. SetFont(Font font) -> bool + Sets the font for this window. GetFont() -> Font + Returns a reference to the font for this window. SetCaret(Caret caret) + Sets the caret associated with the window. GetCaret() -> Caret + Returns the caret associated with the window. GetCharHeight() -> int + Get the (average) character size for the current font. GetCharWidth() -> int + Get the (average) character size for the current font. GetTextExtent(String string) -> (width, height) @@ -4326,7 +5048,8 @@ more or less independent of the screen window size. GetFullTextExtent(String string, Font font=None) -> (width, height, descent, externalLeading) - Get the width, height, decent and leading of the text using the current or specified font. + Get the width, height, decent and leading of the text using the +current or specified font. @@ -4337,14 +5060,16 @@ more or less independent of the screen window size. - ClientToScreenXY(int x, int y) + ClientToScreenXY(int x, int y) -> (x,y) + Converts to screen coordinates from coordinates relative to this window. - ScreenToClientXY(int x, int y) + ScreenToClientXY(int x, int y) -> (x,y) + Converts from screen to client window coordinates. @@ -4352,18 +5077,21 @@ more or less independent of the screen window size. ClientToScreen(Point pt) -> Point + Converts to screen coordinates from coordinates relative to this window. ScreenToClient(Point pt) -> Point + Converts from screen to client window coordinates. HitTestXY(int x, int y) -> int + Test where the given (in client coords) point lies @@ -4371,27 +5099,66 @@ more or less independent of the screen window size. HitTest(Point pt) -> int + Test where the given (in client coords) point lies - - GetBorderFlags(long flags) -> int + + Get the window border style from the given flags: this is different +from simply doing flags & wxBORDER_MASK because it uses +GetDefaultBorder() to translate wxBORDER_DEFAULT to something +reasonable. + - - GetBorder() -> int + + GetBorder(long flags) -> int +GetBorder() -> int + Get border for the flags of this window UpdateWindowUI(long flags=UPDATE_UI_NONE) + This function sends EVT_UPDATE_UI events to the window. The particular +implementation depends on the window; for example a wx.ToolBar will +send an update UI event for each toolbar button, and a wx.Frame will +send an update UI event for each menubar menu item. You can call this +function from your application to ensure that your UI is up-to-date at +a particular point in time (as far as your EVT_UPDATE_UI handlers are +concerned). This may be necessary if you have called +wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to +limit the overhead that wxWindows incurs by sending update UI events +in idle time. + +The flags should be a bitlist of one or more of the following values: + + wx.UPDATE_UI_NONE No particular value + wx.UPDATE_UI_RECURSE Call the function for descendants + wx.UPDATE_UI_FROMIDLE Invoked from OnIdle + +If you are calling this function from an OnIdle function, make sure +you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to +only update the UI elements that need to be updated in idle time. Some +windows update their elements only when necessary, for example when a +menu is about to be shown. The following is an example of how to call +UpdateWindowUI from an idle function. + + def OnIdle(self, evt): + if wx.UpdateUIEvent.CanUpdate(self): + self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE); + PopupMenuXY(Menu menu, int x, int y) -> bool + Pops up the given menu at the specified coordinates, relative to this +window, and returns control when the user has dismissed the menu. If a +menu item is selected, the corresponding menu event is generated and +will be processed as usual. @@ -4400,6 +5167,10 @@ more or less independent of the screen window size. PopupMenu(Menu menu, Point pos) -> bool + Pops up the given menu at the specified coordinates, relative to this +window, and returns control when the user has dismissed the menu. If a +menu item is selected, the corresponding menu event is generated and +will be processed as usual. @@ -4407,17 +5178,35 @@ more or less independent of the screen window size. GetHandle() -> long + Returns the platform-specific handle (as a long integer) of the +physical window. Currently on wxMac it returns the handle of the +toplevel parent of the window. HasScrollbar(int orient) -> bool + Does the window have the scrollbar for this orientation? - SetScrollbar(int orient, int pos, int thumbvisible, int range, bool refresh=True) + SetScrollbar(int orientation, int pos, int thumbvisible, int range, + bool refresh=True) + Sets the scrollbar properties of a built-in scrollbar. + + orientation: Determines the scrollbar whose page size is to be + set. May be wx.HORIZONTAL or wx.VERTICAL. + + position: The position of the scrollbar in scroll units. + + thumbSize: The size of the thumb, or visible portion of the + scrollbar, in scroll units. + + range: The maximum position of the scrollbar. + + refresh: True to redraw the scrollbar, false otherwise. - + @@ -4425,33 +5214,51 @@ more or less independent of the screen window size. - SetScrollPos(int orient, int pos, bool refresh=True) + SetScrollPos(int orientation, int pos, bool refresh=True) + Sets the position of one of the built-in scrollbars. - + - GetScrollPos(int orient) -> int + GetScrollPos(int orientation) -> int + Returns the built-in scrollbar position. - + - GetScrollThumb(int orient) -> int + GetScrollThumb(int orientation) -> int + Returns the built-in scrollbar thumb size. - + - GetScrollRange(int orient) -> int + GetScrollRange(int orientation) -> int + Returns the built-in scrollbar range. - + ScrollWindow(int dx, int dy, Rect rect=None) + Physically scrolls the pixels in the window and move child windows +accordingly. Use this function to optimise your scrolling +implementations, to minimise the area that must be redrawn. Note that +it is rarely required to call this function from a user program. + + dx: Amount to scroll horizontally. + + dy: Amount to scroll vertically. + + rect: Rectangle to invalidate. If this is None, the whole window + is invalidated. If you pass a rectangle corresponding to the + area of the window exposed by the scroll, your painting + handler can optimize painting by checking for the + invalidated region. @@ -4460,90 +5267,143 @@ more or less independent of the screen window size. ScrollLines(int lines) -> bool + If the platform and window class supports it, scrolls the window by +the given number of lines down, if lines is positive, or up if lines +is negative. Returns True if the window was scrolled, False if it was +already on top/bottom and nothing was done. ScrollPages(int pages) -> bool + If the platform and window class supports it, scrolls the window by +the given number of pages down, if pages is positive, or up if pages +is negative. Returns True if the window was scrolled, False if it was +already on top/bottom and nothing was done. LineUp() -> bool + This is just a wrapper for ScrollLines(-1). LineDown() -> bool + This is just a wrapper for ScrollLines(1). PageUp() -> bool + This is just a wrapper for ScrollPages(-1). PageDown() -> bool + This is just a wrapper for ScrollPages(1). SetHelpText(String text) + Sets the help text to be used as context-sensitive help for this +window. Note that the text is actually stored by the current +wxHelpProvider implementation, and not in the window object itself. SetHelpTextForId(String text) + Associate this help text with all windows with the same id as this +one. GetHelpText() -> String + Gets the help text to be used as context-sensitive help for this +window. Note that the text is actually stored by the current +wxHelpProvider implementation, and not in the window object itself. SetToolTipString(String tip) + Attach a tooltip to the window. SetToolTip(ToolTip tip) + Attach a tooltip to the window. GetToolTip() -> ToolTip + get the associated tooltip or None if none - SetDropTarget(PyDropTarget dropTarget) + SetDropTarget(DropTarget dropTarget) + Associates a drop target with this window. If the window already has +a drop target, it is deleted. - GetDropTarget() -> PyDropTarget + GetDropTarget() -> DropTarget + Returns the associated drop target, which may be None. SetConstraints(LayoutConstraints constraints) + Sets the window to have the given layout constraints. If an existing +layout constraints object is already owned by the window, it will be +deleted. Pass None to disassociate and delete the window's current +constraints. + +You must call SetAutoLayout to tell a window to use the constraints +automatically in its default EVT_SIZE handler; otherwise, you must +handle EVT_SIZE yourself and call Layout() explicitly. When setting +both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have +effect. GetConstraints() -> LayoutConstraints + Returns a pointer to the window's layout constraints, or None if there +are none. SetAutoLayout(bool autoLayout) + Determines whether the Layout function will be called automatically +when the window is resized. It is called implicitly by SetSizer but +if you use SetConstraints you should call it manually or otherwise the +window layout won't be correctly updated when its size changes. GetAutoLayout() -> bool + Returns the current autoLayout setting Layout() -> bool + Invokes the constraint-based layout algorithm or the sizer-based +algorithm for this window. See SetAutoLayout: when auto layout is on, +this function gets called automatically by the default EVT_SIZE +handler when the window is resized. SetSizer(Sizer sizer, bool deleteOld=True) + Sets the window to have the given layout sizer. The window will then +own the object, and will take care of its deletion. If an existing +layout sizer object is already owned by the window, it will be deleted +if the deleteOld parameter is true. Note that this function will also +call SetAutoLayout implicitly with a True parameter if the sizer is +non-NoneL and False otherwise. @@ -4551,6 +5411,8 @@ more or less independent of the screen window size. SetSizerAndFit(Sizer sizer, bool deleteOld=True) + The same as SetSizer, except it also sets the size hints for the +window based on the sizer's minimum size. @@ -4558,25 +5420,39 @@ more or less independent of the screen window size. GetSizer() -> Sizer + Return the sizer associated with the window by a previous call to +SetSizer or None if there isn't one. SetContainingSizer(Sizer sizer) + This normally does not need to be called by application code. It is +called internally when a window is added to a sizer, and is used so +the window can remove itself from the sizer when it is destroyed. GetContainingSizer() -> Sizer + Return the sizer that this window is a member of, if any, otherwise None. def DLG_PNT(win, point_or_x, y=None): + """ + Convenience function for converting a Point or (x,y) in + dialog units to pixel units. + """ if y is None: return win.ConvertDialogPointToPixels(point_or_x) else: return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) def DLG_SZE(win, size_width, height=None): + """ + Convenience function for converting a Size or (w,h) in + dialog units to pixel units. + """ if height is None: return win.ConvertDialogSizeToPixels(size_width) else: @@ -4584,6 +5460,10 @@ def DLG_SZE(win, size_width, height=None): FindWindowById(long id, Window parent=None) -> Window + Find the first window in the application with the given id. If parent +is None, the search will start from all top-level frames and dialog +boxes; if non-None, the search will be limited to the given window +hierarchy. The search is recursive in both cases. @@ -4591,6 +5471,13 @@ def DLG_SZE(win, size_width, height=None): FindWindowByName(String name, Window parent=None) -> Window + Find a window by its name (as given in a window constructor or Create +function call). If parent is None, the search will start from all +top-level frames and dialog boxes; if non-None, the search will be +limited to the given window hierarchy. The search is recursive in both +cases. + +If no window with such name is found, wx.FindWindowByLabel is called. @@ -4598,6 +5485,11 @@ def DLG_SZE(win, size_width, height=None): FindWindowByLabel(String label, Window parent=None) -> Window + Find a window by its label. Depending on the type of window, the label +may be a window title or panel item label. If parent is None, the +search will start from all top-level frames and dialog boxes; if +non-None, the search will be limited to the given window +hierarchy. The search is recursive in both cases. @@ -4642,10 +5534,10 @@ def DLG_SZE(win, size_width, height=None): - Validator.IsSilent() -> bool + IsSilent() -> bool - Validator.SetBellOnError(int doIt=True) + SetBellOnError(int doIt=True) @@ -4677,8 +5569,8 @@ def DLG_SZE(win, size_width, height=None): - - Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) + + Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem @@ -4686,27 +5578,27 @@ def DLG_SZE(win, size_width, height=None): - - AppendSeparator() + + AppendSeparator() -> MenuItem - - AppendCheckItem(int id, String text, String help=EmptyString) + + AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem - - AppendRadioItem(int id, String text, String help=EmptyString) + + AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem - - AppendMenu(int id, String text, Menu submenu, String help=EmptyString) + + AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem @@ -4714,8 +5606,8 @@ def DLG_SZE(win, size_width, height=None): - - AppendItem(MenuItem item) + + AppendItem(MenuItem item) -> MenuItem @@ -4723,16 +5615,16 @@ def DLG_SZE(win, size_width, height=None): Break() - - InsertItem(size_t pos, MenuItem item) -> bool + + InsertItem(size_t pos, MenuItem item) -> MenuItem - + Insert(size_t pos, int id, String text, String help=EmptyString, - int kind=ITEM_NORMAL) + int kind=ITEM_NORMAL) -> MenuItem @@ -4741,14 +5633,14 @@ def DLG_SZE(win, size_width, height=None): - - InsertSeparator(size_t pos) + + InsertSeparator(size_t pos) -> MenuItem - - InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) + + InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem @@ -4756,8 +5648,8 @@ def DLG_SZE(win, size_width, height=None): - - InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) + + InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem @@ -4765,8 +5657,8 @@ def DLG_SZE(win, size_width, height=None): - - InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) + + InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem @@ -4775,14 +5667,14 @@ def DLG_SZE(win, size_width, height=None): - - PrependItem(MenuItem item) + + PrependItem(MenuItem item) -> MenuItem - - Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) + + Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem @@ -4790,27 +5682,27 @@ def DLG_SZE(win, size_width, height=None): - - PrependSeparator() + + PrependSeparator() -> MenuItem - - PrependCheckItem(int id, String text, String help=EmptyString) + + PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem - - PrependRadioItem(int id, String text, String help=EmptyString) + + PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem - - PrependMenu(int id, String text, Menu submenu, String help=EmptyString) + + PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem @@ -5211,7 +6103,7 @@ def DLG_SZE(win, size_width, height=None): GetText() -> String - MenuItem.GetLabelFromText(String text) -> String + GetLabelFromText(String text) -> String @@ -5280,7 +6172,7 @@ def DLG_SZE(win, size_width, height=None): - MenuItem.GetDefaultMarginWidth() -> int + GetDefaultMarginWidth() -> int SetBitmap(Bitmap bitmap) @@ -5296,11 +6188,17 @@ def DLG_SZE(win, size_width, height=None): #--------------------------------------------------------------------------- + This is the base class for a control or 'widget'. + +A control is generally a small window which processes user input and/or +displays one or more item of data. __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> Control + Create a Control. Normally you should only call this from a +subclass' __init__ as a plain old wx.Control is not very useful. @@ -5313,11 +6211,13 @@ def DLG_SZE(win, size_width, height=None): PreControl() -> Control + Precreate a Control control for 2-phase creation Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> bool + Do the 2nd phase and create the GUI control. @@ -5330,15 +6230,19 @@ def DLG_SZE(win, size_width, height=None): Command(CommandEvent event) + Simulates the effect of the user issuing a command to the +item. See wxCommandEvent. GetLabel() -> String + Return a control's text. SetLabel(String label) + Sets the item's text. @@ -5348,8 +6252,25 @@ def DLG_SZE(win, size_width, height=None): #--------------------------------------------------------------------------- + wx.ItemContainer defines an interface which is implemented by all +controls which have string subitems, each of which may be +selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and +wx.ComboBox (which implements an extended interface deriving from +this one) + +It defines the methods for accessing the control's items and +although each of the derived classes implements them differently, +they still all conform to the same interface. + +The items in a wx.ItemContainer have (non empty) string labels +and, optionally, client data associated with them. + Append(String item, PyObject clientData=None) -> int + Adds the item to the control, associating the given data with the +item if not None. The return value is the index of the newly +added item which may be different from the last one if the +control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style). @@ -5357,12 +6278,17 @@ def DLG_SZE(win, size_width, height=None): AppendItems(wxArrayString strings) + Apend several items at once to the control. Notice that calling +this method may be much faster than appending the items one by +one if you need to add a lot of items. Insert(String item, int pos, PyObject clientData=None) -> int + Insert an item into the control before the item at the pos index, +optionally associating some data object with the item. @@ -5371,21 +6297,29 @@ def DLG_SZE(win, size_width, height=None): Clear() + Removes all items from the control. Delete(int n) + Deletes the item at the zero-based index 'n' from the control. +Note that it is an error (signalled by a PyAssertionError +exception if enabled) to remove an item with the index negative +or greater or equal than the number of items in the control. GetCount() -> int + Returns the number of items in the control. IsEmpty() -> bool + Returns True if the control is empty or False if it has some items. GetString(int n) -> String + Returns the label of the item with the given index. @@ -5395,6 +6329,7 @@ def DLG_SZE(win, size_width, height=None): SetString(int n, String s) + Sets the label for the given item. @@ -5402,30 +6337,38 @@ def DLG_SZE(win, size_width, height=None): FindString(String s) -> int + Finds an item whose label matches the given string. Returns the +zero-based position of the item, or wx.NOT_FOUND if the string +was not found. Select(int n) + Sets the item at index 'n' to be the selected item. GetSelection() -> int + Returns the index of the selected item or wx.NOT_FOUND if no item is selected. GetStringSelection() -> String + Returns the label of the selected item or an empty string if no item is selected. GetClientData(int n) -> PyObject + Returns the client data associated with the given item, (if any.) SetClientData(int n, PyObject clientData) + Associate the given client data with the item at position n. @@ -5436,6 +6379,9 @@ def DLG_SZE(win, size_width, height=None): #--------------------------------------------------------------------------- + wx.ControlWithItems combines the wx.ItemContainer class with the +wx.Control class, and is used for the base class of various +controls that have items. @@ -6000,15 +6946,15 @@ def DLG_SZE(win, size_width, height=None): - __eq__(GBPosition p) -> bool + __eq__(GBPosition other) -> bool - + - __ne__(GBPosition p) -> bool + __ne__(GBPosition other) -> bool - + @@ -6049,15 +6995,15 @@ def DLG_SZE(win, size_width, height=None): - __eq__(GBSpan o) -> bool + __eq__(GBSpan other) -> bool - + - __ne__(GBSpan o) -> bool + __ne__(GBSpan other) -> bool - + @@ -6331,6 +7277,49 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) #--------------------------------------------------------------------------- + Objects of this class are stored in the wx.LayoutConstraint class as one of +eight possible constraints that a window can be involved in. You will never +need to create an instance of wx.IndividualLayoutConstraint, rather you should +use create a wx.LayoutContstraints instance and use the individual contstraints +that it contains. + +Constraints are initially set to have the relationship wx.Unconstrained, which +means that their values should be calculated by looking at known constraints. + +The Edge specifies the type of edge or dimension of a window. + + Edges + + wx.Left The left edge. + wx.Top The top edge. + wx.Right The right edge. + wx.Bottom The bottom edge. + wx.CentreX The x-coordinate of the centre of the window. + wx.CentreY The y-coordinate of the centre of the window. + + +The Relationship specifies the relationship that this edge or dimension has +with another specified edge or dimension. Normally, the user doesn't use these +directly because functions such as Below and RightOf are a convenience for +using the more general Set function. + + Relationships + + wx.Unconstrained The edge or dimension is unconstrained + (the default for edges.) + wx.AsIs The edge or dimension is to be taken from the current + window position or size (the default for dimensions.) + wx.Above The edge should be above another edge. + wx.Below The edge should be below another edge. + wx.LeftOf The edge should be to the left of another edge. + wx.RightOf The edge should be to the right of another edge. + wx.SameAs The edge or dimension should be the same as another edge + or dimension. + wx.PercentOf The edge or dimension should be a percentage of another + edge or dimension. + wx.Absolute The edge or dimension should be a given absolute value. + + Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) @@ -6344,6 +7333,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) LeftOf(Window sibling, int marg=0) + Sibling relationship @@ -6351,6 +7341,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) RightOf(Window sibling, int marg=0) + Sibling relationship @@ -6358,6 +7349,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) Above(Window sibling, int marg=0) + Sibling relationship @@ -6365,6 +7357,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) Below(Window sibling, int marg=0) + Sibling relationship @@ -6372,6 +7365,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) SameAs(Window otherW, int edge, int marg=0) + 'Same edge' alignment @@ -6380,6 +7374,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) PercentOf(Window otherW, int wh, int per) + The edge is a percentage of the other window's edge @@ -6388,15 +7383,18 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) Absolute(int val) + Edge has absolute value Unconstrained() + Dimension is unconstrained AsIs() + Dimension is 'as is' (use current size settings) GetOtherWindow() -> Window @@ -6454,12 +7452,14 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) ResetIfWin(Window otherW) -> bool + Reset constraint if it mentions otherWin SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool + Try to satisfy constraint @@ -6467,6 +7467,8 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) GetEdge(int which, Window thisWin, Window other) -> int + Get the value of this edge or dimension, or if this +is not determinable, -1. @@ -6475,6 +7477,31 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) + Note: constraints are now deprecated and you should use sizers instead. + +Objects of this class can be associated with a window to define its layout +constraints, with respect to siblings or its parent. + +The class consists of the following eight constraints of class +wx.IndividualLayoutConstraint, some or all of which should be accessed +directly to set the appropriate constraints. + + * left: represents the left hand edge of the window + * right: represents the right hand edge of the window + * top: represents the top edge of the window + * bottom: represents the bottom edge of the window + * width: represents the width of the window + * height: represents the height of the window + * centreX: represents the horizontal centre point of the window + * centreY: represents the vertical centre point of the window + +Most constraints are initially set to have the relationship wxUnconstrained, +which means that their values should be calculated by looking at known +constraints. The exceptions are width and height, which are set to wxAsIs to +ensure that if the user does not specify a constraint, the existing width and +height will be used, to be compatible with panel items which often have take a +default size. If the constraint is wxAsIs, the dimension will not be changed. + __init__() -> LayoutConstraints @@ -6756,9 +7783,25 @@ _core._wxPyFixStockObjects() #--------------------------------------------------------------------------- + A colour is an object representing a combination of Red, Green, and Blue (RGB) +intensity values, and is used to determine drawing colours, window colours, +etc. Valid RGB values are in the range 0 to 255. + +In wxPython there are typemaps that will automatically convert from a colour +name, or from a "#RRGGBB" colour hex value string to a wx.Colour object when +calling C++ methods that expect a wxColour. This means that the following are +all equivallent: + + win.SetBackgroundColour(wxColour(0,0,255)) + win.SetBackgroundColour("BLUE") + win.SetBackgroundColour("#0000FF") + +You can retrieve the various current system colour settings with +wx.SystemSettings.GetColour. __init__(unsigned char red=0, unsigned char green=0, unsigned char blue=0) -> Colour + Constructs a colour from red, green and blue values. @@ -6767,12 +7810,14 @@ _core._wxPyFixStockObjects() NamedColour(String colorName) -> Colour + Constructs a colour object using a colour name listed in wx.TheColourDatabase. ColourRGB(unsigned long colRGB) -> Colour + Constructs a colour from a packed RGB value. @@ -6782,18 +7827,24 @@ _core._wxPyFixStockObjects() Red() -> unsigned char + Returns the red intensity. Green() -> unsigned char + Returns the green intensity. Blue() -> unsigned char + Returns the blue intensity. Ok() -> bool + Returns True if the colour object is valid (the colour has been +initialised with RGB values). Set(unsigned char red, unsigned char green, unsigned char blue) + Sets the RGB intensity values. @@ -6802,32 +7853,52 @@ _core._wxPyFixStockObjects() SetRGB(unsigned long colRGB) + Sets the RGB intensity values from a packed RGB value. + + SetFromName(String colourName) + Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase. + + + + + + GetPixel() -> long + Returns a pixel value which is platform-dependent. On Windows, a +COLORREF is returned. On X, an allocated pixel value is returned. +-1 is returned if the pixel is invalid (on X, unallocated). + __eq__(Colour colour) -> bool + Compare colours for equality __ne__(Colour colour) -> bool + Compare colours for inequality - - InitFromName(String colourName) - - - - - Get() -> PyObject + Get() -> (r, g, b) + Returns the RGB intensity values as a tuple. + + + GetRGB() -> unsigned long + Return the colour as a packed RGB value + + Color = Colour + NamedColor = NamedColour + ColorRGB = ColourRGB + @@ -6937,6 +8008,18 @@ _core._wxPyFixStockObjects() GetDashes() -> PyObject + + __eq__(Pen other) -> bool + + + + + + __ne__(Pen other) -> bool + + + + GetDashCount() -> int @@ -7175,22 +8258,16 @@ in a device context, the unmasked area of the bitmap will be drawn, and the masked area will not be drawn. - __init__(Bitmap bitmap) -> Mask - Constructs a mask from a monochrome bitmap. - - - - - - MaskColour(Bitmap bitmap, Colour colour) -> Mask - Constructs a mask from a bitmap and a colour in that bitmap that indicates the -background. + __init__(Bitmap bitmap, Colour colour=NullColour) -> Mask + Constructs a mask from a bitmap and a colour in that bitmap that indicates +the transparent portions of the mask, by default BLACK is used. - + + MaskColour = Mask @@ -7344,40 +8421,88 @@ background. + A cursor is a small bitmap usually used for denoting where the +mouse pointer is, with a picture that might indicate the +interpretation of a mouse click. + +A single cursor object may be used in many windows (any subwindow +type). The wxWindows convention is to set the cursor for a +window, as in X, rather than to set it globally as in MS Windows, +although a global wx.SetCursor function is also available for use +on MS Windows. - __init__(String cursorName, long flags, int hotSpotX=0, int hotSpotY=0) -> Cursor + __init__(String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor + Construct a Cursor from a file. Specify the type of file using +wx.BITAMP_TYPE* constants, and specify the hotspot if not using a +.cur file. + +This cursor is not available on wxGTK, use wx.StockCursor, +wx.CursorFromImage, or wx.CursorFromBits instead. - + StockCursor(int id) -> Cursor + Create a cursor using one of the stock cursors. Note that not +all cursors are available on all platforms. + + Stock Cursor IDs + + wx.CURSOR_ARROW A standard arrow cursor. + wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right. + wx.CURSOR_BLANK Transparent cursor. + wx.CURSOR_BULLSEYE Bullseye cursor. + wx.CURSOR_CHAR Rectangular character cursor. + wx.CURSOR_CROSS A cross cursor. + wx.CURSOR_HAND A hand cursor. + wx.CURSOR_IBEAM An I-beam cursor (vertical line). + wx.CURSOR_LEFT_BUTTON Represents a mouse with the left button depressed. + wx.CURSOR_MAGNIFIER A magnifier icon. + wx.CURSOR_MIDDLE_BUTTON Represents a mouse with the middle button depressed. + wx.CURSOR_NO_ENTRY A no-entry sign cursor. + wx.CURSOR_PAINT_BRUSH A paintbrush cursor. + wx.CURSOR_PENCIL A pencil cursor. + wx.CURSOR_POINT_LEFT A cursor that points left. + wx.CURSOR_POINT_RIGHT A cursor that points right. + wx.CURSOR_QUESTION_ARROW An arrow and question mark. + wx.CURSOR_RIGHT_BUTTON Represents a mouse with the right button depressed. + wx.CURSOR_SIZENESW A sizing cursor pointing NE-SW. + wx.CURSOR_SIZENS A sizing cursor pointing N-S. + wx.CURSOR_SIZENWSE A sizing cursor pointing NW-SE. + wx.CURSOR_SIZEWE A sizing cursor pointing W-E. + wx.CURSOR_SIZING A general sizing cursor. + wx.CURSOR_SPRAYCAN A spraycan cursor. + wx.CURSOR_WAIT A wait cursor. + wx.CURSOR_WATCH A watch cursor. + wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.) + + CursorFromImage(Image image) -> Cursor + Constructs a cursor from a wxImage. The cursor is monochrome, +colors with the RGB elements all greater than 127 will be +foreground, colors less than this background. The mask (if any) +will be used as transparent. + +In MSW the foreground will be white and the background black. The +cursor is resized to 32x32 In GTK, the two most frequent colors +will be used for foreground and background. The cursor will be +displayed at the size of the image. On MacOS the cursor is +resized to 16x16 and currently only shown as black/white (mask +respected). - - CursorFromBits(PyObject bits, int width, int height, int hotSpotX=-1, - int hotSpotY=-1, PyObject maskBits=0) -> Cursor - - - - - - - - - __del__() @@ -7752,10 +8877,10 @@ background. __del__() - FontMapper.Get() -> FontMapper + Get() -> FontMapper - FontMapper.Set(FontMapper mapper) -> FontMapper + Set(FontMapper mapper) -> FontMapper @@ -7768,22 +8893,22 @@ background. - FontMapper.GetSupportedEncodingsCount() -> size_t + GetSupportedEncodingsCount() -> size_t - FontMapper.GetEncoding(size_t n) -> int + GetEncoding(size_t n) -> int - FontMapper.GetEncodingName(int encoding) -> String + GetEncodingName(int encoding) -> String - FontMapper.GetEncodingDescription(int encoding) -> String + GetEncodingDescription(int encoding) -> String @@ -7801,7 +8926,7 @@ background. - FontMapper.GetDefaultConfigPath() -> String + GetDefaultConfigPath() -> String GetAltForEncoding(int encoding, String facename=EmptyString, bool interactive=True) -> PyObject @@ -7880,15 +9005,15 @@ background. Ok() -> bool - __eq__(Font font) -> bool + __eq__(Font other) -> bool - + - __ne__(Font font) -> bool + __ne__(Font other) -> bool - + @@ -8003,10 +9128,10 @@ background. GetNoAntiAliasing() -> bool - Font.GetDefaultEncoding() -> int + GetDefaultEncoding() -> int - Font.SetDefaultEncoding(int encoding) + SetDefaultEncoding(int encoding) @@ -8089,13 +9214,13 @@ background. - Locale.GetSystemLanguage() -> int + GetSystemLanguage() -> int - Locale.GetSystemEncoding() -> int + GetSystemEncoding() -> int - Locale.GetSystemEncodingName() -> String + GetSystemEncodingName() -> String IsOk() -> bool @@ -8113,7 +9238,7 @@ background. GetCanonicalName() -> String - Locale.AddCatalogLookupPathPrefix(String prefix) + AddCatalogLookupPathPrefix(String prefix) @@ -8131,25 +9256,25 @@ background. - Locale.GetLanguageInfo(int lang) -> LanguageInfo + GetLanguageInfo(int lang) -> LanguageInfo - Locale.GetLanguageName(int lang) -> String + GetLanguageName(int lang) -> String - Locale.FindLanguageInfo(String locale) -> LanguageInfo + FindLanguageInfo(String locale) -> LanguageInfo - Locale.AddLanguage(LanguageInfo info) + AddLanguage(LanguageInfo info) @@ -8170,15 +9295,15 @@ background. - + - GetTranslation(String sz) -> String -GetTranslation(String sz1, String sz2, size_t n) -> String + GetTranslation(String str) -> String +GetTranslation(String str, String strPlural, size_t n) -> String - - + + @@ -8208,20 +9333,20 @@ GetTranslation(String sz1, String sz2, size_t n) -> String - EncodingConverter.GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray + GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray - EncodingConverter.GetAllEquivalents(int enc) -> wxFontEncodingArray + GetAllEquivalents(int enc) -> wxFontEncodingArray - EncodingConverter.CanConvert(int encIn, int encOut) -> bool + CanConvert(int encIn, int encOut) -> bool @@ -8755,6 +9880,12 @@ Works for single as well as multi-line strings. + + GetPartialTextExtents(String text) -> wxArrayInt + + + + GetSize() -> Size Get the DC size in device units. @@ -9079,13 +10210,20 @@ Works for single as well as multi-line strings. - - __init__(DC dc, Bitmap buffer) -> BufferedDC + + + __init__(DC dc, Bitmap buffer) -> BufferedDC +__init__(DC dc, Size area) -> BufferedDC + + + + + BufferedDCInternalBuffer(DC dc, Size area) -> BufferedDC @@ -9093,6 +10231,9 @@ Works for single as well as multi-line strings. + + __del__() + UnMask() @@ -9201,13 +10342,13 @@ Works for single as well as multi-line strings. - PostScriptDC.SetResolution(int ppi) + SetResolution(int ppi) - PostScriptDC.GetResolution() -> int + GetResolution() -> int @@ -9699,6 +10840,7 @@ Works for single as well as multi-line strings. #--------------------------------------------------------------------------- + NullColor = NullColour #--------------------------------------------------------------------------- @@ -9809,6 +10951,7 @@ Works for single as well as multi-line strings. Create(Window parent, int id, 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. @@ -9847,6 +10990,7 @@ Works for single as well as multi-line strings. Create(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. @@ -10038,12 +11182,14 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) SetTitle(String title) + Sets the window's title. Applicable only to frames and dialogs. GetTitle() -> String + Gets the window's title. Applicable only to frames and dialogs. SetShape(Region region) -> bool @@ -10090,6 +11236,9 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) GetClientAreaOrigin() -> Point + Get the origin of the client area of the window relative to the +window's top left corner (the client area may be shifted because of +the borders, scrollbars, other decorations...) SendSizeEvent() @@ -10452,12 +11601,12 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) - __init__(Window parent, int id, Point point=DefaultPosition, - Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow + __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, + long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow - + @@ -10467,12 +11616,12 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) PreSplitterWindow() -> SplitterWindow - Create(Window parent, int id, Point point=DefaultPosition, - Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> bool + Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, + long style=SP_3D, String name=SplitterNameStr) -> bool - + @@ -11109,12 +12258,20 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 ) ScrollLines(int lines) -> bool + If the platform and window class supports it, scrolls the window by +the given number of lines down, if lines is positive, or up if lines +is negative. Returns True if the window was scrolled, False if it was +already on top/bottom and nothing was done. ScrollPages(int pages) -> bool + If the platform and window class supports it, scrolls the window by +the given number of pages down, if pages is positive, or up if pages +is negative. Returns True if the window was scrolled, False if it was +already on top/bottom and nothing was done. @@ -11134,6 +12291,7 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 ) HitTestXT(int x, int y) -> int + Test where the given (in client coords) point lies @@ -11141,6 +12299,7 @@ EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 ) HitTest(Point pt) -> int + Test where the given (in client coords) point lies @@ -11406,39 +12565,53 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) #--------------------------------------------------------------------------- + This class holds a variety of information related to colour dialogs. __init__() -> ColourData + Constructor, sets default values. __del__() GetChooseFull() -> bool + Under Windows, determines whether the Windows colour dialog will display +the full dialog with custom colour selection controls. Has no meaning +under other platforms. The default value is true. GetColour() -> Colour + Gets the colour (pre)selected by the dialog. GetCustomColour(int i) -> Colour + 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. SetChooseFull(int flag) + Under Windows, tells the Windows colour dialog to display the full dialog +with custom colour selection controls. Under other platforms, has no effect. +The default value is true. SetColour(Colour colour) + Sets the default colour for the colour dialog. The default colour is black. SetCustomColour(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. @@ -11446,9 +12619,12 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) + This class represents the colour chooser dialog. __init__(Window parent, ColourData data=None) -> ColourDialog + Constructor. Pass a parent window, and optionally a ColourData, which +will be copied to the colour dialog's internal ColourData instance. @@ -11456,18 +12632,30 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) GetColourData() -> ColourData - - - ShowModal() -> int + Returns a reference to the ColourData used by the dialog. + This class represents the directory chooser 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. __init__(Window parent, String message=DirSelectorPromptStr, String defaultPath=EmptyString, long style=0, 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. @@ -11480,36 +12668,106 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) GetPath() -> String + Returns the default or user-selected path. GetMessage() -> String + Returns the message that will be displayed on the dialog. GetStyle() -> long + Returns the dialog style. SetMessage(String message) + Sets the message that will be displayed on the dialog. SetPath(String path) + Sets the default path. - - ShowModal() -> int - + This class represents the file chooser 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. + __init__(Window parent, String message=FileSelectorPromptStr, String defaultDir=EmptyString, String defaultFile=EmptyString, 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. + @@ -11522,106 +12780,137 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) SetMessage(String message) + Sets the message that will be displayed on the dialog. SetPath(String path) + Sets the path (the combined directory and filename that will +be returned when the dialog is dismissed). SetDirectory(String dir) + Sets the default directory. SetFilename(String name) + Sets the default filename. SetWildcard(String wildCard) + Sets the wildcard, which can contain multiple file types, for example: + "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" SetStyle(long style) + Sets the dialog style. SetFilterIndex(int filterIndex) + Sets the default filter index, starting from zero. GetMessage() -> String + Returns the message that will be displayed on the dialog. GetPath() -> String + Returns the full path (directory and filename) of the selected file. GetDirectory() -> String + Returns the default directory. GetFilename() -> String + Returns the default filename. GetWildcard() -> String + Returns the file dialog wildcard. GetStyle() -> long + Returns the dialog style. GetFilterIndex() -> int + Returns the index into the list of filters supplied, optionally, in +the wildcard parameter. Before the dialog is shown, this is the index +which will be used when the dialog is first displayed. After the dialog +is shown, this is the index selected by the user. GetFilenames() -> PyObject + Returns a list of filenames chosen in the dialog. This function should +only be used with the dialogs which have wx.MULTIPLE style, use +GetFilename for the others. GetPaths() -> PyObject + Fills the array paths with the full paths of the files chosen. This +function should only be used with the dialogs which have wx.MULTIPLE style, +use GetPath for the others. + A simple dialog with a multi selection listbox. - __init__(Window parent, String message, String caption, int LCOUNT, - String choices, long style=CHOICEDLG_STYLE, + __init__(Window parent, String message, String caption, + List choices=[], long style=CHOICEDLG_STYLE, Point pos=DefaultPosition) -> MultiChoiceDialog + Constructor. Use ShowModal method to show the dialog. - - + + - SetSelections(wxArrayInt selections) + SetSelections(List selections) + Specify the items in the list that shoudl be selected, using a list of integers. - GetSelections() -> PyObject + GetSelections() -> [selections] + Returns a list of integers representing the items that are selected. + A simple dialog with a single selection listbox. - __init__(Window parent, String message, String caption, int choices, - String choices_array, long style=CHOICEDLG_STYLE, + __init__(Window parent, String message, String caption, + List choices=[], long style=CHOICEDLG_STYLE, Point pos=DefaultPosition) -> SingleChoiceDialog + Constructor. Use ShowModal method to show the dialog. @@ -11634,26 +12923,28 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) GetSelection() -> int + Get the index of teh currently selected item. GetStringSelection() -> String + Returns the string value of the currently selected item SetSelection(int sel) + Set the current selected item to sel - - ShowModal() -> int - + A dialog with text control, [ok] and [cancel] buttons __init__(Window parent, String message, String caption=GetTextFromUserPromptStr, String defaultValue=EmptyString, long style=wxOK|wxCANCEL|wxCENTRE, Point pos=DefaultPosition) -> TextEntryDialog + Constructor. Use ShowModal method to show the dialog. @@ -11665,75 +12956,97 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) GetValue() -> String + Returns the text that the user has entered if the user has pressed OK, +or the original value if the user has pressed Cancel. SetValue(String value) + Sets the default text value. - - ShowModal() -> int - + This class holds a variety of information related to font dialogs. __init__() -> FontData + This class holds a variety of information related to font dialogs. __del__() EnableEffects(bool enable) + Enables or disables 'effects' under MS Windows only. This refers +to the controls for manipulating colour, strikeout and underline +properties. The default value is true. GetAllowSymbols() -> bool + Under MS Windows, returns a flag determining whether symbol fonts can be +selected. Has no effect on other platforms. The default value is true. GetColour() -> Colour + Gets the colour associated with the font dialog. The default value is black. GetChosenFont() -> Font + Gets the font chosen by the user. GetEnableEffects() -> bool + Determines whether 'effects' are enabled under Windows. GetInitialFont() -> Font + Gets the font that will be initially used by the font dialog. This should have +previously been set by the application. GetShowHelp() -> bool + Returns true if the Help button will be shown (Windows only). The default +value is false. SetAllowSymbols(bool allowSymbols) + Under MS Windows, determines whether symbol fonts can be selected. Has no +effect on other platforms. The default value is true. SetChosenFont(Font font) + Sets the font that will be returned to the user (for internal use only). SetColour(Colour colour) + Sets the colour that will be used for the font foreground colour. The default +colour is black. SetInitialFont(Font font) + Sets the font that will be initially used by the font dialog. SetRange(int min, int max) + Sets the valid range for the font point size (Windows only). The default is +0, 0 (unrestricted range). @@ -11741,15 +13054,20 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) SetShowHelp(bool showHelp) + Determines whether the Help button will be displayed in the font dialog +(Windows only). The default value is false. + This class represents the font chooser dialog. __init__(Window parent, FontData data) -> FontDialog + Constructor. Pass a parent window and the FontData object to be +used to initialize the dialog controls. @@ -11757,17 +13075,67 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) GetFontData() -> FontData - - - ShowModal() -> int + Returns a reference to the internal FontData used by the FontDialog. + 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). + __init__(Window parent, String message, String caption=MessageBoxCaptionStr, long style=wxOK|wxCANCEL|wxCENTRE, 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). + @@ -11776,15 +13144,68 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) - - ShowModal() -> int - + A dialog that shows a short message and a progress bar. Optionally, it can +display an ABORT button. + + 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. + __init__(String title, String message, int maximum=100, Window parent=None, 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. + @@ -11795,6 +13216,13 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) Update(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. + +If false is returned, the application can either immediately destroy the +dialog or ask the user for the confirmation and if the abort is not confirmed +the dialog may be resumed with Resume function. @@ -11802,6 +13230,7 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK ) Resume() + Can be used to continue with the dialog, after the user had chosen to abort. @@ -11819,9 +13248,11 @@ EVT_COMMAND_FIND_REPLACE_ALL = EVT_FIND_REPLACE_ALL EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE + Events for the FindReplaceDialog __init__(wxEventType commandType=wxEVT_NULL, int id=0) -> FindDialogEvent + Events for the FindReplaceDialog @@ -11829,15 +13260,21 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE GetFlags() -> int + Get the currently selected flags: this is the combination of +wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags. GetFindString() -> String + Return the string to find (never empty). GetReplaceString() -> String + Return the string to replace the search string with (only +for replace and replace all events). GetDialog() -> FindReplaceDialog + Return the pointer to the dialog which generated this event. SetFlags(int flags) @@ -11859,9 +13296,27 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE + FindReplaceData holds the data for FindReplaceDialog. It is used to initialize +the dialog with the default values and will keep the last values from the +dialog when it is closed. It is also updated each time a wxFindDialogEvent is +generated so instead of using the wxFindDialogEvent methods you can also +directly query this object. + +Note that all SetXXX() methods may only be called before showing the dialog +and calling them has no effect later. + + Flags + wxFR_DOWN: downward search/replace selected (otherwise, upwards) + + wxFR_WHOLEWORD: whole word search/replace selected + + wxFR_MATCHCASE: case sensitive search/replace selected (otherwise, + case insensitive) + __init__(int flags=0) -> FindReplaceData + Constuctor initializes the flags to default value (0). @@ -11871,37 +13326,72 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE GetFindString() -> String + Get the string to find. GetReplaceString() -> String + Get the replacement string. GetFlags() -> int + Get the combination of flag values. SetFlags(int flags) + Set the flags to use to initialize the controls of the dialog. SetFindString(String str) + Set the string to find (used as initial value by the dialog). SetReplaceString(String str) + Set the replacement string (used as initial value by the dialog). + FindReplaceDialog is a standard modeless dialog which is used to allow the +user to search for some text (and possibly replace it with something +else). The actual searching is supposed to be done in the owner window which +is the parent of this dialog. Note that it means that unlike for the other +standard dialogs this one must have a parent window. Also note that there is +no way to use this dialog in a modal way; it is always, by design and +implementation, modeless. + + 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 + __init__(Window parent, FindReplaceData data, String title, 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 + @@ -11911,10 +13401,22 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE 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, int style=0) -> bool + Create the dialog, for 2-phase create. @@ -11924,9 +13426,11 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE GetData() -> FindReplaceData + Get the FindReplaceData object used by this dialog. SetData(FindReplaceData data) + Set the FindReplaceData object used by this dialog. @@ -12491,6 +13995,15 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE + + GetOutputStream() -> OutputStream + + + SetOutputStream(OutputStream outputstream) + + + + @@ -12865,7 +14378,7 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE GetAbort() -> bool - Printer.GetLastError() -> int + GetLastError() -> int @@ -13404,18 +14917,22 @@ indeed almost any other window. This sets the button to be the default item for the panel or dialog box. - Button.GetDefaultSize() -> Size + GetDefaultSize() -> Size - A Buttont that contains a bitmap. + A Button that contains a bitmap. A bitmap button can be supplied with a +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. + __init__(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, Size size=DefaultSize, long style=BU_AUTODRAW, Validator validator=DefaultValidator, String name=ButtonNameStr) -> BitmapButton - Create and show a button. + Create and show a button with a bitmap for the label. @@ -13511,11 +15028,44 @@ unselected state, and for all other states if no other bitmaps are provided. + A checkbox is a labelled box which by default is either on (checkmark is +visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag +is set) it can have a third state, called the mixed or undetermined +state. Often this is used as a "Does Not Apply" state. + + 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. + __init__(Window parent, int id, String label, Point pos=DefaultPosition, 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. + @@ -13529,11 +15079,27 @@ unselected state, and for all other states if no other bitmaps are provided. 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, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool + Actually create the GUI CheckBox for 2-phase creation. @@ -13547,49 +15113,73 @@ unselected state, and for all other states if no other bitmaps are provided. GetValue() -> bool + Gets the state of a 2-state CheckBox. Returns True if it is checked, +False otherwise. IsChecked() -> bool + Similar to GetValue, but raises an exception if it is not a 2-state CheckBox. SetValue(bool state) + Set the state of a 2-state CheckBox. Pass True for checked, +False for unchecked. Get3StateValue() -> int + Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when +it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state. +Raises an exceptiion when the function is used with a 2-state CheckBox. Set3StateValue(int state) + Sets the CheckBox to the given state. The state parameter can be +one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED +(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an +exception when the CheckBox is a 2-state checkbox and setting the state +to wx.CHK_UNDETERMINED. Is3State() -> bool + Returns whether or not the CheckBox is a 3-state CheckBox. Is3rdStateAllowedForUser() -> bool + Returns whether or not the user can set the CheckBox to the third state. #--------------------------------------------------------------------------- + A Choice control is used to select one of a list of strings. Unlike a ListBox, +only the selection is visible until the user pulls down the menu of choices. + + Events + EVT_CHOICE: Sent when an item in the list is selected. + - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - int choices=0, String choices_array=None, - long style=0, Validator validator=DefaultValidator, + __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, + List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> Choice + Create and show a Choice control + + Events + EVT_CHOICE: Sent when an item in the list is selected. + - - + @@ -13597,50 +15187,48 @@ unselected state, and for all other states if no other bitmaps are provided. 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, - int choices=0, String choices_array=None, - long style=0, Validator validator=DefaultValidator, + Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, + List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool + Actually create the GUI Choice control for 2-phase creation - - + - - GetColumns() -> int - - - SetColumns(int n=1) - - - - SetSelection(int n) + Select the n'th item (zero based) in the list. SetStringSelection(String string) + Select the item with the specifed string - SetString(int n, String s) + SetString(int n, String string) + Set the label for the n'th item (zero based) in the list. - + @@ -13648,22 +15236,62 @@ unselected state, and for all other states if no other bitmaps are provided. + A combobox is like a combination of an edit control and a listbox. It can be +displayed as static list with editable or read-only text field; or a drop-down +list with text field. + + 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. + - __init__(Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, - Size size=DefaultSize, - int choices=0, String choices_array=None, - long style=0, Validator validator=DefaultValidator, - String name=ComboBoxNameStr) -> ComboBox + __init__(Window parent, int id, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + 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. + - - + @@ -13671,28 +15299,48 @@ unselected state, and for all other states if no other bitmaps are provided. 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, Point pos=DefaultPosition, - Size size=DefaultSize, - int choices=0, String choices_array=None, - long style=0, Validator validator=DefaultValidator, - String name=ComboBoxNameStr) -> bool + Create(Window parent, int id, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + List choices=[], long style=0, Validator validator=DefaultValidator, + String name=ChoiceNameStr) -> bool + Actually create the GUI wxComboBox control for 2-phase creation - - + - + GetValue() -> String + Returns the current value in the combobox text field. SetValue(String value) @@ -13702,27 +15350,35 @@ unselected state, and for all other states if no other bitmaps are provided. Copy() + Copies the selected text to the clipboard. Cut() + Copies the selected text to the clipboard and removes the selection. Paste() + Pastes text from the clipboard to the text field. SetInsertionPoint(long pos) + Sets the insertion point in the combobox text field. GetInsertionPoint() -> long + Returns the insertion point for the combobox's text field. GetLastPosition() -> long + Returns the last position in the combobox text field. Replace(long from, long to, String value) + Replaces the text between two positions with the given text, in the +combobox text field. @@ -13731,6 +15387,7 @@ unselected state, and for all other states if no other bitmaps are provided. SetSelection(int n) + Selects the text between the two positions, in the combobox text field. @@ -13750,9 +15407,11 @@ unselected state, and for all other states if no other bitmaps are provided. SetInsertionPointEnd() + Sets the insertion point at the end of the combobox text field. Remove(long from, long to) + Removes the text between the two positions in the combobox text field. @@ -13914,7 +15573,7 @@ unselected state, and for all other states if no other bitmaps are provided.IsVertical() -> bool - StaticLine.GetDefaultSize() -> int + GetDefaultSize() -> int @@ -14013,7 +15672,7 @@ unselected state, and for all other states if no other bitmaps are provided. __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - int choices=0, String choices_array=None, + wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> ListBox @@ -14021,8 +15680,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14033,7 +15691,7 @@ unselected state, and for all other states if no other bitmaps are provided. Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - int choices=0, String choices_array=None, + wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool @@ -14041,8 +15699,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14050,6 +15707,8 @@ unselected state, and for all other states if no other bitmaps are provided. Insert(String item, int pos, PyObject clientData=None) + Insert an item into the control before the item at the pos index, +optionally associating some data object with the item. @@ -14084,6 +15743,7 @@ unselected state, and for all other states if no other bitmaps are provided. Select(int n) + Sets the item at index 'n' to be the selected item. @@ -14137,6 +15797,27 @@ unselected state, and for all other states if no other bitmaps are provided. IsSorted() -> bool + + SetItemForegroundColour(int item, Colour c) + + + + + + + SetItemBackgroundColour(int item, Colour c) + + + + + + + SetItemFont(int item, Font f) + + + + + #--------------------------------------------------------------------------- @@ -14145,7 +15826,7 @@ unselected state, and for all other states if no other bitmaps are provided. __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - int choices=0, String choices_array=None, + wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> CheckListBox @@ -14153,8 +15834,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14165,7 +15845,7 @@ unselected state, and for all other states if no other bitmaps are provided. Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - int choices=0, String choices_array=None, + wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool @@ -14173,8 +15853,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14198,12 +15877,14 @@ unselected state, and for all other states if no other bitmaps are provided. HitTest(Point pt) -> int + Test where the given (in client coords) point lies HitTestXY(int x, int y) -> int + Test where the given (in client coords) point lies @@ -14226,6 +15907,9 @@ __init__(Colour colText, Colour colBack=wxNullColour, Font font=wxNullFont, + + __del__() + Init() @@ -14333,7 +16017,7 @@ __init__(Colour colText, Colour colBack=wxNullColour, Font font=wxNullFont, IsDefault() -> bool - TextAttr.Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr + Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr @@ -14537,6 +16221,17 @@ __init__(Colour colText, Colour colBack=wxNullColour, Font font=wxNullFont, + + HitTest(Point pt) -> (result, row, col) + Find the character at position given in pixels. +NB: pt is in device coords (not adjusted for the client area +origin nor scrolling) + + + + + + Copy() @@ -14665,6 +16360,7 @@ EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1) Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=SB_HORIZONTAL, Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> bool + Do the 2nd phase and create the GUI control. @@ -14699,6 +16395,19 @@ EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1) SetScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh=True) + Sets the scrollbar properties of a built-in scrollbar. + + orientation: Determines the scrollbar whose page size is to be + set. May be wx.HORIZONTAL or wx.VERTICAL. + + position: The position of the scrollbar in scroll units. + + thumbSize: The size of the thumb, or visible portion of the + scrollbar, in scroll units. + + range: The maximum position of the scrollbar. + + refresh: True to redraw the scrollbar, false otherwise. @@ -14888,19 +16597,18 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - __init__(Window parent, int id, String label, Point point=DefaultPosition, - Size size=DefaultSize, int choices=0, - String choices_array=None, int majorDimension=0, + __init__(Window parent, int id, String label, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> RadioBox - + - - + @@ -14911,19 +16619,18 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) PreRadioBox() -> RadioBox - Create(Window parent, int id, String label, Point point=DefaultPosition, - Size size=DefaultSize, int choices=0, - String choices_array=None, int majorDimension=0, + Create(Window parent, int id, String label, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> bool - + - - + @@ -15054,7 +16761,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) __init__(Window parent, int id, int value, int minValue, int maxValue, - Point point=DefaultPosition, Size size=DefaultSize, + Point pos=DefaultPosition, Size size=DefaultSize, long style=SL_HORIZONTAL, Validator validator=DefaultValidator, String name=SliderNameStr) -> Slider @@ -15063,7 +16770,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - + @@ -15075,7 +16782,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) Create(Window parent, int id, int value, int minValue, int maxValue, - Point point=DefaultPosition, Size size=DefaultSize, + Point pos=DefaultPosition, Size size=DefaultSize, long style=SL_HORIZONTAL, Validator validator=DefaultValidator, String name=SliderNameStr) -> bool @@ -15084,7 +16791,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - + @@ -15153,10 +16860,10 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) GetThumbLength() -> int - SetTickFreq(int n, int pos) + SetTickFreq(int n, int pos=1) - + @@ -15240,6 +16947,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) SetLabel(String label) + Sets the item's text. @@ -15443,7 +17151,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) HitTest(Point pt) -> (tab, where) - Returns the tab which is hit, and flags indicating where using wxNB_HITTEST_ flags. + Returns the tab which is hit, and flags indicating where using wx.NB_HITTEST_ flags. @@ -16338,6 +18046,7 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_ICON, Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool + Do the 2nd phase and create the GUI control. @@ -16357,12 +18066,29 @@ 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. @@ -16530,6 +18256,9 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED SetWindowStyleFlag(long style) + Sets the style of the window. Please note that some styles cannot be +changed after the window creation and that Refresh() might be called +after changing the others for the change to take place immediately. @@ -16769,6 +18498,7 @@ giving details in the second return value (see wxLIST_HITTEST_... flags.)Create(Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=LC_REPORT, Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool + Do the 2nd phase and create the GUI control. @@ -16852,7 +18582,7 @@ giving details in the second return value (see wxLIST_HITTEST_... flags.) - + @@ -17010,6 +18740,7 @@ EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, String name=TreeCtrlNameStr) -> bool + Do the 2nd phase and create the GUI control. @@ -17244,10 +18975,10 @@ EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP - GetNextChild(TreeItemId item, wxTreeItemIdValue cookie) -> PyObject + GetNextChild(TreeItemId item, void cookie) -> PyObject - + @@ -17380,11 +19111,24 @@ EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP Unselect() + + UnselectItem(TreeItemId item) + + + + UnselectAll() - SelectItem(TreeItemId item) + SelectItem(TreeItemId item, bool select=True) + + + + + + + ToggleItemSelection(TreeItemId item) @@ -17727,6 +19471,29 @@ EVT_DETAILED_HELP = wx.PyEventBinder( wxEVT_DETAILED_HELP, 1) EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) + A help event is sent when the user has requested +context-sensitive help. This can either be caused by the +application requesting context-sensitive help mode via +wx.ContextHelp, or (on MS Windows) by the system generating a +WM_HELP message when the user pressed F1 or clicked on the query +button in a dialog caption. + +A help event is sent to the window that the user clicked on, and +is propagated up the window hierarchy until the event is +processed or there are no more event handlers. The application +should call event.GetId to check the identity of the clicked-on +window, and then either show some suitable help or call +event.Skip if the identifier is unrecognised. Calling Skip is +important because it allows wxWindows to generate further events +for ancestors of the clicked-on window. Otherwise it would be +impossible to show help for container windows, since processing +would stop after the first window found. + + Events + EVT_HELP Sent when the user has requested context- + sensitive help. + EVT_HELP_RANGE Allows to catch EVT_HELP for a range of IDs + __init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> HelpEvent @@ -17738,36 +19505,68 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) GetPosition() -> Point + Returns the left-click position of the mouse, in screen +coordinates. This allows the application to position the help +appropriately. SetPosition(Point pos) + Sets the left-click position of the mouse, in screen coordinates. GetLink() -> String + Get an optional link to further help SetLink(String link) + Set an optional link to further help GetTarget() -> String + Get an optional target to display help in. E.g. a window specification SetTarget(String target) + Set an optional target to display help in. E.g. a window specification + This class changes the cursor to a query and puts the application +into a 'context-sensitive help mode'. When the user left-clicks +on a window within the specified window, a EVT_HELP event is sent +to that control, and the application may respond to it by popping +up some help. + +There are a couple of ways to invoke this behaviour implicitly: + + * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a + dialog (Windows only). This will put a question mark in the + titlebar, and Windows will put the application into + context-sensitive help mode automatically, with further + programming. + + * Create a wx.ContextHelpButton, whose predefined behaviour + is to create a context help object. Normally you will write + your application so that this button is only added to a + dialog for non-Windows platforms (use + wx.DIALOG_EX_CONTEXTHELP on Windows). + __init__(Window window=None, bool doNow=True) -> ContextHelp + Constructs a context help object, calling BeginContextHelp if +doNow is true (the default). + +If window is None, the top window is used. @@ -17778,19 +19577,40 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) BeginContextHelp(Window window=None) -> bool + Puts the application into context-sensitive help mode. window is +the window which will be used to catch events; if NULL, the top +window will be used. + +Returns true if the application was successfully put into +context-sensitive help mode. This function only returns when the +event loop has finished. EndContextHelp() -> bool + Ends context-sensitive help mode. Not normally called by the +application. + Instances of this class may be used to add a question mark button +that when pressed, puts the application into context-help +mode. It does this by creating a wx.ContextHelp object which +itself generates a EVT_HELP event when the user clicks on a +window. + +On Windows, you may add a question-mark icon to a dialog by use +of the wx.DIALOG_EX_CONTEXTHELP extra style, but on other +platforms you will have to add a button explicitly, usually next +to OK, Cancel or similar buttons. + __init__(Window parent, int id=ID_CONTEXT_HELP, Point pos=DefaultPosition, Size size=DefaultSize, long style=BU_AUTODRAW) -> ContextHelpButton + Constructor, creating and showing a context help button. @@ -17801,29 +19621,49 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) + wx.HelpProvider is an abstract class used by a program +implementing context-sensitive help to show the help text for the +given window. + +The current help provider must be explicitly set by the +application using wx.HelpProvider.Set(). - HelpProvider.Set(HelpProvider helpProvider) -> HelpProvider + Set(HelpProvider helpProvider) -> HelpProvider + Sset the current, application-wide help provider. Returns the +previous one. Unlike some other classes, the help provider is +not created on demand. This must be explicitly done by the +application. - HelpProvider.Get() -> HelpProvider + Get() -> HelpProvider + Return the current application-wide help provider. GetHelp(Window window) -> String + Gets the help string for this window. Its interpretation is +dependent on the help provider except that empty string always +means that no help is associated with the window. ShowHelp(Window window) -> bool + Shows help for the given window. Uses GetHelp internally if +applicable. + +Returns true if it was done, or false if no help was available +for this window. AddHelp(Window window, String text) + Associates the text with the given window. @@ -17831,19 +19671,38 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) AddHelpById(int id, String text) + This version associates the given text with all windows with this +id. May be used to set the same help string for all Cancel +buttons in the application, for example. + + RemoveHelp(Window window) + Removes the association between the window pointer and the help +text. This is called by the wx.Window destructor. Without this, +the table of help strings will fill up and when window pointers +are reused, the wrong help string will be found. + + + + Destroy() + wx.SimpleHelpProvider is an implementation of wx.HelpProvider +which supports only plain text help strings, and shows the string +associated with the control (if any) in a tooltip. __init__() -> SimpleHelpProvider + wx.SimpleHelpProvider is an implementation of wx.HelpProvider +which supports only plain text help strings, and shows the string +associated with the control (if any) in a tooltip. @@ -17969,34 +19828,34 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) - SystemSettings.GetColour(int index) -> Colour + GetColour(int index) -> Colour - SystemSettings.GetFont(int index) -> Font + GetFont(int index) -> Font - SystemSettings.GetMetric(int index) -> int + GetMetric(int index) -> int - SystemSettings.HasFeature(int index) -> bool + HasFeature(int index) -> bool - SystemSettings.GetScreenType() -> int + GetScreenType() -> int - SystemSettings.SetScreenType(int screen) + SetScreenType(int screen) @@ -18008,33 +19867,33 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) __init__() -> SystemOptions - SystemOptions.SetOption(String name, String value) + SetOption(String name, String value) - SystemOptions.SetOptionInt(String name, int value) + SetOptionInt(String name, int value) - SystemOptions.GetOption(String name) -> String + GetOption(String name) -> String - SystemOptions.GetOptionInt(String name) -> int + GetOptionInt(String name) -> int - SystemOptions.HasOption(String name) -> bool + HasOption(String name) -> bool @@ -18423,13 +20282,13 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) GetWindow() -> Window - ToolTip.Enable(bool flag) + Enable(bool flag) - ToolTip.SetDelay(long milliseconds) + SetDelay(long milliseconds) @@ -18841,16 +20700,16 @@ __init__(wxTimer timer, int milli, bool oneShot=False) -> TimerRunner__init__() -> Log - Log.IsEnabled() -> bool + IsEnabled() -> bool - Log.EnableLogging(bool doIt=True) -> bool + EnableLogging(bool doIt=True) -> bool - Log.OnLog(wxLogLevel level, wxChar szString, time_t t) + OnLog(wxLogLevel level, wxChar szString, time_t t) @@ -18861,88 +20720,88 @@ __init__(wxTimer timer, int milli, bool oneShot=False) -> TimerRunnerFlush() - Log.FlushActive() + FlushActive() - Log.GetActiveTarget() -> Log + GetActiveTarget() -> Log - Log.SetActiveTarget(Log pLogger) -> Log + SetActiveTarget(Log pLogger) -> Log - Log.Suspend() + Suspend() - Log.Resume() + Resume() - Log.SetVerbose(bool bVerbose=True) + SetVerbose(bool bVerbose=True) - Log.SetLogLevel(wxLogLevel logLevel) + SetLogLevel(wxLogLevel logLevel) - Log.DontCreateOnDemand() + DontCreateOnDemand() - Log.SetTraceMask(wxTraceMask ulMask) + SetTraceMask(wxTraceMask ulMask) - Log.AddTraceMask(String str) + AddTraceMask(String str) - Log.RemoveTraceMask(String str) + RemoveTraceMask(String str) - Log.ClearTraceMasks() + ClearTraceMasks() - Log.GetTraceMasks() -> wxArrayString + GetTraceMasks() -> wxArrayString - Log.SetTimestamp(wxChar ts) + SetTimestamp(wxChar ts) - Log.GetVerbose() -> bool + GetVerbose() -> bool - Log.GetTraceMask() -> wxTraceMask + GetTraceMask() -> wxTraceMask - Log.IsAllowedTraceMask(wxChar mask) -> bool + IsAllowedTraceMask(wxChar mask) -> bool - Log.GetLogLevel() -> wxLogLevel + GetLogLevel() -> wxLogLevel - Log.GetTimestamp() -> wxChar + GetTimestamp() -> wxChar - Log.TimeStamp() -> String + TimeStamp() -> String Destroy() @@ -19161,20 +21020,20 @@ LogTrace(String mask, String msg) - Process.Kill(int pid, int sig=SIGTERM) -> int + Kill(int pid, int sig=SIGTERM) -> int - Process.Exists(int pid) -> bool + Exists(int pid) -> bool - Process.Open(String cmd, int flags=EXEC_ASYNC) -> Process + Open(String cmd, int flags=EXEC_ASYNC) -> Process @@ -19508,33 +21367,59 @@ EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN, #--------------------------------------------------------------------------- - - - __init__(String fileName, bool isResource=False) -> Wave + + + - + - - WaveData(String data) -> Wave + + __init__() -> Sound +__init__(String fileName, bool isResource=false) -> Sound +__init__(int size, wxByte data) -> Sound - + + - + __del__() + + + + + + + + Create(String fileName, bool isResource=false) -> bool +Create(int size, wxByte data) -> bool + + + + + IsOk() -> bool - Play(bool async=True, bool looped=False) -> bool + Play(unsigned int flags=SOUND_ASYNC) -> bool - - + + + PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool + + + + + + + Stop() + #--------------------------------------------------------------------------- @@ -19670,7 +21555,7 @@ EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN, Unassociate() -> bool - FileType.ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String + ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String @@ -19686,7 +21571,7 @@ EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN, __del__() - MimeTypesManager.IsOfType(String mimeType, String wildcard) -> bool + IsOfType(String mimeType, String wildcard) -> bool @@ -19764,18 +21649,18 @@ EVT_JOYSTICK_EVENTS = wx.PyEventBinder([ wxEVT_JOY_BUTTON_DOWN, - ArtProvider.PushProvider(ArtProvider provider) + PushProvider(ArtProvider provider) Add new provider to the top of providers stack. - ArtProvider.PopProvider() -> bool + PopProvider() -> bool Remove latest added provider and delete it. - ArtProvider.RemoveProvider(ArtProvider provider) -> bool + RemoveProvider(ArtProvider provider) -> bool Remove provider. The provider must have been added previously! The provider is _not_ deleted. @@ -19783,7 +21668,7 @@ The provider is _not_ deleted. - ArtProvider.GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap + GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap Query the providers for bitmap with given ID and return it. Return wx.NullBitmap if no provider provides it. @@ -19793,7 +21678,7 @@ wx.NullBitmap if no provider provides it. - ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon + GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon Query the providers for icon with given ID and return it. Return wx.NullIcon if no provider provides it. @@ -19810,92 +21695,146 @@ wx.NullIcon if no provider provides it. #--------------------------------------------------------------------------- + wx.ConfigBase class defines the basic interface of all config +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. + __del__() - ConfigBase.Set(ConfigBase pConfig) -> ConfigBase + Set(ConfigBase config) -> ConfigBase + Sets the global config object (the one returned by Get) and +returns a reference to the previous global config object. - + - ConfigBase.Get(bool createOnDemand=True) -> ConfigBase + Get(bool createOnDemand=True) -> ConfigBase + Returns the current global config object, creating one if neccessary. - ConfigBase.Create() -> ConfigBase + Create() -> ConfigBase + Create and return a new global config object. This function will +create the "best" implementation of wx.Config available for the +current platform. - ConfigBase.DontCreateOnDemand() + DontCreateOnDemand() + Should Get() try to create a new log object if there isn't a current one? - SetPath(String strPath) + SetPath(String path) + Set current path: if the first character is '/', it's the absolute path, +otherwise it's a relative path. '..' is supported. If the strPath +doesn't exist it is created. - + GetPath() -> String + Retrieve the current path (always as absolute path) - GetFirstGroup() -> PyObject + GetFirstGroup() -> (more, value, index) + Allows enumerating the subgroups in a config object. Returns +a tuple containing a flag indicating there are more items, the +name of the current item, and an index to pass to GetNextGroup to +fetch the next item. - GetNextGroup(long index) -> PyObject + GetNextGroup(long index) -> (more, value, index) + Allows enumerating the subgroups in a config object. Returns +a tuple containing a flag indicating there are more items, the +name of the current item, and an index to pass to GetNextGroup to +fetch the next item. - GetFirstEntry() -> PyObject + GetFirstEntry() -> (more, value, index) + Allows enumerating the entries in the current group in a config +object. Returns a tuple containing a flag indicating there are +more items, the name of the current item, and an index to pass to +GetNextGroup to fetch the next item. - GetNextEntry(long index) -> PyObject + GetNextEntry(long index) -> (more, value, index) + Allows enumerating the entries in the current group in a config +object. Returns a tuple containing a flag indicating there are +more items, the name of the current item, and an index to pass to +GetNextGroup to fetch the next item. - GetNumberOfEntries(bool bRecursive=False) -> size_t + GetNumberOfEntries(bool recursive=False) -> size_t + Get the number of entries in the current group, with or +without its subgroups. - + - GetNumberOfGroups(bool bRecursive=False) -> size_t + GetNumberOfGroups(bool recursive=False) -> size_t + Get the number of subgroups in the current group, with or +without its subgroups. - + - HasGroup(String strName) -> bool + HasGroup(String name) -> bool + Returns True if the group by this name exists - + - HasEntry(String strName) -> bool + HasEntry(String name) -> bool + Returns True if the entry by this name exists - + - Exists(String strName) -> bool + Exists(String name) -> bool + Returns True if either a group or an entry with a given name exists - + GetEntryType(String name) -> int + Get the type of the entry. Returns one of the wx.Config.Type_XXX values. Read(String key, String defaultVal=EmptyString) -> String + Returns the value of key if it exists, defaultVal otherwise. @@ -19903,6 +21842,7 @@ wx.NullIcon if no provider provides it. ReadInt(String key, long defaultVal=0) -> long + Returns the value of key if it exists, defaultVal otherwise. @@ -19910,6 +21850,7 @@ wx.NullIcon if no provider provides it. ReadFloat(String key, double defaultVal=0.0) -> double + Returns the value of key if it exists, defaultVal otherwise. @@ -19917,6 +21858,7 @@ wx.NullIcon if no provider provides it. ReadBool(String key, bool defaultVal=False) -> bool + Returns the value of key if it exists, defaultVal otherwise. @@ -19924,6 +21866,7 @@ wx.NullIcon if no provider provides it. Write(String key, String value) -> bool + write the value (return True on success) @@ -19931,6 +21874,7 @@ wx.NullIcon if no provider provides it. WriteInt(String key, long value) -> bool + write the value (return True on success) @@ -19938,6 +21882,7 @@ wx.NullIcon if no provider provides it. WriteFloat(String key, double value) -> bool + write the value (return True on success) @@ -19945,19 +21890,23 @@ wx.NullIcon if no provider provides it. WriteBool(String key, bool value) -> bool + write the value (return True on success) - Flush(bool bCurrentOnly=False) -> bool + Flush(bool currentOnly=False) -> bool + permanently writes all changes - + RenameEntry(String oldName, String newName) -> bool + Rename an entry. Returns False on failure (probably because the new +name is already taken by an existing entry) @@ -19965,47 +21914,60 @@ wx.NullIcon if no provider provides it. RenameGroup(String oldName, String newName) -> bool + Rename aa group. Returns False on failure (probably because the new +name is already taken by an existing entry) - DeleteEntry(String key, bool bDeleteGroupIfEmpty=True) -> bool + DeleteEntry(String key, bool deleteGroupIfEmpty=True) -> bool + Deletes the specified entry and the group it belongs to if +it was the last key in it and the second parameter is True - + DeleteGroup(String key) -> bool + Delete the group (with all subgroups) DeleteAll() -> bool - - - IsExpandingEnvVars() -> bool + Delete the whole underlying object (disk file, registry key, ...) +primarly intended for use by desinstallation routine. - SetExpandEnvVars(bool bDoIt=True) + SetExpandEnvVars(bool doIt=True) + We can automatically expand environment variables in the config entries +(this option is on by default, you can turn it on/off at any time) - + + + IsExpandingEnvVars() -> bool + Are we currently expanding environment variables? + - SetRecordDefaults(bool bDoIt=True) + SetRecordDefaults(bool doIt=True) + Set whether the config objec should record default values. - + IsRecordingDefaults() -> bool + Are we currently recording default values? ExpandEnvVars(String str) -> String + Expand any environment variables in str and return the result @@ -20038,22 +22000,9 @@ wx.NullIcon if no provider provides it. GetStyle() -> long - - - __init__(ConfigBase pContainer, String strEntry) -> ConfigPathChanger - - - - - - - __del__() - - - Name() -> String - - + This ConfigBase-derived class will use the registry on Windows, +and will be a wx.FileConfig on other platforms. __init__(String appName=EmptyString, String vendorName=EmptyString, @@ -20072,6 +22021,7 @@ wx.NullIcon if no provider provides it. + This config class will use a file for storage on all platforms. __init__(String appName=EmptyString, String vendorName=EmptyString, @@ -20089,8 +22039,32 @@ wx.NullIcon if no provider provides it. __del__() + + A handy little class which changes current path to the path of +given entry and restores it in the destructoir: so if you declare +a local variable of this type, you work in the entry directory +and the path is automatically restored when the function returns. + + __init__(ConfigBase config, String entry) -> ConfigPathChanger + + + + + + + __del__() + + + Name() -> String + Get the key name + + ExpandEnvVars(String sz) -> String + Replace environment variables ($SOMETHING) with their values. The +format is $VARNAME or ${VARNAME} where VARNAME contains +alphanumeric characters and '_' only. '$' must be escaped ('\\$') +in order to be taken literally. @@ -20140,60 +22114,60 @@ wx.NullIcon if no provider provides it. __del__() - DateTime.SetCountry(int country) + SetCountry(int country) - DateTime.GetCountry() -> int + GetCountry() -> int - DateTime.IsWestEuropeanCountry(int country=Country_Default) -> bool + IsWestEuropeanCountry(int country=Country_Default) -> bool - DateTime.GetCurrentYear(int cal=Gregorian) -> int + GetCurrentYear(int cal=Gregorian) -> int - DateTime.ConvertYearToBC(int year) -> int + ConvertYearToBC(int year) -> int - DateTime.GetCurrentMonth(int cal=Gregorian) -> int + GetCurrentMonth(int cal=Gregorian) -> int - DateTime.IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool + IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool - DateTime.GetCentury(int year=Inv_Year) -> int + GetCentury(int year=Inv_Year) -> int - DateTime.GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int + GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int - DateTime.GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int + GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int @@ -20201,14 +22175,14 @@ wx.NullIcon if no provider provides it. - DateTime.GetMonthName(int month, int flags=Name_Full) -> String + GetMonthName(int month, int flags=Name_Full) -> String - DateTime.GetWeekDayName(int weekday, int flags=Name_Full) -> String + GetWeekDayName(int weekday, int flags=Name_Full) -> String @@ -20223,34 +22197,34 @@ wx.NullIcon if no provider provides it. - DateTime.IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool + IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool - DateTime.GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime + GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime - DateTime.GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime + GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime - DateTime.Now() -> DateTime + Now() -> DateTime - DateTime.UNow() -> DateTime + UNow() -> DateTime - DateTime.Today() -> DateTime + Today() -> DateTime SetToCurrent() -> DateTime @@ -20744,7 +22718,7 @@ __sub__(DateSpan other) -> DateTime - ParseFormat(String date, String format=DateFormatStr, DateTime dateDef=wxDefaultDateTime) -> int + ParseFormat(String date, String format=DateFormatStr, DateTime dateDef=DefaultDateTime) -> int @@ -20803,49 +22777,49 @@ __sub__(DateSpan other) -> DateTime __del__() - TimeSpan.Seconds(long sec) -> TimeSpan + Seconds(long sec) -> TimeSpan - TimeSpan.Second() -> TimeSpan + Second() -> TimeSpan - TimeSpan.Minutes(long min) -> TimeSpan + Minutes(long min) -> TimeSpan - TimeSpan.Minute() -> TimeSpan + Minute() -> TimeSpan - TimeSpan.Hours(long hours) -> TimeSpan + Hours(long hours) -> TimeSpan - TimeSpan.Hour() -> TimeSpan + Hour() -> TimeSpan - TimeSpan.Days(long days) -> TimeSpan + Days(long days) -> TimeSpan - TimeSpan.Day() -> TimeSpan + Day() -> TimeSpan - TimeSpan.Weeks(long days) -> TimeSpan + Weeks(long days) -> TimeSpan - TimeSpan.Week() -> TimeSpan + Week() -> TimeSpan Add(TimeSpan diff) -> TimeSpan @@ -21018,40 +22992,40 @@ __sub__(DateSpan other) -> DateTime __del__() - DateSpan.Days(int days) -> DateSpan + Days(int days) -> DateSpan - DateSpan.Day() -> DateSpan + Day() -> DateSpan - DateSpan.Weeks(int weeks) -> DateSpan + Weeks(int weeks) -> DateSpan - DateSpan.Week() -> DateSpan + Week() -> DateSpan - DateSpan.Months(int mon) -> DateSpan + Months(int mon) -> DateSpan - DateSpan.Month() -> DateSpan + Month() -> DateSpan - DateSpan.Years(int years) -> DateSpan + Years(int years) -> DateSpan - DateSpan.Year() -> DateSpan + Year() -> DateSpan SetYears(int n) -> DateSpan @@ -21187,14 +23161,27 @@ __sub__(DateSpan other) -> DateTime #--------------------------------------------------------------------------- + A wx.DataFormat is an encapsulation of a platform-specific format +handle which is used by the system for the clipboard and drag and +drop operations. The applications are usually only interested in, +for example, pasting data from the clipboard only if the data is +in a format the program understands. A data format is is used to +uniquely identify this format. + +On the system level, a data format is usually just a number +(CLIPFORMAT under Windows or Atom under X11, for example). __init__(int type) -> DataFormat + Constructs a data format object for one of the standard data +formats or an empty data object (use SetType or SetId later in +this case) CustomDataFormat(String format) -> DataFormat + Constructs a data format object for a custom format identified by its name. @@ -21228,18 +23215,22 @@ __ne__(DataFormat format) -> bool SetType(int format) + Sets the format to the given value, which should be one of wx.DF_XXX constants. GetType() -> int + Returns the platform-specific number identifying the format. GetId() -> String + Returns the name of a custom format (this function will fail for a standard format). SetId(String format) + Sets the format to be the custom format identified by the given name. @@ -21423,6 +23414,12 @@ __ne__(DataFormat format) -> bool GetFilenames() -> wxArrayString + + AddFile(String filename) + + + + @@ -21533,8 +23530,8 @@ __ne__(DataFormat format) -> bool - - PyDropTarget(DataObject dataObject=None) -> DropTarget + + __init__(DataObject dataObject=None) -> DropTarget @@ -21687,6 +23684,16 @@ __ne__(DataFormat format) -> bool #--------------------------------------------------------------------------- + wx.Clipboard represents the system clipboard and provides methods to copy data +to or paste data from it. Normally, you should only use wx.TheClipboard which +is a reference to a global wx.Clipboard instance. + +Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation +returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put +data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the +clipboard. Call wx.TheClipboard.Close to close the clipboard and relinquish +ownership. You should keep the clipboard open only momentarily. + __init__() -> Clipboard @@ -21696,53 +23703,81 @@ __ne__(DataFormat format) -> bool Open() -> bool + Call this function to open the clipboard before calling SetData +and GetData. Call Close when you have finished with the clipboard. +You should keep the clipboard open for only a very short time. +Returns true on success. Close() + Closes the clipboard. IsOpened() -> bool + Query whether the clipboard is opened AddData(DataObject data) -> bool + Call this function to add the data object to the clipboard. You +may call this function repeatedly after having cleared the clipboard. +After this function has been called, the clipboard owns the data, so +do not delete the data explicitly. SetData(DataObject data) -> bool + Set the clipboard data, this is the same as Clear followed by AddData. IsSupported(DataFormat format) -> bool + Returns True if the given format is available in the data object(s) on +the clipboard. GetData(DataObject data) -> bool + Call this function to fill data with data on the clipboard, if available +in the required format. Returns true on success. Clear() + Clears data from the clipboard object and also the system's clipboard +if possible. Flush() -> bool + Flushes the clipboard: this means that the data which is currently on +clipboard will stay available even after the application exits (possibly +eating memory), otherwise the clipboard will be emptied on exit. +Returns False if the operation is unsuccesful for any reason. - UsePrimarySelection(bool primary=False) + UsePrimarySelection(bool primary=True) + On platforms supporting it (the X11 based platforms), selects the so +called PRIMARY SELECTION as the clipboard as opposed to the normal +clipboard, if primary is True. - + + A helpful class for opening the clipboard and automatically closing it when +the locker is destroyed. __init__(Clipboard clipboard=None) -> ClipboardLocker + A helpful class for opening the clipboard and automatically closing it when +the locker is destroyed. @@ -21752,6 +23787,8 @@ __ne__(DataFormat format) -> bool __nonzero__() -> bool + A ClipboardLocker instance evaluates to True if the clipboard was +successfully opened. @@ -21759,25 +23796,21 @@ __ne__(DataFormat format) -> bool wx = core + A set of customization attributes for a calendar date, which can be used to +control the look of the Calendar object. - __init__(Colour colText, Colour colBack=wxNullColour, Colour colBorder=wxNullColour, - Font font=wxNullFont, + __init__(Colour colText=wxNullColour, Colour colBack=wxNullColour, + Colour colBorder=wxNullColour, Font font=wxNullFont, int border=CAL_BORDER_NONE) -> CalendarDateAttr + Create a CalendarDateAttr. - + - - CalendarDateAttrBorder(int border, Colour colBorder=wxNullColour) -> CalendarDateAttr - - - - - SetTextColour(Colour colText) @@ -21885,12 +23918,106 @@ EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1) EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1) + The calendar control allows the user to pick a date interactively. + 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. + + - __init__(Window parent, int id, DateTime date=wxDefaultDateTime, + __init__(Window parent, int id, DateTime date=DefaultDateTime, Point pos=DefaultPosition, Size size=DefaultSize, 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. + + @@ -21903,12 +24030,60 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 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=wxDefaultDateTime, + Create(Window parent, int id, DateTime date=DefaultDateTime, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS, String name=CalendarNameStr) -> bool + Acutally create the GUI portion of the CalendarCtrl for 2-phase creation. @@ -21921,33 +24096,40 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, SetDate(DateTime date) + Sets the current date. GetDate() -> DateTime + Gets the currently selected date. - SetLowerDateLimit(DateTime date=wxDefaultDateTime) -> bool + SetLowerDateLimit(DateTime date=DefaultDateTime) -> bool + set the range in which selection can occur - - GetLowerDateLimit() -> DateTime - - SetUpperDateLimit(DateTime date=wxDefaultDateTime) -> bool + SetUpperDateLimit(DateTime date=DefaultDateTime) -> bool + set the range in which selection can occur + + GetLowerDateLimit() -> DateTime + get the range in which selection can occur + GetUpperDateLimit() -> DateTime + get the range in which selection can occur - SetDateRange(DateTime lowerdate=wxDefaultDateTime, DateTime upperdate=wxDefaultDateTime) -> bool + SetDateRange(DateTime lowerdate=DefaultDateTime, DateTime upperdate=DefaultDateTime) -> bool + set the range in which selection can occur @@ -21955,24 +24137,33 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, EnableYearChange(bool enable=True) + This function should be used instead of changing CAL_NO_YEAR_CHANGE +style bit directly. It allows or disallows the user to change the year +interactively. EnableMonthChange(bool enable=True) + This function should be used instead of changing CAL_NO_MONTH_CHANGE style +bit. It allows or disallows the user to change the month interactively. Note +that if the month can not be changed, the year can not be changed either. EnableHolidayDisplay(bool display=True) + This function should be used instead of changing CAL_SHOW_HOLIDAYS style +bit directly. It enables or disables the special highlighting of the holidays. SetHeaderColours(Colour colFg, Colour colBg) + header colours are used for painting the weekdays at the top @@ -21980,12 +24171,15 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, GetHeaderColourFg() -> Colour + header colours are used for painting the weekdays at the top GetHeaderColourBg() -> Colour + header colours are used for painting the weekdays at the top SetHighlightColours(Colour colFg, Colour colBg) + highlight colour is used for the currently selected date @@ -21993,12 +24187,15 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, GetHighlightColourFg() -> Colour + highlight colour is used for the currently selected date GetHighlightColourBg() -> Colour + highlight colour is used for the currently selected date SetHolidayColours(Colour colFg, Colour colBg) + holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) @@ -22006,18 +24203,24 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, GetHolidayColourFg() -> Colour + holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) GetHolidayColourBg() -> Colour + holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) GetAttr(size_t day) -> CalendarDateAttr + Returns the attribute for the given date (should be in the range 1...31). +The returned value may be None SetAttr(size_t day, CalendarDateAttr attr) + Associates the attribute with the specified date (in the range 1...31). +If the attribute passed is None, the items attribute is cleared. @@ -22025,41 +24228,39 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, SetHoliday(size_t day) + Marks the specified day as being a holiday in the current month. ResetAttr(size_t day) + Clears any attributes associated with the given day (in the range 1...31). - - HitTest(Point pos, DateTime date=None, int wd=None) -> int + + HitTest(Point pos) -> (result, date, weekday) + Returns 3-tuple with information about the given position on the calendar +control. The first value of the tuple is a result code and determines the +validity of the remaining two values. The result codes are: + + CAL_HITTEST_NOWHERE: hit outside of anything + CAL_HITTEST_HEADER: hit on the header, weekday is valid + CAL_HITTEST_DAY: hit on a day in the calendar, date is set. + - - - - - - Enable(bool enable=True) -> bool - - - - - - Show(bool show=True) -> bool - - GetMonthControl() -> Control + get the currently shown control for month GetYearControl() -> Control + get the currently shown control for year @@ -23344,6 +25545,9 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 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. @@ -25347,6 +27551,7 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) SetTitle(String title) + Sets the window's title. Applicable only to frames and dialogs. @@ -25405,11 +27610,26 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) - HtmlWindow.AddFilter(HtmlFilter filter) + AddFilter(HtmlFilter filter) + + SelectWord(Point pos) + + + + + + SelectLine(Point pos) + + + + + + SelectAll() + base_OnLinkClicked(HtmlLinkInfo link) @@ -25554,13 +27774,13 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) - HtmlPrintout.AddFilter(wxHtmlFilter filter) + AddFilter(wxHtmlFilter filter) - HtmlPrintout.CleanUpStatics() + CleanUpStatics() @@ -26142,7 +28362,7 @@ EVT_WIZARD_FINISHED = wx.PyEventBinder( wxEVT_WIZARD_FINISHED, 1) - WizardPageSimple.Chain(WizardPageSimple first, WizardPageSimple second) + Chain(WizardPageSimple first, WizardPageSimple second) @@ -26304,8 +28524,8 @@ EVT_WIZARD_FINISHED = wx.PyEventBinder( wxEVT_WIZARD_FINISHED, 1) - - wxGLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, + + GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=GLCanvasNameStr, int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas @@ -32198,6 +34418,7 @@ ControlPoint = PyControlPoint + wx = core @@ -33795,6 +36016,12 @@ ControlPoint = PyControlPoint + + SetHotspotSingleLine(bool singleLine) + + + + PositionBefore(int pos) -> int @@ -33821,6 +36048,39 @@ ControlPoint = PyControlPoint + + SetSelectionMode(int mode) + + + + + + GetSelectionMode() -> int + + + GetLineSelStartPosition(int line) -> int + + + + + + GetLineSelEndPosition(int line) -> int + + + + + + SetWhitespaceChars(String characters) + + + + + + SetCharsDefault() + + + AutoCompGetCurrent() -> int + StartRecord() @@ -33972,7 +36232,7 @@ ControlPoint = PyControlPoint - DoDragOver(int x, int y, wxDragResult def) -> wxDragResult + DoDragOver(int x, int y, int def) -> int @@ -33987,6 +36247,15 @@ ControlPoint = PyControlPoint + + SetUseAntiAliasing(bool useAA) + + + + + + GetUseAntiAliasing() -> bool + @@ -34115,7 +36384,7 @@ ControlPoint = PyControlPoint - SetDragResult(wxDragResult val) + SetDragResult(int val) @@ -34178,7 +36447,7 @@ ControlPoint = PyControlPoint GetDragAllowMove() -> bool - GetDragResult() -> wxDragResult + GetDragResult() -> int GetShift() -> bool @@ -34277,7 +36546,7 @@ EVT_STC_CALLTIP_CLICK = wx.PyEventBinder( wxEVT_STC_CALLTIP_CLICK, 1 ) ClearHandlers() - XmlResource.AddSubclassFactory(XmlSubclassFactory factory) + AddSubclassFactory(XmlSubclassFactory factory) @@ -34391,7 +36660,7 @@ EVT_STC_CALLTIP_CLICK = wx.PyEventBinder( wxEVT_STC_CALLTIP_CLICK, 1 ) - XmlResource.GetXRCID(String str_id) -> int + GetXRCID(String str_id) -> int @@ -34409,10 +36678,10 @@ EVT_STC_CALLTIP_CLICK = wx.PyEventBinder( wxEVT_STC_CALLTIP_CLICK, 1 ) - XmlResource.Get() -> XmlResource + Get() -> XmlResource - XmlResource.Set(XmlResource res) -> XmlResource + Set(XmlResource res) -> XmlResource @@ -35305,6 +37574,7 @@ EVT_DYNAMIC_SASH_UNIFY = wx.PyEventBinder( wxEVT_DYNAMIC_SASH_UNIFY, 1 ) Size size=DefaultSize, long style=TR_DEFAULT_STYLE, Validator validator=DefaultValidator, String name=TreeListCtrlNameStr) -> bool + Do the 2nd phase and create the GUI control.