</constructor>
<method name="GetFloor" type="" overloaded="no">
<autodoc>GetFloor() -> (x,y)</autodoc>
+ <docstring>Convert to integer</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="GetRounded" type="" overloaded="no">
<autodoc>GetRounded() -> (x,y)</autodoc>
+ <docstring>Convert to integer</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
</staticmethod>
<method name="FindFirstUnusedColour" type="bool" overloaded="no">
<autodoc>FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)</autodoc>
+ <docstring>Find first colour that is not used in the image and has higher RGB
+values than startR, startG, startB. Returns a tuple consisting of a
+success flag and rgb values.</docstring>
<paramlist>
<param name="OUTPUT" type="unsigned char" default=""/>
<param name="OUTPUT" type="unsigned char" default=""/>
</method>
<method name="FindFirstUnusedColour" type="bool" overloaded="no">
<autodoc>FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)</autodoc>
+ <docstring>Find first colour that is not used in the image and has higher RGB
+values than startR, startG, startB. Returns a tuple consisting of a
+success flag and rgb values.</docstring>
<paramlist>
<param name="OUTPUT" type="byte" default=""/>
<param name="OUTPUT" type="byte" default=""/>
<param name="startB" type="byte" default="0"/>
</paramlist>
</method>
+ <method name="ConvertAlphaToMask" type="bool" overloaded="no">
+ <autodoc>ConvertAlphaToMask(self, byte threshold=128) -> bool</autodoc>
+ <docstring>If the image has alpha channel, this method converts it to mask. All pixels
+with alpha value less than ``threshold`` are replaced with mask colour and the
+alpha channel is removed. Mask colour is chosen automatically using
+`FindFirstUnusedColour`.
+
+If the image image doesn't have alpha channel, ConvertAlphaToMask does
+nothing.</docstring>
+ <paramlist>
+ <param name="threshold" type="byte" default="128"/>
+ </paramlist>
+ </method>
<method name="SetMaskFromImage" type="bool" overloaded="no">
<autodoc>SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool</autodoc>
<paramlist>
<autodoc>__init__(self) -> TIFFHandler</autodoc>
</constructor>
</class>
+ <class name="Quantize" oldname="wxQuantize" module="_core">
+ <docstring>Performs quantization, or colour reduction, on a wxImage.</docstring>
+ <staticmethod name="Quantize" type="bool" overloaded="no">
+ <autodoc>Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool</autodoc>
+ <docstring>Reduce the colours in the source image and put the result into the
+destination image, setting the palette in the destination if
+needed. Both images may be the same, to overwrite the source image.
+:todo: Create a version that returns the wx.Palette used.</docstring>
+ <paramlist>
+ <param name="src" type="Image" default=""/>
+ <param name="dest" type="Image" default=""/>
+ <param name="desiredNoColours" type="int" default="236"/>
+ <param name="flags" type="int" default="wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE"/>
+ </paramlist>
+ </staticmethod>
+ </class>
<pythoncode>
#---------------------------------------------------------------------------
</pythoncode>
<method name="ShiftDown" type="bool" overloaded="no">
<autodoc>ShiftDown(self) -> bool</autodoc>
</method>
+ <method name="CmdDown" type="bool" overloaded="no">
+ <autodoc>CmdDown(self) -> bool</autodoc>
+ <docstring>"Cmd" is a pseudo key which is the same as Control for PC and Unix
+platforms but the special "Apple" (a.k.a as "Command") key on
+Macs: it makes often sense to use it instead of, say, `ControlDown`
+because Cmd key is used for the same thing under Mac as Ctrl
+elsewhere. The Ctrl still exists, it's just not used for this
+purpose. So for non-Mac platforms this is the same as `ControlDown`
+and Macs this is the same as `MetaDown`.</docstring>
+ </method>
<method name="LeftDown" type="bool" overloaded="no">
<autodoc>LeftDown(self) -> bool</autodoc>
</method>
<method name="ShiftDown" type="bool" overloaded="no">
<autodoc>ShiftDown(self) -> bool</autodoc>
</method>
+ <method name="CmdDown" type="bool" overloaded="no">
+ <autodoc>CmdDown(self) -> bool</autodoc>
+ <docstring>"Cmd" is a pseudo key which is the same as Control for PC and Unix
+platforms but the special "Apple" (a.k.a as "Command") key on
+Macs: it makes often sense to use it instead of, say, `ControlDown`
+because Cmd key is used for the same thing under Mac as Ctrl
+elsewhere. The Ctrl still exists, it's just not used for this
+purpose. So for non-Mac platforms this is the same as `ControlDown`
+and Macs this is the same as `MetaDown`.</docstring>
+ </method>
<method name="HasModifiers" type="bool" overloaded="no">
<autodoc>HasModifiers(self) -> bool</autodoc>
</method>
<method name="GetKeyCode" type="int" overloaded="no">
<autodoc>GetKeyCode(self) -> int</autodoc>
</method>
- <method name="GetUniChar" type="int" overloaded="no">
- <autodoc>GetUniChar(self) -> int</autodoc>
+ <method name="GetUnicodeKey" type="int" overloaded="no">
+ <autodoc>GetUnicodeKey(self) -> int</autodoc>
</method>
<method name="GetRawKeyCode" type="unsigned int" overloaded="no">
<autodoc>GetRawKeyCode(self) -> unsigned int</autodoc>
<autodoc>GetDirection(self) -> bool</autodoc>
</method>
<method name="SetDirection" type="" overloaded="no">
- <autodoc>SetDirection(self, bool bForward)</autodoc>
+ <autodoc>SetDirection(self, bool forward)</autodoc>
<paramlist>
- <param name="bForward" type="bool" default=""/>
+ <param name="forward" type="bool" default=""/>
</paramlist>
</method>
<method name="IsWindowChange" type="bool" overloaded="no">
<autodoc>IsWindowChange(self) -> bool</autodoc>
</method>
<method name="SetWindowChange" type="" overloaded="no">
- <autodoc>SetWindowChange(self, bool bIs)</autodoc>
+ <autodoc>SetWindowChange(self, bool ischange)</autodoc>
<paramlist>
- <param name="bIs" type="bool" default=""/>
+ <param name="ischange" type="bool" default=""/>
+ </paramlist>
+ </method>
+ <method name="SetFlags" type="" overloaded="no">
+ <autodoc>SetFlags(self, long flags)</autodoc>
+ <paramlist>
+ <param name="flags" type="long" default=""/>
</paramlist>
</method>
<method name="GetCurrentFocus" type="wxWindow" overloaded="no">
</method>
<method name="SetAssertMode" type="" overloaded="no">
<autodoc>SetAssertMode(self, int mode)</autodoc>
- <docstring>Set the OnAssert behaviour for debug and hybrid builds.</docstring>
+ <docstring>Set the OnAssert behaviour for debug and hybrid builds.The following flags may be or'd together:
+
+ ========================= =======================================
+ wx.PYAPP_ASSERT_SUPPRESS Don't do anything
+ wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible
+ (default)
+ wx.PYAPP_ASSERT_DIALOG Display a message dialog
+ wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
+ ========================= =======================================
+
+</docstring>
<paramlist>
<param name="mode" type="int" default=""/>
</paramlist>
def __init__(self, title = "wxPython: stdout/stderr"):
self.frame = None
self.title = title
+ self.pos = wx.DefaultPosition
+ self.size = (450, 300)
self.parent = None
def SetParent(self, parent):
def CreateOutputWindow(self, st):
- self.frame = wx.Frame(self.parent, -1, self.title,
- style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
+ self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
+ style=wx.DEFAULT_FRAME_STYLE)
self.text = wx.TextCtrl(self.frame, -1, "",
- style = wx.TE_MULTILINE | wx.TE_READONLY)
+ style=wx.TE_MULTILINE|wx.TE_READONLY)
self.text.AppendText(st)
- self.frame.SetSize((450, 300))
self.frame.Show(True)
EVT_CLOSE(self.frame, self.OnCloseWindow)
wx.CallAfter(self.frame.Close)
+ def flush(self):
+ pass
+
+
#----------------------------------------------------------------------
_sys.stdout, _sys.stderr = self.saveStdio
+ def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
+ """
+ Set the title, position and/or size of the output window if
+ the stdio has been redirected. This should be called before
+ any output would cause the output window to be created.
+ """
+ if self.stdioWin:
+ if title is not None:
+ self.stdioWin.title = title
+ if pos is not None:
+ self.stdioWin.pos = pos
+ if size is not None:
+ self.stdioWin.size = size
+
+
+
# change from wx.PyApp_XX to wx.App_XX
App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
:see: `wx.AcceleratorTable`</docstring>
<constructor name="AcceleratorEntry" overloaded="no">
<autodoc>__init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry</autodoc>
- <docstring>Construct a wx.AcceleratorEntry.</docstring>
+ <docstring>Construct a wx.AcceleratorEntry.
+ :param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT,
+ wx.ACCEL_CTRL or wx.ACCEL_NORMAL used to specify
+ which modifier keys are held down.
+ :param keyCode: The keycode to be detected
+ :param cmdID: The menu or control command ID to use for the
+ accellerator event.
+</docstring>
<paramlist>
<param name="flags" type="int" default="0"/>
<param name="keyCode" type="int" default="0"/>
<docstring>An accelerator table allows the application to specify a table of
keyboard shortcuts for menus or other commands. On Windows, menu or
button commands are supported; on GTK, only menu commands are
-supported.</docstring>
+supported.
+
+The object ``wx.NullAcceleratorTable`` is defined to be a table with
+no data, and is the initial accelerator table for a window.
+
+An accelerator takes precedence over normal processing and can be a
+convenient way to program some event handling. For example, you can
+use an accelerator table to make a hotkey generate an event no matter
+which window within a frame has the focus.
+
+Foe example::
+
+ aTable = wx.AcceleratorTable([(wx.ACCEL_ALT, ord('X'), exitID),
+ (wx.ACCEL_CTRL, ord('H'), helpID),
+ (wx.ACCEL_CTRL, ord('F'), findID),
+ (wx.ACCEL_NORMAL, wx.WXK_F3, findnextID)
+ ])
+ self.SetAcceleratorTable(aTable)
+
+
+:see: `wx.AcceleratorEntry`, `wx.Window.SetAcceleratorTable`
+</docstring>
<baseclass name="Object"/>
<constructor name="AcceleratorTable" overloaded="no">
<autodoc>__init__(entries) -> AcceleratorTable</autodoc>
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.
+ ============================= =====================================
+
</docstring>
<baseclass name="EvtHandler"/>
<constructor name="Window" overloaded="no">
<docstring>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.</docstring>
+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.</docstring>
<paramlist>
<param name="force" type="bool" default="False"/>
</paramlist>
<method name="SetWindowVariant" type="" overloaded="no">
<autodoc>SetWindowVariant(self, int variant)</autodoc>
<docstring>Sets the variant of the window/font size to use for this window, if
-the platform supports variants, for example, wxMac.</docstring>
+the platform supports variants, for example, wxMac.
+Variant values are:
+
+ ======================== =======================================
+ wx.WINDOW_VARIANT_NORMAL Normal size
+ wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
+ wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
+ wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
+ ======================== =======================================
+</docstring>
<paramlist>
<param name="variant" type="wxWindowVariant" default=""/>
</paramlist>
<param name="flags" type="int" default="wxSIZE_USE_EXISTING"/>
</paramlist>
</method>
+ <method name="SetBestFittingSize" type="" overloaded="no">
+ <autodoc>SetBestFittingSize(self, Size size=DefaultSize)</autodoc>
+ <docstring>A 'Smart' SetSize that will fill in default size components with the
+window's *best size* values. Also set's the minsize for use with sizers.</docstring>
+ <paramlist>
+ <param name="size" type="Size" default="wxDefaultSize"/>
+ </paramlist>
+ </method>
<method name="Raise" type="" overloaded="no">
<autodoc>Raise(self)</autodoc>
<docstring>Raises the window to the top of the window hierarchy if it is a
<param name="OUTPUT" type="int" default=""/>
</paramlist>
</method>
+ <method name="InvalidateBestSize" type="" overloaded="no">
+ <autodoc>InvalidateBestSize(self)</autodoc>
+ <docstring>Reset the cached best size value so it will be recalculated the next
+time it is needed.</docstring>
+ </method>
+ <method name="GetBestFittingSize" type="Size" overloaded="no">
+ <autodoc>GetBestFittingSize(self) -> Size</autodoc>
+ <docstring>This function will merge the window's best size into the window's
+minimum size, giving priority to the min size components, and returns
+the results.
+</docstring>
+ </method>
<method name="GetAdjustedBestSize" type="Size" overloaded="no">
<autodoc>GetAdjustedBestSize(self) -> Size</autodoc>
<docstring>This method is similar to GetBestSize, except in one
windows without an interior sizer. This function similarly won't do
anything if there are no subwindows.</docstring>
</method>
- <method name="SetSizeHints" type="" overloaded="yes">
+ <method name="SetSizeHints" type="" overloaded="no">
+ <autodoc>SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
+ int incH=-1)</autodoc>
<docstring>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.</docstring>
+will not be able to size the window outside the given bounds (if it is
+a top-level window.) Sizers will also inspect the minimum window size
+and will use that value if set when calculating layout.
+
+The resizing increments are only significant under Motif or Xt.
+
+:see: `GetMinSize`, `GetMaxSize`, `SetMinSize`, `SetMaxSize`
+</docstring>
<paramlist>
<param name="minW" type="int" default=""/>
<param name="minH" type="int" default=""/>
<param name="incH" type="int" default="-1"/>
</paramlist>
</method>
- <method name="SetSizeHints" type="" overloaded="yes">
- <autodoc>SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
- int incH=-1)
-SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)</autodoc>
+ <method name="SetSizeHintsSz" type="" overloaded="no">
+ <autodoc>SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)</autodoc>
<docstring>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.</docstring>
+will not be able to size the window outside the given bounds (if it is
+a top-level window.) Sizers will also inspect the minimum window size
+and will use that value if set when calculating layout.
+
+The resizing increments are only significant under Motif or Xt.
+
+:see: `GetMinSize`, `GetMaxSize`, `SetMinSize`, `SetMaxSize`
+</docstring>
<paramlist>
<param name="minSize" type="Size" default=""/>
<param name="maxSize" type="Size" default="wxDefaultSize"/>
<param name="incSize" type="Size" default="wxDefaultSize"/>
</paramlist>
</method>
- <method name="SetVirtualSizeHints" type="" overloaded="yes">
+ <method name="SetVirtualSizeHints" type="" overloaded="no">
+ <autodoc>SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)</autodoc>
<docstring>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
<param name="maxH" type="int" default="-1"/>
</paramlist>
</method>
- <method name="SetVirtualSizeHints" type="" overloaded="yes">
- <autodoc>SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
-SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize)</autodoc>
+ <method name="SetVirtualSizeHintsSz" type="" overloaded="no">
+ <autodoc>SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)</autodoc>
<docstring>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
<param name="maxSize" type="Size" default="wxDefaultSize"/>
</paramlist>
</method>
+ <method name="GetMaxSize" type="Size" overloaded="no">
+ <autodoc>GetMaxSize(self) -> Size</autodoc>
+ </method>
+ <method name="GetMinSize" type="Size" overloaded="no">
+ <autodoc>GetMinSize(self) -> Size</autodoc>
+ </method>
+ <method name="SetMinSize" type="" overloaded="no">
+ <autodoc>SetMinSize(self, Size minSize)</autodoc>
+ <docstring>A more convenient method than `SetSizeHints` for setting just the
+min size.</docstring>
+ <paramlist>
+ <param name="minSize" type="Size" default=""/>
+ </paramlist>
+ </method>
+ <method name="SetMaxSize" type="" overloaded="no">
+ <autodoc>SetMaxSize(self, Size maxSize)</autodoc>
+ <docstring>A more convenient method than `SetSizeHints` for setting just the
+max size.</docstring>
+ <paramlist>
+ <param name="maxSize" type="Size" default=""/>
+ </paramlist>
+ </method>
<method name="GetMinWidth" type="int" overloaded="no">
<autodoc>GetMinWidth(self) -> int</autodoc>
</method>
<method name="GetMaxHeight" type="int" overloaded="no">
<autodoc>GetMaxHeight(self) -> int</autodoc>
</method>
- <method name="GetMaxSize" type="Size" overloaded="no">
- <autodoc>GetMaxSize(self) -> Size</autodoc>
- </method>
- <method name="GetMinSize" type="Size" overloaded="no">
- <autodoc>GetMinSize(self) -> Size</autodoc>
- </method>
<method name="SetVirtualSize" type="" overloaded="no">
<autodoc>SetVirtualSize(self, Size size)</autodoc>
<docstring>Set the the virtual size of a window in pixels. For most windows this
<param name="win" type="Window" default=""/>
</paramlist>
</method>
+ <method name="Navigate" type="bool" overloaded="no">
+ <autodoc>Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool</autodoc>
+ <docstring>Does keyboard navigation from this window to another, by sending a
+`wx.NavigationKeyEvent`.
+
+ :param flags: A combination of the ``IsForward`` or ``IsBackward``
+ and the ``WinChange`` values in the `wx.NavigationKeyEvent`
+ class, which determine if the navigation should be in forward
+ or reverse order, and if it should be able to cross parent
+ window boundaries, such as between notebook pages or MDI child
+ frames. Typically the status of the Shift key (for forward or
+ backward) or the Control key (for WinChange) would be used to
+ determine how to set the flags.
+
+One situation in which you may wish to call this method is from a text
+control custom keypress handler to do the default navigation behaviour
+for the tab key, since the standard default behaviour for a multiline
+text control with the wx.TE_PROCESS_TAB style is to insert a tab and
+not navigate to the next control.</docstring>
+ <paramlist>
+ <param name="flags" type="int" default="wxNavigationKeyEvent::IsForward"/>
+ </paramlist>
+ </method>
+ <method name="MoveAfterInTabOrder" type="" overloaded="no">
+ <autodoc>MoveAfterInTabOrder(self, Window win)</autodoc>
+ <docstring>Moves this window in the tab navigation order after the specified
+sibling window. This means that when the user presses the TAB key on
+that other window, the focus switches to this window.
+
+The default tab order is the same as creation order. This function
+and `MoveBeforeInTabOrder` allow to change it after creating all the
+windows.
+</docstring>
+ <paramlist>
+ <param name="win" type="Window" default=""/>
+ </paramlist>
+ </method>
+ <method name="MoveBeforeInTabOrder" type="" overloaded="no">
+ <autodoc>MoveBeforeInTabOrder(self, Window win)</autodoc>
+ <docstring>Same as `MoveAfterInTabOrder` except that it inserts this window just
+before win instead of putting it right after it.</docstring>
+ <paramlist>
+ <param name="win" type="Window" default=""/>
+ </paramlist>
+ </method>
<method name="GetChildren" type="PyObject" overloaded="no">
<autodoc>GetChildren(self) -> PyObject</autodoc>
<docstring>Returns a list of the window's children. NOTE: Currently this is a
<docstring>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.
+automatically under GTK. Using `wx.NullColour` will reset the window
+to the default background colour.
Note that setting the background colour may not cause an immediate
-refresh, so you may wish to call ClearBackground or Refresh after
+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.</docstring>
+Using this function will disable attempts to use themes for this
+window, if the system supports them. Use with care since usually the
+themes represent the appearance chosen by the user to be used for all
+applications on the system.</docstring>
<paramlist>
<param name="colour" type="wxColour" default=""/>
</paramlist>
</method>
- <method name="SetOwnBackroundColour" type="" overloaded="no">
- <autodoc>SetOwnBackroundColour(self, Colour colour)</autodoc>
+ <method name="SetOwnBackgroundColour" type="" overloaded="no">
+ <autodoc>SetOwnBackgroundColour(self, Colour colour)</autodoc>
<paramlist>
<param name="colour" type="wxColour" default=""/>
</paramlist>
<docstring>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.</docstring>
+ </method>
+ <method name="SetBackgroundStyle" type="bool" overloaded="no">
+ <autodoc>SetBackgroundStyle(self, int style) -> bool</autodoc>
+ <docstring>Returns the background style of the window. The background style
+indicates how the background of the window is drawn.
+
+ ====================== ========================================
+ wx.BG_STYLE_SYSTEM The background colour or pattern should
+ be determined by the system
+ wx.BG_STYLE_COLOUR The background should be a solid colour
+ wx.BG_STYLE_CUSTOM The background will be implemented by the
+ application.
+ ====================== ========================================
+
+On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
+a custom background, such as a tiled bitmap. Currently the style has
+no effect on other platforms.
+
+:see: `GetBackgroundStyle`, `SetBackgroundColour`</docstring>
+ <paramlist>
+ <param name="style" type="wxBackgroundStyle" default=""/>
+ </paramlist>
+ </method>
+ <method name="GetBackgroundStyle" type="wxBackgroundStyle" overloaded="no">
+ <autodoc>GetBackgroundStyle(self) -> int</autodoc>
+ <docstring>Returns the background style of the window.
+
+:see: `SetBackgroundStyle`</docstring>
</method>
<method name="SetCursor" type="bool" overloaded="no">
<autodoc>SetCursor(self, Cursor cursor) -> bool</autodoc>
</method>
<method name="GetTextExtent" type="" overloaded="no">
<autodoc>GetTextExtent(String string) -> (width, height)</autodoc>
+ <docstring>Get the width and height of the text using the current font.</docstring>
<paramlist>
<param name="string" type="String" default=""/>
<param name="OUTPUT" type="int" default=""/>
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.</docstring>
+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);
+</docstring>
<paramlist>
<param name="flags" type="long" default="wxUPDATE_UI_NONE"/>
</paramlist>
</method>
<method name="PopupMenuXY" type="bool" overloaded="no">
- <autodoc>PopupMenuXY(self, Menu menu, int x, int y) -> bool</autodoc>
- <docstring>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.</docstring>
+ <autodoc>PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool</autodoc>
+ <docstring>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. If the default position is given then the current position of the
+mouse cursor will be used.</docstring>
<paramlist>
<param name="menu" type="wxMenu" default=""/>
- <param name="x" type="int" default=""/>
- <param name="y" type="int" default=""/>
+ <param name="x" type="int" default="-1"/>
+ <param name="y" type="int" default="-1"/>
</paramlist>
</method>
<method name="PopupMenu" type="bool" overloaded="no">
- <autodoc>PopupMenu(self, Menu menu, Point pos) -> bool</autodoc>
- <docstring>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.</docstring>
+ <autodoc>PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool</autodoc>
+ <docstring>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. If the default position is given then the current position of the
+mouse cursor will be used.</docstring>
<paramlist>
<param name="menu" type="wxMenu" default=""/>
- <param name="pos" type="Point" default=""/>
+ <param name="pos" type="Point" default="wxDefaultPosition"/>
</paramlist>
</method>
<method name="GetHandle" type="long" overloaded="no">
<method name="SetScrollbar" type="" overloaded="no">
<autodoc>SetScrollbar(self, int orientation, int position, int thumbSize, int range,
bool refresh=True)</autodoc>
- <docstring>Sets the scrollbar properties of a built-in scrollbar.</docstring>
+ <docstring>Sets the scrollbar properties of a built-in scrollbar.
+ :param orientation: Determines the scrollbar whose page size is to
+ be set. May be wx.HORIZONTAL or wx.VERTICAL.
+
+ :param position: The position of the scrollbar in scroll units.
+
+ :param thumbSize: The size of the thumb, or visible portion of the
+ scrollbar, in scroll units.
+
+ :param range: The maximum position of the scrollbar.
+
+ :param refresh: True to redraw the scrollbar, false otherwise.
+</docstring>
<paramlist>
<param name="orientation" type="int" default=""/>
<param name="position" type="int" default=""/>
<docstring>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.</docstring>
+it is rarely required to call this function from a user program.
+ :param dx: Amount to scroll horizontally.
+
+ :param dy: Amount to scroll vertically.
+
+ :param 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.</docstring>
<paramlist>
<param name="dx" type="int" default=""/>
<param name="dy" type="int" default=""/>
ShouldInheritColours to return false, the colours will not be changed
no matter what and only the font might.
-This rather complicated logic is necessary in order to accomodate the
+This rather complicated logic is necessary in order to accommodate the
different usage scenarius. The most common one is when all default
attributes are used and in this case, nothing should be inherited as
in modern GUIs different controls use different fonts (and colours)
</paramlist>
</method>
<method name="AppendItems" type="" overloaded="no">
- <autodoc>AppendItems(self, wxArrayString strings)</autodoc>
+ <autodoc>AppendItems(self, List strings)</autodoc>
<docstring>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.</docstring>
<autodoc>GetMinSize(self) -> Size</autodoc>
<docstring>Get the minimum size needed for the item.</docstring>
</method>
+ <method name="GetMinSizeWithBorder" type="Size" overloaded="no">
+ <autodoc>GetMinSizeWithBorder(self) -> Size</autodoc>
+ <docstring>Get the minimum size needed for the item with space for the borders
+added, if needed.</docstring>
+ </method>
<method name="SetInitSize" type="" overloaded="no">
<autodoc>SetInitSize(self, int x, int y)</autodoc>
<paramlist>
sizes on different platforms without problems. If for example the
standard font as well as the overall design of Mac widgets requires
more space than on Windows, then the initial size of a dialog using a
-sizer will automatically be bigger on Mac than on Windows.</docstring>
+sizer will automatically be bigger on Mac than on Windows.
+
+:note: If you wish to create a custom sizer class in wxPython you
+ should derive the class from `wx.PySizer` in order to get
+ Python-aware capabilities for the various virtual methods.
+
+:see: `wx.SizerItem`
+
+:todo: More dscriptive text here along with some pictures...
+
+</docstring>
<baseclass name="Object"/>
<method name="_setOORInfo" type="" overloaded="no">
<autodoc>_setOORInfo(self, PyObject _self)</autodoc>
<method name="Add" type="" overloaded="no">
<autodoc>Add(self, item, int proportion=0, int flag=0, int border=0,
PyObject userData=None)</autodoc>
- <docstring>Appends a child item to the sizer.</docstring>
+ <docstring>Appends a child item to the sizer.
+
+ :param item: The item can be one of three kinds of objects:
+
+ - **window**: A `wx.Window` to be managed by the sizer. Its
+ minimal size (either set explicitly by the user or
+ calculated internally when constructed with wx.DefaultSize)
+ is interpreted as the minimal size to use when laying out
+ item in the sizer. This is particularly useful in
+ connection with `wx.Window.SetSizeHints`.
+
+ - **sizer**: The (child-)sizer to be added to the sizer. This
+ allows placing a child sizer in a sizer and thus to create
+ hierarchies of sizers (typically a vertical box as the top
+ sizer and several horizontal boxes on the level beneath).
+
+ - **size**: A `wx.Size` or a 2-element sequence of integers
+ that represents the width and height of a spacer to be added
+ to the sizer. Adding spacers to sizers gives more
+ flexibility in the design of dialogs; imagine for example a
+ horizontal box with two buttons at the bottom of a dialog:
+ you might want to insert a space between the two buttons and
+ make that space stretchable using the *proportion* value and
+ the result will be that the left button will be aligned with
+ the left side of the dialog and the right button with the
+ right side - the space in between will shrink and grow with
+ the dialog.
+
+ :param proportion: Although the meaning of this parameter is
+ undefined in wx.Sizer, it is used in `wx.BoxSizer` to indicate
+ if a child of a sizer can change its size in the main
+ orientation of the wx.BoxSizer - where 0 stands for not
+ changeable and a value of more than zero is interpreted
+ relative (a proportion of the total) to the value of other
+ children of the same wx.BoxSizer. For example, you might have
+ a horizontal wx.BoxSizer with three children, two of which are
+ supposed to change their size with the sizer. Then the two
+ stretchable windows should each be given *proportion* value of
+ 1 to make them grow and shrink equally with the sizer's
+ horizontal dimension. But if one of them had a *proportion*
+ value of 2 then it would get a double share of the space
+ available after the fixed size items are positioned.
+
+ :param flag: This parameter can be used to set a number of flags
+ which can be combined using the binary OR operator ``|``. Two
+ main behaviours are defined using these flags. One is the
+ border around a window: the *border* parameter determines the
+ border width whereas the flags given here determine which
+ side(s) of the item that the border will be added. The other
+ flags determine how the sizer item behaves when the space
+ allotted to the sizer changes, and is somewhat dependent on
+ the specific kind of sizer used.
+
+ +----------------------------+------------------------------------------+
+ |- wx.TOP |These flags are used to specify |
+ |- wx.BOTTOM |which side(s) of the sizer item that |
+ |- wx.LEFT |the *border* width will apply to. |
+ |- wx.RIGHT | |
+ |- wx.ALL | |
+ | | |
+ +----------------------------+------------------------------------------+
+ |- wx.EXAPAND |The item will be expanded to fill |
+ | |the space allotted to the item. |
+ +----------------------------+------------------------------------------+
+ |- wx.SHAPED |The item will be expanded as much as |
+ | |possible while also maintaining its |
+ | |aspect ratio |
+ +----------------------------+------------------------------------------+
+ |- wx.FIXED_MINSIZE |Normally wx.Sizers will use |
+ | |`wx.Window.GetMinSize` or |
+ | |`wx.Window.GetBestSize` to determine what |
+ | |the minimal size of window items should |
+ | |be, and will use that size to calculate |
+ | |the layout. This allows layouts to adjust |
+ | |when an item changes and it's best size |
+ | |becomes different. If you would rather |
+ | |have a window item stay the size it |
+ | |started with then use wx.FIXED_MINSIZE. |
+ +----------------------------+------------------------------------------+
+ |- wx.ALIGN_CENTER |The wx.ALIGN flags allow you to specify |
+ |- wx.ALIGN_LEFT |the alignment of the item within the space|
+ |- wx.ALIGN_RIGHT |allotted to it by the sizer, ajusted for |
+ |- wx.ALIGN_TOP |the border if any. |
+ |- wx.ALIGN_BOTTOM | |
+ |- wx.ALIGN_CENTER_VERTICAL | |
+ |- wx.ALIGN_CENTER_HORIZONTAL| |
+ +----------------------------+------------------------------------------+
+
+
+ :param border: Determines the border width, if the *flag*
+ parameter is set to include any border flag.
+
+ :param userData: Allows an extra object to be attached to the
+ sizer item, for use in derived classes when sizing information
+ is more complex than the *proportion* and *flag* will allow for.
+</docstring>
<paramlist>
<param name="item" type="PyObject" default=""/>
<param name="proportion" type="int" default="0"/>
the layout on screen after removing a child from the sizer. The
*item* parameter can be either a window, a sizer, or the zero-based
index of an item to remove. Returns True if the child item was found
-and removed.</docstring>
+and removed.
+
+:note: For historical reasons calling this method with a `wx.Window`
+ parameter is depreacted, as it will not be able to destroy the
+ window since it is owned by its parent. You should use `Detach`
+ instead.
+</docstring>
<paramlist>
<param name="item" type="PyObject" default=""/>
</paramlist>
laid out in rather simple basic geometry, typically in a row or a
column or nested hierarchies of either. A wx.BoxSizer will lay out
its items in a simple row or column, depending on the orientation
-parameter passed to the constructor.</docstring>
+parameter passed to the constructor.
+
+It is the unique feature of a box sizer, that it can grow in both
+directions (height and width) but can distribute its growth in the
+main direction (horizontal for a row) *unevenly* among its children.
+This is determined by the proportion parameter give to items when they
+are added to the sizer. It is interpreted as a weight factor, i.e. it
+can be zero, indicating that the window may not be resized at all, or
+above zero. If several windows have a value above zero, the value is
+interpreted relative to the sum of all weight factors of the sizer, so
+when adding two windows with a value of 1, they will both get resized
+equally and each will receive half of the available space after the
+fixed size items have been sized. If the items have unequal
+proportion settings then they will receive a coresondingly unequal
+allotment of the free space.
+
+:see: `wx.StaticBoxSizer`
+</docstring>
<baseclass name="Sizer"/>
<constructor name="BoxSizer" overloaded="no">
<autodoc>__init__(self, int orient=HORIZONTAL) -> BoxSizer</autodoc>
</method>
<method name="GetRowHeights" type="wxArrayInt" overloaded="no">
<autodoc>GetRowHeights(self) -> list</autodoc>
+ <docstring>Returns a list of integers representing the heights of each of the
+rows in the sizer.</docstring>
</method>
<method name="GetColWidths" type="wxArrayInt" overloaded="no">
<autodoc>GetColWidths(self) -> list</autodoc>
+ <docstring>Returns a list of integers representing the widths of each of the
+columns in the sizer.</docstring>
</method>
</class>
<pythoncode>
You will never need to create an instance of
wx.IndividualLayoutConstraint, rather you should create a
`wx.LayoutConstraints` instance and use the individual contstraints
-that it contains.</docstring>
+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.
+ ================== ==============================================
+
+:see: `wx.LayoutConstraints`, `wx.Window.SetConstraints`
+</docstring>
<baseclass name="Object"/>
<method name="Set" type="" overloaded="no">
<autodoc>Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)</autodoc>
#----------------------------------------------------------------------------
# Load version numbers from __version__... Ensure that major and minor
-# versions are the same for both wxPython and wxWindows.
+# versions are the same for both wxPython and wxWidgets.
from __version__ import *
__version__ = VERSION_STRING
-assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWindows version mismatch"
-assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWindows version mismatch"
+assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
+assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
if RELEASE_VERSION != _core_.RELEASE_VERSION:
import warnings
- warnings.warn("wxPython/wxWindows release number mismatch")
+ warnings.warn("wxPython/wxWidgets release number mismatch")
#----------------------------------------------------------------------------
:see: `wx.FutureCall`
"""
app = wx.GetApp()
- assert app, 'No wxApp created yet'
+ assert app is not None, 'No wx.App created yet'
global _wxPyCallAfterId
if _wxPyCallAfterId is None:
<class name="Brush" oldname="wxBrush" module="_gdi">
<docstring>A brush is a drawing tool for filling in areas. It is used for
painting the background of rectangles, ellipses, etc. when drawing on
-a `wx.DC`. It has a colour and a style.</docstring>
+a `wx.DC`. It has a colour and a style.
+
+:warning: Do not create instances of wx.Brush before the `wx.App`
+ object has been created because, depending on the platform,
+ required internal data structures may not have been initialized
+ yet. Instead create your brushes in the app's OnInit or as they
+ are needed for drawing.
+
+:note: On monochrome displays all brushes are white, unless the colour
+ really is black.
+
+:see: `wx.BrushList`, `wx.DC`, `wx.DC.SetBrush`
+</docstring>
<baseclass name="GDIObject"/>
<constructor name="Brush" overloaded="no">
<autodoc>__init__(self, Colour colour, int style=SOLID) -> Brush</autodoc>
- <docstring>Constructs a brush from a `wx.Colour` object and a style.</docstring>
+ <docstring>Constructs a brush from a `wx.Colour` object and a style.The style parameter may be one of the following:
+
+ =================== =============================
+ Style Meaning
+ =================== =============================
+ wx.TRANSPARENT Transparent (no fill).
+ wx.SOLID Solid.
+ wx.STIPPLE Uses a bitmap as a stipple.
+ wx.BDIAGONAL_HATCH Backward diagonal hatch.
+ wx.CROSSDIAG_HATCH Cross-diagonal hatch.
+ wx.FDIAGONAL_HATCH Forward diagonal hatch.
+ wx.CROSS_HATCH Cross hatch.
+ wx.HORIZONTAL_HATCH Horizontal hatch.
+ wx.VERTICAL_HATCH Vertical hatch.
+ =================== =============================
+
+</docstring>
<paramlist>
<param name="colour" type="Colour" default=""/>
<param name="style" type="int" default="wxSOLID"/>
a file or created dynamically. A bitmap can be selected into a memory
device context (instance of `wx.MemoryDC`). This enables the bitmap to
be copied to a window or memory device context using `wx.DC.Blit`, or
-to be used as a drawing surface.</docstring>
+to be used as a drawing surface.
+
+The BMP and XMP image file formats are supported on all platforms by
+wx.Bitmap. Other formats are automatically loaded by `wx.Image` and
+converted to a wx.Bitmap, so any image file format supported by
+`wx.Image` can be used.
+
+:todo: Add wrappers and support for raw bitmap data access. Can this
+ be be put into Python without losing the speed benefits of the
+ teplates and iterators in rawbmp.h?
+
+:todo: Find a way to do very efficient PIL Image <--> wx.Bitmap
+ converstions.
+</docstring>
<baseclass name="GDIObject"/>
<constructor name="Bitmap" overloaded="no">
<autodoc>__init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap</autodoc>
- <docstring>Loads a bitmap from a file.</docstring>
+ <docstring>Loads a bitmap from a file.
+ :param name: Name of the file to load the bitmap from.
+ :param type: The type of image to expect. Can be one of the following
+ constants (assuming that the neccessary `wx.Image` handlers are
+ loaded):
+
+ * wx.BITMAP_TYPE_ANY
+ * wx.BITMAP_TYPE_BMP
+ * wx.BITMAP_TYPE_ICO
+ * wx.BITMAP_TYPE_CUR
+ * wx.BITMAP_TYPE_XBM
+ * wx.BITMAP_TYPE_XPM
+ * wx.BITMAP_TYPE_TIF
+ * wx.BITMAP_TYPE_GIF
+ * wx.BITMAP_TYPE_PNG
+ * wx.BITMAP_TYPE_JPEG
+ * wx.BITMAP_TYPE_PNM
+ * wx.BITMAP_TYPE_PCX
+ * wx.BITMAP_TYPE_PICT
+ * wx.BITMAP_TYPE_ICON
+ * wx.BITMAP_TYPE_ANI
+ * wx.BITMAP_TYPE_IFF
+
+:see: Alternate constructors `wx.EmptyBitmap`, `wx.BitmapFromIcon`,
+ `wx.BitmapFromImage`, `wx.BitmapFromXPMData`,
+ `wx.BitmapFromBits`
+</docstring>
<paramlist>
<param name="name" type="String" default=""/>
<param name="type" type="wxBitmapType" default="wxBITMAP_TYPE_ANY"/>
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.
+
+
+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.)
+ ======================== ======================================
+
</docstring>
<baseclass name="GDIObject"/>
<constructor name="Cursor" overloaded="no">
<docstring>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.</docstring>
+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).</docstring>
<paramlist>
<param name="image" type="Image" default=""/>
</paramlist>
</paramlist>
</constructor>
<constructor name="RegionFromBitmap" overloaded="no">
- <autodoc>RegionFromBitmap(Bitmap bmp, Colour transColour=NullColour, int tolerance=0) -> Region</autodoc>
+ <autodoc>RegionFromBitmap(Bitmap bmp) -> Region</autodoc>
+ <paramlist>
+ <param name="bmp" type="Bitmap" default=""/>
+ </paramlist>
+ </constructor>
+ <constructor name="RegionFromBitmapColour" overloaded="no">
+ <autodoc>RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region</autodoc>
<paramlist>
<param name="bmp" type="Bitmap" default=""/>
- <param name="transColour" type="Colour" default="wxNullColour"/>
+ <param name="transColour" type="Colour" default=""/>
<param name="tolerance" type="int" default="0"/>
</paramlist>
</constructor>
<autodoc>ConvertToBitmap(self) -> Bitmap</autodoc>
</method>
<method name="UnionBitmap" type="bool" overloaded="no">
- <autodoc>UnionBitmap(self, Bitmap bmp, Colour transColour=NullColour, int tolerance=0) -> bool</autodoc>
+ <autodoc>UnionBitmap(self, Bitmap bmp) -> bool</autodoc>
<paramlist>
<param name="bmp" type="Bitmap" default=""/>
- <param name="transColour" type="Colour" default="wxNullColour"/>
+ </paramlist>
+ </method>
+ <method name="UnionBitmapColour" type="bool" overloaded="no">
+ <autodoc>UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool</autodoc>
+ <paramlist>
+ <param name="bmp" type="Bitmap" default=""/>
+ <param name="transColour" type="Colour" default=""/>
<param name="tolerance" type="int" default="0"/>
</paramlist>
</method>
#---------------------------------------------------------------------------
</pythoncode>
<class name="DC" oldname="wxDC" module="_gdi">
+ <docstring>A wx.DC is a device context onto which graphics and text can be
+drawn. It is intended to represent a number of output devices in a
+generic way, so a window can have a device context associated with it,
+and a printer also has a device context. In this way, the same piece
+of code may write to a number of different devices, if the device
+context is used as a parameter.
+
+Derived types of wxDC have documentation for specific features only,
+so refer to this section for most device context information.
+
+The wx.DC class is abstract and can not be instantiated, you must use
+one of the derived classes instead. Which one will depend on the
+situation in which it is used.</docstring>
<baseclass name="Object"/>
<destructor name="~wxDC" overloaded="no">
<autodoc>__del__(self)</autodoc>
</destructor>
<method name="BeginDrawing" type="" overloaded="no">
<autodoc>BeginDrawing(self)</autodoc>
+ <docstring>Allows for optimization of drawing code on platforms that need it. On
+other platforms this is just an empty function and is harmless. To
+take advantage of this postential optimization simply enclose each
+group of calls to the drawing primitives within calls to
+`BeginDrawing` and `EndDrawing`.</docstring>
</method>
<method name="EndDrawing" type="" overloaded="no">
<autodoc>EndDrawing(self)</autodoc>
+ <docstring>Ends the group of drawing primitives started with `BeginDrawing`, and
+invokes whatever optimization is available for this DC type on the
+current platform.</docstring>
</method>
<method name="FloodFill" type="bool" overloaded="no">
<autodoc>FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool</autodoc>
+ <docstring>Flood fills the device context starting from the given point, using
+the current brush colour, and using a style:
+
+ - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
+ the given colour is encountered.
+
+ - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
+ colour.
+
+Returns False if the operation failed.
+
+Note: The present implementation for non-Windows platforms may fail to
+find colour borders if the pixels do not match the colour
+exactly. However the function will still return true.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="FloodFillPoint" type="bool" overloaded="no">
<autodoc>FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool</autodoc>
+ <docstring>Flood fills the device context starting from the given point, using
+the current brush colour, and using a style:
+
+ - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
+ the given colour is encountered.
+
+ - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
+ colour.
+
+Returns False if the operation failed.
+
+Note: The present implementation for non-Windows platforms may fail to
+find colour borders if the pixels do not match the colour
+exactly. However the function will still return true.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="col" type="Colour" default=""/>
</method>
<method name="GetPixel" type="Colour" overloaded="no">
<autodoc>GetPixel(self, int x, int y) -> Colour</autodoc>
+ <docstring>Gets the colour at the specified location on the DC.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawLine" type="" overloaded="no">
<autodoc>DrawLine(self, int x1, int y1, int x2, int y2)</autodoc>
+ <docstring>Draws a line from the first point to the second. The current pen is
+used for drawing the line. Note that the second point is *not* part of
+the line and is not drawn by this function (this is consistent with
+the behaviour of many other toolkits).</docstring>
<paramlist>
<param name="x1" type="int" default=""/>
<param name="y1" type="int" default=""/>
</method>
<method name="DrawLinePoint" type="" overloaded="no">
<autodoc>DrawLinePoint(self, Point pt1, Point pt2)</autodoc>
+ <docstring>Draws a line from the first point to the second. The current pen is
+used for drawing the line. Note that the second point is *not* part of
+the line and is not drawn by this function (this is consistent with
+the behaviour of many other toolkits).</docstring>
<paramlist>
<param name="pt1" type="Point" default=""/>
<param name="pt2" type="Point" default=""/>
</method>
<method name="CrossHair" type="" overloaded="no">
<autodoc>CrossHair(self, int x, int y)</autodoc>
+ <docstring>Displays a cross hair using the current pen. This is a vertical and
+horizontal line the height and width of the window, centred on the
+given point.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="CrossHairPoint" type="" overloaded="no">
<autodoc>CrossHairPoint(self, Point pt)</autodoc>
+ <docstring>Displays a cross hair using the current pen. This is a vertical and
+horizontal line the height and width of the window, centred on the
+given point.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
</paramlist>
</method>
<method name="DrawArc" type="" overloaded="no">
<autodoc>DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)</autodoc>
+ <docstring>Draws an arc of a circle, centred on the *center* point (xc, yc), from
+the first point to the second. The current pen is used for the outline
+and the current brush for filling the shape.
+
+The arc is drawn in an anticlockwise direction from the start point to
+the end point.</docstring>
<paramlist>
<param name="x1" type="int" default=""/>
<param name="y1" type="int" default=""/>
</paramlist>
</method>
<method name="DrawArcPoint" type="" overloaded="no">
- <autodoc>DrawArcPoint(self, Point pt1, Point pt2, Point centre)</autodoc>
+ <autodoc>DrawArcPoint(self, Point pt1, Point pt2, Point center)</autodoc>
+ <docstring>Draws an arc of a circle, centred on the *center* point (xc, yc), from
+the first point to the second. The current pen is used for the outline
+and the current brush for filling the shape.
+
+The arc is drawn in an anticlockwise direction from the start point to
+the end point.</docstring>
<paramlist>
<param name="pt1" type="Point" default=""/>
<param name="pt2" type="Point" default=""/>
- <param name="centre" type="Point" default=""/>
+ <param name="center" type="Point" default=""/>
</paramlist>
</method>
<method name="DrawCheckMark" type="" overloaded="no">
<autodoc>DrawCheckMark(self, int x, int y, int width, int height)</autodoc>
+ <docstring>Draws a check mark inside the given rectangle.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawCheckMarkRect" type="" overloaded="no">
<autodoc>DrawCheckMarkRect(self, Rect rect)</autodoc>
+ <docstring>Draws a check mark inside the given rectangle.</docstring>
<paramlist>
<param name="rect" type="Rect" default=""/>
</paramlist>
</method>
<method name="DrawEllipticArc" type="" overloaded="no">
- <autodoc>DrawEllipticArc(self, int x, int y, int w, int h, double sa, double ea)</autodoc>
+ <autodoc>DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)</autodoc>
+ <docstring>Draws an arc of an ellipse, with the given rectangle defining the
+bounds of the ellipse. The current pen is used for drawing the arc and
+the current brush is used for drawing the pie.
+
+The *start* and *end* parameters specify the start and end of the arc
+relative to the three-o'clock position from the center of the
+rectangle. Angles are specified in degrees (360 is a complete
+circle). Positive values mean counter-clockwise motion. If start is
+equal to end, a complete ellipse will be drawn.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
<param name="w" type="int" default=""/>
<param name="h" type="int" default=""/>
- <param name="sa" type="double" default=""/>
- <param name="ea" type="double" default=""/>
+ <param name="start" type="double" default=""/>
+ <param name="end" type="double" default=""/>
</paramlist>
</method>
<method name="DrawEllipticArcPointSize" type="" overloaded="no">
- <autodoc>DrawEllipticArcPointSize(self, Point pt, Size sz, double sa, double ea)</autodoc>
+ <autodoc>DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)</autodoc>
+ <docstring>Draws an arc of an ellipse, with the given rectangle defining the
+bounds of the ellipse. The current pen is used for drawing the arc and
+the current brush is used for drawing the pie.
+
+The *start* and *end* parameters specify the start and end of the arc
+relative to the three-o'clock position from the center of the
+rectangle. Angles are specified in degrees (360 is a complete
+circle). Positive values mean counter-clockwise motion. If start is
+equal to end, a complete ellipse will be drawn.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
- <param name="sa" type="double" default=""/>
- <param name="ea" type="double" default=""/>
+ <param name="start" type="double" default=""/>
+ <param name="end" type="double" default=""/>
</paramlist>
</method>
<method name="DrawPoint" type="" overloaded="no">
<autodoc>DrawPoint(self, int x, int y)</autodoc>
+ <docstring>Draws a point using the current pen.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawPointPoint" type="" overloaded="no">
<autodoc>DrawPointPoint(self, Point pt)</autodoc>
+ <docstring>Draws a point using the current pen.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
</paramlist>
</method>
<method name="DrawRectangle" type="" overloaded="no">
<autodoc>DrawRectangle(self, int x, int y, int width, int height)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The current pen is used for the outline and the current brush
+for filling the shape.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawRectangleRect" type="" overloaded="no">
<autodoc>DrawRectangleRect(self, Rect rect)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The current pen is used for the outline and the current brush
+for filling the shape.</docstring>
<paramlist>
<param name="rect" type="Rect" default=""/>
</paramlist>
</method>
<method name="DrawRectanglePointSize" type="" overloaded="no">
<autodoc>DrawRectanglePointSize(self, Point pt, Size sz)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The current pen is used for the outline and the current brush
+for filling the shape.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
</method>
<method name="DrawRoundedRectangle" type="" overloaded="no">
<autodoc>DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The corners are quarter-circles using the given radius. The
+current pen is used for the outline and the current brush for filling
+the shape.
+
+If radius is positive, the value is assumed to be the radius of the
+rounded corner. If radius is negative, the absolute value is assumed
+to be the proportion of the smallest dimension of the rectangle. This
+means that the corner can be a sensible size relative to the size of
+the rectangle, and also avoids the strange effects X produces when the
+corners are too big for the rectangle.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawRoundedRectangleRect" type="" overloaded="no">
<autodoc>DrawRoundedRectangleRect(self, Rect r, double radius)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The corners are quarter-circles using the given radius. The
+current pen is used for the outline and the current brush for filling
+the shape.
+
+If radius is positive, the value is assumed to be the radius of the
+rounded corner. If radius is negative, the absolute value is assumed
+to be the proportion of the smallest dimension of the rectangle. This
+means that the corner can be a sensible size relative to the size of
+the rectangle, and also avoids the strange effects X produces when the
+corners are too big for the rectangle.</docstring>
<paramlist>
<param name="r" type="Rect" default=""/>
<param name="radius" type="double" default=""/>
</method>
<method name="DrawRoundedRectanglePointSize" type="" overloaded="no">
<autodoc>DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)</autodoc>
+ <docstring>Draws a rectangle with the given top left corner, and with the given
+size. The corners are quarter-circles using the given radius. The
+current pen is used for the outline and the current brush for filling
+the shape.
+
+If radius is positive, the value is assumed to be the radius of the
+rounded corner. If radius is negative, the absolute value is assumed
+to be the proportion of the smallest dimension of the rectangle. This
+means that the corner can be a sensible size relative to the size of
+the rectangle, and also avoids the strange effects X produces when the
+corners are too big for the rectangle.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
</method>
<method name="DrawCircle" type="" overloaded="no">
<autodoc>DrawCircle(self, int x, int y, int radius)</autodoc>
+ <docstring>Draws a circle with the given center point and radius. The current
+pen is used for the outline and the current brush for filling the
+shape.
+
+:see: `DrawEllipse`</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawCirclePoint" type="" overloaded="no">
<autodoc>DrawCirclePoint(self, Point pt, int radius)</autodoc>
+ <docstring>Draws a circle with the given center point and radius. The current
+pen is used for the outline and the current brush for filling the
+shape.
+
+:see: `DrawEllipse`</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="radius" type="int" default=""/>
</method>
<method name="DrawEllipse" type="" overloaded="no">
<autodoc>DrawEllipse(self, int x, int y, int width, int height)</autodoc>
+ <docstring>Draws an ellipse contained in the specified rectangle. The current pen
+is used for the outline and the current brush for filling the shape.
+
+:see: `DrawCircle`</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="DrawEllipseRect" type="" overloaded="no">
<autodoc>DrawEllipseRect(self, Rect rect)</autodoc>
+ <docstring>Draws an ellipse contained in the specified rectangle. The current pen
+is used for the outline and the current brush for filling the shape.
+
+:see: `DrawCircle`</docstring>
<paramlist>
<param name="rect" type="Rect" default=""/>
</paramlist>
</method>
<method name="DrawEllipsePointSize" type="" overloaded="no">
<autodoc>DrawEllipsePointSize(self, Point pt, Size sz)</autodoc>
+ <docstring>Draws an ellipse contained in the specified rectangle. The current pen
+is used for the outline and the current brush for filling the shape.
+
+:see: `DrawCircle`</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
</method>
<method name="DrawIcon" type="" overloaded="no">
<autodoc>DrawIcon(self, Icon icon, int x, int y)</autodoc>
+ <docstring>Draw an icon on the display (does nothing if the device context is
+PostScript). This can be the simplest way of drawing bitmaps on a
+window.</docstring>
<paramlist>
<param name="icon" type="Icon" default=""/>
<param name="x" type="int" default=""/>
</method>
<method name="DrawIconPoint" type="" overloaded="no">
<autodoc>DrawIconPoint(self, Icon icon, Point pt)</autodoc>
+ <docstring>Draw an icon on the display (does nothing if the device context is
+PostScript). This can be the simplest way of drawing bitmaps on a
+window.</docstring>
<paramlist>
<param name="icon" type="Icon" default=""/>
<param name="pt" type="Point" default=""/>
</method>
<method name="DrawBitmap" type="" overloaded="no">
<autodoc>DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)</autodoc>
+ <docstring>Draw a bitmap on the device context at the specified point. If
+*transparent* is true and the bitmap has a transparency mask, (or
+alpha channel on the platforms that support it) then the bitmap will
+be drawn transparently.
+
+When drawing a mono-bitmap, the current text foreground colour will be
+used to draw the foreground of the bitmap (all bits set to 1), and the
+current text background colour to draw the background (all bits set to
+0).
+
+:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`</docstring>
<paramlist>
<param name="bmp" type="Bitmap" default=""/>
<param name="x" type="int" default=""/>
</method>
<method name="DrawBitmapPoint" type="" overloaded="no">
<autodoc>DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)</autodoc>
+ <docstring>Draw a bitmap on the device context at the specified point. If
+*transparent* is true and the bitmap has a transparency mask, (or
+alpha channel on the platforms that support it) then the bitmap will
+be drawn transparently.
+
+When drawing a mono-bitmap, the current text foreground colour will be
+used to draw the foreground of the bitmap (all bits set to 1), and the
+current text background colour to draw the background (all bits set to
+0).
+
+:see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`</docstring>
<paramlist>
<param name="bmp" type="Bitmap" default=""/>
<param name="pt" type="Point" default=""/>
</method>
<method name="DrawText" type="" overloaded="no">
<autodoc>DrawText(self, String text, int x, int y)</autodoc>
+ <docstring>Draws a text string at the specified point, using the current text
+font, and the current text foreground and background colours.
+
+The coordinates refer to the top-left corner of the rectangle bounding
+the string. See `GetTextExtent` for how to get the dimensions of a
+text string, which can be used to position the text more precisely.
+
+**NOTE**: under wxGTK the current logical function is used by this
+function but it is ignored by wxMSW. Thus, you should avoid using
+logical functions with this function in portable programs.
+
+:see: `DrawRotatedText`</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="x" type="int" default=""/>
</method>
<method name="DrawTextPoint" type="" overloaded="no">
<autodoc>DrawTextPoint(self, String text, Point pt)</autodoc>
+ <docstring>Draws a text string at the specified point, using the current text
+font, and the current text foreground and background colours.
+
+The coordinates refer to the top-left corner of the rectangle bounding
+the string. See `GetTextExtent` for how to get the dimensions of a
+text string, which can be used to position the text more precisely.
+
+**NOTE**: under wxGTK the current logical function is used by this
+function but it is ignored by wxMSW. Thus, you should avoid using
+logical functions with this function in portable programs.
+
+:see: `DrawRotatedText`</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="pt" type="Point" default=""/>
</method>
<method name="DrawRotatedText" type="" overloaded="no">
<autodoc>DrawRotatedText(self, String text, int x, int y, double angle)</autodoc>
+ <docstring>Draws the text rotated by *angle* degrees, if supported by the platform.
+
+**NOTE**: Under Win9x only TrueType fonts can be drawn by this
+function. In particular, a font different from ``wx.NORMAL_FONT``
+should be used as the it is not normally a TrueType
+font. ``wx.SWISS_FONT`` is an example of a font which is.
+
+:see: `DrawText`</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="x" type="int" default=""/>
</method>
<method name="DrawRotatedTextPoint" type="" overloaded="no">
<autodoc>DrawRotatedTextPoint(self, String text, Point pt, double angle)</autodoc>
+ <docstring>Draws the text rotated by *angle* degrees, if supported by the platform.
+
+**NOTE**: Under Win9x only TrueType fonts can be drawn by this
+function. In particular, a font different from ``wx.NORMAL_FONT``
+should be used as the it is not normally a TrueType
+font. ``wx.SWISS_FONT`` is an example of a font which is.
+
+:see: `DrawText`</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="pt" type="Point" default=""/>
<autodoc>Blit(self, int xdest, int ydest, int width, int height, DC source,
int xsrc, int ysrc, int rop=COPY, bool useMask=False,
int xsrcMask=-1, int ysrcMask=-1) -> bool</autodoc>
+ <docstring>Copy from a source DC to this DC. Parameters specify the destination
+coordinates, size of area to copy, source DC, source coordinates,
+logical function, whether to use a bitmap mask, and mask source
+position.
+
+ :param xdest: Destination device context x position.
+ :param ydest: Destination device context y position.
+ :param width: Width of source area to be copied.
+ :param height: Height of source area to be copied.
+ :param source: Source device context.
+ :param xsrc: Source device context x position.
+ :param ysrc: Source device context y position.
+ :param rop: Logical function to use: see `SetLogicalFunction`.
+ :param useMask: If true, Blit does a transparent blit using the mask
+ that is associated with the bitmap selected into the
+ source device context.
+ :param xsrcMask: Source x position on the mask. If both xsrcMask and
+ ysrcMask are -1, xsrc and ysrc will be assumed for
+ the mask source position.
+ :param ysrcMask: Source y position on the mask.
+</docstring>
<paramlist>
<param name="xdest" type="int" default=""/>
<param name="ydest" type="int" default=""/>
<method name="BlitPointSize" type="bool" overloaded="no">
<autodoc>BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool</autodoc>
+ <docstring>Copy from a source DC to this DC. Parameters specify the destination
+coordinates, size of area to copy, source DC, source coordinates,
+logical function, whether to use a bitmap mask, and mask source
+position.
+
+ :param destPt: Destination device context position.
+ :param sz: Size of source area to be copied.
+ :param source: Source device context.
+ :param srcPt: Source device context position.
+ :param rop: Logical function to use: see `SetLogicalFunction`.
+ :param useMask: If true, Blit does a transparent blit using the mask
+ that is associated with the bitmap selected into the
+ source device context.
+ :param srcPtMask: Source position on the mask.
+</docstring>
<paramlist>
<param name="destPt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
</method>
<method name="SetClippingRegion" type="" overloaded="no">
<autodoc>SetClippingRegion(self, int x, int y, int width, int height)</autodoc>
+ <docstring>Sets the clipping region for this device context to the intersection
+of the given region described by the parameters of this method and the
+previously set clipping region. You should call `DestroyClippingRegion`
+if you want to set the clipping region exactly to the region
+specified.
+
+The clipping region is an area to which drawing is
+restricted. Possible uses for the clipping region are for clipping
+text or for speeding up window redraws when only a known area of the
+screen is damaged.
+
+:see: `DestroyClippingRegion`, `wx.Region`</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="SetClippingRegionPointSize" type="" overloaded="no">
<autodoc>SetClippingRegionPointSize(self, Point pt, Size sz)</autodoc>
+ <docstring>Sets the clipping region for this device context to the intersection
+of the given region described by the parameters of this method and the
+previously set clipping region. You should call `DestroyClippingRegion`
+if you want to set the clipping region exactly to the region
+specified.
+
+The clipping region is an area to which drawing is
+restricted. Possible uses for the clipping region are for clipping
+text or for speeding up window redraws when only a known area of the
+screen is damaged.
+
+:see: `DestroyClippingRegion`, `wx.Region`</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="sz" type="Size" default=""/>
</method>
<method name="SetClippingRegionAsRegion" type="" overloaded="no">
<autodoc>SetClippingRegionAsRegion(self, Region region)</autodoc>
+ <docstring>Sets the clipping region for this device context to the intersection
+of the given region described by the parameters of this method and the
+previously set clipping region. You should call `DestroyClippingRegion`
+if you want to set the clipping region exactly to the region
+specified.
+
+The clipping region is an area to which drawing is
+restricted. Possible uses for the clipping region are for clipping
+text or for speeding up window redraws when only a known area of the
+screen is damaged.
+
+:see: `DestroyClippingRegion`, `wx.Region`</docstring>
<paramlist>
<param name="region" type="Region" default=""/>
</paramlist>
</method>
<method name="SetClippingRect" type="" overloaded="no">
<autodoc>SetClippingRect(self, Rect rect)</autodoc>
+ <docstring>Sets the clipping region for this device context to the intersection
+of the given region described by the parameters of this method and the
+previously set clipping region. You should call `DestroyClippingRegion`
+if you want to set the clipping region exactly to the region
+specified.
+
+The clipping region is an area to which drawing is
+restricted. Possible uses for the clipping region are for clipping
+text or for speeding up window redraws when only a known area of the
+screen is damaged.
+
+:see: `DestroyClippingRegion`, `wx.Region`</docstring>
<paramlist>
<param name="rect" type="Rect" default=""/>
</paramlist>
</method>
<method name="DrawLines" type="" overloaded="no">
- <autodoc>DrawLines(self, int points, Point points_array, int xoffset=0, int yoffset=0)</autodoc>
+ <autodoc>DrawLines(self, List points, int xoffset=0, int yoffset=0)</autodoc>
+ <docstring>Draws lines using a sequence of `wx.Point` objects, adding the
+optional offset coordinate. The current pen is used for drawing the
+lines.</docstring>
<paramlist>
<param name="points" type="int" default=""/>
<param name="points_array" type="Point" default=""/>
</paramlist>
</method>
<method name="DrawPolygon" type="" overloaded="no">
- <autodoc>DrawPolygon(self, int points, Point points_array, int xoffset=0, int yoffset=0,
+ <autodoc>DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
int fillStyle=ODDEVEN_RULE)</autodoc>
+ <docstring>Draws a filled polygon using a sequence of `wx.Point` objects, adding
+the optional offset coordinate. The last argument specifies the fill
+rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
+
+The current pen is used for drawing the outline, and the current brush
+for filling the shape. Using a transparent brush suppresses
+filling. Note that wxWidgets automatically closes the first and last
+points.</docstring>
<paramlist>
<param name="points" type="int" default=""/>
<param name="points_array" type="Point" default=""/>
<method name="DrawLabel" type="" overloaded="no">
<autodoc>DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
int indexAccel=-1)</autodoc>
+ <docstring>Draw *text* within the specified rectangle, abiding by the alignment
+flags. Will additionally emphasize the character at *indexAccel* if
+it is not -1.
+
+:see: `DrawImageLabel`</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="rect" type="Rect" default=""/>
<method name="DrawImageLabel" type="Rect" overloaded="no">
<autodoc>DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
int indexAccel=-1) -> Rect</autodoc>
+ <docstring>Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
+drawing it) within the specified rectangle, abiding by the alignment
+flags. Will additionally emphasize the character at *indexAccel* if
+it is not -1. Returns the bounding rectangle.</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="image" type="Bitmap" default=""/>
</paramlist>
</method>
<method name="DrawSpline" type="" overloaded="no">
- <autodoc>DrawSpline(self, int points, Point points_array)</autodoc>
+ <autodoc>DrawSpline(self, List points)</autodoc>
+ <docstring>Draws a spline between all given control points, (a list of `wx.Point`
+objects) using the current pen. The spline is drawn using a series of
+lines, using an algorithm taken from the X drawing program 'XFIG'.</docstring>
<paramlist>
<param name="points" type="int" default=""/>
<param name="points_array" type="Point" default=""/>
</method>
<method name="Clear" type="" overloaded="no">
<autodoc>Clear(self)</autodoc>
+ <docstring>Clears the device context using the current background brush.</docstring>
</method>
<method name="StartDoc" type="bool" overloaded="no">
<autodoc>StartDoc(self, String message) -> bool</autodoc>
+ <docstring>Starts a document (only relevant when outputting to a
+printer). *Message* is a message to show whilst printing.</docstring>
<paramlist>
<param name="message" type="String" default=""/>
</paramlist>
</method>
<method name="EndDoc" type="" overloaded="no">
<autodoc>EndDoc(self)</autodoc>
+ <docstring>Ends a document (only relevant when outputting to a printer).</docstring>
</method>
<method name="StartPage" type="" overloaded="no">
<autodoc>StartPage(self)</autodoc>
+ <docstring>Starts a document page (only relevant when outputting to a printer).</docstring>
</method>
<method name="EndPage" type="" overloaded="no">
<autodoc>EndPage(self)</autodoc>
+ <docstring>Ends a document page (only relevant when outputting to a printer).</docstring>
</method>
<method name="SetFont" type="" overloaded="no">
<autodoc>SetFont(self, Font font)</autodoc>
+ <docstring>Sets the current font for the DC. It must be a valid font, in
+particular you should not pass ``wx.NullFont`` to this method.
+
+:see: `wx.Font`</docstring>
<paramlist>
<param name="font" type="Font" default=""/>
</paramlist>
</method>
<method name="SetPen" type="" overloaded="no">
<autodoc>SetPen(self, Pen pen)</autodoc>
+ <docstring>Sets the current pen for the DC.
+
+If the argument is ``wx.NullPen``, the current pen is selected out of the
+device context, and the original pen restored.
+
+:see: `wx.Pen`</docstring>
<paramlist>
<param name="pen" type="Pen" default=""/>
</paramlist>
</method>
<method name="SetBrush" type="" overloaded="no">
<autodoc>SetBrush(self, Brush brush)</autodoc>
+ <docstring>Sets the current brush for the DC.
+
+If the argument is ``wx.NullBrush``, the current brush is selected out
+of the device context, and the original brush restored, allowing the
+current brush to be destroyed safely.
+
+:see: `wx.Brush`</docstring>
<paramlist>
<param name="brush" type="Brush" default=""/>
</paramlist>
</method>
<method name="SetBackground" type="" overloaded="no">
<autodoc>SetBackground(self, Brush brush)</autodoc>
+ <docstring>Sets the current background brush for the DC.</docstring>
<paramlist>
<param name="brush" type="Brush" default=""/>
</paramlist>
</method>
<method name="SetBackgroundMode" type="" overloaded="no">
<autodoc>SetBackgroundMode(self, int mode)</autodoc>
+ <docstring>*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
+determines whether text will be drawn with a background colour or
+not.</docstring>
<paramlist>
<param name="mode" type="int" default=""/>
</paramlist>
</method>
<method name="SetPalette" type="" overloaded="no">
<autodoc>SetPalette(self, Palette palette)</autodoc>
+ <docstring>If this is a window DC or memory DC, assigns the given palette to the
+window or bitmap associated with the DC. If the argument is
+``wx.NullPalette``, the current palette is selected out of the device
+context, and the original palette restored.
+
+:see: `wx.Palette`</docstring>
<paramlist>
<param name="palette" type="Palette" default=""/>
</paramlist>
</method>
<method name="DestroyClippingRegion" type="" overloaded="no">
<autodoc>DestroyClippingRegion(self)</autodoc>
+ <docstring>Destroys the current clipping region so that none of the DC is
+clipped.
+
+:see: `SetClippingRegion`</docstring>
</method>
<method name="GetClippingBox" type="" overloaded="no">
<autodoc>GetClippingBox() -> (x, y, width, height)</autodoc>
+ <docstring>Gets the rectangle surrounding the current clipping region.</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="GetClippingRect" type="Rect" overloaded="no">
<autodoc>GetClippingRect(self) -> Rect</autodoc>
+ <docstring>Gets the rectangle surrounding the current clipping region.</docstring>
</method>
<method name="GetCharHeight" type="int" overloaded="no">
<autodoc>GetCharHeight(self) -> int</autodoc>
+ <docstring>Gets the character height of the currently set font.</docstring>
</method>
<method name="GetCharWidth" type="int" overloaded="no">
<autodoc>GetCharWidth(self) -> int</autodoc>
+ <docstring>Gets the average character width of the currently set font.</docstring>
</method>
<method name="GetTextExtent" type="" overloaded="no">
<autodoc>GetTextExtent(wxString string) -> (width, height)</autodoc>
+ <docstring>Get the width and height of the text using the current font. Only
+works for single line strings.</docstring>
<paramlist>
<param name="string" type="String" default=""/>
<param name="OUTPUT" type="int" default=""/>
<method name="GetMultiLineTextExtent" type="" overloaded="no">
<autodoc>GetMultiLineTextExtent(wxString string, Font font=None) ->
(width, height, descent, externalLeading)</autodoc>
+ <docstring>Get the width, height, decent and leading of the text using the
+current or specified font. Works for single as well as multi-line
+strings.</docstring>
<paramlist>
<param name="text" type="String" default=""/>
<param name="OUTPUT" type="int" default=""/>
</paramlist>
</method>
<method name="GetPartialTextExtents" type="wxArrayInt" overloaded="no">
- <autodoc>GetPartialTextExtents(self, String text) -> wxArrayInt</autodoc>
+ <autodoc>GetPartialTextExtents(self, text) -> [widths]</autodoc>
+ <docstring>Returns a list of integers such that each value is the distance in
+pixels from the begining of text to the coresponding character of
+*text*. The generic version simply builds a running total of the widths
+of each character using GetTextExtent, however if the various
+platforms have a native API function that is faster or more accurate
+than the generic implementaiton then it will be used instead.</docstring>
<paramlist>
<param name="text" type="String" default=""/>
</paramlist>
</method>
<method name="GetSize" type="Size" overloaded="no">
<autodoc>GetSize(self) -> Size</autodoc>
- <docstring>Get the DC size in device units.</docstring>
+ <docstring>This gets the horizontal and vertical resolution in device units. It
+can be used to scale graphics to fit the page. For example, if *maxX*
+and *maxY* represent the maximum horizontal and vertical 'pixel' values
+used in your application, the following code will scale the graphic to
+fit on the printer page::
+
+ w, h = dc.GetSize()
+ scaleX = maxX*1.0 / w
+ scaleY = maxY*1.0 / h
+ dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
+</docstring>
</method>
<method name="GetSizeTuple" type="" overloaded="no">
<autodoc>GetSizeTuple() -> (width, height)</autodoc>
- <docstring>Get the DC size in device units.</docstring>
+ <docstring>This gets the horizontal and vertical resolution in device units. It
+can be used to scale graphics to fit the page. For example, if *maxX*
+and *maxY* represent the maximum horizontal and vertical 'pixel' values
+used in your application, the following code will scale the graphic to
+fit on the printer page::
+
+ w, h = dc.GetSize()
+ scaleX = maxX*1.0 / w
+ scaleY = maxY*1.0 / h
+ dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
+</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="DeviceToLogicalX" type="int" overloaded="no">
<autodoc>DeviceToLogicalX(self, int x) -> int</autodoc>
+ <docstring>Convert device X coordinate to logical coordinate, using the current
+mapping mode.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
</paramlist>
</method>
<method name="DeviceToLogicalY" type="int" overloaded="no">
<autodoc>DeviceToLogicalY(self, int y) -> int</autodoc>
+ <docstring>Converts device Y coordinate to logical coordinate, using the current
+mapping mode.</docstring>
<paramlist>
<param name="y" type="int" default=""/>
</paramlist>
</method>
<method name="DeviceToLogicalXRel" type="int" overloaded="no">
<autodoc>DeviceToLogicalXRel(self, int x) -> int</autodoc>
+ <docstring>Convert device X coordinate to relative logical coordinate, using the
+current mapping mode but ignoring the x axis orientation. Use this
+function for converting a width, for example.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
</paramlist>
</method>
<method name="DeviceToLogicalYRel" type="int" overloaded="no">
<autodoc>DeviceToLogicalYRel(self, int y) -> int</autodoc>
+ <docstring>Convert device Y coordinate to relative logical coordinate, using the
+current mapping mode but ignoring the y axis orientation. Use this
+function for converting a height, for example.</docstring>
<paramlist>
<param name="y" type="int" default=""/>
</paramlist>
</method>
<method name="LogicalToDeviceX" type="int" overloaded="no">
<autodoc>LogicalToDeviceX(self, int x) -> int</autodoc>
+ <docstring>Converts logical X coordinate to device coordinate, using the current
+mapping mode.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
</paramlist>
</method>
<method name="LogicalToDeviceY" type="int" overloaded="no">
<autodoc>LogicalToDeviceY(self, int y) -> int</autodoc>
+ <docstring>Converts logical Y coordinate to device coordinate, using the current
+mapping mode.</docstring>
<paramlist>
<param name="y" type="int" default=""/>
</paramlist>
</method>
<method name="LogicalToDeviceXRel" type="int" overloaded="no">
<autodoc>LogicalToDeviceXRel(self, int x) -> int</autodoc>
+ <docstring>Converts logical X coordinate to relative device coordinate, using the
+current mapping mode but ignoring the x axis orientation. Use this for
+converting a width, for example.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
</paramlist>
</method>
<method name="LogicalToDeviceYRel" type="int" overloaded="no">
<autodoc>LogicalToDeviceYRel(self, int y) -> int</autodoc>
+ <docstring>Converts logical Y coordinate to relative device coordinate, using the
+current mapping mode but ignoring the y axis orientation. Use this for
+converting a height, for example.</docstring>
<paramlist>
<param name="y" type="int" default=""/>
</paramlist>
</method>
<method name="GetDepth" type="int" overloaded="no">
<autodoc>GetDepth(self) -> int</autodoc>
+ <docstring>Returns the colour depth of the DC.</docstring>
</method>
<method name="GetPPI" type="Size" overloaded="no">
<autodoc>GetPPI(self) -> Size</autodoc>
+ <docstring>Resolution in Pixels per inch</docstring>
</method>
<method name="Ok" type="bool" overloaded="no">
<autodoc>Ok(self) -> bool</autodoc>
+ <docstring>Returns true if the DC is ok to use.</docstring>
</method>
<method name="GetBackgroundMode" type="int" overloaded="no">
<autodoc>GetBackgroundMode(self) -> int</autodoc>
+ <docstring>Returns the current background mode, either ``wx.SOLID`` or
+``wx.TRANSPARENT``.
+
+:see: `SetBackgroundMode`</docstring>
</method>
<method name="GetBackground" type="Brush" overloaded="no">
<autodoc>GetBackground(self) -> Brush</autodoc>
+ <docstring>Gets the brush used for painting the background.
+
+:see: `SetBackground`</docstring>
</method>
<method name="GetBrush" type="Brush" overloaded="no">
<autodoc>GetBrush(self) -> Brush</autodoc>
+ <docstring>Gets the current brush</docstring>
</method>
<method name="GetFont" type="Font" overloaded="no">
<autodoc>GetFont(self) -> Font</autodoc>
+ <docstring>Gets the current font</docstring>
</method>
<method name="GetPen" type="Pen" overloaded="no">
<autodoc>GetPen(self) -> Pen</autodoc>
+ <docstring>Gets the current pen</docstring>
</method>
<method name="GetTextBackground" type="Colour" overloaded="no">
<autodoc>GetTextBackground(self) -> Colour</autodoc>
+ <docstring>Gets the current text background colour</docstring>
</method>
<method name="GetTextForeground" type="Colour" overloaded="no">
<autodoc>GetTextForeground(self) -> Colour</autodoc>
+ <docstring>Gets the current text foreground colour</docstring>
</method>
<method name="SetTextForeground" type="" overloaded="no">
<autodoc>SetTextForeground(self, Colour colour)</autodoc>
+ <docstring>Sets the current text foreground colour for the DC.</docstring>
<paramlist>
<param name="colour" type="Colour" default=""/>
</paramlist>
</method>
<method name="SetTextBackground" type="" overloaded="no">
<autodoc>SetTextBackground(self, Colour colour)</autodoc>
+ <docstring>Sets the current text background colour for the DC.</docstring>
<paramlist>
<param name="colour" type="Colour" default=""/>
</paramlist>
</method>
<method name="GetMapMode" type="int" overloaded="no">
<autodoc>GetMapMode(self) -> int</autodoc>
+ <docstring>Gets the current *mapping mode* for the device context </docstring>
</method>
<method name="SetMapMode" type="" overloaded="no">
<autodoc>SetMapMode(self, int mode)</autodoc>
+ <docstring>The *mapping mode* of the device context defines the unit of
+measurement used to convert logical units to device units. The
+mapping mode can be one of the following:
+
+ ================ =============================================
+ wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
+ of an inch.
+ wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
+ wx.MM_METRIC Each logical unit is 1 mm.
+ wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
+ wx.MM_TEXT Each logical unit is 1 pixel.
+ ================ =============================================
+
+Note that in X, text drawing isn't handled consistently with the
+mapping mode; a font is always specified in point size. However,
+setting the user scale (see `SetUserScale`) scales the text
+appropriately. In Windows, scalable TrueType fonts are always used; in
+X, results depend on availability of fonts, but usually a reasonable
+match is found.
+
+The coordinate origin is always at the top left of the screen/printer.
+
+Drawing to a Windows printer device context uses the current mapping
+mode, but mapping mode is currently ignored for PostScript output.
+</docstring>
<paramlist>
<param name="mode" type="int" default=""/>
</paramlist>
</method>
<method name="GetUserScale" type="" overloaded="no">
- <autodoc>GetUserScale() -> (xScale, yScale)</autodoc>
+ <autodoc>GetUserScale(self) -> (xScale, yScale)</autodoc>
+ <docstring>Gets the current user scale factor (set by `SetUserScale`).</docstring>
<paramlist>
<param name="OUTPUT" type="double" default=""/>
<param name="OUTPUT" type="double" default=""/>
</method>
<method name="SetUserScale" type="" overloaded="no">
<autodoc>SetUserScale(self, double x, double y)</autodoc>
+ <docstring>Sets the user scaling factor, useful for applications which require
+'zooming'.</docstring>
<paramlist>
<param name="x" type="double" default=""/>
<param name="y" type="double" default=""/>
</method>
<method name="SetAxisOrientation" type="" overloaded="no">
<autodoc>SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)</autodoc>
+ <docstring>Sets the x and y axis orientation (i.e., the direction from lowest to
+highest values on the axis). The default orientation is the natural
+orientation, e.g. x axis from left to right and y axis from bottom up.</docstring>
<paramlist>
<param name="xLeftRight" type="bool" default=""/>
<param name="yBottomUp" type="bool" default=""/>
</method>
<method name="GetLogicalFunction" type="int" overloaded="no">
<autodoc>GetLogicalFunction(self) -> int</autodoc>
+ <docstring>Gets the current logical function (set by `SetLogicalFunction`).</docstring>
</method>
<method name="SetLogicalFunction" type="" overloaded="no">
<autodoc>SetLogicalFunction(self, int function)</autodoc>
+ <docstring>Sets the current logical function for the device context. This
+determines how a source pixel (from a pen or brush colour, or source
+device context if using `Blit`) combines with a destination pixel in
+the current device context.
+
+The possible values and their meaning in terms of source and
+destination pixel values are as follows:
+
+ ================ ==========================
+ wx.AND src AND dst
+ wx.AND_INVERT (NOT src) AND dst
+ wx.AND_REVERSE src AND (NOT dst)
+ wx.CLEAR 0
+ wx.COPY src
+ wx.EQUIV (NOT src) XOR dst
+ wx.INVERT NOT dst
+ wx.NAND (NOT src) OR (NOT dst)
+ wx.NOR (NOT src) AND (NOT dst)
+ wx.NO_OP dst
+ wx.OR src OR dst
+ wx.OR_INVERT (NOT src) OR dst
+ wx.OR_REVERSE src OR (NOT dst)
+ wx.SET 1
+ wx.SRC_INVERT NOT src
+ wx.XOR src XOR dst
+ ================ ==========================
+
+The default is wx.COPY, which simply draws with the current
+colour. The others combine the current colour and the background using
+a logical operation. wx.INVERT is commonly used for drawing rubber
+bands or moving outlines, since drawing twice reverts to the original
+colour.
+</docstring>
<paramlist>
<param name="function" type="int" default=""/>
</paramlist>
</method>
<method name="SetOptimization" type="" overloaded="no">
- <autodoc>SetOptimization(self, bool opt)</autodoc>
+ <autodoc>SetOptimization(self, bool optimize)</autodoc>
+ <docstring>If *optimize* is true this function sets optimization mode on. This
+currently means that under X, the device context will not try to set a
+pen or brush property if it is known to be set already. This approach
+can fall down if non-wxWidgets code is using the same device context
+or window, for example when the window is a panel on which the
+windowing system draws panel items. The wxWidgets device context
+'memory' will now be out of step with reality.
+
+Setting optimization off, drawing, then setting it back on again, is a
+trick that must occasionally be employed.</docstring>
<paramlist>
- <param name="opt" type="bool" default=""/>
+ <param name="optimize" type="bool" default=""/>
</paramlist>
</method>
<method name="GetOptimization" type="bool" overloaded="no">
<autodoc>GetOptimization(self) -> bool</autodoc>
+ <docstring>Returns true if device context optimization is on. See
+`SetOptimization` for .</docstring>
</method>
<method name="CalcBoundingBox" type="" overloaded="no">
<autodoc>CalcBoundingBox(self, int x, int y)</autodoc>
+ <docstring>Adds the specified point to the bounding box which can be retrieved
+with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.</docstring>
<paramlist>
<param name="x" type="int" default=""/>
<param name="y" type="int" default=""/>
</method>
<method name="CalcBoundingBoxPoint" type="" overloaded="no">
<autodoc>CalcBoundingBoxPoint(self, Point point)</autodoc>
+ <docstring>Adds the specified point to the bounding box which can be retrieved
+with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.</docstring>
<paramlist>
<param name="point" type="Point" default=""/>
</paramlist>
</method>
<method name="ResetBoundingBox" type="" overloaded="no">
<autodoc>ResetBoundingBox(self)</autodoc>
+ <docstring>Resets the bounding box: after a call to this function, the bounding
+box doesn't contain anything.</docstring>
</method>
<method name="MinX" type="int" overloaded="no">
<autodoc>MinX(self) -> int</autodoc>
+ <docstring>Gets the minimum horizontal extent used in drawing commands so far.</docstring>
</method>
<method name="MaxX" type="int" overloaded="no">
<autodoc>MaxX(self) -> int</autodoc>
+ <docstring>Gets the maximum horizontal extent used in drawing commands so far.</docstring>
</method>
<method name="MinY" type="int" overloaded="no">
<autodoc>MinY(self) -> int</autodoc>
+ <docstring>Gets the minimum vertical extent used in drawing commands so far.</docstring>
</method>
<method name="MaxY" type="int" overloaded="no">
<autodoc>MaxY(self) -> int</autodoc>
+ <docstring>Gets the maximum vertical extent used in drawing commands so far.</docstring>
</method>
<method name="GetBoundingBox" type="" overloaded="no">
<autodoc>GetBoundingBox() -> (x1,y1, x2,y2)</autodoc>
+ <docstring>Returns the min and max points used in drawing commands so far.</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
#---------------------------------------------------------------------------
</pythoncode>
<class name="MemoryDC" oldname="wxMemoryDC" module="_gdi">
+ <docstring>A memory device context provides a means to draw graphics onto a
+bitmap. A bitmap must be selected into the new memory DC before it may
+be used for anything. Typical usage is as follows::
+
+ dc = wx.MemoryDC()
+ dc.SelectObject(bitmap)
+ # draw on the dc usign any of the Draw methods
+ dc.SelectObject(wx.NullBitmap)
+ # the bitmap now contains wahtever was drawn upon it
+
+Note that the memory DC *must* be deleted (or the bitmap selected out
+of it) before a bitmap can be reselected into another memory DC.
+</docstring>
<baseclass name="DC"/>
<constructor name="MemoryDC" overloaded="no">
<autodoc>__init__(self) -> MemoryDC</autodoc>
+ <docstring>Constructs a new memory device context.
+
+Use the Ok member to test whether the constructor was successful in
+creating a usable device context. Don't forget to select a bitmap into
+the DC before drawing on it.
+
+:see: `MemoryDCFromDC`</docstring>
</constructor>
<constructor name="MemoryDCFromDC" overloaded="no">
<autodoc>MemoryDCFromDC(DC oldDC) -> MemoryDC</autodoc>
+ <docstring>Creates a DC that is compatible with the oldDC.</docstring>
<paramlist>
<param name="oldDC" type="DC" default=""/>
</paramlist>
</constructor>
<method name="SelectObject" type="" overloaded="no">
<autodoc>SelectObject(self, Bitmap bitmap)</autodoc>
+ <docstring>Selects the bitmap into the device context, to use as the memory
+bitmap. Selecting the bitmap into a memory DC allows you to draw into
+the DC, and therefore the bitmap, and also to use Blit to copy the
+bitmap to a window.
+
+If the argument is wx.NullBitmap (or some other uninitialised
+`wx.Bitmap`) the current bitmap is selected out of the device context,
+and the original bitmap restored, allowing the current bitmap to be
+destroyed safely.</docstring>
<paramlist>
<param name="bitmap" type="Bitmap" default=""/>
</paramlist>
#---------------------------------------------------------------------------
</pythoncode>
<class name="BufferedDC" oldname="wxBufferedDC" module="_gdi">
+ <docstring>This simple class provides a simple way to avoid flicker: when drawing
+on it, everything is in fact first drawn on an in-memory buffer (a
+`wx.Bitmap`) and then copied to the screen only once, when this object
+is destroyed.
+
+It can be used in the same way as any other device
+context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
+want to use it in your EVT_PAINT handler, you should look at
+`wx.BufferedPaintDC`.
+</docstring>
<baseclass name="MemoryDC"/>
<constructor name="BufferedDC" overloaded="yes">
+ <docstring>Constructs a buffered DC.
+
+ :param dc: The underlying DC: everything drawn to this object will
+ be flushed to this DC when this object is destroyed. You may
+ pass ``None`` in order to just initialize the buffer, and not
+ flush it.
+
+ :param buffer: If a `wx.Size` object is passed as the 2nd arg then
+ it is the size of the bitmap that will be created internally
+ and used for an implicit buffer. If the 2nd arg is a
+ `wx.Bitmap` then it is the explicit buffer that will be
+ used. Using an explicit buffer is the most efficient solution
+ as the bitmap doesn't have to be recreated each time but it
+ also requires more memory as the bitmap is never freed. The
+ bitmap should have appropriate size, anything drawn outside of
+ its bounds is clipped.
+</docstring>
<paramlist>
<param name="dc" type="DC" default=""/>
<param name="buffer" type="Bitmap" default=""/>
<constructor name="BufferedDC" overloaded="yes">
<autodoc>__init__(self, DC dc, Bitmap buffer) -> BufferedDC
__init__(self, DC dc, Size area) -> BufferedDC</autodoc>
- <paramlist>
- <param name="dc" type="DC" default=""/>
- <param name="area" type="Size" default=""/>
- </paramlist>
- </constructor>
- <constructor name="BufferedDCInternalBuffer" overloaded="no">
- <autodoc>BufferedDCInternalBuffer(DC dc, Size area) -> BufferedDC</autodoc>
+ <docstring>Constructs a buffered DC.
+
+ :param dc: The underlying DC: everything drawn to this object will
+ be flushed to this DC when this object is destroyed. You may
+ pass ``None`` in order to just initialize the buffer, and not
+ flush it.
+
+ :param buffer: If a `wx.Size` object is passed as the 2nd arg then
+ it is the size of the bitmap that will be created internally
+ and used for an implicit buffer. If the 2nd arg is a
+ `wx.Bitmap` then it is the explicit buffer that will be
+ used. Using an explicit buffer is the most efficient solution
+ as the bitmap doesn't have to be recreated each time but it
+ also requires more memory as the bitmap is never freed. The
+ bitmap should have appropriate size, anything drawn outside of
+ its bounds is clipped.
+</docstring>
<paramlist>
<param name="dc" type="DC" default=""/>
<param name="area" type="Size" default=""/>
</constructor>
<destructor name="~wxBufferedDC" overloaded="no">
<autodoc>__del__(self)</autodoc>
+ <docstring>Copies everything drawn on the DC so far to the underlying DC
+associated with this object, if any.</docstring>
</destructor>
<method name="UnMask" type="" overloaded="no">
<autodoc>UnMask(self)</autodoc>
+ <docstring>Blits the buffer to the dc, and detaches the dc from the buffer (so it
+can be effectively used once only). This is usually only called in
+the destructor.</docstring>
</method>
</class>
<class name="BufferedPaintDC" oldname="wxBufferedPaintDC" module="_gdi">
+ <docstring>This is a subclass of `wx.BufferedDC` which can be used inside of an
+EVT_PAINT event handler. Just create an object of this class instead
+of `wx.PaintDC` and that's all you have to do to (mostly) avoid
+flicker. The only thing to watch out for is that if you are using this
+class together with `wx.ScrolledWindow`, you probably do **not** want
+to call `wx.Window.PrepareDC` on it as it already does this internally
+for the real underlying `wx.PaintDC`.
+
+If your window is already fully buffered in a `wx.Bitmap` then your
+EVT_PAINT handler can be as simple as just creating a
+``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
+automatically when it is destroyed. For example::
+
+ def OnPaint(self, event):
+ dc = wx.BufferedPaintDC(self, self.buffer)
+
+
+</docstring>
<baseclass name="BufferedDC"/>
<constructor name="BufferedPaintDC" overloaded="no">
<autodoc>__init__(self, Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC</autodoc>
+ <docstring>Create a buffered paint DC. As with `wx.BufferedDC`, you may either
+provide the bitmap to be used for buffering or let this object create
+one internally (in the latter case, the size of the client part of the
+window is automatically used).
+
+</docstring>
<paramlist>
<param name="window" type="Window" default=""/>
<param name="buffer" type="Bitmap" default="wxNullBitmap"/>
#---------------------------------------------------------------------------
</pythoncode>
<class name="ScreenDC" oldname="wxScreenDC" module="_gdi">
+ <docstring>A wxScreenDC can be used to paint anywhere on the screen. This should
+normally be constructed as a temporary stack object; don't store a
+wxScreenDC object.
+</docstring>
<baseclass name="DC"/>
<constructor name="ScreenDC" overloaded="no">
<autodoc>__init__(self) -> ScreenDC</autodoc>
+ <docstring>A wxScreenDC can be used to paint anywhere on the screen. This should
+normally be constructed as a temporary stack object; don't store a
+wxScreenDC object.
+</docstring>
</constructor>
<method name="StartDrawingOnTopWin" type="bool" overloaded="no">
<autodoc>StartDrawingOnTopWin(self, Window window) -> bool</autodoc>
+ <docstring>Specify that the area of the screen to be drawn upon coincides with
+the given window.
+
+:see: `EndDrawingOnTop`</docstring>
<paramlist>
<param name="window" type="Window" default=""/>
</paramlist>
</method>
<method name="StartDrawingOnTop" type="bool" overloaded="no">
<autodoc>StartDrawingOnTop(self, Rect rect=None) -> bool</autodoc>
+ <docstring>Specify that the area is the given rectangle, or the whole screen if
+``None`` is passed.
+
+:see: `EndDrawingOnTop`</docstring>
<paramlist>
<param name="rect" type="Rect" default="NULL"/>
</paramlist>
</method>
<method name="EndDrawingOnTop" type="bool" overloaded="no">
<autodoc>EndDrawingOnTop(self) -> bool</autodoc>
+ <docstring>Use this in conjunction with `StartDrawingOnTop` or
+`StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
+top of existing windows. Without this, some window systems (such as X)
+only allow drawing to take place underneath other windows.
+
+You might use this pair of functions when implementing a drag feature,
+for example as in the `wx.SplitterWindow` implementation.
+
+These functions are probably obsolete since the X implementations
+allow drawing directly on the screen now. However, the fact that this
+function allows the screen to be refreshed afterwards may be useful
+to some applications.</docstring>
</method>
</class>
<pythoncode>
#---------------------------------------------------------------------------
</pythoncode>
<class name="ClientDC" oldname="wxClientDC" module="_gdi">
+ <docstring>A wx.ClientDC must be constructed if an application wishes to paint on
+the client area of a window from outside an EVT_PAINT event. This should
+normally be constructed as a temporary stack object; don't store a
+wx.ClientDC object long term.
+
+To draw on a window from within an EVT_PAINT handler, construct a
+`wx.PaintDC` object.
+
+To draw on the whole window including decorations, construct a
+`wx.WindowDC` object (Windows only).
+</docstring>
<baseclass name="DC"/>
<constructor name="ClientDC" overloaded="no">
<autodoc>__init__(self, Window win) -> ClientDC</autodoc>
+ <docstring>Constructor. Pass the window on which you wish to paint.</docstring>
<paramlist>
<param name="win" type="Window" default=""/>
</paramlist>
#---------------------------------------------------------------------------
</pythoncode>
<class name="PaintDC" oldname="wxPaintDC" module="_gdi">
+ <docstring>A wx.PaintDC must be constructed if an application wishes to paint on
+the client area of a window from within an EVT_PAINT event
+handler. This should normally be constructed as a temporary stack
+object; don't store a wx.PaintDC object. If you have an EVT_PAINT
+handler, you **must** create a wx.PaintDC object within it even if you
+don't actually use it.
+
+Using wx.PaintDC within EVT_PAINT handlers is important because it
+automatically sets the clipping area to the damaged area of the
+window. Attempts to draw outside this area do not appear.
+
+To draw on a window from outside EVT_PAINT handlers, construct a
+`wx.ClientDC` object.
+</docstring>
<baseclass name="DC"/>
<constructor name="PaintDC" overloaded="no">
<autodoc>__init__(self, Window win) -> PaintDC</autodoc>
+ <docstring>Constructor. Pass the window on which you wish to paint.</docstring>
<paramlist>
<param name="win" type="Window" default=""/>
</paramlist>
#---------------------------------------------------------------------------
</pythoncode>
<class name="WindowDC" oldname="wxWindowDC" module="_gdi">
+ <docstring>A wx.WindowDC must be constructed if an application wishes to paint on
+the whole area of a window (client and decorations). This should
+normally be constructed as a temporary stack object; don't store a
+wx.WindowDC object.</docstring>
<baseclass name="DC"/>
<constructor name="WindowDC" overloaded="no">
<autodoc>__init__(self, Window win) -> WindowDC</autodoc>
+ <docstring>Constructor. Pass the window on which you wish to paint.</docstring>
<paramlist>
<param name="win" type="Window" default=""/>
</paramlist>
#---------------------------------------------------------------------------
</pythoncode>
<class name="MirrorDC" oldname="wxMirrorDC" module="_gdi">
+ <docstring>wx.MirrorDC is a simple wrapper class which is always associated with a
+real `wx.DC` object and either forwards all of its operations to it
+without changes (no mirroring takes place) or exchanges x and y
+coordinates which makes it possible to reuse the same code to draw a
+figure and its mirror -- i.e. reflection related to the diagonal line
+x == y.</docstring>
<baseclass name="DC"/>
<constructor name="MirrorDC" overloaded="no">
<autodoc>__init__(self, DC dc, bool mirror) -> MirrorDC</autodoc>
+ <docstring>Creates a mirrored DC associated with the real *dc*. Everything drawn
+on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
+*mirror* is True.</docstring>
<paramlist>
<param name="dc" type="DC" default=""/>
<param name="mirror" type="bool" default=""/>
#---------------------------------------------------------------------------
</pythoncode>
<class name="PostScriptDC" oldname="wxPostScriptDC" module="_gdi">
+ <docstring>This is a `wx.DC` that can write to PostScript files on any platform.</docstring>
<baseclass name="DC"/>
<constructor name="PostScriptDC" overloaded="no">
<autodoc>__init__(self, wxPrintData printData) -> PostScriptDC</autodoc>
+ <docstring>Constructs a PostScript printer device context from a `wx.PrintData`
+object.</docstring>
<paramlist>
<param name="printData" type="wxPrintData" default=""/>
</paramlist>
</method>
<staticmethod name="SetResolution" type="" overloaded="no">
<autodoc>SetResolution(int ppi)</autodoc>
+ <docstring>Set resolution (in pixels per inch) that will be used in PostScript
+output. Default is 720ppi.</docstring>
<paramlist>
<param name="ppi" type="int" default=""/>
</paramlist>
</staticmethod>
<staticmethod name="GetResolution" type="int" overloaded="no">
<autodoc>GetResolution() -> int</autodoc>
+ <docstring>Return resolution used in PostScript output.</docstring>
</staticmethod>
</class>
<pythoncode>
<autodoc>Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER,
String name=PanelNameStr) -> bool</autodoc>
+ <docstring>Create the GUI part of the Window for 2-phase creation mode.</docstring>
<paramlist>
<param name="parent" type="Window" default=""/>
<param name="id" type="int" default="-1"/>
<autodoc>Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL,
String name=PanelNameStr) -> bool</autodoc>
+ <docstring>Create the GUI part of the Window for 2-phase creation mode.</docstring>
<paramlist>
<param name="parent" type="Window" default=""/>
<param name="id" type="int" default="-1"/>
</method>
<method name="GetScrollPixelsPerUnit" type="" overloaded="no">
<autodoc>GetScrollPixelsPerUnit() -> (xUnit, yUnit)</autodoc>
+ <docstring>Get the size of one logical unit in physical units.</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="GetViewStart" type="" overloaded="no">
<autodoc>GetViewStart() -> (x,y)</autodoc>
+ <docstring>Get the view start</docstring>
<paramlist>
<param name="OUTPUT" type="int" default=""/>
<param name="OUTPUT" type="int" default=""/>
<method name="GetTargetWindow" type="Window" overloaded="no">
<autodoc>GetTargetWindow(self) -> Window</autodoc>
</method>
+ <method name="DoPrepareDC" type="" overloaded="no">
+ <autodoc>DoPrepareDC(self, DC dc)</autodoc>
+ <docstring>Normally what is called by `PrepareDC`.</docstring>
+ <paramlist>
+ <param name="dc" type="DC" default=""/>
+ </paramlist>
+ </method>
<staticmethod name="GetClassDefaultAttributes" type="VisualAttributes" overloaded="no">
<autodoc>GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes</autodoc>
<docstring>Get the default attributes for this class. This is useful if you want
<param name="widths_field" type="int" default=""/>
</paramlist>
</method>
+ <method name="SetStatusStyles" type="" overloaded="no">
+ <autodoc>SetStatusStyles(self, int styles, int styles_field)</autodoc>
+ <paramlist>
+ <param name="styles" type="int" default=""/>
+ <param name="styles_field" type="int" default=""/>
+ </paramlist>
+ </method>
<method name="GetFieldRect" type="Rect" overloaded="no">
<autodoc>GetFieldRect(self, int i) -> Rect</autodoc>
<paramlist>
<class name="SplitterWindow" oldname="wxSplitterWindow" module="_windows">
<docstring>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.</docstring>
+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.)
+ ============================== =======================================
+
+</docstring>
<baseclass name="Window"/>
<constructor name="SplitterWindow" overloaded="no">
<autodoc>__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
</method>
<method name="SplitVertically" type="bool" overloaded="no">
<autodoc>SplitVertically(self, Window window1, Window window2, int sashPosition=0) -> bool</autodoc>
- <docstring>Initializes the left and right panes of the splitter window.</docstring>
+ <docstring>Initializes the left and right panes of the splitter window.
+ :param window1: The left pane.
+ :param window2: The right pane.
+ :param 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.
+</docstring>
<paramlist>
<param name="window1" type="Window" default=""/>
<param name="window2" type="Window" default=""/>
</method>
<method name="SplitHorizontally" type="bool" overloaded="no">
<autodoc>SplitHorizontally(self, Window window1, Window window2, int sashPosition=0) -> bool</autodoc>
- <docstring>Initializes the top and bottom panes of the splitter window.</docstring>
+ <docstring>Initializes the top and bottom panes of the splitter window.
+ :param window1: The top pane.
+ :param window2: The bottom pane.
+ :param 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.
+</docstring>
<paramlist>
<param name="window1" type="Window" default=""/>
<param name="window2" type="Window" default=""/>
<param name="to" type="size_t" default=""/>
</paramlist>
</method>
- <method name="HitTestXT" type="int" overloaded="no">
- <autodoc>HitTestXT(self, int x, int y) -> int</autodoc>
+ <method name="HitTestXY" type="int" overloaded="no">
+ <autodoc>HitTestXY(self, int x, int y) -> int</autodoc>
<docstring>Test where the given (in client coords) point lies</docstring>
<paramlist>
<param name="x" type="int" default=""/>
</class>
<class name="DirDialog" oldname="wxDirDialog" module="_windows">
<docstring>wx.DirDialog allows the user to select a directory by browising the
-file system.</docstring>
+file system.
+
+Window Styles
+--------------
+ ==================== ==========================================
+ wx.DD_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.
+ ==================== ==========================================
+</docstring>
<baseclass name="Dialog"/>
<constructor name="DirDialog" overloaded="no">
<autodoc>__init__(self, Window parent, String message=DirSelectorPromptStr,
</class>
<class name="FileDialog" oldname="wxFileDialog" module="_windows">
<docstring>wx.FileDialog allows the user to select one or more files from the
-filesystem.</docstring>
+filesystem.
+
+In Windows, this is the common file selector dialog. On X based
+platforms a generic alternative is used. 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"
+
+
+Window 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.
+ =================== ==========================================
+</docstring>
<baseclass name="Dialog"/>
<constructor name="FileDialog" overloaded="no">
<autodoc>__init__(self, Window parent, String message=FileSelectorPromptStr,
</constructor>
<method name="SetSelections" type="" overloaded="no">
<autodoc>SetSelections(List selections)</autodoc>
+ <docstring>Specify the items in the list that should be selected, using a list of
+integers.</docstring>
<paramlist>
<param name="selections" type="wxArrayInt" default=""/>
</paramlist>
</class>
<class name="MessageDialog" oldname="wxMessageDialog" module="_windows">
<docstring>This class provides a simple dialog that shows a single or multi-line
-message, with a choice of OK, Yes, No and/or Cancel buttons.</docstring>
+message, with a choice of OK, Yes, No and/or Cancel buttons.
+
+Window 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).
+ =================== =============================================
+</docstring>
<baseclass name="Dialog"/>
<constructor name="MessageDialog" overloaded="no">
<autodoc>__init__(self, Window parent, String message, String caption=MessageBoxCaptionStr,
</class>
<class name="ProgressDialog" oldname="wxProgressDialog" module="_windows">
<docstring>A dialog that shows a short message and a progress bar. Optionally, it
-can display an ABORT button.</docstring>
+can display an ABORT button.
+
+Window 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.
+ ==================== =============================================
+</docstring>
<baseclass name="Frame"/>
<constructor name="ProgressDialog" overloaded="no">
<autodoc>__init__(self, String title, String message, int maximum=100, Window parent=None,
<method name="Update" type="bool" overloaded="no">
<autodoc>Update(self, int value, String newmsg=EmptyString) -> bool</autodoc>
<docstring>Updates the dialog, setting the progress bar to the new value and, if
-given changes the message above it. Returns true unless the Cancel
-button has been pressed.
+given changes the message above it. The value given should be less
+than or equal to the maximum value given to the constructor and the
+dialog is closed if it is equal to the maximum. Returns true unless
+the Cancel button has been pressed.
If false is returned, the application can either immediately destroy
the dialog or ask the user for the confirmation and if the abort is
`wx.FindDialogEvent` 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.</docstring>
+dialog and calling them has no effect later.
+
+Flags
+-----
+ ================ ===============================================
+ wx.FR_DOWN Downward search/replace selected (otherwise,
+ upwards)
+
+ wx.FR_WHOLEWORD Whole word search/replace selected
+
+ wx.FR_MATCHCASE Case sensitive search/replace selected
+ (otherwise, case insensitive)
+ ================ ===============================================
+</docstring>
<baseclass name="Object"/>
<constructor name="FindReplaceData" overloaded="no">
<autodoc>__init__(self, int flags=0) -> FindReplaceData</autodoc>
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.</docstring>
+way; it is always, by design and implementation, modeless.
+
+
+Window 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
+ ===================== =========================================
+</docstring>
<baseclass name="Dialog"/>
<constructor name="FindReplaceDialog" overloaded="no">
<autodoc>__init__(self, Window parent, FindReplaceData data, String title,
<class name="Button" oldname="wxButton" module="_controls">
<docstring>A button is a control that contains a text string, and is one of the most
common elements of a GUI. It may be placed on a dialog box or panel, or
-indeed almost any other window.</docstring>
+indeed almost any other window.
+
+Window Styles
+-------------
+ ============== ==========================================
+ wx.BU_LEFT Left-justifies the label. Windows and GTK+ only.
+ wx.BU_TOP Aligns the label to the top of the button.
+ Windows and GTK+ only.
+ wx.BU_RIGHT Right-justifies the bitmap label. Windows and GTK+ only.
+ wx.BU_BOTTOM Aligns the label to the bottom of the button.
+ Windows and GTK+ 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.
+ ============ ==========================================
+
+:see: `wx.BitmapButton`
+</docstring>
<baseclass name="Control"/>
<constructor name="Button" overloaded="no">
<autodoc>__init__(self, Window parent, int id=-1, String label=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
long style=0, Validator validator=DefaultValidator,
String name=ButtonNameStr) -> Button</autodoc>
- <docstring>Create and show a button.</docstring>
+ <docstring>Create and show a button. The preferred way to create standard
+buttons is to use a standard ID and an empty label. In this case
+wxWigets will automatically use a stock label that coresponds to the
+ID given. In additon, the button will be decorated with stock icons
+under GTK+ 2.
+
+The stock IDs and coresponding labels are
+
+ ================== ====================
+ wx.ID_ADD 'Add'
+ wx.ID_APPLY '\\&Apply'
+ wx.ID_BOLD '\\&Bold'
+ wx.ID_CANCEL '\\&Cancel'
+ wx.ID_CLEAR '\\&Clear'
+ wx.ID_CLOSE '\\&Close'
+ wx.ID_COPY '\\&Copy'
+ wx.ID_CUT 'Cu\\&t'
+ wx.ID_DELETE '\\&Delete'
+ wx.ID_FIND '\\&Find'
+ wx.ID_REPLACE 'Find and rep\\&lace'
+ wx.ID_BACKWARD '\\&Back'
+ wx.ID_DOWN '\\&Down'
+ wx.ID_FORWARD '\\&Forward'
+ wx.ID_UP '\\&Up'
+ wx.ID_HELP '\\&Help'
+ wx.ID_HOME '\\&Home'
+ wx.ID_INDENT 'Indent'
+ wx.ID_INDEX '\\&Index'
+ wx.ID_ITALIC '\\&Italic'
+ wx.ID_JUSTIFY_CENTER 'Centered'
+ wx.ID_JUSTIFY_FILL 'Justified'
+ wx.ID_JUSTIFY_LEFT 'Align Left'
+ wx.ID_JUSTIFY_RIGHT 'Align Right'
+ wx.ID_NEW '\\&New'
+ wx.ID_NO '\\&No'
+ wx.ID_OK '\\&OK'
+ wx.ID_OPEN '\\&Open'
+ wx.ID_PASTE '\\&Paste'
+ wx.ID_PREFERENCES '\\&Preferences'
+ wx.ID_PRINT '\\&Print'
+ wx.ID_PREVIEW 'Print previe\\&w'
+ wx.ID_PROPERTIES '\\&Properties'
+ wx.ID_EXIT '\\&Quit'
+ wx.ID_REDO '\\&Redo'
+ wx.ID_REFRESH 'Refresh'
+ wx.ID_REMOVE 'Remove'
+ wx.ID_REVERT_TO_SAVED 'Revert to Saved'
+ wx.ID_SAVE '\\&Save'
+ wx.ID_SAVEAS 'Save \\&As...'
+ wx.ID_STOP '\\&Stop'
+ wx.ID_UNDELETE 'Undelete'
+ wx.ID_UNDERLINE '\\&Underline'
+ wx.ID_UNDO '\\&Undo'
+ wx.ID_UNINDENT '\\&Unindent'
+ wx.ID_YES '\\&Yes'
+ wx.ID_ZOOM_100 '\\&Actual Size'
+ wx.ID_ZOOM_FIT 'Zoom to \\&Fit'
+ wx.ID_ZOOM_IN 'Zoom \\&In'
+ wx.ID_ZOOM_OUT 'Zoom \\&Out'
+ ================== ====================
+</docstring>
<paramlist>
<param name="parent" type="Window" default=""/>
<param name="id" type="int" default="-1"/>
<docstring>A Button that contains a bitmap. A bitmap button can be supplied with a
single bitmap, and wxWidgets 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.</docstring>
+unpressed focused state, and greyed-out state may be supplied.
+
+Window 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.
+ =========== ==================================
+
+:see: `wx.Button`, `wx.Bitmap`
+</docstring>
<baseclass name="Button"/>
<constructor name="BitmapButton" overloaded="no">
<autodoc>__init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap,
checkmark is visible) or off (no checkmark). Optionally (When the
wx.CHK_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.</docstring>
+Apply" state.
+
+Window 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.
+ =============================== ===============================
+</docstring>
<baseclass name="Control"/>
<constructor name="CheckBox" overloaded="no">
<autodoc>__init__(self, Window parent, int id=-1, String label=EmptyString,
<class name="Choice" oldname="wxChoice" module="_controls">
<docstring>A Choice control is used to select one of a list of strings.
Unlike a `wx.ListBox`, only the selection is visible until the
-user pulls down the menu of choices.</docstring>
+user pulls down the menu of choices.
+
+Events
+------
+ ================ ==========================================
+ EVT_CHOICE Sent when an item in the list is selected.
+ ================ ==========================================
+</docstring>
<baseclass name="ControlWithItems"/>
<constructor name="Choice" overloaded="no">
<autodoc>__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
<autodoc>Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool</autodoc>
+ <docstring>Actually create the GUI Choice control for 2-phase creation</docstring>
<paramlist>
<param name="parent" type="Window" default=""/>
<param name="id" type="int" default="-1"/>
read-only text field; or a drop-down list with text field.
A combobox permits a single selection only. Combobox items are
-numbered from zero.</docstring>
+numbered from zero.
+
+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.
+ ================ ===============================================
+</docstring>
<baseclass name="Control"/>
<baseclass name="ItemContainer"/>
<constructor name="ComboBox" overloaded="no">
Point pos=DefaultPosition, Size size=DefaultSize,
List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool</autodoc>
+ <docstring>Actually create the GUI wxComboBox control for 2-phase creation</docstring>
<paramlist>
<param name="parent" type="Window" default=""/>
<param name="id" type="int" default="-1"/>
#---------------------------------------------------------------------------
</pythoncode>
<class name="TextAttr" oldname="wxTextAttr" module="_controls">
- <constructor name="TextAttr" overloaded="yes"/>
- <constructor name="TextAttr" overloaded="yes">
- <autodoc>__init__(self) -> TextAttr
-__init__(self, Colour colText, Colour colBack=wxNullColour, Font font=wxNullFont,
- int alignment=TEXT_ALIGNMENT_DEFAULT) -> TextAttr</autodoc>
+ <constructor name="TextAttr" overloaded="no">
+ <autodoc>__init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour,
+ Font font=wxNullFont, int alignment=TEXT_ALIGNMENT_DEFAULT) -> TextAttr</autodoc>
<paramlist>
- <param name="colText" type="Colour" default=""/>
+ <param name="colText" type="Colour" default="wxNullColour"/>
<param name="colBack" type="Colour" default="wxNullColour"/>
<param name="font" type="Font" default="wxNullFont"/>
<param name="alignment" type="wxTextAttrAlignment" default="wxTEXT_ALIGNMENT_DEFAULT"/>
</method>
<method name="GetSelection" type="" overloaded="no">
<autodoc>GetSelection() -> (from, to)</autodoc>
+ <docstring>If the return values from and to are the same, there is no selection.</docstring>
<paramlist>
<param name="OUTPUT" type="long" default=""/>
<param name="OUTPUT" type="long" default=""/>
</method>
<method name="HitTest" type="wxTextCtrlHitTestResult" overloaded="no">
<autodoc>HitTest(Point pt) -> (result, row, col)</autodoc>
+ <docstring>Find the row, col coresponding to the character at the point given in
+pixels. NB: pt is in device coords but is not adjusted for the client
+area origin nor scrolling.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="OUTPUT" type="long" default=""/>
<param name="OUTPUT" type="long" default=""/>
</paramlist>
</method>
+ <method name="HitTestPos" type="wxTextCtrlHitTestResult" overloaded="no">
+ <autodoc>HitTestPos(Point pt) -> (result, position)</autodoc>
+ <docstring>Find the character position in the text coresponding to the point
+given in pixels. NB: pt is in device coords but is not adjusted for
+the client area origin nor scrolling. </docstring>
+ <paramlist>
+ <param name="pt" type="Point" default=""/>
+ <param name="OUTPUT" type="long" default=""/>
+ </paramlist>
+ </method>
<method name="Copy" type="" overloaded="no">
<autodoc>Copy(self)</autodoc>
</method>
<method name="SetScrollbar" type="" overloaded="no">
<autodoc>SetScrollbar(self, int position, int thumbSize, int range, int pageSize,
bool refresh=True)</autodoc>
- <docstring>Sets the scrollbar properties of a built-in scrollbar.</docstring>
+ <docstring>Sets the scrollbar properties of a built-in scrollbar.
+ :param orientation: Determines the scrollbar whose page size is to
+ be set. May be wx.HORIZONTAL or wx.VERTICAL.
+
+ :param position: The position of the scrollbar in scroll units.
+
+ :param thumbSize: The size of the thumb, or visible portion of the
+ scrollbar, in scroll units.
+
+ :param range: The maximum position of the scrollbar.
+
+ :param refresh: True to redraw the scrollbar, false otherwise.
+</docstring>
<paramlist>
<param name="position" type="int" default=""/>
<param name="thumbSize" type="int" default=""/>
</method>
<method name="HitTest" type="int" overloaded="no">
<autodoc>HitTest(Point pt) -> (tab, where)</autodoc>
+ <docstring>Returns the tab which is hit, and flags indicating where using
+wx.NB_HITTEST flags.</docstring>
<paramlist>
<param name="pt" type="Point" default=""/>
<param name="OUTPUT" type="long" default=""/>
</method>
<method name="HitTest" type="long" overloaded="no">
<autodoc>HitTest(Point point) -> (item, where)</autodoc>
+ <docstring>Determines which item (if any) is at the specified point, giving
+ in the second return value (see wxLIST_HITTEST_... flags.)</docstring>
<paramlist>
<param name="point" type="Point" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="HitTest" type="TreeItemId" overloaded="no">
<autodoc>HitTest(Point point) -> (item, where)</autodoc>
+ <docstring>Determine which item (if any) belongs the given point. The coordinates
+specified are relative to the client area of tree ctrl and the where return
+value is set to a bitmask of wxTREE_HITTEST_xxx constants.
+</docstring>
<paramlist>
<param name="point" type="Point" default=""/>
<param name="OUTPUT" type="int" default=""/>
</method>
<method name="FindChild" type="TreeItemId" overloaded="no">
<autodoc>FindChild(wxTreeItemId parentId, wxString path) -> (item, done)</autodoc>
+ <docstring>Find the child that matches the first part of 'path'. E.g. if a child
+path is "/usr" and 'path' is "/usr/include" then the child for
+/usr is returned. If the path string has been used (we're at the
+leaf), done is set to True.
+</docstring>
<paramlist>
<param name="parentId" type="TreeItemId" default=""/>
<param name="path" type="String" default=""/>
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.</docstring>
+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
+ ============== =========================================
+
+:see: `wx.ContextHelp`, `wx.ContextHelpButton`
+</docstring>
<baseclass name="CommandEvent"/>
<constructor name="HelpEvent" overloaded="no">
<autodoc>__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> HelpEvent</autodoc>
<param name="secs" type="int" default=""/>
</paramlist>
</method>
- <method name="Usleep" oldname="wxUsleep" type="" overloaded="no">
- <autodoc>Usleep(unsigned long milliseconds)</autodoc>
+ <method name="MilliSleep" oldname="wxMilliSleep" type="" overloaded="no">
+ <autodoc>MilliSleep(unsigned long milliseconds)</autodoc>
<paramlist>
<param name="milliseconds" type="unsigned long" default=""/>
</paramlist>
</method>
+ <method name="MicroSleep" oldname="wxMicroSleep" type="" overloaded="no">
+ <autodoc>MicroSleep(unsigned long microseconds)</autodoc>
+ <paramlist>
+ <param name="microseconds" type="unsigned long" default=""/>
+ </paramlist>
+ </method>
+ <pythoncode> Usleep = MilliSleep </pythoncode>
<method name="EnableTopLevelWindows" oldname="wxEnableTopLevelWindows" type="" overloaded="no">
<autodoc>EnableTopLevelWindows(bool enable)</autodoc>
<paramlist>
<class name="FileHistory" oldname="wxFileHistory" module="_misc">
<baseclass name="Object"/>
<constructor name="FileHistory" overloaded="no">
- <autodoc>__init__(self, int maxFiles=9) -> FileHistory</autodoc>
+ <autodoc>__init__(self, int maxFiles=9, int idBase=ID_FILE1) -> FileHistory</autodoc>
<paramlist>
<param name="maxFiles" type="int" default="9"/>
+ <param name="idBase" type="int" default="wxID_FILE1"/>
</paramlist>
</constructor>
<destructor name="~wxFileHistory" overloaded="no">
def CreateBitmap(self, artid, client, size):
...
return bmp
+
+
+Identifying art resources
+-------------------------
+
+Every bitmap is known to wx.ArtProvider under an unique ID that is
+used when requesting a resource from it. The IDs can have one of the
+following predefined values. Additionally, any string recognized by
+custom art providers registered using `PushProvider` may be used.
+
+GTK+ Note
+---------
+
+When running under GTK+ 2, GTK+ stock item IDs (e.g. 'gtk-cdrom') may be used
+as well. Additionally, if wxGTK was compiled against GTK+ >= 2.4, then it is
+also possible to load icons from current icon theme by specifying their name
+without the extension and directory components. Icon themes recognized by GTK+
+follow the freedesktop.org Icon Themes specification. Note that themes are
+not guaranteed to contain all icons, so wx.ArtProvider may return wx.NullBitmap
+or wx.NullIcon. The default theme is typically installed in /usr/share/icons/hicolor.
+
+
+ * wx.ART_ADD_BOOKMARK
+ * wx.ART_DEL_BOOKMARK
+ * wx.ART_HELP_SIDE_PANEL
+ * wx.ART_HELP_SETTINGS
+ * wx.ART_HELP_BOOK
+ * wx.ART_HELP_FOLDER
+ * wx.ART_HELP_PAGE
+ * wx.ART_GO_BACK
+ * wx.ART_GO_FORWARD
+ * wx.ART_GO_UP
+ * wx.ART_GO_DOWN
+ * wx.ART_GO_TO_PARENT
+ * wx.ART_GO_HOME
+ * wx.ART_FILE_OPEN
+ * wx.ART_PRINT
+ * wx.ART_HELP
+ * wx.ART_TIP
+ * wx.ART_REPORT_VIEW
+ * wx.ART_LIST_VIEW
+ * wx.ART_NEW_DIR
+ * wx.ART_FOLDER
+ * wx.ART_GO_DIR_UP
+ * wx.ART_EXECUTABLE_FILE
+ * wx.ART_NORMAL_FILE
+ * wx.ART_TICK_MARK
+ * wx.ART_CROSS_MARK
+ * wx.ART_ERROR
+ * wx.ART_QUESTION
+ * wx.ART_WARNING
+ * wx.ART_INFORMATION
+ * wx.ART_MISSING_IMAGE
+
+
+Clients
+-------
+
+The Client is the entity that calls wx.ArtProvider's `GetBitmap` or
+`GetIcon` function. Client IDs serve as a hint to wx.ArtProvider
+that is supposed to help it to choose the best looking bitmap. For
+example it is often desirable to use slightly different icons in menus
+and toolbars even though they represent the same action (e.g.
+wx.ART_FILE_OPEN). Remember that this is really only a hint for
+wx.ArtProvider -- it is common that `wx.ArtProvider.GetBitmap` returns
+identical bitmap for different client values!
+
+ * wx.ART_TOOLBAR
+ * wx.ART_MENU
+ * wx.ART_FRAME_ICON
+ * wx.ART_CMN_DIALOG
+ * wx.ART_HELP_BROWSER
+ * wx.ART_MESSAGE_BOX
+ * wx.ART_BUTTON
+ * wx.ART_OTHER (used for all requests that don't fit into any
+ of the categories above)
</docstring>
<constructor name="wxPyArtProvider" overloaded="no">
<autodoc>__init__(self) -> ArtProvider</autodoc>
def CreateBitmap(self, artid, client, size):
...
return bmp
+
+
+Identifying art resources
+-------------------------
+
+Every bitmap is known to wx.ArtProvider under an unique ID that is
+used when requesting a resource from it. The IDs can have one of the
+following predefined values. Additionally, any string recognized by
+custom art providers registered using `PushProvider` may be used.
+
+GTK+ Note
+---------
+
+When running under GTK+ 2, GTK+ stock item IDs (e.g. 'gtk-cdrom') may be used
+as well. Additionally, if wxGTK was compiled against GTK+ >= 2.4, then it is
+also possible to load icons from current icon theme by specifying their name
+without the extension and directory components. Icon themes recognized by GTK+
+follow the freedesktop.org Icon Themes specification. Note that themes are
+not guaranteed to contain all icons, so wx.ArtProvider may return wx.NullBitmap
+or wx.NullIcon. The default theme is typically installed in /usr/share/icons/hicolor.
+
+
+ * wx.ART_ADD_BOOKMARK
+ * wx.ART_DEL_BOOKMARK
+ * wx.ART_HELP_SIDE_PANEL
+ * wx.ART_HELP_SETTINGS
+ * wx.ART_HELP_BOOK
+ * wx.ART_HELP_FOLDER
+ * wx.ART_HELP_PAGE
+ * wx.ART_GO_BACK
+ * wx.ART_GO_FORWARD
+ * wx.ART_GO_UP
+ * wx.ART_GO_DOWN
+ * wx.ART_GO_TO_PARENT
+ * wx.ART_GO_HOME
+ * wx.ART_FILE_OPEN
+ * wx.ART_PRINT
+ * wx.ART_HELP
+ * wx.ART_TIP
+ * wx.ART_REPORT_VIEW
+ * wx.ART_LIST_VIEW
+ * wx.ART_NEW_DIR
+ * wx.ART_FOLDER
+ * wx.ART_GO_DIR_UP
+ * wx.ART_EXECUTABLE_FILE
+ * wx.ART_NORMAL_FILE
+ * wx.ART_TICK_MARK
+ * wx.ART_CROSS_MARK
+ * wx.ART_ERROR
+ * wx.ART_QUESTION
+ * wx.ART_WARNING
+ * wx.ART_INFORMATION
+ * wx.ART_MISSING_IMAGE
+
+
+Clients
+-------
+
+The Client is the entity that calls wx.ArtProvider's `GetBitmap` or
+`GetIcon` function. Client IDs serve as a hint to wx.ArtProvider
+that is supposed to help it to choose the best looking bitmap. For
+example it is often desirable to use slightly different icons in menus
+and toolbars even though they represent the same action (e.g.
+wx.ART_FILE_OPEN). Remember that this is really only a hint for
+wx.ArtProvider -- it is common that `wx.ArtProvider.GetBitmap` returns
+identical bitmap for different client values!
+
+ * wx.ART_TOOLBAR
+ * wx.ART_MENU
+ * wx.ART_FRAME_ICON
+ * wx.ART_CMN_DIALOG
+ * wx.ART_HELP_BROWSER
+ * wx.ART_MESSAGE_BOX
+ * wx.ART_BUTTON
+ * wx.ART_OTHER (used for all requests that don't fit into any
+ of the categories above)
</docstring>
</constructor>
<method name="_setCallbackInfo" type="" overloaded="no">
</staticmethod>
<staticmethod name="GetAmPmStrings" type="" overloaded="no">
<autodoc>GetAmPmStrings() -> (am, pm)</autodoc>
+ <docstring>Get the AM and PM strings in the current locale (may be empty)</docstring>
<paramlist>
<param name="OUTPUT" type="String" default=""/>
<param name="OUTPUT" type="String" default=""/>
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.</docstring>
+identify this format.
+On the system level, a data format is usually just a number, (which
+may be the CLIPFORMAT under Windows or Atom under X11, for example.)
+
+The standard format IDs are:
+
+ ================ =====================================
+ wx.DF_INVALID An invalid format
+ wx.DF_TEXT Text format
+ wx.DF_BITMAP A bitmap (wx.Bitmap)
+ wx.DF_METAFILE A metafile (wx.Metafile, Windows only)
+ wx.DF_FILENAME A list of filenames
+ wx.DF_HTML An HTML string. This is only valid on
+ Windows and non-unicode builds
+ ================ =====================================
+
+Aside the standard formats, the application may also use custom
+formats which are identified by their names (strings) and not numeric
+identifiers. Although internally custom format must be created (or
+registered) first, you shouldn't care about it because it is done
+automatically the first time the wxDataFormat object corresponding to
+a given format name is created.
+
+</docstring>
<constructor name="DataFormat" overloaded="no">
<autodoc>__init__(self, int type) -> DataFormat</autodoc>
<docstring>Constructs a data format object for one of the standard data formats
directly from Python. If you need a custom type of data object then
you should instead derive from `wx.PyDataObjectSimple` or use
`wx.CustomDataObject`.
+
+Not surprisingly, being 'smart' comes at a price of added
+complexity. This is reasonable for the situations when you really need
+to support multiple formats, but may be annoying if you only want to
+do something simple like cut and paste text.
+
+To provide a solution for both cases, wxWidgets has two predefined
+classes which derive from wx.DataObject: `wx.DataObjectSimple` and
+`wx.DataObjectComposite`. `wx.DataObjectSimple` is the simplest
+wx.DataObject possible and only holds data in a single format (such as
+text or bitmap) and `wx.DataObjectComposite` is the simplest way to
+implement a wx.DataObject which supports multiple simultaneous formats
+because it achievs this by simply holding several
+`wx.DataObjectSimple` objects.
+
+Please note that the easiest way to use drag and drop and the
+clipboard with multiple formats is by using `wx.DataObjectComposite`,
+but it is not the most efficient one as each `wx.DataObjectSimple`
+would contain the whole data in its respective formats. Now imagine
+that you want to paste 200 pages of text in your proprietary format,
+as well as Word, RTF, HTML, Unicode and plain text to the clipboard
+and even today's computers are in trouble. For this case, you will
+have to derive from wx.DataObject directly and make it enumerate its
+formats and provide the data in the requested format on
+demand. (**TODO**: This is currently not possible from Python. Make
+it so.)
+
+Note that the platform transfer mechanisms for the clipboard and drag
+and drop, do not copy any data out of the source application until
+another application actually requests the data. This is in contrast to
+the 'feel' offered to the user of a program who would normally think
+that the data resides in the clipboard after having pressed 'Copy' -
+in reality it is only declared to be available.
</docstring>
<destructor name="~wxDataObject" overloaded="no">
<autodoc>__del__(self)</autodoc>
<method name="GetDataHere" type="PyObject" overloaded="no">
<autodoc>GetDataHere(self, DataFormat format) -> String</autodoc>
<docstring>Get the data bytes in the specified format, returns None on failure.
-</docstring>
+
+:todo: This should use the python buffer interface isntead...</docstring>
<paramlist>
<param name="format" type="DataFormat" default=""/>
</paramlist>
<method name="SetData" type="bool" overloaded="no">
<autodoc>SetData(self, DataFormat format, String data) -> bool</autodoc>
<docstring>Set the data in the specified format from the bytes in the the data string.
-</docstring>
+
+:todo: This should use the python buffer interface isntead...</docstring>
<paramlist>
<param name="format" type="DataFormat" default=""/>
<param name="data" type="PyObject" default=""/>
to methods in the Python derived class. You should derive from this
class and overload `GetDataSize`, `GetDataHere` and `SetData` when you
need to create your own simple single-format type of `wx.DataObject`.
+
+Here is a simple example::
+
+ class MyDataObject(wx.PyDataObjectSimple):
+ def __init__(self):
+ wx.PyDataObjectSimple.__init__(
+ self, wx.CustomDataFormat('MyDOFormat'))
+ self.data = ''
+
+ def GetDataSize(self):
+ return len(self.data)
+ def GetDataHere(self):
+ return self.data # returns a string
+ def SetData(self, data):
+ self.data = data
+ return True
+
+Note that there is already a `wx.CustomDataObject` class that behaves
+very similarly to this example. The value of creating your own
+derived class like this is to be able to do additional things when the
+data is requested or given via the clipboard or drag and drop
+operation, such as generate the data value or decode it into needed
+data structures.
</docstring>
<baseclass name="DataObjectSimple"/>
<constructor name="PyDataObjectSimple" overloaded="no">
to methods in the Python derived class. You should derive from this
class and overload `GetDataSize`, `GetDataHere` and `SetData` when you
need to create your own simple single-format type of `wx.DataObject`.
+
+Here is a simple example::
+
+ class MyDataObject(wx.PyDataObjectSimple):
+ def __init__(self):
+ wx.PyDataObjectSimple.__init__(
+ self, wx.CustomDataFormat('MyDOFormat'))
+ self.data = ''
+
+ def GetDataSize(self):
+ return len(self.data)
+ def GetDataHere(self):
+ return self.data # returns a string
+ def SetData(self, data):
+ self.data = data
+ return True
+
+Note that there is already a `wx.CustomDataObject` class that behaves
+very similarly to this example. The value of creating your own
+derived class like this is to be able to do additional things when the
+data is requested or given via the clipboard or drag and drop
+operation, such as generate the data value or decode it into needed
+data structures.
</docstring>
<paramlist>
<param name="format" type="DataFormat" default="wxFormatInvalid"/>
<docstring>wx.BitmapDataObject is a specialization of wxDataObject for bitmap
data. It can be used without change to paste data into the `wx.Clipboard`
or a `wx.DropSource`.
-</docstring>
+
+:see: `wx.PyBitmapDataObject` if you wish to override `GetBitmap` to increase efficiency.</docstring>
<baseclass name="DataObjectSimple"/>
<constructor name="BitmapDataObject" overloaded="no">
<autodoc>__init__(self, Bitmap bitmap=wxNullBitmap) -> BitmapDataObject</autodoc>
</constructor>
<method name="GetFilenames" type="wxArrayString" overloaded="no">
<autodoc>GetFilenames(self) -> [names]</autodoc>
+ <docstring>Returns a list of file names.</docstring>
</method>
<method name="AddFile" type="" overloaded="no">
<autodoc>AddFile(self, String filename)</autodoc>
<param name="primary" type="bool" default="True"/>
</paramlist>
</method>
+ <staticmethod name="Get" type="Clipboard" overloaded="no">
+ <autodoc>Get() -> Clipboard</autodoc>
+ <docstring>Returns global instance (wxTheClipboard) of the object.</docstring>
+ </staticmethod>
</class>
+ <pythoncode>
+ class _wxPyDelayedInitWrapper(object):
+ def __init__(self, initfunc, *args, **kwargs):
+ self._initfunc = initfunc
+ self._args = args
+ self._kwargs = kwargs
+ self._instance = None
+ def _checkInstance(self):
+ if self._instance is None:
+ self._instance = self._initfunc(*self._args, **self._kwargs)
+ def __getattr__(self, name):
+ self._checkInstance()
+ return getattr(self._instance, name)
+ def __repr__(self):
+ self._checkInstance()
+ return repr(self._instance)
+ TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get)
+</pythoncode>
<class name="ClipboardLocker" oldname="wxClipboardLocker" module="_misc">
<docstring>A helpful class for opening the clipboard and automatically
closing it when the locker is destroyed.</docstring>
</method>
<method name="ChangeMode" type="bool" overloaded="no">
<autodoc>ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool</autodoc>
- <docstring>Change current mode, return true if succeeded, false otherwise</docstring>
+ <docstring>Changes the video mode of this display to the mode specified in the
+mode parameter.
+
+If wx.DefaultVideoMode is passed in as the mode parameter, the defined
+behaviour is that wx.Display will reset the video mode to the default
+mode used by the display. On Windows, the behavior is normal.
+However, there are differences on other platforms. On Unix variations
+using X11 extensions it should behave as defined, but some
+irregularities may occur.
+
+On wxMac passing in wx.DefaultVideoMode as the mode parameter does
+nothing. This happens because Carbon no longer has access to
+DMUseScreenPrefs, an undocumented function that changed the video mode
+to the system default by using the system's 'scrn' resource.
+
+Returns True if succeeded, False otherwise</docstring>
<paramlist>
<param name="mode" type="VideoMode" default="wxDefaultVideoMode"/>
</paramlist>
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.</docstring>
+EVT_CALENDAR_MONTH event handler.
+
+Window 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 CAL_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 one of
+EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED
+event.
+
+</docstring>
<baseclass name="Control"/>
<constructor name="CalendarCtrl" overloaded="no">
<autodoc>__init__(self, Window parent, int id=-1, DateTime date=DefaultDateTime,
<autodoc>HitTest(Point pos) -> (result, date, weekday)</autodoc>
<docstring>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.</docstring>
+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.
+ =================== ============================================
+</docstring>
<paramlist>
<param name="pos" type="Point" default=""/>
</paramlist>
<method name="IsReadOnly" type="bool" overloaded="no">
<autodoc>IsReadOnly(self) -> bool</autodoc>
</method>
+ <method name="GetKind" type="wxGridCellAttr::wxAttrKind" overloaded="no">
+ <autodoc>GetKind(self) -> int</autodoc>
+ </method>
<method name="SetDefAttr" type="" overloaded="no">
<autodoc>SetDefAttr(self, GridCellAttr defAttr)</autodoc>
<paramlist>
<method name="CanDragGridSize" type="bool" overloaded="no">
<autodoc>CanDragGridSize(self) -> bool</autodoc>
</method>
+ <method name="EnableDragCell" type="" overloaded="no">
+ <autodoc>EnableDragCell(self, bool enable=True)</autodoc>
+ <paramlist>
+ <param name="enable" type="bool" default="True"/>
+ </paramlist>
+ </method>
+ <method name="DisableDragCell" type="" overloaded="no">
+ <autodoc>DisableDragCell(self)</autodoc>
+ </method>
+ <method name="CanDragCell" type="bool" overloaded="no">
+ <autodoc>CanDragCell(self) -> bool</autodoc>
+ </method>
<method name="SetAttr" type="" overloaded="no">
<autodoc>SetAttr(self, int row, int col, GridCellAttr attr)</autodoc>
<paramlist>
EVT_GRID_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN )
EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN )
EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED )
+EVT_GRID_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG )
+
+
+# The same as above but with the ability to specify an identifier
+EVT_GRID_CMD_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK, 1 )
+EVT_GRID_CMD_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK, 1 )
+EVT_GRID_CMD_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK, 1 )
+EVT_GRID_CMD_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK, 1 )
+EVT_GRID_CMD_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK, 1 )
+EVT_GRID_CMD_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK, 1 )
+EVT_GRID_CMD_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK, 1 )
+EVT_GRID_CMD_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK, 1 )
+EVT_GRID_CMD_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE, 1 )
+EVT_GRID_CMD_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE, 1 )
+EVT_GRID_CMD_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT, 1 )
+EVT_GRID_CMD_CELL_CHANGE = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGE, 1 )
+EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, 1 )
+EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 )
+EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 )
+EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 )
+EVT_GRID_CMD_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG, 1 )
+
</pythoncode>
</module>
<module name="html">
<param name="sizes" type="PyObject" default="NULL"/>
</paramlist>
</method>
+ <method name="NormalizeFontSizes" type="" overloaded="no">
+ <autodoc>NormalizeFontSizes(self, int size=-1)</autodoc>
+ <paramlist>
+ <param name="size" type="int" default="-1"/>
+ </paramlist>
+ </method>
<method name="GetContainer" type="wxHtmlContainerCell" overloaded="no">
<autodoc>GetContainer(self) -> HtmlContainerCell</autodoc>
</method>
<param name="sizes" type="PyObject" default="NULL"/>
</paramlist>
</method>
+ <method name="NormalizeFontSizes" type="" overloaded="no">
+ <autodoc>NormalizeFontSizes(self, int size=-1)</autodoc>
+ <paramlist>
+ <param name="size" type="int" default="-1"/>
+ </paramlist>
+ </method>
<method name="SetTitle" type="" overloaded="no">
<autodoc>SetTitle(self, String title)</autodoc>
<paramlist>
<method name="SelectAll" type="" overloaded="no">
<autodoc>SelectAll(self)</autodoc>
</method>
+ <method name="SelectionToText" type="String" overloaded="no">
+ <autodoc>SelectionToText(self) -> String</autodoc>
+ </method>
+ <method name="ToText" type="String" overloaded="no">
+ <autodoc>ToText(self) -> String</autodoc>
+ </method>
<method name="base_OnLinkClicked" type="" overloaded="no">
<autodoc>base_OnLinkClicked(self, HtmlLinkInfo link)</autodoc>
<paramlist>
<param name="sizes" type="PyObject" default="NULL"/>
</paramlist>
</method>
+ <method name="NormalizeFontSizes" type="" overloaded="no">
+ <autodoc>NormalizeFontSizes(self, int size=-1)</autodoc>
+ <paramlist>
+ <param name="size" type="int" default="-1"/>
+ </paramlist>
+ </method>
<method name="Render" type="int" overloaded="no">
<autodoc>Render(self, int x, int y, int from=0, int dont_render=False, int to=INT_MAX,
int choices=None, int LCOUNT=0) -> int</autodoc>
<param name="sizes" type="PyObject" default="NULL"/>
</paramlist>
</method>
+ <method name="NormalizeFontSizes" type="" overloaded="no">
+ <autodoc>NormalizeFontSizes(self, int size=-1)</autodoc>
+ <paramlist>
+ <param name="size" type="int" default="-1"/>
+ </paramlist>
+ </method>
<method name="SetMargins" type="" overloaded="no">
<autodoc>SetMargins(self, float top=25.2, float bottom=25.2, float left=25.2,
float right=25.2, float spaces=5)</autodoc>
<param name="sizes" type="PyObject" default="NULL"/>
</paramlist>
</method>
+ <method name="NormalizeFontSizes" type="" overloaded="no">
+ <autodoc>NormalizeFontSizes(self, int size=-1)</autodoc>
+ <paramlist>
+ <param name="size" type="int" default="-1"/>
+ </paramlist>
+ </method>
<method name="GetPrintData" type="PrintData" overloaded="no">
<autodoc>GetPrintData(self) -> PrintData</autodoc>
</method>
<module name="gizmos">
<import name="_windows"/>
<import name="_controls"/>
- <pythoncode> wx = _core </pythoncode>
- <pythoncode> __docfilter__ = wx.__DocFilter(globals()) </pythoncode>
+ <pythoncode> import wx </pythoncode>
+ <pythoncode> __docfilter__ = wx._core.__DocFilter(globals()) </pythoncode>
<class name="DynamicSashSplitEvent" oldname="wxDynamicSashSplitEvent" module="gizmos">
<baseclass name="CommandEvent"/>
<constructor name="DynamicSashSplitEvent" overloaded="no">
<method name="GetStrings" type="PyObject" overloaded="no">
<autodoc>GetStrings(self) -> PyObject</autodoc>
</method>
- <method name="GetListCtrl" type="wxListCtrl" overloaded="no">
- <autodoc>GetListCtrl(self) -> wxListCtrl</autodoc>
+ <method name="GetListCtrl" type="ListCtrl" overloaded="no">
+ <autodoc>GetListCtrl(self) -> ListCtrl</autodoc>
</method>
<method name="GetDelButton" type="BitmapButton" overloaded="no">
<autodoc>GetDelButton(self) -> BitmapButton</autodoc>
</paramlist>
</method>
</class>
+ <pythoncode> wx.TR_DONT_ADJUST_MAC = TR_DONT_ADJUST_MAC </pythoncode>
<class name="TreeListColumnInfo" oldname="wxTreeListColumnInfo" module="gizmos">
<baseclass name="Object"/>
<constructor name="TreeListColumnInfo" overloaded="no">
<method name="GetHeaderWindow" type="Window" overloaded="no">
<autodoc>GetHeaderWindow(self) -> Window</autodoc>
</method>
- <method name="GetMainWindow" type="Window" overloaded="no">
- <autodoc>GetMainWindow(self) -> Window</autodoc>
+ <method name="GetMainWindow" type="ScrolledWindow" overloaded="no">
+ <autodoc>GetMainWindow(self) -> ScrolledWindow</autodoc>
</method>
</class>
</module>