X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cff531b1a85a05ea1cec6e13a543ddd6a7fb0ab3..cfe5e918e6cbb28da4e4041b3fccfdaf538b247c:/wxPython/docs/xml/wxPython-metadata.xml diff --git a/wxPython/docs/xml/wxPython-metadata.xml b/wxPython/docs/xml/wxPython-metadata.xml index 0c7460d458..82f5edf3df 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. @@ -3360,6 +3361,13 @@ class PyOnDemandOutputWindow: EVT_CLOSE(self.frame, self.OnCloseWindow) + def OnCloseWindow(self, event): + if self.frame is not None: + self.frame.Destroy() + self.frame = None + self.text = None + + # These methods provide the file-like output behaviour. def write(self, text): """ @@ -3384,11 +3392,6 @@ class PyOnDemandOutputWindow: wx.CallAfter(self.frame.Close) - def OnCloseWindow(self, event): - if self.frame is not None: - self.frame.Destroy() - self.frame = None - self.text = None #---------------------------------------------------------------------- @@ -3462,7 +3465,7 @@ your Mac.""" self.RestoreStdio() - def RedirectStdio(self, filename): + def RedirectStdio(self, filename=None): """Redirect sys.stdout and sys.stderr to a file or a popup window.""" if filename: _sys.stdout = _sys.stderr = open(filename, 'a') @@ -3616,10 +3619,133 @@ _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. @@ -3631,10 +3757,12 @@ _sys.__wxPythonCleanup = __wxPyCleanup() PreWindow() -> Window + Precreate a Window for 2-phase creation. 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 +3774,158 @@ _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. + + + SetWindowVariant(int variant) + Sets the variant of the window/font size to use for this window, +if the platform supports variants, (for example, wxMac.) + + + + + + GetWindowVariant() -> int SetId(int winid) + 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 +3936,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 +3944,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() SetSizeWH(int width, int height) + Sets the size of the window in pixels. @@ -3743,6 +3952,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() Move(Point pt, int flags=SIZE_USE_EXISTING) + Moves the window to the given position. @@ -3750,6 +3960,7 @@ _sys.__wxPythonCleanup = __wxPyCleanup() MoveXY(int x, int y, int flags=SIZE_USE_EXISTING) + Moves the window to the given position. @@ -3758,18 +3969,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 +4002,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 +4037,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 +4057,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 +4089,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 +4159,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 +4187,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 +4206,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 +4222,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 +4535,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 +4602,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 +4613,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 +4646,70 @@ 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. Calls to Freeze/Thaw may be nested, with the actual Thaw +being delayed until all the nesting has been undone. + +This method is useful for visual appearance optimization (for example, +it is a good idea to use it before inserting large amount of text into +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. Calls to +Freeze/Thaw may be nested, so Thaw must be called the same number of times +that Freeze was before the window will be updated. PrepareDC(DC dc) + 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 +4719,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 + + 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 the default font used 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 +4833,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 +4845,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 +4862,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 +4884,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 +4952,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 +4963,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 +4999,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 +5052,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 +5196,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 +5205,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 +5245,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 +5256,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,15 +5270,21 @@ 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. - Window_FromHWND(unsigned long hWnd) -> Window + Window_FromHWND(Window parent, unsigned long _hWnd) -> Window - + + @@ -4642,10 +5320,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 +5355,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 +5364,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 +5392,8 @@ def DLG_SZE(win, size_width, height=None): - - AppendItem(MenuItem item) + + AppendItem(MenuItem item) -> MenuItem @@ -4723,16 +5401,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 +5419,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 +5434,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 +5443,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 +5453,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 +5468,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 +5889,7 @@ def DLG_SZE(win, size_width, height=None): GetText() -> String - MenuItem.GetLabelFromText(String text) -> String + GetLabelFromText(String text) -> String @@ -5280,7 +5958,7 @@ def DLG_SZE(win, size_width, height=None): - MenuItem.GetDefaultMarginWidth() -> int + GetDefaultMarginWidth() -> int SetBitmap(Bitmap bitmap) @@ -5296,11 +5974,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 +5997,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 +6016,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 +6038,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 +6064,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 +6083,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 +6115,7 @@ def DLG_SZE(win, size_width, height=None): SetString(int n, String s) + Sets the label for the given item. @@ -5402,30 +6123,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 +6165,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 +6732,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 +6781,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 +7063,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 +7119,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) LeftOf(Window sibling, int marg=0) + Sibling relationship @@ -6351,6 +7127,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) RightOf(Window sibling, int marg=0) + Sibling relationship @@ -6358,6 +7135,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) Above(Window sibling, int marg=0) + Sibling relationship @@ -6365,6 +7143,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) Below(Window sibling, int marg=0) + Sibling relationship @@ -6372,6 +7151,7 @@ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) SameAs(Window otherW, int edge, int marg=0) + 'Same edge' alignment @@ -6380,6 +7160,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 +7169,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 +7238,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 +7253,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 +7263,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 @@ -6506,6 +7319,8 @@ try: except NameError: __builtins__.True = 1==1 __builtins__.False = 1==0 + def bool(value): return not not value + __builtins__.bool = bool @@ -6617,7 +7432,7 @@ def CallAfter(callable, *args, **kw): class FutureCall: """ - A convenience class for wxTimer, that calls the given callable + A convenience class for wx.Timer, that calls the given callable object once after the given amount of milliseconds, passing any positional or keyword args. The return value of the callable is availbale after it has been run with the GetResult method. @@ -6634,6 +7449,7 @@ class FutureCall: self.callable = callable self.SetArgs(*args, **kwargs) self.runCount = 0 + self.running = False self.hasRun = False self.result = None self.timer = None @@ -6655,6 +7471,7 @@ class FutureCall: self.Stop() self.timer = wx.PyTimer(self.Notify) self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) + self.running = True Restart = Start @@ -6701,9 +7518,12 @@ class FutureCall: """ if self.callable and getattr(self.callable, 'im_self', True): self.runCount += 1 + self.running = False self.result = self.callable(*self.args, **self.kwargs) self.hasRun = True - wx.CallAfter(self.Stop) + if not self.running: + # if it wasn't restarted, then cleanup + wx.CallAfter(self.Stop) #---------------------------------------------------------------------------- @@ -6756,9 +7576,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 +7603,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 +7620,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 +7646,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 +7801,18 @@ _core._wxPyFixStockObjects() GetDashes() -> PyObject + + __eq__(Pen other) -> bool + + + + + + __ne__(Pen other) -> bool + + + + GetDashCount() -> int @@ -7167,6 +8043,18 @@ to the bitmap. This function preserves bit depth and mask information. + + __eq__(Bitmap other) -> bool + + + + + + __ne__(Bitmap other) -> bool + + + + This class encapsulates a monochrome mask bitmap, where the masked area is @@ -7175,22 +8063,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. + __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(Bitmap bitmap, Colour colour) -> Mask - Constructs a mask from a bitmap and a colour in that bitmap that indicates the -background. - - - + + MaskColour = Mask @@ -7344,40 +8226,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 +8682,10 @@ background. __del__() - FontMapper.Get() -> FontMapper + Get() -> FontMapper - FontMapper.Set(FontMapper mapper) -> FontMapper + Set(FontMapper mapper) -> FontMapper @@ -7768,22 +8698,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 +8731,7 @@ background. - FontMapper.GetDefaultConfigPath() -> String + GetDefaultConfigPath() -> String GetAltForEncoding(int encoding, String facename=EmptyString, bool interactive=True) -> PyObject @@ -7880,15 +8810,15 @@ background. Ok() -> bool - __eq__(Font font) -> bool + __eq__(Font other) -> bool - + - __ne__(Font font) -> bool + __ne__(Font other) -> bool - + @@ -8003,10 +8933,10 @@ background. GetNoAntiAliasing() -> bool - Font.GetDefaultEncoding() -> int + GetDefaultEncoding() -> int - Font.SetDefaultEncoding(int encoding) + SetDefaultEncoding(int encoding) @@ -8089,13 +9019,13 @@ background. - Locale.GetSystemLanguage() -> int + GetSystemLanguage() -> int - Locale.GetSystemEncoding() -> int + GetSystemEncoding() -> int - Locale.GetSystemEncodingName() -> String + GetSystemEncodingName() -> String IsOk() -> bool @@ -8113,7 +9043,7 @@ background. GetCanonicalName() -> String - Locale.AddCatalogLookupPathPrefix(String prefix) + AddCatalogLookupPathPrefix(String prefix) @@ -8131,25 +9061,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 +9100,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 +9138,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 +9685,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 +10015,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 +10036,9 @@ Works for single as well as multi-line strings. + + __del__() + UnMask() @@ -9201,13 +10147,13 @@ Works for single as well as multi-line strings. - PostScriptDC.SetResolution(int ppi) + SetResolution(int ppi) - PostScriptDC.GetResolution() -> int + GetResolution() -> int @@ -9699,6 +10645,7 @@ Works for single as well as multi-line strings. #--------------------------------------------------------------------------- + NullColor = NullColour #--------------------------------------------------------------------------- @@ -9809,6 +10756,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 +10795,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 +10987,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 +11041,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() @@ -10110,11 +11064,11 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) - CreateStatusBar(int number=1, long style=ST_SIZEGRIP, int winid=0, - String name=StatusLineNameStr) -> StatusBar + CreateStatusBar(int number=1, long style=wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + int winid=0, String name=StatusLineNameStr) -> StatusBar - + @@ -10365,11 +11319,12 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) - __init__(Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> StatusBar + __init__(Window parent, int id=-1, long style=wxST_SIZEGRIP|wxFULL_REPAINT_ON_RESIZE, + String name=StatusLineNameStr) -> StatusBar - + @@ -10450,14 +11405,64 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) #--------------------------------------------------------------------------- + wx.SplitterWindow manages up to two subwindows or panes, +with an optional vertical or horizontal split which can be +used with the mouse or programmatically. + + + Styles + wx.SP_3D Draws a 3D effect border and sash. + wx.SP_3DSASH Draws a 3D effect sash. + wx.SP_3DBORDER Synonym for wxSP_BORDER. + wx.SP_BORDER Draws a standard border. + wx.SP_NOBORDER No border (default). + wx.SP_NO_XP_THEME Under Windows XP, switches off the + attempt to draw the splitter + using Windows XP theming, so the + borders and sash will take on the + pre-XP look. + wx.SP_PERMIT_UNSPLIT Always allow to unsplit, even with + the minimum pane size other than zero. + wx.SP_LIVE_UPDATE Don't draw XOR line but resize the + child windows immediately. + + Events + + EVT_SPLITTER_SASH_POS_CHANGING + The sash position is in the + process of being changed. May be + used to modify the position of + the tracking bar to properly + reflect the position that would + be set if the drag were to be + completed at this point. + + EVT_SPLITTER_SASH_POS_CHANGED + The sash position was + changed. May be used to modify + the sash position before it is + set, or to prevent the change + from taking place. + + EVT_SPLITTER_UNSPLIT The splitter has been just unsplit. + + EVT_SPLITTER_DCLICK The sash was double clicked. The + default behaviour is to unsplit + the window when this happens + (unless the minimum pane size has + been set to a value greater than + zero.) + + - __init__(Window parent, int id, Point 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 + Constructor. Creates and shows a SplitterWindow. - + @@ -10465,14 +11470,16 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) PreSplitterWindow() -> SplitterWindow + Precreate a SplitterWindow for 2-phase creation. - 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 + Create the GUI part of the SplitterWindow for the 2-phase create. - + @@ -10480,27 +11487,55 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) GetWindow1() -> Window + Gets the only or left/top pane. GetWindow2() -> Window + Gets the right/bottom pane. SetSplitMode(int mode) + Sets the split mode. The mode can be wx.SPLIT_VERTICAL or +wx.SPLIT_HORIZONTAL. This only sets the internal variable; +does not update the display. GetSplitMode() -> int + Gets the split mode Initialize(Window window) + Initializes the splitter window to have one pane. This +should be called if you wish to initially view only a single +pane in the splitter window. SplitVertically(Window window1, Window window2, int sashPosition=0) -> bool + Initializes the left and right panes of the splitter window. + + window1 The left pane. + window2 The right pane. + sashPosition The initial position of the sash. If this + value is positive, it specifies the size + of the left pane. If it is negative, it is + absolute value gives the size of the right + pane. Finally, specify 0 (default) to + choose the default position (half of the + total window width). + +Returns True if successful, False otherwise (the window was +already split). + +SplitVertically should be called if you wish to initially +view two panes. It can also be called at any subsequent +time, but the application should check that the window is +not currently split using IsSplit. @@ -10509,6 +11544,25 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) SplitHorizontally(Window window1, Window window2, int sashPosition=0) -> bool + Initializes the top and bottom panes of the splitter window. + + window1 The top pane. + window2 The bottom pane. + sashPosition The initial position of the sash. If this + value is positive, it specifies the size + of the upper pane. If it is negative, it + is absolute value gives the size of the + lower pane. Finally, specify 0 (default) + to choose the default position (half of + the total window height). + +Returns True if successful, False otherwise (the window was +already split). + +SplitHorizontally should be called if you wish to initially +view two panes. It can also be called at any subsequent +time, but the application should check that the window is +not currently split using IsSplit. @@ -10517,40 +11571,81 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) Unsplit(Window toRemove=None) -> bool + Unsplits the window. Pass the pane to remove, or None to +remove the right or bottom pane. Returns True if +successful, False otherwise (the window was not split). + +This function will not actually delete the pane being +removed; it sends EVT_SPLITTER_UNSPLIT which can be handled +for the desired behaviour. By default, the pane being +removed is only hidden. ReplaceWindow(Window winOld, Window winNew) -> bool + This function replaces one of the windows managed by the +SplitterWindow with another one. It is in general better to +use it instead of calling Unsplit() and then resplitting the +window back because it will provoke much less flicker. It is +valid to call this function whether the splitter has two +windows or only one. + +Both parameters should be non-None and winOld must specify +one of the windows managed by the splitter. If the +parameters are incorrect or the window couldn't be replaced, +False is returned. Otherwise the function will return True, +but please notice that it will not Destroy the replaced +window and you may wish to do it yourself. + + UpdateSize() + Causes any pending sizing of the sash and child panes to +take place immediately. + +Such resizing normally takes place in idle time, in order to +wait for layout to be completed. However, this can cause +unacceptable flicker as the panes are resized after the +window has been shown. To work around this, you can perform +window layout (for example by sending a size event to the +parent window), and then call this function, before showing +the top-level window. + IsSplit() -> bool + Is the window split? SetSashSize(int width) + Sets the sash size SetBorderSize(int width) + Sets the border size GetSashSize() -> int + Gets the sash size GetBorderSize() -> int + Gets the border size SetSashPosition(int position, bool redraw=True) + Sets the sash position, in pixels. If redraw is Ttrue then +the panes are resized and the sash and border are redrawn. @@ -10558,18 +11653,30 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) GetSashPosition() -> int + Returns the surrent sash position. SetMinimumPaneSize(int min) + Sets the minimum pane size in pixels. + +The default minimum pane size is zero, which means that +either pane can be reduced to zero by dragging the sash, +thus removing one of the panes. To prevent this behaviour (and +veto out-of-range sash dragging), set a minimum size, +for example 20 pixels. If the wx.SP_PERMIT_UNSPLIT style is +used when a splitter window is created, the window may be +unsplit even if minimum size is non-zero. GetMinimumPaneSize() -> int + Gets the minimum pane size in pixels. SashHitTest(int x, int y, int tolerance=5) -> bool + Tests for x, y over the sash @@ -10578,6 +11685,7 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) SizeWindows() + Resizes subwindows SetNeedUpdating(bool needUpdating) @@ -10590,9 +11698,11 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) + This class represents the events generated by a splitter control. __init__(wxEventType type=wxEVT_NULL, SplitterWindow splitter=(wxSplitterWindow *) NULL) -> SplitterEvent + This class represents the events generated by a splitter control. @@ -10600,21 +11710,38 @@ CalcUnscrolledPosition(int x, int y) -> (ux, uy) SetSashPosition(int pos) + This funciton is only meaningful during +EVT_SPLITTER_SASH_POS_CHANGING and +EVT_SPLITTER_SASH_POS_CHANGED events. In the case of +_CHANGED events, sets the the new sash position. In the case +of _CHANGING events, sets the new tracking bar position so +visual feedback during dragging will represent that change +that will actually take place. Set to -1 from the event +handler code to prevent repositioning. GetSashPosition() -> int + Returns the new sash position while in +EVT_SPLITTER_SASH_POS_CHANGING and +EVT_SPLITTER_SASH_POS_CHANGED events. GetWindowBeingRemoved() -> Window + Returns a pointer to the window being removed when a +splitter window is unsplit. GetX() -> int + Returns the x coordinate of the double-click point in a +EVT_SPLITTER_DCLICK event. GetY() -> int + Returns the y coordinate of the double-click point in a +EVT_SPLITTER_DCLICK event. @@ -10622,6 +11749,7 @@ EVT_SPLITTER_SASH_POS_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_SASH_PO EVT_SPLITTER_SASH_POS_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 1 ) EVT_SPLITTER_DOUBLECLICKED = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 1 ) EVT_SPLITTER_UNSPLIT = wx.PyEventBinder( wxEVT_COMMAND_SPLITTER_UNSPLIT, 1 ) +EVT_SPLITTER_DCLICK = EVT_SPLITTER_DOUBLECLICKED #--------------------------------------------------------------------------- @@ -11109,12 +12237,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 +12270,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 +12278,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 +12544,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 +12598,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 +12611,24 @@ 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. @@ -11480,36 +12641,73 @@ 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. @@ -11522,106 +12720,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 +12863,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 +12896,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 +12994,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 +13015,43 @@ 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. @@ -11776,15 +13060,42 @@ 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. @@ -11795,6 +13106,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 +13120,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 +13138,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 +13150,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 +13186,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 +13216,62 @@ 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. @@ -11911,10 +13281,12 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE PreFindReplaceDialog() -> FindReplaceDialog + Precreate a FindReplaceDialog for 2-phase creation Create(Window parent, FindReplaceData data, String title, int style=0) -> bool + Create the dialog, for 2-phase create. @@ -11924,9 +13296,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 +13865,15 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE + + GetOutputStream() -> OutputStream + + + SetOutputStream(OutputStream outputstream) + + + + @@ -12648,8 +14031,13 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE - - __init__() -> PrintDialogData + + + __init__() -> PrintDialogData +__init__(PrintData printData) -> PrintDialogData + + + __del__() @@ -12865,7 +14253,7 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE GetAbort() -> bool - Printer.GetLastError() -> int + GetLastError() -> int @@ -13086,12 +14474,20 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE - - __init__(Printout printout, Printout printoutForPrinting, PrintData data=None) -> PrintPreview + + + + + + + + + __init__(Printout printout, Printout printoutForPrinting, PrintDialogData data=None) -> PrintPreview +__init__(Printout printout, Printout printoutForPrinting, PrintData data) -> PrintPreview - + @@ -13198,12 +14594,20 @@ EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE - - __init__(Printout printout, Printout printoutForPrinting, PrintData data=None) -> PyPrintPreview + - + + + + + __init__(Printout printout, Printout printoutForPrinting, PrintDialogData data=None) -> PyPrintPreview +__init__(Printout printout, Printout printoutForPrinting, PrintData data) -> PyPrintPreview + + + + @@ -13404,18 +14808,39 @@ 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. + + + Styles + wx.BU_AUTODRAW: If this is specified, the button will be drawn + automatically using the label bitmap only, providing a + 3D-look border. If this style is not specified, the button + will be drawn without borders and using all provided + bitmaps. WIN32 only. + wx.BU_LEFT: Left-justifies the label. WIN32 only. + wx.BU_TOP: Aligns the label to the top of the button. WIN32 only. + wx.BU_RIGHT: Right-justifies the bitmap label. WIN32 only. + wx.BU_BOTTOM: Aligns the label to the bottom of the button. WIN32 only. + wx.BU_EXACTFIT: Creates the button as small as possible instead of making + it of the standard size (which is the default behaviour.) + + Events + EVT_BUTTON: Sent when the button is clicked. + __init__(Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, 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 +14936,30 @@ 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 @@ -13529,11 +14973,13 @@ unselected state, and for all other states if no other bitmaps are provided. PreCheckBox() -> CheckBox + Precreate a CheckBox for 2-phase creation. 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 +14993,69 @@ 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 - - + @@ -13597,50 +15063,44 @@ unselected state, and for all other states if no other bitmaps are provided. PreChoice() -> Choice + Precreate a Choice control for 2-phase creation. - 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 +15108,43 @@ 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. - - + @@ -13671,28 +15152,29 @@ unselected state, and for all other states if no other bitmaps are provided. PreComboBox() -> ComboBox + Precreate a ComboBox control for 2-phase creation. - 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 +15184,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 +15221,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 +15241,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 +15407,7 @@ unselected state, and for all other states if no other bitmaps are provided.IsVertical() -> bool - StaticLine.GetDefaultSize() -> int + GetDefaultSize() -> int @@ -14013,7 +15506,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 +15514,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14033,7 +15525,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 +15533,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14050,6 +15541,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 +15577,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 +15631,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 +15660,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 +15668,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14165,7 +15679,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 +15687,7 @@ unselected state, and for all other states if no other bitmaps are provided. - - + @@ -14198,12 +15711,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 +15741,9 @@ __init__(Colour colText, Colour colBack=wxNullColour, Font font=wxNullFont, + + __del__() + Init() @@ -14333,7 +15851,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 +16055,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 +16194,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 +16229,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 +16431,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 +16453,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 +16595,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 +16604,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - + @@ -15075,7 +16616,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 +16625,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - + @@ -15153,10 +16694,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 +16781,7 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) SetLabel(String label) + Sets the item's text. @@ -15400,11 +16942,11 @@ EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=NOTEBOOK_NAME) -> Notebook + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> Notebook - + @@ -15443,7 +16985,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. @@ -15511,11 +17053,11 @@ class NotebookPage(wx.Panel): - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=EmptyString) -> Listbook + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=EmptyString) -> Listbook - + @@ -16338,6 +17880,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. @@ -16530,6 +18073,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. @@ -16562,6 +18108,9 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED + + InReportView() -> bool + IsVirtual() -> bool @@ -16769,6 +18318,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 +18402,7 @@ giving details in the second return value (see wxLIST_HITTEST_... flags.) - + @@ -17010,6 +18560,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 +18795,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 +18931,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 +19291,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 +19325,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 +19397,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 +19441,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 +19491,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 +19648,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 +19687,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 +20102,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) @@ -18743,10 +20422,11 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) __del__() - _setCallbackInfo(PyObject self, PyObject _class) + _setCallbackInfo(PyObject self, PyObject _class, int incref=1) + @@ -18779,7 +20459,7 @@ EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) GetId() -> int - + # For backwards compatibility with 2.4 class PyTimer(Timer): def __init__(self, notify): @@ -18792,7 +20472,7 @@ class PyTimer(Timer): EVT_TIMER = wx.PyEventBinder( wxEVT_TIMER, 1 ) - + @@ -18841,16 +20521,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 +20541,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 +20841,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 +21188,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 +21376,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 +21392,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 +21470,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 +21489,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 +21499,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 +21516,147 @@ 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 that act +like directories and entries, key/value pairs that act like +files. There is always one current group given by the current +path. As in the file system case, to specify a key in the config +class you must use a path to it. Config classes also support the +notion of the current group, which makes it possible to use +relative paths. + +Keys are pairs "key_name = value" where value may be of string, +integer floating point or boolean, you can not store binary data +without first encoding it as a string. For performance reasons +items should be kept small, no more than a couple kilobytes. + __del__() - 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 +21664,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 +21672,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 +21680,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 +21688,7 @@ wx.NullIcon if no provider provides it. Write(String key, String value) -> bool + write the value (return True on success) @@ -19931,6 +21696,7 @@ wx.NullIcon if no provider provides it. WriteInt(String key, long value) -> bool + write the value (return True on success) @@ -19938,6 +21704,7 @@ wx.NullIcon if no provider provides it. WriteFloat(String key, double value) -> bool + write the value (return True on success) @@ -19945,19 +21712,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 +21736,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,33 +21822,20 @@ 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, String localFilename=EmptyString, String globalFilename=EmptyString, - long style=0) -> Config + long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> Config - + @@ -20072,25 +21843,50 @@ 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, String localFilename=EmptyString, String globalFilename=EmptyString, - long style=0) -> FileConfig + long style=wxCONFIG_USE_LOCAL_FILE|wxCONFIG_USE_GLOBAL_FILE) -> FileConfig - + __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 +21936,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 +21997,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 +22019,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 +22540,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 +22599,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 +22814,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 +22983,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 +23037,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 +23236,12 @@ __ne__(DataFormat format) -> bool GetFilenames() -> wxArrayString + + AddFile(String filename) + + + + @@ -21533,8 +23352,8 @@ __ne__(DataFormat format) -> bool - - PyDropTarget(DataObject dataObject=None) -> DropTarget + + __init__(DataObject dataObject=None) -> DropTarget @@ -21687,6 +23506,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 +23525,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 +23609,153 @@ __ne__(DataFormat format) -> bool __nonzero__() -> bool + A ClipboardLocker instance evaluates to True if the clipboard was +successfully opened. + + + +#--------------------------------------------------------------------------- + + + A simple struct containing video mode parameters for a display + + __init__(int width=0, int height=0, int depth=0, int freq=0) -> VideoMode + A simple struct containing video mode parameters for a display + + + + + + + + + __del__() + + + Matches(VideoMode other) -> bool + Returns true if this mode matches the other one in the sense that +all non zero fields of the other mode have the same value in this +one (except for refresh which is allowed to have a greater value) + + + + + + GetWidth() -> int + Returns the screen width in pixels (e.g. 640*480), 0 means +unspecified + + + GetHeight() -> int + Returns the screen width in pixels (e.g. 640*480), 0 means +unspecified + + + GetDepth() -> int + Returns the screen's bits per pixel (e.g. 32), 1 is monochrome +and 0 means unspecified/known + + + IsOk() -> bool + returns true if the object has been initialized + + + __eq__(VideoMode other) -> bool + + + + + + __ne__(VideoMode other) -> bool + + + + + + + + + + + Represents a display/monitor attached to the system + + __init__(size_t index=0) -> Display + Set up a Display instance with the specified display. The +displays are numbered from 0 to GetCount() - 1, 0 is always the +primary display and the only one which is always supported + + + + + + __del__() + + + GetCount() -> size_t + Return the number of available displays. + + + GetFromPoint(Point pt) -> int + Find the display where the given point lies, return wx.NOT_FOUND +if it doesn't belong to any display + + + + + + GetFromWindow(Window window) -> int + Find the display where the given window lies, return wx.NOT_FOUND +if it is not shown at all. + + + + + + IsOk() -> bool + Return true if the object was initialized successfully + + + GetGeometry() -> Rect + Returns the bounding rectangle of the display whose index was +passed to the constructor. + + + GetName() -> String + Returns the display's name. A name is not available on all platforms. + + + IsPrimary() -> bool + Returns true if the display is the primary display. The primary +display is the one whose index is 0. + + + GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...] + Enumerate all video modes supported by this display matching the +given one (in the sense of VideoMode.Match()). + +As any mode matches the default value of the argument and there +is always at least one video mode supported by display, the +returned array is only empty for the default value of the +argument if this function is not supported at all on this +platform. + + + + + + GetCurrentMode() -> VideoMode + Get the current video mode. + + + ChangeMode(VideoMode mode=DefaultVideoMode) -> bool + Change current mode, return true if succeeded, false otherwise + + + + + + ResetMode() + Restore the default video mode (just a more readable synonym) @@ -21759,25 +23763,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 +23885,60 @@ 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. @@ -21903,12 +23951,14 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, PreCalendarCtrl() -> CalendarCtrl + Precreate a CalendarCtrl for 2-phase creation. - 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 +23971,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 +24012,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 +24046,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 +24062,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 +24078,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 +24103,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 @@ -23342,13 +25418,6 @@ EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, ForceRefresh() - - Refresh(bool eraseb=True, Rect rect=None) - - - - - IsEditable() -> bool @@ -24954,6 +27023,9 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) GetDescent() -> int + + GetMaxTotalWidth() -> int + GetId() -> String @@ -25405,11 +27477,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 +27641,13 @@ EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) - HtmlPrintout.AddFilter(wxHtmlFilter filter) + AddFilter(wxHtmlFilter filter) - HtmlPrintout.CleanUpStatics() + CleanUpStatics() @@ -26142,7 +28229,7 @@ EVT_WIZARD_FINISHED = wx.PyEventBinder( wxEVT_WIZARD_FINISHED, 1) - WizardPageSimple.Chain(WizardPageSimple first, WizardPageSimple second) + Chain(WizardPageSimple first, WizardPageSimple second) @@ -26304,8 +28391,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 +34285,7 @@ ControlPoint = PyControlPoint + wx = core @@ -33517,9 +35605,148 @@ ControlPoint = PyControlPoint + + LineDown() + This is just a wrapper for ScrollLines(1). + + + LineDownExtend() + + + LineUp() + This is just a wrapper for ScrollLines(-1). + + + LineUpExtend() + + + CharLeft() + + + CharLeftExtend() + + + CharRight() + + + CharRightExtend() + + + WordLeft() + + + WordLeftExtend() + + + WordRight() + + + WordRightExtend() + + + Home() + + + HomeExtend() + + + LineEnd() + + + LineEndExtend() + + + DocumentStart() + + + DocumentStartExtend() + + + DocumentEnd() + + + DocumentEndExtend() + + + PageUp() + This is just a wrapper for ScrollPages(-1). + + + PageUpExtend() + + + PageDown() + This is just a wrapper for ScrollPages(1). + + + PageDownExtend() + + + EditToggleOvertype() + + + Cancel() + + + DeleteBack() + + + Tab() + + + BackTab() + + + NewLine() + + + FormFeed() + + + VCHome() + + + VCHomeExtend() + + + ZoomIn() + + + ZoomOut() + + + DelWordLeft() + + + DelWordRight() + + + LineCut() + + + LineDelete() + + + LineTranspose() + LineDuplicate() + + LowerCase() + + + UpperCase() + + + LineScrollDown() + + + LineScrollUp() + + + DeleteBackNotLine() + HomeDisplay() @@ -33532,6 +35759,24 @@ ControlPoint = PyControlPoint LineEndDisplayExtend() + + HomeWrap() + + + HomeWrapExtend() + + + LineEndWrap() + + + LineEndWrapExtend() + + + VCHomeWrap() + + + VCHomeWrapExtend() + LineCopy() @@ -33795,6 +36040,24 @@ ControlPoint = PyControlPoint + + SetHotspotSingleLine(bool singleLine) + + + + + + ParaDown() + + + ParaDownExtend() + + + ParaUp() + + + ParaUpExtend() + PositionBefore(int pos) -> int @@ -33821,6 +36084,90 @@ ControlPoint = PyControlPoint + + SetSelectionMode(int mode) + + + + + + GetSelectionMode() -> int + + + GetLineSelStartPosition(int line) -> int + + + + + + GetLineSelEndPosition(int line) -> int + + + + + + LineDownRectExtend() + + + LineUpRectExtend() + + + CharLeftRectExtend() + + + CharRightRectExtend() + + + HomeRectExtend() + + + VCHomeRectExtend() + + + LineEndRectExtend() + + + PageUpRectExtend() + + + PageDownRectExtend() + + + StutteredPageUp() + + + StutteredPageUpExtend() + + + StutteredPageDown() + + + StutteredPageDownExtend() + + + WordLeftEnd() + + + WordLeftEndExtend() + + + WordRightEnd() + + + WordRightEndExtend() + + + SetWhitespaceChars(String characters) + + + + + + SetCharsDefault() + + + AutoCompGetCurrent() -> int + StartRecord() @@ -33972,7 +36319,7 @@ ControlPoint = PyControlPoint - DoDragOver(int x, int y, wxDragResult def) -> wxDragResult + DoDragOver(int x, int y, int def) -> int @@ -33987,6 +36334,15 @@ ControlPoint = PyControlPoint + + SetUseAntiAliasing(bool useAA) + + + + + + GetUseAntiAliasing() -> bool + @@ -34115,7 +36471,7 @@ ControlPoint = PyControlPoint - SetDragResult(wxDragResult val) + SetDragResult(int val) @@ -34178,7 +36534,7 @@ ControlPoint = PyControlPoint GetDragAllowMove() -> bool - GetDragResult() -> wxDragResult + GetDragResult() -> int GetShift() -> bool @@ -34277,7 +36633,7 @@ EVT_STC_CALLTIP_CLICK = wx.PyEventBinder( wxEVT_STC_CALLTIP_CLICK, 1 ) ClearHandlers() - XmlResource.AddSubclassFactory(XmlSubclassFactory factory) + AddSubclassFactory(XmlSubclassFactory factory) @@ -34391,7 +36747,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 +36765,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 +37661,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.