<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>
<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>
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)
#----------------------------------------------------------------------------
# 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")
#----------------------------------------------------------------------------
*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>
+than the generic implementation then it will be used instead.</docstring>
<paramlist>
<param name="text" type="String" default=""/>
</paramlist>
<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="ScrollLines" type="bool" overloaded="no">
<autodoc>ScrollLines(self, int lines) -> bool</autodoc>
+ <docstring>If the platform and window class supports it, scrolls the window by
+the given number of lines down, if lines is positive, or up if lines
+is negative. Returns True if the window was scrolled, False if it was
+already on top/bottom and nothing was done.</docstring>
<paramlist>
<param name="lines" type="int" default=""/>
</paramlist>
Window Styles
-------------
============== ==========================================
- wx.BU_LEFT Left-justifies the label. WIN32 only.
+ wx.BU_LEFT Left-justifies the label. Windows and GTK+ 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.
+ 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.
- WIN32 only.
+ 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.)
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"/>
<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">
-------------------------
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 these
-predefined values:
+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
-------
The Client is the entity that calls wx.ArtProvider's `GetBitmap` or
-`GetIcon` function. Client IDs server as a hint to wx.ArtProvider
+`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_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>
-------------------------
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 these
-predefined values:
+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
-------
The Client is the entity that calls wx.ArtProvider's `GetBitmap` or
-`GetIcon` function. Client IDs server as a hint to wx.ArtProvider
+`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_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>
<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_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">
<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>