reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-04-30 06:30:29 +00:00
parent bcb1a72d5f
commit 66c033b4a6
16 changed files with 1479 additions and 1027 deletions

View File

@@ -7,7 +7,7 @@ import _windows
import _core import _core
import _controls import _controls
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT
wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY
DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS

View File

@@ -5,7 +5,7 @@ import _glcanvas
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
class GLContext(_core.Object): class GLContext(_core.Object):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)

View File

@@ -6,7 +6,7 @@ import _ogl
import _windows import _windows
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class ShapeRegion(_core.Object): class ShapeRegion(_core.Object):

View File

@@ -6,7 +6,7 @@ import _stc
import _core import _core
import _misc import _misc
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
STC_USE_DND = _stc.STC_USE_DND STC_USE_DND = _stc.STC_USE_DND
STC_USE_POPUP = _stc.STC_USE_POPUP STC_USE_POPUP = _stc.STC_USE_POPUP
STC_INVALID_POSITION = _stc.STC_INVALID_POSITION STC_INVALID_POSITION = _stc.STC_INVALID_POSITION

View File

@@ -5,7 +5,7 @@ import _xrc
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR WX_XMLRES_CURRENT_VERSION_MAJOR = _xrc.WX_XMLRES_CURRENT_VERSION_MAJOR
@@ -56,7 +56,7 @@ class XmlResource(_core.Object):
return _xrc.XmlResource_ClearHandlers(*args, **kwargs) return _xrc.XmlResource_ClearHandlers(*args, **kwargs)
def AddSubclassFactory(*args, **kwargs): def AddSubclassFactory(*args, **kwargs):
"""XmlResource.AddSubclassFactory(XmlSubclassFactory factory)""" """AddSubclassFactory(XmlSubclassFactory factory)"""
return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs) return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
AddSubclassFactory = staticmethod(AddSubclassFactory) AddSubclassFactory = staticmethod(AddSubclassFactory)
@@ -121,7 +121,7 @@ class XmlResource(_core.Object):
return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs) return _xrc.XmlResource_AttachUnknownControl(*args, **kwargs)
def GetXRCID(*args, **kwargs): def GetXRCID(*args, **kwargs):
"""XmlResource.GetXRCID(String str_id) -> int""" """GetXRCID(String str_id) -> int"""
return _xrc.XmlResource_GetXRCID(*args, **kwargs) return _xrc.XmlResource_GetXRCID(*args, **kwargs)
GetXRCID = staticmethod(GetXRCID) GetXRCID = staticmethod(GetXRCID)
@@ -134,12 +134,12 @@ class XmlResource(_core.Object):
return _xrc.XmlResource_CompareVersion(*args, **kwargs) return _xrc.XmlResource_CompareVersion(*args, **kwargs)
def Get(*args, **kwargs): def Get(*args, **kwargs):
"""XmlResource.Get() -> XmlResource""" """Get() -> XmlResource"""
return _xrc.XmlResource_Get(*args, **kwargs) return _xrc.XmlResource_Get(*args, **kwargs)
Get = staticmethod(Get) Get = staticmethod(Get)
def Set(*args, **kwargs): def Set(*args, **kwargs):
"""XmlResource.Set(XmlResource res) -> XmlResource""" """Set(XmlResource res) -> XmlResource"""
return _xrc.XmlResource_Set(*args, **kwargs) return _xrc.XmlResource_Set(*args, **kwargs)
Set = staticmethod(Set) Set = staticmethod(Set)

View File

@@ -5,7 +5,6 @@ import _controls_
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
BU_LEFT = _controls_.BU_LEFT BU_LEFT = _controls_.BU_LEFT
@@ -19,6 +18,29 @@ class Button(_core.Control):
A button is a control that contains a text string, and is one of the most 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 common elements of a GUI. It may be placed on a dialog box or panel, or
indeed almost any other window. indeed almost any other window.
Window Styles
-------------
============== ==========================================
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.BitmapButton`
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -55,7 +77,11 @@ class Button(_core.Control):
return _controls_.Button_SetDefault(*args, **kwargs) return _controls_.Button_SetDefault(*args, **kwargs)
def GetDefaultSize(*args, **kwargs): def GetDefaultSize(*args, **kwargs):
"""Button.GetDefaultSize() -> Size""" """
GetDefaultSize() -> Size
Returns the default button size for this platform.
"""
return _controls_.Button_GetDefaultSize(*args, **kwargs) return _controls_.Button_GetDefaultSize(*args, **kwargs)
GetDefaultSize = staticmethod(GetDefaultSize) GetDefaultSize = staticmethod(GetDefaultSize)
@@ -80,16 +106,48 @@ def PreButton(*args, **kwargs):
return val return val
def Button_GetDefaultSize(*args, **kwargs): def Button_GetDefaultSize(*args, **kwargs):
"""Button_GetDefaultSize() -> Size""" """
Button_GetDefaultSize() -> Size
Returns the default button size for this platform.
"""
return _controls_.Button_GetDefaultSize(*args, **kwargs) return _controls_.Button_GetDefaultSize(*args, **kwargs)
class BitmapButton(Button): class BitmapButton(Button):
""" """
A Button that contains a bitmap. A bitmap button can be supplied with a A Button that contains a bitmap. A bitmap button can be supplied with a
single bitmap, and wxWindows will draw all button states using this bitmap. If single bitmap, and wxWidgets will draw all button states using this bitmap. If
the application needs more control, additional bitmaps for the selected state, the application needs more control, additional bitmaps for the selected state,
unpressed focused state, and greyed-out state may be supplied. 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`
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -224,10 +282,36 @@ CHK_CHECKED = _controls_.CHK_CHECKED
CHK_UNDETERMINED = _controls_.CHK_UNDETERMINED CHK_UNDETERMINED = _controls_.CHK_UNDETERMINED
class CheckBox(_core.Control): class CheckBox(_core.Control):
""" """
A checkbox is a labelled box which by default is either on (checkmark is A checkbox is a labelled box which by default is either on (the
visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag checkmark is visible) or off (no checkmark). Optionally (When the
is set) it can have a third state, called the mixed or undetermined wx.CHK_3STATE style flag is set) it can have a third state, called the
state. Often this is used as a "Does Not Apply" state. mixed or undetermined state. Often this is used as a "Does Not
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.
=============================== ===============================
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -268,7 +352,8 @@ class CheckBox(_core.Control):
""" """
IsChecked(self) -> bool IsChecked(self) -> bool
Similar to GetValue, but raises an exception if it is not a 2-state CheckBox. Similar to GetValue, but raises an exception if it is not a 2-state
CheckBox.
""" """
return _controls_.CheckBox_IsChecked(*args, **kwargs) return _controls_.CheckBox_IsChecked(*args, **kwargs)
@@ -276,8 +361,8 @@ class CheckBox(_core.Control):
""" """
SetValue(self, bool state) SetValue(self, bool state)
Set the state of a 2-state CheckBox. Pass True for checked, Set the state of a 2-state CheckBox. Pass True for checked, False for
False for unchecked. unchecked.
""" """
return _controls_.CheckBox_SetValue(*args, **kwargs) return _controls_.CheckBox_SetValue(*args, **kwargs)
@@ -285,9 +370,10 @@ class CheckBox(_core.Control):
""" """
Get3StateValue(self) -> int Get3StateValue(self) -> int
Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when Returns wx.CHK_UNCHECKED when the CheckBox is unchecked,
it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state. wx.CHK_CHECKED when it is checked and wx.CHK_UNDETERMINED when it's in
Raises an exceptiion when the function is used with a 2-state CheckBox. the undetermined state. Raises an exceptiion when the function is
used with a 2-state CheckBox.
""" """
return _controls_.CheckBox_Get3StateValue(*args, **kwargs) return _controls_.CheckBox_Get3StateValue(*args, **kwargs)
@@ -295,11 +381,11 @@ class CheckBox(_core.Control):
""" """
Set3StateValue(self, int state) Set3StateValue(self, int state)
Sets the CheckBox to the given state. The state parameter can be Sets the CheckBox to the given state. The state parameter can be one
one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED (the
(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
exception when the CheckBox is a 2-state checkbox and setting the state exception when the CheckBox is a 2-state checkbox and setting the
to wx.CHK_UNDETERMINED. state to wx.CHK_UNDETERMINED.
""" """
return _controls_.CheckBox_Set3StateValue(*args, **kwargs) return _controls_.CheckBox_Set3StateValue(*args, **kwargs)
@@ -315,7 +401,8 @@ class CheckBox(_core.Control):
""" """
Is3rdStateAllowedForUser(self) -> bool Is3rdStateAllowedForUser(self) -> bool
Returns whether or not the user can set the CheckBox to the third state. Returns whether or not the user can set the CheckBox to the third
state.
""" """
return _controls_.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs) return _controls_.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs)
@@ -342,8 +429,16 @@ def PreCheckBox(*args, **kwargs):
class Choice(_core.ControlWithItems): class Choice(_core.ControlWithItems):
""" """
A Choice control is used to select one of a list of strings. Unlike a ListBox, A Choice control is used to select one of a list of strings.
only the selection is visible until the user pulls down the menu of choices. Unlike a `wx.ListBox`, only the selection is visible until the
user pulls down the menu of choices.
Events
------
================ ==========================================
EVT_CHOICE Sent when an item in the list is selected.
================ ==========================================
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -745,7 +840,7 @@ class StaticLine(_core.Control):
return _controls_.StaticLine_IsVertical(*args, **kwargs) return _controls_.StaticLine_IsVertical(*args, **kwargs)
def GetDefaultSize(*args, **kwargs): def GetDefaultSize(*args, **kwargs):
"""StaticLine.GetDefaultSize() -> int""" """GetDefaultSize() -> int"""
return _controls_.StaticLine_GetDefaultSize(*args, **kwargs) return _controls_.StaticLine_GetDefaultSize(*args, **kwargs)
GetDefaultSize = staticmethod(GetDefaultSize) GetDefaultSize = staticmethod(GetDefaultSize)
@@ -967,7 +1062,7 @@ class ListBox(_core.ControlWithItems):
def GetClassDefaultAttributes(*args, **kwargs): def GetClassDefaultAttributes(*args, **kwargs):
""" """
ListBox.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if Get the default attributes for this class. This is useful if
you want to use the same font or colour in your own control as you want to use the same font or colour in your own control as
@@ -1249,7 +1344,7 @@ class TextAttr(object):
return _controls_.TextAttr_IsDefault(*args, **kwargs) return _controls_.TextAttr_IsDefault(*args, **kwargs)
def Combine(*args, **kwargs): def Combine(*args, **kwargs):
"""TextAttr.Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr"""
return _controls_.TextAttr_Combine(*args, **kwargs) return _controls_.TextAttr_Combine(*args, **kwargs)
Combine = staticmethod(Combine) Combine = staticmethod(Combine)
@@ -3836,7 +3931,7 @@ class ListCtrl(_core.Control):
def GetClassDefaultAttributes(*args, **kwargs): def GetClassDefaultAttributes(*args, **kwargs):
""" """
ListCtrl.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if Get the default attributes for this class. This is useful if
you want to use the same font or colour in your own control as you want to use the same font or colour in your own control as
@@ -4518,7 +4613,7 @@ class TreeCtrl(_core.Control):
def GetClassDefaultAttributes(*args, **kwargs): def GetClassDefaultAttributes(*args, **kwargs):
""" """
TreeCtrl.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if Get the default attributes for this class. This is useful if
you want to use the same font or colour in your own control as you want to use the same font or colour in your own control as
@@ -5074,7 +5169,7 @@ class HelpProvider(object):
return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Set(*args, **kwargs): def Set(*args, **kwargs):
""" """
HelpProvider.Set(HelpProvider helpProvider) -> HelpProvider Set(HelpProvider helpProvider) -> HelpProvider
Sset the current, application-wide help provider. Returns the Sset the current, application-wide help provider. Returns the
previous one. Unlike some other classes, the help provider is previous one. Unlike some other classes, the help provider is
@@ -5086,7 +5181,7 @@ class HelpProvider(object):
Set = staticmethod(Set) Set = staticmethod(Set)
def Get(*args, **kwargs): def Get(*args, **kwargs):
""" """
HelpProvider.Get() -> HelpProvider Get() -> HelpProvider
Return the current application-wide help provider. Return the current application-wide help provider.
""" """

View File

@@ -12,6 +12,26 @@ _core_._wxPySetDictionary(vars())
import sys as _sys import sys as _sys
wx = _sys.modules[__name__] wx = _sys.modules[__name__]
#----------------------------------------------------------------------------
def _deprecated(callable, msg=None):
"""
Create a wrapper function that will raise a DeprecationWarning
before calling the callable.
"""
if msg is None:
msg = "%s is deprecated" % callable
def deprecatedWrapper(*args, **kwargs):
import warnings
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return callable(*args, **kwargs)
deprecatedWrapper.__doc__ = msg
return deprecatedWrapper
#----------------------------------------------------------------------------
NOT_FOUND = _core_.NOT_FOUND NOT_FOUND = _core_.NOT_FOUND
VSCROLL = _core_.VSCROLL VSCROLL = _core_.VSCROLL
HSCROLL = _core_.HSCROLL HSCROLL = _core_.HSCROLL
@@ -1706,17 +1726,17 @@ class FileSystem(Object):
return _core_.FileSystem_FindNext(*args, **kwargs) return _core_.FileSystem_FindNext(*args, **kwargs)
def AddHandler(*args, **kwargs): def AddHandler(*args, **kwargs):
"""FileSystem.AddHandler(CPPFileSystemHandler handler)""" """AddHandler(CPPFileSystemHandler handler)"""
return _core_.FileSystem_AddHandler(*args, **kwargs) return _core_.FileSystem_AddHandler(*args, **kwargs)
AddHandler = staticmethod(AddHandler) AddHandler = staticmethod(AddHandler)
def CleanUpHandlers(*args, **kwargs): def CleanUpHandlers(*args, **kwargs):
"""FileSystem.CleanUpHandlers()""" """CleanUpHandlers()"""
return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
CleanUpHandlers = staticmethod(CleanUpHandlers) CleanUpHandlers = staticmethod(CleanUpHandlers)
def FileNameToURL(*args, **kwargs): def FileNameToURL(*args, **kwargs):
"""FileSystem.FileNameToURL(String filename) -> String""" """FileNameToURL(String filename) -> String"""
return _core_.FileSystem_FileNameToURL(*args, **kwargs) return _core_.FileSystem_FileNameToURL(*args, **kwargs)
FileNameToURL = staticmethod(FileNameToURL) FileNameToURL = staticmethod(FileNameToURL)
@@ -1833,7 +1853,7 @@ class MemoryFSHandler(CPPFileSystemHandler):
self.thisown = 1 self.thisown = 1
del newobj.thisown del newobj.thisown
def RemoveFile(*args, **kwargs): def RemoveFile(*args, **kwargs):
"""MemoryFSHandler.RemoveFile(String filename)""" """RemoveFile(String filename)"""
return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
RemoveFile = staticmethod(RemoveFile) RemoveFile = staticmethod(RemoveFile)
@@ -1927,7 +1947,7 @@ class ImageHistogram(object):
del newobj.thisown del newobj.thisown
def MakeKey(*args, **kwargs): def MakeKey(*args, **kwargs):
""" """
ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
Get the key in the histogram for the given RGB values Get the key in the histogram for the given RGB values
""" """
@@ -2042,12 +2062,12 @@ class Image(Object):
return _core_.Image_SetMaskFromImage(*args, **kwargs) return _core_.Image_SetMaskFromImage(*args, **kwargs)
def CanRead(*args, **kwargs): def CanRead(*args, **kwargs):
"""Image.CanRead(String name) -> bool""" """CanRead(String name) -> bool"""
return _core_.Image_CanRead(*args, **kwargs) return _core_.Image_CanRead(*args, **kwargs)
CanRead = staticmethod(CanRead) CanRead = staticmethod(CanRead)
def GetImageCount(*args, **kwargs): def GetImageCount(*args, **kwargs):
"""Image.GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
return _core_.Image_GetImageCount(*args, **kwargs) return _core_.Image_GetImageCount(*args, **kwargs)
GetImageCount = staticmethod(GetImageCount) GetImageCount = staticmethod(GetImageCount)
@@ -2068,7 +2088,7 @@ class Image(Object):
return _core_.Image_SaveMimeFile(*args, **kwargs) return _core_.Image_SaveMimeFile(*args, **kwargs)
def CanReadStream(*args, **kwargs): def CanReadStream(*args, **kwargs):
"""Image.CanReadStream(InputStream stream) -> bool""" """CanReadStream(InputStream stream) -> bool"""
return _core_.Image_CanReadStream(*args, **kwargs) return _core_.Image_CanReadStream(*args, **kwargs)
CanReadStream = staticmethod(CanReadStream) CanReadStream = staticmethod(CanReadStream)
@@ -2219,22 +2239,22 @@ class Image(Object):
return _core_.Image_ComputeHistogram(*args, **kwargs) return _core_.Image_ComputeHistogram(*args, **kwargs)
def AddHandler(*args, **kwargs): def AddHandler(*args, **kwargs):
"""Image.AddHandler(ImageHandler handler)""" """AddHandler(ImageHandler handler)"""
return _core_.Image_AddHandler(*args, **kwargs) return _core_.Image_AddHandler(*args, **kwargs)
AddHandler = staticmethod(AddHandler) AddHandler = staticmethod(AddHandler)
def InsertHandler(*args, **kwargs): def InsertHandler(*args, **kwargs):
"""Image.InsertHandler(ImageHandler handler)""" """InsertHandler(ImageHandler handler)"""
return _core_.Image_InsertHandler(*args, **kwargs) return _core_.Image_InsertHandler(*args, **kwargs)
InsertHandler = staticmethod(InsertHandler) InsertHandler = staticmethod(InsertHandler)
def RemoveHandler(*args, **kwargs): def RemoveHandler(*args, **kwargs):
"""Image.RemoveHandler(String name) -> bool""" """RemoveHandler(String name) -> bool"""
return _core_.Image_RemoveHandler(*args, **kwargs) return _core_.Image_RemoveHandler(*args, **kwargs)
RemoveHandler = staticmethod(RemoveHandler) RemoveHandler = staticmethod(RemoveHandler)
def GetImageExtWildcard(*args, **kwargs): def GetImageExtWildcard(*args, **kwargs):
"""Image.GetImageExtWildcard() -> String""" """GetImageExtWildcard() -> String"""
return _core_.Image_GetImageExtWildcard(*args, **kwargs) return _core_.Image_GetImageExtWildcard(*args, **kwargs)
GetImageExtWildcard = staticmethod(GetImageExtWildcard) GetImageExtWildcard = staticmethod(GetImageExtWildcard)
@@ -2273,12 +2293,9 @@ def ImageFromStreamMime(*args, **kwargs):
val.thisown = 1 val.thisown = 1
return val return val
def EmptyImage(*args): def EmptyImage(*args, **kwargs):
""" """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
EmptyImage(int width=0, int height=0, bool clear=True) -> Image val = _core_.new_EmptyImage(*args, **kwargs)
EmptyImage(Size size, bool clear=True) -> Image
"""
val = _core_.new_EmptyImage(*args)
val.thisown = 1 val.thisown = 1
return val return val
@@ -2614,6 +2631,14 @@ class EvtHandler(Object):
id = source.GetId() id = source.GetId()
event.Bind(self, id, id2, handler) event.Bind(self, id, id2, handler)
def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
"""
Disconencts the event handler binding for event from self.
Returns True if successful.
"""
if source is not None:
id = source.GetId()
return event.Unbind(self, id, id2)
class EvtHandlerPtr(EvtHandler): class EvtHandlerPtr(EvtHandler):
@@ -2646,6 +2671,14 @@ class PyEventBinder(object):
for et in self.evtType: for et in self.evtType:
target.Connect(id1, id2, et, function) target.Connect(id1, id2, et, function)
def Unbind(self, target, id1, id2):
"""Remove an event binding."""
success = 0
for et in self.evtType:
success += target.Disconnect(id1, id2, et)
return success != 0
def __call__(self, *args): def __call__(self, *args):
""" """
@@ -4033,32 +4066,32 @@ class UpdateUIEvent(CommandEvent):
return _core_.UpdateUIEvent_SetText(*args, **kwargs) return _core_.UpdateUIEvent_SetText(*args, **kwargs)
def SetUpdateInterval(*args, **kwargs): def SetUpdateInterval(*args, **kwargs):
"""UpdateUIEvent.SetUpdateInterval(long updateInterval)""" """SetUpdateInterval(long updateInterval)"""
return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
SetUpdateInterval = staticmethod(SetUpdateInterval) SetUpdateInterval = staticmethod(SetUpdateInterval)
def GetUpdateInterval(*args, **kwargs): def GetUpdateInterval(*args, **kwargs):
"""UpdateUIEvent.GetUpdateInterval() -> long""" """GetUpdateInterval() -> long"""
return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
GetUpdateInterval = staticmethod(GetUpdateInterval) GetUpdateInterval = staticmethod(GetUpdateInterval)
def CanUpdate(*args, **kwargs): def CanUpdate(*args, **kwargs):
"""UpdateUIEvent.CanUpdate(Window win) -> bool""" """CanUpdate(Window win) -> bool"""
return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
CanUpdate = staticmethod(CanUpdate) CanUpdate = staticmethod(CanUpdate)
def ResetUpdateTime(*args, **kwargs): def ResetUpdateTime(*args, **kwargs):
"""UpdateUIEvent.ResetUpdateTime()""" """ResetUpdateTime()"""
return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
ResetUpdateTime = staticmethod(ResetUpdateTime) ResetUpdateTime = staticmethod(ResetUpdateTime)
def SetMode(*args, **kwargs): def SetMode(*args, **kwargs):
"""UpdateUIEvent.SetMode(int mode)""" """SetMode(int mode)"""
return _core_.UpdateUIEvent_SetMode(*args, **kwargs) return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
SetMode = staticmethod(SetMode) SetMode = staticmethod(SetMode)
def GetMode(*args, **kwargs): def GetMode(*args, **kwargs):
"""UpdateUIEvent.GetMode() -> int""" """GetMode() -> int"""
return _core_.UpdateUIEvent_GetMode(*args, **kwargs) return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
GetMode = staticmethod(GetMode) GetMode = staticmethod(GetMode)
@@ -4345,17 +4378,17 @@ class IdleEvent(Event):
return _core_.IdleEvent_MoreRequested(*args, **kwargs) return _core_.IdleEvent_MoreRequested(*args, **kwargs)
def SetMode(*args, **kwargs): def SetMode(*args, **kwargs):
"""IdleEvent.SetMode(int mode)""" """SetMode(int mode)"""
return _core_.IdleEvent_SetMode(*args, **kwargs) return _core_.IdleEvent_SetMode(*args, **kwargs)
SetMode = staticmethod(SetMode) SetMode = staticmethod(SetMode)
def GetMode(*args, **kwargs): def GetMode(*args, **kwargs):
"""IdleEvent.GetMode() -> int""" """GetMode() -> int"""
return _core_.IdleEvent_GetMode(*args, **kwargs) return _core_.IdleEvent_GetMode(*args, **kwargs)
GetMode = staticmethod(GetMode) GetMode = staticmethod(GetMode)
def CanSend(*args, **kwargs): def CanSend(*args, **kwargs):
"""IdleEvent.CanSend(Window win) -> bool""" """CanSend(Window win) -> bool"""
return _core_.IdleEvent_CanSend(*args, **kwargs) return _core_.IdleEvent_CanSend(*args, **kwargs)
CanSend = staticmethod(CanSend) CanSend = staticmethod(CanSend)
@@ -4456,6 +4489,10 @@ PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
PRINT_WINDOWS = _core_.PRINT_WINDOWS PRINT_WINDOWS = _core_.PRINT_WINDOWS
PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
class PyApp(EvtHandler): class PyApp(EvtHandler):
"""
The ``wx.PyApp`` class is an *implementation detail*, please use the
`wx.App` class (or some other derived class) instead.
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -4493,8 +4530,8 @@ class PyApp(EvtHandler):
""" """
SetAppName(self, String name) SetAppName(self, String name)
Set the application name. This value may be used automatically Set the application name. This value may be used automatically by
by wx.Config and such. `wx.Config` and such.
""" """
return _core_.PyApp_SetAppName(*args, **kwargs) return _core_.PyApp_SetAppName(*args, **kwargs)
@@ -4510,8 +4547,8 @@ class PyApp(EvtHandler):
""" """
SetClassName(self, String name) SetClassName(self, String name)
Set the application's class name. This value may be used for X-resources if Set the application's class name. This value may be used for
applicable for the platform X-resources if applicable for the platform
""" """
return _core_.PyApp_SetClassName(*args, **kwargs) return _core_.PyApp_SetClassName(*args, **kwargs)
@@ -4527,8 +4564,8 @@ class PyApp(EvtHandler):
""" """
SetVendorName(self, String name) SetVendorName(self, String name)
Set the application's vendor name. This value may be used automatically Set the application's vendor name. This value may be used
by wx.Config and such. automatically by `wx.Config` and such.
""" """
return _core_.PyApp_SetVendorName(*args, **kwargs) return _core_.PyApp_SetVendorName(*args, **kwargs)
@@ -4536,11 +4573,14 @@ class PyApp(EvtHandler):
""" """
GetTraits(self) -> wxAppTraits GetTraits(self) -> wxAppTraits
Create the app traits object to which we delegate for everything which either Return (and create if necessary) the app traits object to which we
should be configurable by the user (then he can change the default behaviour delegate for everything which either should be configurable by the
simply by overriding CreateTraits() and returning his own traits object) or user (then he can change the default behaviour simply by overriding
which is GUI/console dependent as then wx.AppTraits allows us to abstract the CreateTraits() and returning his own traits object) or which is
differences behind the common facade GUI/console dependent as then wx.AppTraits allows us to abstract the
differences behind the common facade.
:todo: Add support for overriding CreateAppTraits in wxPython.
""" """
return _core_.PyApp_GetTraits(*args, **kwargs) return _core_.PyApp_GetTraits(*args, **kwargs)
@@ -4548,9 +4588,9 @@ class PyApp(EvtHandler):
""" """
ProcessPendingEvents(self) ProcessPendingEvents(self)
Process all events in the Pending Events list -- it is necessary to call this Process all events in the Pending Events list -- it is necessary to
function to process posted events. This happens during each event loop call this function to process posted events. This normally happens
iteration. during each event loop iteration.
""" """
return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
@@ -4558,15 +4598,16 @@ class PyApp(EvtHandler):
""" """
Yield(self, bool onlyIfNeeded=False) -> bool Yield(self, bool onlyIfNeeded=False) -> bool
Process all currently pending events right now, instead of waiting until Process all currently pending events right now, instead of waiting
return to the event loop. It is an error to call Yield() recursively unless until return to the event loop. It is an error to call ``Yield``
the value of onlyIfNeeded is True. recursively unless the value of ``onlyIfNeeded`` is True.
WARNING: This function is dangerous as it can lead to unexpected :warning: This function is dangerous as it can lead to unexpected
reentrancies (i.e. when called from an event handler it reentrancies (i.e. when called from an event handler it may
may result in calling the same event handler again), use result in calling the same event handler again), use with
with _extreme_ care or, better, don't use at all! _extreme_ care or, better, don't use at all!
:see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
""" """
return _core_.PyApp_Yield(*args, **kwargs) return _core_.PyApp_Yield(*args, **kwargs)
@@ -4574,7 +4615,8 @@ class PyApp(EvtHandler):
""" """
WakeUpIdle(self) WakeUpIdle(self)
Make sure that idle events are sent again Make sure that idle events are sent again.
:see: `wx.WakeUpIdle`
""" """
return _core_.PyApp_WakeUpIdle(*args, **kwargs) return _core_.PyApp_WakeUpIdle(*args, **kwargs)
@@ -4582,7 +4624,8 @@ class PyApp(EvtHandler):
""" """
MainLoop(self) -> int MainLoop(self) -> int
Execute the main GUI loop, the function returns when the loop ends. Execute the main GUI loop, the function doesn't normally return until
all top level windows have been closed and destroyed.
""" """
return _core_.PyApp_MainLoop(*args, **kwargs) return _core_.PyApp_MainLoop(*args, **kwargs)
@@ -4591,6 +4634,7 @@ class PyApp(EvtHandler):
Exit(self) Exit(self)
Exit the main loop thus terminating the application. Exit the main loop thus terminating the application.
:see: `wx.Exit`
""" """
return _core_.PyApp_Exit(*args, **kwargs) return _core_.PyApp_Exit(*args, **kwargs)
@@ -4598,8 +4642,8 @@ class PyApp(EvtHandler):
""" """
ExitMainLoop(self) ExitMainLoop(self)
Exit the main GUI loop during the next iteration (i.e. it does not Exit the main GUI loop during the next iteration of the main
stop the program immediately!) loop, (i.e. it does not stop the program immediately!)
""" """
return _core_.PyApp_ExitMainLoop(*args, **kwargs) return _core_.PyApp_ExitMainLoop(*args, **kwargs)
@@ -4624,9 +4668,9 @@ class PyApp(EvtHandler):
""" """
ProcessIdle(self) -> bool ProcessIdle(self) -> bool
Called from the MainLoop when the application becomes idle and sends an Called from the MainLoop when the application becomes idle (there are
IdleEvent to all interested parties. Returns True is more idle events are no pending events) and sends a `wx.IdleEvent` to all interested
needed, False if not. parties. Returns True if more idle events are needed, False if not.
""" """
return _core_.PyApp_ProcessIdle(*args, **kwargs) return _core_.PyApp_ProcessIdle(*args, **kwargs)
@@ -4634,8 +4678,8 @@ class PyApp(EvtHandler):
""" """
SendIdleEvents(self, Window win, IdleEvent event) -> bool SendIdleEvents(self, Window win, IdleEvent event) -> bool
Send idle event to window and all subwindows. Returns True if more idle time Send idle event to window and all subwindows. Returns True if more
is requested. idle time is requested.
""" """
return _core_.PyApp_SendIdleEvents(*args, **kwargs) return _core_.PyApp_SendIdleEvents(*args, **kwargs)
@@ -4651,7 +4695,7 @@ class PyApp(EvtHandler):
""" """
SetTopWindow(self, Window win) SetTopWindow(self, Window win)
Set the "main" top level window Set the *main* top level window
""" """
return _core_.PyApp_SetTopWindow(*args, **kwargs) return _core_.PyApp_SetTopWindow(*args, **kwargs)
@@ -4659,9 +4703,9 @@ class PyApp(EvtHandler):
""" """
GetTopWindow(self) -> Window GetTopWindow(self) -> Window
Return the "main" top level window (if it hadn't been set previously with Return the *main* top level window (if it hadn't been set previously
SetTopWindow(), will return just some top level window and, if there not any, with SetTopWindow(), will return just some top level window and, if
will return None) there not any, will return None)
""" """
return _core_.PyApp_GetTopWindow(*args, **kwargs) return _core_.PyApp_GetTopWindow(*args, **kwargs)
@@ -4669,12 +4713,11 @@ class PyApp(EvtHandler):
""" """
SetExitOnFrameDelete(self, bool flag) SetExitOnFrameDelete(self, bool flag)
Control the exit behaviour: by default, the program will exit the main loop Control the exit behaviour: by default, the program will exit the main
(and so, usually, terminate) when the last top-level program window is loop (and so, usually, terminate) when the last top-level program
deleted. Beware that if you disable this behaviour (with window is deleted. Beware that if you disable this behaviour (with
SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
from somewhere. explicitly from somewhere.
""" """
return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
@@ -4690,8 +4733,8 @@ class PyApp(EvtHandler):
""" """
SetUseBestVisual(self, bool flag) SetUseBestVisual(self, bool flag)
Set whether the app should try to use the best available visual on systems Set whether the app should try to use the best available visual on
where more than one is available, (Sun, SGI, XFree86 4, etc.) systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
""" """
return _core_.PyApp_SetUseBestVisual(*args, **kwargs) return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
@@ -4715,13 +4758,17 @@ class PyApp(EvtHandler):
""" """
SetAssertMode(self, int mode) SetAssertMode(self, int mode)
Set the OnAssert behaviour for debug and hybrid builds. The following flags Set the OnAssert behaviour for debug and hybrid builds. The following
may be or'd together: 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
========================= =======================================
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
""" """
return _core_.PyApp_SetAssertMode(*args, **kwargs) return _core_.PyApp_SetAssertMode(*args, **kwargs)
@@ -4735,52 +4782,52 @@ class PyApp(EvtHandler):
return _core_.PyApp_GetAssertMode(*args, **kwargs) return _core_.PyApp_GetAssertMode(*args, **kwargs)
def GetMacSupportPCMenuShortcuts(*args, **kwargs): def GetMacSupportPCMenuShortcuts(*args, **kwargs):
"""PyApp.GetMacSupportPCMenuShortcuts() -> bool""" """GetMacSupportPCMenuShortcuts() -> bool"""
return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
def GetMacAboutMenuItemId(*args, **kwargs): def GetMacAboutMenuItemId(*args, **kwargs):
"""PyApp.GetMacAboutMenuItemId() -> long""" """GetMacAboutMenuItemId() -> long"""
return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
def GetMacPreferencesMenuItemId(*args, **kwargs): def GetMacPreferencesMenuItemId(*args, **kwargs):
"""PyApp.GetMacPreferencesMenuItemId() -> long""" """GetMacPreferencesMenuItemId() -> long"""
return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
def GetMacExitMenuItemId(*args, **kwargs): def GetMacExitMenuItemId(*args, **kwargs):
"""PyApp.GetMacExitMenuItemId() -> long""" """GetMacExitMenuItemId() -> long"""
return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
def GetMacHelpMenuTitleName(*args, **kwargs): def GetMacHelpMenuTitleName(*args, **kwargs):
"""PyApp.GetMacHelpMenuTitleName() -> String""" """GetMacHelpMenuTitleName() -> String"""
return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
def SetMacSupportPCMenuShortcuts(*args, **kwargs): def SetMacSupportPCMenuShortcuts(*args, **kwargs):
"""PyApp.SetMacSupportPCMenuShortcuts(bool val)""" """SetMacSupportPCMenuShortcuts(bool val)"""
return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
def SetMacAboutMenuItemId(*args, **kwargs): def SetMacAboutMenuItemId(*args, **kwargs):
"""PyApp.SetMacAboutMenuItemId(long val)""" """SetMacAboutMenuItemId(long val)"""
return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
def SetMacPreferencesMenuItemId(*args, **kwargs): def SetMacPreferencesMenuItemId(*args, **kwargs):
"""PyApp.SetMacPreferencesMenuItemId(long val)""" """SetMacPreferencesMenuItemId(long val)"""
return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
def SetMacExitMenuItemId(*args, **kwargs): def SetMacExitMenuItemId(*args, **kwargs):
"""PyApp.SetMacExitMenuItemId(long val)""" """SetMacExitMenuItemId(long val)"""
return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
def SetMacHelpMenuTitleName(*args, **kwargs): def SetMacHelpMenuTitleName(*args, **kwargs):
"""PyApp.SetMacHelpMenuTitleName(String val)""" """SetMacHelpMenuTitleName(String val)"""
return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
@@ -4794,11 +4841,10 @@ class PyApp(EvtHandler):
def GetComCtl32Version(*args, **kwargs): def GetComCtl32Version(*args, **kwargs):
""" """
PyApp.GetComCtl32Version() -> int GetComCtl32Version() -> int
Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
0 if it wasn't found at all. Raises an exception on non-Windows it wasn't found at all. Raises an exception on non-Windows platforms.
platforms.
""" """
return _core_.PyApp_GetComCtl32Version(*args, **kwargs) return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
@@ -4855,9 +4901,8 @@ def PyApp_GetComCtl32Version(*args, **kwargs):
""" """
PyApp_GetComCtl32Version() -> int PyApp_GetComCtl32Version() -> int
Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
0 if it wasn't found at all. Raises an exception on non-Windows it wasn't found at all. Raises an exception on non-Windows platforms.
platforms.
""" """
return _core_.PyApp_GetComCtl32Version(*args, **kwargs) return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
@@ -4892,12 +4937,13 @@ def SafeYield(*args, **kwargs):
""" """
SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
This function is similar to wx.Yield, except that it disables the user input This function is similar to `wx.Yield`, except that it disables the
to all program windows before calling wx.Yield and re-enables it again user input to all program windows before calling `wx.Yield` and
afterwards. If win is not None, this window will remain enabled, allowing the re-enables it again afterwards. If ``win`` is not None, this window
implementation of some limited user interaction. will remain enabled, allowing the implementation of some limited user
interaction.
Returns the result of the call to wx.Yield. :Returns: the result of the call to `wx.Yield`.
""" """
return _core_.SafeYield(*args, **kwargs) return _core_.SafeYield(*args, **kwargs)
@@ -4905,7 +4951,8 @@ def WakeUpIdle(*args, **kwargs):
""" """
WakeUpIdle() WakeUpIdle()
Cause the message queue to become empty again, so idle events will be sent. Cause the message queue to become empty again, so idle events will be
sent.
""" """
return _core_.WakeUpIdle(*args, **kwargs) return _core_.WakeUpIdle(*args, **kwargs)
@@ -4913,7 +4960,8 @@ def PostEvent(*args, **kwargs):
""" """
PostEvent(EvtHandler dest, Event event) PostEvent(EvtHandler dest, Event event)
Send an event to a window or other wx.EvtHandler to be processed later. Send an event to a window or other wx.EvtHandler to be processed
later.
""" """
return _core_.PostEvent(*args, **kwargs) return _core_.PostEvent(*args, **kwargs)
@@ -4921,7 +4969,8 @@ def App_CleanUp(*args, **kwargs):
""" """
App_CleanUp() App_CleanUp()
For internal use only, it is used to cleanup after wxWindows when Python shuts down. For internal use only, it is used to cleanup after wxWindows when
Python shuts down.
""" """
return _core_.App_CleanUp(*args, **kwargs) return _core_.App_CleanUp(*args, **kwargs)
@@ -5000,12 +5049,56 @@ _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
class App(wx.PyApp): class App(wx.PyApp):
""" """
The main application class. Derive from this and implement an OnInit The ``wx.App`` class represents the application and is used to:
method that creates a frame and then calls self.SetTopWindow(frame)
* bootstrap the wxPython system and initialize the underlying
gui toolkit
* set and get application-wide properties
* implement the windowing system main message or event loop,
and to dispatch events to window instances
* etc.
Every application must have a ``wx.App`` instance, and all
creation of UI objects should be delayed until after the
``wx.App`` object has been created in order to ensure that the
gui platform and wxWidgets have been fully initialized.
Normally you would derive from this class and implement an
``OnInit`` method that creates a frame and then calls
``self.SetTopWindow(frame)``.
:see: `wx.PySimpleApp` for a simpler app class that can be used directly.
""" """
outputWindowClass = PyOnDemandOutputWindow outputWindowClass = PyOnDemandOutputWindow
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False): def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
"""
Construct a ``wx.App`` object.
:param redirect: Should ``sys.stdout`` and ``sys.stderr``
be redirected? Defaults to True on Windows and Mac,
False otherwise. If `filename` is None then output
will be redirected to a window that pops up as
needed. (You can control what kind of window is
created for the output by resetting the class
variable ``outputWindowClass`` to a class of your
choosing.)
:param filename: The name of a file to redirect output
to, if redirect is True.
:param useBestVisual: Should the app try to use the best
available visual provided by the system (only
relevant on systems that have more than one visual.)
This parameter must be used instead of calling
`SetUseBestVisual` later on because it must be set
before the underlying GUI toolkit is initialized.
:note: You should override OnInit to do applicaition
initialization to ensure that the system, toolkit and
wxWidgets are fully initialized.
"""
wx.PyApp.__init__(self) wx.PyApp.__init__(self)
if wx.Platform == "__WXMAC__": if wx.Platform == "__WXMAC__":
@@ -5080,7 +5173,7 @@ your Mac."""
# change from wxPyApp_ to wxApp_ # change from wx.PyApp_XX to wx.App_XX
App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
@@ -5099,9 +5192,20 @@ class PySimpleApp(wx.App):
""" """
A simple application class. You can just create one of these and A simple application class. You can just create one of these and
then then make your top level windows later, and not have to worry then then make your top level windows later, and not have to worry
about OnInit.""" about OnInit. For example::
app = wx.PySimpleApp()
frame = wx.Frame(None, title='Hello World')
frame.Show()
app.MainLoop()
:see: `wx.App`
"""
def __init__(self, redirect=False, filename=None, useBestVisual=False): def __init__(self, redirect=False, filename=None, useBestVisual=False):
"""
:see: `wx.App.__init__`
"""
wx.App.__init__(self, redirect, filename, useBestVisual) wx.App.__init__(self, redirect, filename, useBestVisual)
def OnInit(self): def OnInit(self):
@@ -5109,6 +5213,7 @@ class PySimpleApp(wx.App):
return True return True
# Is anybody using this one? # Is anybody using this one?
class PyWidgetTester(wx.App): class PyWidgetTester(wx.App):
def __init__(self, size = (250, 100)): def __init__(self, size = (250, 100)):
@@ -5120,15 +5225,15 @@ class PyWidgetTester(wx.App):
self.SetTopWindow(self.frame) self.SetTopWindow(self.frame)
return True return True
def SetWidget(self, widgetClass, *args): def SetWidget(self, widgetClass, *args, **kwargs):
w = widgetClass(self.frame, *args) w = widgetClass(self.frame, *args, **kwargs)
self.frame.Show(True) self.frame.Show(True)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# DO NOT hold any other references to this object. This is how we # DO NOT hold any other references to this object. This is how we
# know when to cleanup system resources that wxWin is holding. When # know when to cleanup system resources that wxWidgets is holding. When
# the sys module is unloaded, the refcount on sys.__wxPythonCleanup # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
# goes to zero and it calls the wxApp_CleanUp function. # goes to zero and it calls the wx.App_CleanUp function.
class __wxPyCleanup: class __wxPyCleanup:
def __init__(self): def __init__(self):
@@ -5139,11 +5244,8 @@ class __wxPyCleanup:
_sys.__wxPythonCleanup = __wxPyCleanup() _sys.__wxPythonCleanup = __wxPyCleanup()
## # another possible solution, but it gets called too early... ## # another possible solution, but it gets called too early...
## if sys.version[0] == '2': ## import atexit
## import atexit ## atexit.register(_core_.wxApp_CleanUp)
## atexit.register(_core_.wxApp_CleanUp)
## else:
## sys.exitfunc = _core_.wxApp_CleanUp
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@@ -5151,10 +5253,30 @@ _sys.__wxPythonCleanup = __wxPyCleanup()
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class AcceleratorEntry(object): class AcceleratorEntry(object):
"""
A class used to define items in an `wx.AcceleratorTable`. wxPython
programs can choose to use wx.AcceleratorEntry objects, but using a
list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
as well. See `__init__` for details of the tuple values.
:see: `wx.AcceleratorTable`
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""__init__(self, int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry""" """
__init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
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.
"""
newobj = _core_.new_AcceleratorEntry(*args, **kwargs) newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
self.thisown = 1 self.thisown = 1
@@ -5166,27 +5288,36 @@ class AcceleratorEntry(object):
except: pass except: pass
def Set(*args, **kwargs): def Set(*args, **kwargs):
"""Set(self, int flags, int keyCode, int cmd, MenuItem item=None)""" """
Set(self, int flags, int keyCode, int cmd)
(Re)set the attributes of a wx.AcceleratorEntry.
:see `__init__`
"""
return _core_.AcceleratorEntry_Set(*args, **kwargs) return _core_.AcceleratorEntry_Set(*args, **kwargs)
def SetMenuItem(*args, **kwargs):
"""SetMenuItem(self, MenuItem item)"""
return _core_.AcceleratorEntry_SetMenuItem(*args, **kwargs)
def GetMenuItem(*args, **kwargs):
"""GetMenuItem(self) -> MenuItem"""
return _core_.AcceleratorEntry_GetMenuItem(*args, **kwargs)
def GetFlags(*args, **kwargs): def GetFlags(*args, **kwargs):
"""GetFlags(self) -> int""" """
GetFlags(self) -> int
Get the AcceleratorEntry's flags.
"""
return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
def GetKeyCode(*args, **kwargs): def GetKeyCode(*args, **kwargs):
"""GetKeyCode(self) -> int""" """
GetKeyCode(self) -> int
Get the AcceleratorEntry's keycode.
"""
return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
def GetCommand(*args, **kwargs): def GetCommand(*args, **kwargs):
"""GetCommand(self) -> int""" """
GetCommand(self) -> int
Get the AcceleratorEntry's command ID.
"""
return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
@@ -5198,14 +5329,43 @@ class AcceleratorEntryPtr(AcceleratorEntry):
_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr) _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
class AcceleratorTable(Object): class AcceleratorTable(Object):
"""
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.
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`
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """
__init__(entries) -> AcceleratorTable __init__(entries) -> AcceleratorTable
Construct an AcceleratorTable from a list of AcceleratorEntry items or Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
3-tuples (flags, keyCode, cmdID) items or or of 3-tuples (flags, keyCode, cmdID)
:see: `wx.AcceleratorEntry`
""" """
newobj = _core_.new_AcceleratorTable(*args, **kwargs) newobj = _core_.new_AcceleratorTable(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -5466,7 +5626,7 @@ class Window(EvtHandler):
def NewControlId(*args, **kwargs): def NewControlId(*args, **kwargs):
""" """
Window.NewControlId() -> int NewControlId() -> int
Generate a control id for the controls which were not given one. Generate a control id for the controls which were not given one.
""" """
@@ -5475,7 +5635,7 @@ class Window(EvtHandler):
NewControlId = staticmethod(NewControlId) NewControlId = staticmethod(NewControlId)
def NextControlId(*args, **kwargs): def NextControlId(*args, **kwargs):
""" """
Window.NextControlId(int winid) -> int NextControlId(int winid) -> int
Get the id of the control following the one with the given Get the id of the control following the one with the given
(autogenerated) id (autogenerated) id
@@ -5485,7 +5645,7 @@ class Window(EvtHandler):
NextControlId = staticmethod(NextControlId) NextControlId = staticmethod(NextControlId)
def PrevControlId(*args, **kwargs): def PrevControlId(*args, **kwargs):
""" """
Window.PrevControlId(int winid) -> int PrevControlId(int winid) -> int
Get the id of the control preceding the one with the given Get the id of the control preceding the one with the given
(autogenerated) id (autogenerated) id
@@ -6041,7 +6201,7 @@ class Window(EvtHandler):
def FindFocus(*args, **kwargs): def FindFocus(*args, **kwargs):
""" """
Window.FindFocus() -> Window FindFocus() -> Window
Returns the window or control that currently has the keyboard focus, Returns the window or control that currently has the keyboard focus,
or None. or None.
@@ -6437,7 +6597,7 @@ class Window(EvtHandler):
def GetCapture(*args, **kwargs): def GetCapture(*args, **kwargs):
""" """
Window.GetCapture() -> Window GetCapture() -> Window
Returns the window which currently captures the mouse or None Returns the window which currently captures the mouse or None
""" """
@@ -6596,7 +6756,7 @@ class Window(EvtHandler):
def GetClassDefaultAttributes(*args, **kwargs): def GetClassDefaultAttributes(*args, **kwargs):
""" """
Window.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if Get the default attributes for this class. This is useful if
you want to use the same font or colour in your own control as you want to use the same font or colour in your own control as
@@ -7426,12 +7586,12 @@ class Validator(EvtHandler):
return _core_.Validator_SetWindow(*args, **kwargs) return _core_.Validator_SetWindow(*args, **kwargs)
def IsSilent(*args, **kwargs): def IsSilent(*args, **kwargs):
"""Validator.IsSilent() -> bool""" """IsSilent() -> bool"""
return _core_.Validator_IsSilent(*args, **kwargs) return _core_.Validator_IsSilent(*args, **kwargs)
IsSilent = staticmethod(IsSilent) IsSilent = staticmethod(IsSilent)
def SetBellOnError(*args, **kwargs): def SetBellOnError(*args, **kwargs):
"""Validator.SetBellOnError(int doIt=True)""" """SetBellOnError(int doIt=True)"""
return _core_.Validator_SetBellOnError(*args, **kwargs) return _core_.Validator_SetBellOnError(*args, **kwargs)
SetBellOnError = staticmethod(SetBellOnError) SetBellOnError = staticmethod(SetBellOnError)
@@ -7894,7 +8054,7 @@ class MenuItem(Object):
return _core_.MenuItem_GetText(*args, **kwargs) return _core_.MenuItem_GetText(*args, **kwargs)
def GetLabelFromText(*args, **kwargs): def GetLabelFromText(*args, **kwargs):
"""MenuItem.GetLabelFromText(String text) -> String""" """GetLabelFromText(String text) -> String"""
return _core_.MenuItem_GetLabelFromText(*args, **kwargs) return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
GetLabelFromText = staticmethod(GetLabelFromText) GetLabelFromText = staticmethod(GetLabelFromText)
@@ -7963,7 +8123,7 @@ class MenuItem(Object):
return _core_.MenuItem_SetAccel(*args, **kwargs) return _core_.MenuItem_SetAccel(*args, **kwargs)
def GetDefaultMarginWidth(*args, **kwargs): def GetDefaultMarginWidth(*args, **kwargs):
"""MenuItem.GetDefaultMarginWidth() -> int""" """GetDefaultMarginWidth() -> int"""
return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
@@ -8054,7 +8214,7 @@ class Control(Window):
def GetClassDefaultAttributes(*args, **kwargs): def GetClassDefaultAttributes(*args, **kwargs):
""" """
Control.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
Get the default attributes for this class. This is useful if Get the default attributes for this class. This is useful if
you want to use the same font or colour in your own control as you want to use the same font or colour in your own control as
@@ -8506,16 +8666,30 @@ class Sizer(Object):
return _core_.Sizer_PrependItem(*args, **kwargs) return _core_.Sizer_PrependItem(*args, **kwargs)
def AddMany(self, widgets): def AddMany(self, widgets):
"""
AddMany is a convenience method for adding several items
to a sizer at one time. Simply pass it a list of tuples,
where each tuple consists of the parameters that you
would normally pass to the `Add` method.
"""
for childinfo in widgets: for childinfo in widgets:
if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)):
childinfo = (childinfo, ) childinfo = (childinfo, )
self.Add(*childinfo) self.Add(*childinfo)
# for backwards compatibility only, please do not use in new code # for backwards compatibility only, please do not use in new code
AddWindow = AddSizer = AddSpacer = Add AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
PrependWindow = PrependSizer = PrependSpacer = Prepend AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
InsertWindow = InsertSizer = InsertSpacer = Insert AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
RemoveWindow = RemoveSizer = RemovePos = Remove PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
def SetItemMinSize(self, item, *args): def SetItemMinSize(self, item, *args):
@@ -9672,14 +9846,22 @@ class FutureCall:
# documented (or will be) as part of the classes/functions/methods # documented (or will be) as part of the classes/functions/methods
# where they should be used. # where they should be used.
def __docfilter__(name): class __DocFilter:
import types """
obj = globals().get(name, None) A filter for epydoc that only allows non-Ptr classes and
if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: fucntions, in order to reduce the clutter in the API docs.
return False """
if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): def __init__(self, globals):
return False self._globals = globals
return True
def __call__(self, name):
import types
obj = self._globals.get(name, None)
if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
return False
if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
return False
return True
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

View File

@@ -1094,15 +1094,12 @@ SWIG_CheckUnsignedChar(PyObject* obj)
} }
} }
wxImage *new_wxImage__SWIG_0(int width,int height,bool clear){ wxImage *new_wxImage(int width,int height,bool clear){
if (width > 0 && height > 0) if (width > 0 && height > 0)
return new wxImage(width, height, clear); return new wxImage(width, height, clear);
else else
return new wxImage; return new wxImage;
} }
wxImage *new_wxImage__SWIG_1(wxSize const &size,bool clear){
return new wxImage(size.x, size.y, clear);
}
wxImage *new_wxImage(wxBitmap const &bitmap){ wxImage *new_wxImage(wxBitmap const &bitmap){
return new wxImage(bitmap.ConvertToImage()); return new wxImage(bitmap.ConvertToImage());
} }
@@ -8792,7 +8789,7 @@ static PyObject *_wrap_new_ImageFromStreamMime(PyObject *self, PyObject *args, P
} }
static PyObject *_wrap_new_EmptyImage__SWIG_0(PyObject *self, PyObject *args) { static PyObject *_wrap_new_EmptyImage(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
int arg1 = (int) 0 ; int arg1 = (int) 0 ;
int arg2 = (int) 0 ; int arg2 = (int) 0 ;
@@ -8801,8 +8798,11 @@ static PyObject *_wrap_new_EmptyImage__SWIG_0(PyObject *self, PyObject *args) {
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ; PyObject * obj2 = 0 ;
char *kwnames[] = {
(char *) "width",(char *) "height",(char *) "clear", NULL
};
if(!PyArg_ParseTuple(args,(char *)"|OOO:new_EmptyImage",&obj0,&obj1,&obj2)) goto fail; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_EmptyImage",kwnames,&obj0,&obj1,&obj2)) goto fail;
if (obj0) { if (obj0) {
arg1 = (int) SWIG_AsInt(obj0); arg1 = (int) SWIG_AsInt(obj0);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
@@ -8817,7 +8817,7 @@ static PyObject *_wrap_new_EmptyImage__SWIG_0(PyObject *self, PyObject *args) {
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxImage *)new_wxImage__SWIG_0(arg1,arg2,arg3); result = (wxImage *)new_wxImage(arg1,arg2,arg3);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
@@ -8829,90 +8829,6 @@ static PyObject *_wrap_new_EmptyImage__SWIG_0(PyObject *self, PyObject *args) {
} }
static PyObject *_wrap_new_EmptyImage__SWIG_1(PyObject *self, PyObject *args) {
PyObject *resultobj;
wxSize *arg1 = 0 ;
bool arg2 = (bool) True ;
wxImage *result;
wxSize temp1 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"O|O:new_EmptyImage",&obj0,&obj1)) goto fail;
{
arg1 = &temp1;
if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail;
}
if (obj1) {
arg2 = (bool) SWIG_AsBool(obj1);
if (PyErr_Occurred()) SWIG_fail;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxImage *)new_wxImage__SWIG_1((wxSize const &)*arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxImage, 1);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_new_EmptyImage(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[4];
int ii;
argc = PyObject_Length(args);
for (ii = 0; (ii < argc) && (ii < 3); ii++) {
argv[ii] = PyTuple_GetItem(args,ii);
}
if ((argc >= 0) && (argc <= 3)) {
int _v;
if (argc <= 0) {
return _wrap_new_EmptyImage__SWIG_0(self,args);
}
_v = SWIG_CheckInt(argv[0]);
if (_v) {
if (argc <= 1) {
return _wrap_new_EmptyImage__SWIG_0(self,args);
}
_v = SWIG_CheckInt(argv[1]);
if (_v) {
if (argc <= 2) {
return _wrap_new_EmptyImage__SWIG_0(self,args);
}
_v = SWIG_CheckBool(argv[2]);
if (_v) {
return _wrap_new_EmptyImage__SWIG_0(self,args);
}
}
}
}
if ((argc >= 1) && (argc <= 2)) {
int _v;
{
_v = wxPySimple_typecheck(argv[0], wxT("wxSize"), 2);
}
if (_v) {
if (argc <= 1) {
return _wrap_new_EmptyImage__SWIG_1(self,args);
}
_v = SWIG_CheckBool(argv[1]);
if (_v) {
return _wrap_new_EmptyImage__SWIG_1(self,args);
}
}
}
PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_EmptyImage'");
return NULL;
}
static PyObject *_wrap_new_ImageFromBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_new_ImageFromBitmap(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
wxBitmap *arg1 = 0 ; wxBitmap *arg1 = 0 ;
@@ -20861,17 +20777,15 @@ static PyObject *_wrap_new_AcceleratorEntry(PyObject *self, PyObject *args, PyOb
int arg1 = (int) 0 ; int arg1 = (int) 0 ;
int arg2 = (int) 0 ; int arg2 = (int) 0 ;
int arg3 = (int) 0 ; int arg3 = (int) 0 ;
wxMenuItem *arg4 = (wxMenuItem *) NULL ;
wxAcceleratorEntry *result; wxAcceleratorEntry *result;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ; PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
char *kwnames[] = { char *kwnames[] = {
(char *) "flags",(char *) "keyCode",(char *) "cmd",(char *) "item", NULL (char *) "flags",(char *) "keyCode",(char *) "cmdID", NULL
}; };
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_AcceleratorEntry",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_AcceleratorEntry",kwnames,&obj0,&obj1,&obj2)) goto fail;
if (obj0) { if (obj0) {
arg1 = (int) SWIG_AsInt(obj0); arg1 = (int) SWIG_AsInt(obj0);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
@@ -20884,13 +20798,9 @@ static PyObject *_wrap_new_AcceleratorEntry(PyObject *self, PyObject *args, PyOb
arg3 = (int) SWIG_AsInt(obj2); arg3 = (int) SWIG_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
if (obj3) {
if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxMenuItem,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
}
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxAcceleratorEntry *)new wxAcceleratorEntry(arg1,arg2,arg3,arg4); result = (wxAcceleratorEntry *)new wxAcceleratorEntry(arg1,arg2,arg3);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
@@ -20933,17 +20843,15 @@ static PyObject *_wrap_AcceleratorEntry_Set(PyObject *self, PyObject *args, PyOb
int arg2 ; int arg2 ;
int arg3 ; int arg3 ;
int arg4 ; int arg4 ;
wxMenuItem *arg5 = (wxMenuItem *) NULL ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ; PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ; PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
char *kwnames[] = { char *kwnames[] = {
(char *) "self",(char *) "flags",(char *) "keyCode",(char *) "cmd",(char *) "item", NULL (char *) "self",(char *) "flags",(char *) "keyCode",(char *) "cmd", NULL
}; };
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:AcceleratorEntry_Set",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:AcceleratorEntry_Set",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxAcceleratorEntry, if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxAcceleratorEntry,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (int) SWIG_AsInt(obj1); arg2 = (int) SWIG_AsInt(obj1);
@@ -20952,13 +20860,9 @@ static PyObject *_wrap_AcceleratorEntry_Set(PyObject *self, PyObject *args, PyOb
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
arg4 = (int) SWIG_AsInt(obj3); arg4 = (int) SWIG_AsInt(obj3);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
if (obj4) {
if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxMenuItem,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
}
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->Set(arg2,arg3,arg4,arg5); (arg1)->Set(arg2,arg3,arg4);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
@@ -20970,63 +20874,6 @@ static PyObject *_wrap_AcceleratorEntry_Set(PyObject *self, PyObject *args, PyOb
} }
static PyObject *_wrap_AcceleratorEntry_SetMenuItem(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxAcceleratorEntry *arg1 = (wxAcceleratorEntry *) 0 ;
wxMenuItem *arg2 = (wxMenuItem *) 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "item", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:AcceleratorEntry_SetMenuItem",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxAcceleratorEntry,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMenuItem,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetMenuItem(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_AcceleratorEntry_GetMenuItem(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxAcceleratorEntry *arg1 = (wxAcceleratorEntry *) 0 ;
wxMenuItem *result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:AcceleratorEntry_GetMenuItem",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxAcceleratorEntry,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (wxMenuItem *)((wxAcceleratorEntry const *)arg1)->GetMenuItem();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = wxPyMake_wxObject(result);
}
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_AcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_AcceleratorEntry_GetFlags(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
wxAcceleratorEntry *arg1 = (wxAcceleratorEntry *) 0 ; wxAcceleratorEntry *arg1 = (wxAcceleratorEntry *) 0 ;
@@ -40498,7 +40345,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"new_ImageFromMime", (PyCFunction) _wrap_new_ImageFromMime, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ImageFromMime", (PyCFunction) _wrap_new_ImageFromMime, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_ImageFromStream", (PyCFunction) _wrap_new_ImageFromStream, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ImageFromStream", (PyCFunction) _wrap_new_ImageFromStream, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_ImageFromStreamMime", (PyCFunction) _wrap_new_ImageFromStreamMime, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ImageFromStreamMime", (PyCFunction) _wrap_new_ImageFromStreamMime, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_EmptyImage", _wrap_new_EmptyImage, METH_VARARGS }, { (char *)"new_EmptyImage", (PyCFunction) _wrap_new_EmptyImage, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_ImageFromBitmap", (PyCFunction) _wrap_new_ImageFromBitmap, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ImageFromBitmap", (PyCFunction) _wrap_new_ImageFromBitmap, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_ImageFromData", (PyCFunction) _wrap_new_ImageFromData, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ImageFromData", (PyCFunction) _wrap_new_ImageFromData, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Image_Create", (PyCFunction) _wrap_Image_Create, METH_VARARGS | METH_KEYWORDS }, { (char *)"Image_Create", (PyCFunction) _wrap_Image_Create, METH_VARARGS | METH_KEYWORDS },
@@ -40945,8 +40792,6 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"new_AcceleratorEntry", (PyCFunction) _wrap_new_AcceleratorEntry, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_AcceleratorEntry", (PyCFunction) _wrap_new_AcceleratorEntry, METH_VARARGS | METH_KEYWORDS },
{ (char *)"delete_AcceleratorEntry", (PyCFunction) _wrap_delete_AcceleratorEntry, METH_VARARGS | METH_KEYWORDS }, { (char *)"delete_AcceleratorEntry", (PyCFunction) _wrap_delete_AcceleratorEntry, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_Set", (PyCFunction) _wrap_AcceleratorEntry_Set, METH_VARARGS | METH_KEYWORDS }, { (char *)"AcceleratorEntry_Set", (PyCFunction) _wrap_AcceleratorEntry_Set, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_SetMenuItem", (PyCFunction) _wrap_AcceleratorEntry_SetMenuItem, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_GetMenuItem", (PyCFunction) _wrap_AcceleratorEntry_GetMenuItem, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_GetFlags", (PyCFunction) _wrap_AcceleratorEntry_GetFlags, METH_VARARGS | METH_KEYWORDS }, { (char *)"AcceleratorEntry_GetFlags", (PyCFunction) _wrap_AcceleratorEntry_GetFlags, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_GetKeyCode", (PyCFunction) _wrap_AcceleratorEntry_GetKeyCode, METH_VARARGS | METH_KEYWORDS }, { (char *)"AcceleratorEntry_GetKeyCode", (PyCFunction) _wrap_AcceleratorEntry_GetKeyCode, METH_VARARGS | METH_KEYWORDS },
{ (char *)"AcceleratorEntry_GetCommand", (PyCFunction) _wrap_AcceleratorEntry_GetCommand, METH_VARARGS | METH_KEYWORDS }, { (char *)"AcceleratorEntry_GetCommand", (PyCFunction) _wrap_AcceleratorEntry_GetCommand, METH_VARARGS | METH_KEYWORDS },

View File

@@ -5,7 +5,6 @@ import _gdi_
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class GDIObject(_core.Object): class GDIObject(_core.Object):
@@ -324,6 +323,20 @@ class Pen(GDIObject):
"""GetDashes(self) -> PyObject""" """GetDashes(self) -> PyObject"""
return _gdi_.Pen_GetDashes(*args, **kwargs) return _gdi_.Pen_GetDashes(*args, **kwargs)
def _SetDashes(*args, **kwargs):
"""_SetDashes(self, PyObject _self, PyObject pyDashes)"""
return _gdi_.Pen__SetDashes(*args, **kwargs)
def SetDashes(self, dashes):
"""
Associate a list of dash lengths with the Pen.
"""
self._SetDashes(self, dashes)
def GetDashCount(*args, **kwargs):
"""GetDashCount(self) -> int"""
return _gdi_.Pen_GetDashCount(*args, **kwargs)
def __eq__(*args, **kwargs): def __eq__(*args, **kwargs):
"""__eq__(self, Pen other) -> bool""" """__eq__(self, Pen other) -> bool"""
return _gdi_.Pen___eq__(*args, **kwargs) return _gdi_.Pen___eq__(*args, **kwargs)
@@ -332,10 +345,6 @@ class Pen(GDIObject):
"""__ne__(self, Pen other) -> bool""" """__ne__(self, Pen other) -> bool"""
return _gdi_.Pen___ne__(*args, **kwargs) return _gdi_.Pen___ne__(*args, **kwargs)
def GetDashCount(*args, **kwargs):
"""GetDashCount(self) -> int"""
return _gdi_.Pen_GetDashCount(*args, **kwargs)
def __nonzero__(self): return self.Ok() def __nonzero__(self): return self.Ok()
class PenPtr(Pen): class PenPtr(Pen):
@@ -345,40 +354,25 @@ class PenPtr(Pen):
self.__class__ = Pen self.__class__ = Pen
_gdi_.Pen_swigregister(PenPtr) _gdi_.Pen_swigregister(PenPtr)
class PyPen(Pen):
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyPen instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""__init__(self, Colour colour, int width=1, int style=SOLID) -> PyPen"""
newobj = _gdi_.new_PyPen(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def __del__(self, destroy=_gdi_.delete_PyPen):
"""__del__(self)"""
try:
if self.thisown: destroy(self)
except: pass
def SetDashes(*args, **kwargs):
"""SetDashes(self, int dashes, wxDash dashes_array)"""
return _gdi_.PyPen_SetDashes(*args, **kwargs)
class PyPenPtr(PyPen):
def __init__(self, this):
self.this = this
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = PyPen
_gdi_.PyPen_swigregister(PyPenPtr)
Pen = PyPen
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class Brush(GDIObject): class Brush(GDIObject):
""" """
A brush is a drawing tool for filling in areas. It is used for painting the A brush is a drawing tool for filling in areas. It is used for
background of rectangles, ellipses, etc. It has a colour and a style. painting the background of rectangles, ellipses, etc. when drawing on
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`
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -386,7 +380,24 @@ class Brush(GDIObject):
""" """
__init__(self, Colour colour, int style=SOLID) -> Brush __init__(self, Colour colour, int style=SOLID) -> Brush
Constructs a brush from a colour object and style. 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.
=================== =============================
""" """
newobj = _gdi_.new_Brush(*args, **kwargs) newobj = _gdi_.new_Brush(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -399,31 +410,62 @@ class Brush(GDIObject):
except: pass except: pass
def SetColour(*args, **kwargs): def SetColour(*args, **kwargs):
"""SetColour(self, Colour col)""" """
SetColour(self, Colour col)
Set the brush's `wx.Colour`.
"""
return _gdi_.Brush_SetColour(*args, **kwargs) return _gdi_.Brush_SetColour(*args, **kwargs)
def SetStyle(*args, **kwargs): def SetStyle(*args, **kwargs):
"""SetStyle(self, int style)""" """
SetStyle(self, int style)
Sets the style of the brush. See `__init__` for a listing of styles.
"""
return _gdi_.Brush_SetStyle(*args, **kwargs) return _gdi_.Brush_SetStyle(*args, **kwargs)
def SetStipple(*args, **kwargs): def SetStipple(*args, **kwargs):
"""SetStipple(self, Bitmap stipple)""" """
SetStipple(self, Bitmap stipple)
Sets the stipple `wx.Bitmap`.
"""
return _gdi_.Brush_SetStipple(*args, **kwargs) return _gdi_.Brush_SetStipple(*args, **kwargs)
def GetColour(*args, **kwargs): def GetColour(*args, **kwargs):
"""GetColour(self) -> Colour""" """
GetColour(self) -> Colour
Returns the `wx.Colour` of the brush.
"""
return _gdi_.Brush_GetColour(*args, **kwargs) return _gdi_.Brush_GetColour(*args, **kwargs)
def GetStyle(*args, **kwargs): def GetStyle(*args, **kwargs):
"""GetStyle(self) -> int""" """
GetStyle(self) -> int
Returns the style of the brush. See `__init__` for a listing of
styles.
"""
return _gdi_.Brush_GetStyle(*args, **kwargs) return _gdi_.Brush_GetStyle(*args, **kwargs)
def GetStipple(*args, **kwargs): def GetStipple(*args, **kwargs):
"""GetStipple(self) -> Bitmap""" """
GetStipple(self) -> Bitmap
Returns the stiple `wx.Bitmap` of the brush. If the brush does not
have a wx.STIPPLE style, then the return value may be non-None but an
uninitialised bitmap (`wx.Bitmap.Ok` returns False).
"""
return _gdi_.Brush_GetStipple(*args, **kwargs) return _gdi_.Brush_GetStipple(*args, **kwargs)
def Ok(*args, **kwargs): def Ok(*args, **kwargs):
"""Ok(self) -> bool""" """
Ok(self) -> bool
Returns True if the brush is initialised and valid.
"""
return _gdi_.Brush_Ok(*args, **kwargs) return _gdi_.Brush_Ok(*args, **kwargs)
def __nonzero__(self): return self.Ok() def __nonzero__(self): return self.Ok()
@@ -436,6 +478,27 @@ class BrushPtr(Brush):
_gdi_.Brush_swigregister(BrushPtr) _gdi_.Brush_swigregister(BrushPtr)
class Bitmap(GDIObject): class Bitmap(GDIObject):
"""
The wx.Bitmap class encapsulates the concept of a platform-dependent
bitmap. It can be either monochrome or colour, and either loaded from
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.
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.
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -443,6 +506,33 @@ class Bitmap(GDIObject):
__init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
Loads a bitmap from a file. 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`
""" """
newobj = _gdi_.new_Bitmap(*args, **kwargs) newobj = _gdi_.new_Bitmap(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -495,9 +585,9 @@ class Bitmap(GDIObject):
""" """
ConvertToImage(self) -> Image ConvertToImage(self) -> Image
Creates a platform-independent image from a platform-dependent bitmap. This Creates a platform-independent image from a platform-dependent
preserves mask information so that bitmaps and images can be converted back bitmap. This preserves mask information so that bitmaps and images can
and forth without loss in that respect. be converted back and forth without loss in that respect.
""" """
return _gdi_.Bitmap_ConvertToImage(*args, **kwargs) return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
@@ -505,8 +595,11 @@ class Bitmap(GDIObject):
""" """
GetMask(self) -> Mask GetMask(self) -> Mask
Gets the associated mask (if any) which may have been loaded from a file Gets the associated mask (if any) which may have been loaded from a
or explpicitly set for the bitmap. file or explpicitly set for the bitmap.
:see: `SetMask`, `wx.Mask`
""" """
return _gdi_.Bitmap_GetMask(*args, **kwargs) return _gdi_.Bitmap_GetMask(*args, **kwargs)
@@ -515,6 +608,9 @@ class Bitmap(GDIObject):
SetMask(self, Mask mask) SetMask(self, Mask mask)
Sets the mask for this bitmap. Sets the mask for this bitmap.
:see: `GetMask`, `wx.Mask`
""" """
return _gdi_.Bitmap_SetMask(*args, **kwargs) return _gdi_.Bitmap_SetMask(*args, **kwargs)
@@ -530,16 +626,18 @@ class Bitmap(GDIObject):
""" """
GetSubBitmap(self, Rect rect) -> Bitmap GetSubBitmap(self, Rect rect) -> Bitmap
Returns a sub bitmap of the current one as long as the rect belongs entirely Returns a sub-bitmap of the current one as long as the rect belongs
to the bitmap. This function preserves bit depth and mask information. entirely to the bitmap. This function preserves bit depth and mask
information.
""" """
return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs) return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
def SaveFile(*args, **kwargs): def SaveFile(*args, **kwargs):
""" """
SaveFile(self, String name, int type, Palette palette=(wxPalette *) NULL) -> bool SaveFile(self, String name, int type, Palette palette=None) -> bool
Saves a bitmap in the named file. Saves a bitmap in the named file. See `__init__` for a description of
the ``type`` parameter.
""" """
return _gdi_.Bitmap_SaveFile(*args, **kwargs) return _gdi_.Bitmap_SaveFile(*args, **kwargs)
@@ -547,7 +645,8 @@ class Bitmap(GDIObject):
""" """
LoadFile(self, String name, int type) -> bool LoadFile(self, String name, int type) -> bool
Loads a bitmap from a file Loads a bitmap from a file. See `__init__` for a description of the
``type`` parameter.
""" """
return _gdi_.Bitmap_LoadFile(*args, **kwargs) return _gdi_.Bitmap_LoadFile(*args, **kwargs)
@@ -559,7 +658,7 @@ class Bitmap(GDIObject):
""" """
SetHeight(self, int height) SetHeight(self, int height)
Set the height property (does not affect the bitmap data). Set the height property (does not affect the existing bitmap data).
""" """
return _gdi_.Bitmap_SetHeight(*args, **kwargs) return _gdi_.Bitmap_SetHeight(*args, **kwargs)
@@ -567,7 +666,7 @@ class Bitmap(GDIObject):
""" """
SetWidth(self, int width) SetWidth(self, int width)
Set the width property (does not affect the bitmap data). Set the width property (does not affect the existing bitmap data).
""" """
return _gdi_.Bitmap_SetWidth(*args, **kwargs) return _gdi_.Bitmap_SetWidth(*args, **kwargs)
@@ -575,7 +674,7 @@ class Bitmap(GDIObject):
""" """
SetDepth(self, int depth) SetDepth(self, int depth)
Set the depth property (does not affect the bitmap data). Set the depth property (does not affect the existing bitmap data).
""" """
return _gdi_.Bitmap_SetDepth(*args, **kwargs) return _gdi_.Bitmap_SetDepth(*args, **kwargs)
@@ -583,7 +682,7 @@ class Bitmap(GDIObject):
""" """
SetSize(self, Size size) SetSize(self, Size size)
Set the bitmap size Set the bitmap size (does not affect the existing bitmap data).
""" """
return _gdi_.Bitmap_SetSize(*args, **kwargs) return _gdi_.Bitmap_SetSize(*args, **kwargs)
@@ -604,11 +703,23 @@ class BitmapPtr(Bitmap):
self.__class__ = Bitmap self.__class__ = Bitmap
_gdi_.Bitmap_swigregister(BitmapPtr) _gdi_.Bitmap_swigregister(BitmapPtr)
def EmptyBitmap(*args, **kwargs):
"""
EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
Creates a new bitmap of the given size. A depth of -1 indicates the
depth of the current screen or visual. Some platforms only support 1
for monochrome and -1 for the current colour setting.
"""
val = _gdi_.new_EmptyBitmap(*args, **kwargs)
val.thisown = 1
return val
def BitmapFromIcon(*args, **kwargs): def BitmapFromIcon(*args, **kwargs):
""" """
BitmapFromIcon(Icon icon) -> Bitmap BitmapFromIcon(Icon icon) -> Bitmap
Create a new bitmap from an Icon object. Create a new bitmap from a `wx.Icon` object.
""" """
val = _gdi_.new_BitmapFromIcon(*args, **kwargs) val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
val.thisown = 1 val.thisown = 1
@@ -618,10 +729,11 @@ def BitmapFromImage(*args, **kwargs):
""" """
BitmapFromImage(Image image, int depth=-1) -> Bitmap BitmapFromImage(Image image, int depth=-1) -> Bitmap
Creates bitmap object from the image. This has to be done to actually display Creates bitmap object from a `wx.Image`. This has to be done to
an image as you cannot draw an image directly on a window. The resulting actually display a `wx.Image` as you cannot draw an image directly on
bitmap will use the provided colour depth (or that of the current system if a window. The resulting bitmap will use the provided colour depth (or
depth is -1) which entails that a colour reduction has to take place. that of the current screen colour depth if depth is -1) which entails
that a colour reduction may have to take place.
""" """
val = _gdi_.new_BitmapFromImage(*args, **kwargs) val = _gdi_.new_BitmapFromImage(*args, **kwargs)
val.thisown = 1 val.thisown = 1
@@ -641,34 +753,27 @@ def BitmapFromBits(*args, **kwargs):
""" """
BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
Creates a bitmap from an array of bits. You should only use this function for Creates a bitmap from an array of bits. You should only use this
monochrome bitmaps (depth 1) in portable programs: in this case the bits function for monochrome bitmaps (depth 1) in portable programs: in
parameter should contain an XBM image. For other bit depths, the behaviour is this case the bits parameter should contain an XBM image. For other
platform dependent. bit depths, the behaviour is platform dependent.
""" """
val = _gdi_.new_BitmapFromBits(*args, **kwargs) val = _gdi_.new_BitmapFromBits(*args, **kwargs)
val.thisown = 1 val.thisown = 1
return val return val
def EmptyBitmap(*args):
"""
EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
EmptyBitmap(Size size, int depth=-1) -> Bitmap
Creates a new bitmap of the given size. A depth of -1 indicates
the depth of the current screen or visual. Some platforms only
support 1 for monochrome and -1 for the current colour setting.
"""
val = _gdi_.new_EmptyBitmap(*args)
val.thisown = 1
return val
class Mask(_core.Object): class Mask(_core.Object):
""" """
This class encapsulates a monochrome mask bitmap, where the masked area is This class encapsulates a monochrome mask bitmap, where the masked
black and the unmasked area is white. When associated with a bitmap and drawn area is black and the unmasked area is white. When associated with a
in a device context, the unmasked area of the bitmap will be drawn, and the bitmap and drawn in a device context, the unmasked area of the bitmap
masked area will not be drawn. will be drawn, and the masked area will not be drawn.
A mask may be associated with a `wx.Bitmap`. It is used in
`wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
`wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
mask.
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -676,8 +781,13 @@ class Mask(_core.Object):
""" """
__init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
Constructs a mask from a bitmap and a colour in that bitmap that indicates Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
the transparent portions of the mask, by default BLACK is used. that indicates the transparent portions of the mask. In other words,
the pixels in ``bitmap`` that match ``colour`` will be the transparent
portions of the mask. If no ``colour`` or an invalid ``colour`` is
passed then BLACK is used.
:see: `wx.Bitmap`, `wx.Colour`
""" """
newobj = _gdi_.new_Mask(*args, **kwargs) newobj = _gdi_.new_Mask(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -691,7 +801,7 @@ class MaskPtr(Mask):
self.__class__ = Mask self.__class__ = Mask
_gdi_.Mask_swigregister(MaskPtr) _gdi_.Mask_swigregister(MaskPtr)
MaskColour = Mask MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
class Icon(GDIObject): class Icon(GDIObject):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -1435,12 +1545,12 @@ class FontMapper(object):
except: pass except: pass
def Get(*args, **kwargs): def Get(*args, **kwargs):
"""FontMapper.Get() -> FontMapper""" """Get() -> FontMapper"""
return _gdi_.FontMapper_Get(*args, **kwargs) return _gdi_.FontMapper_Get(*args, **kwargs)
Get = staticmethod(Get) Get = staticmethod(Get)
def Set(*args, **kwargs): def Set(*args, **kwargs):
"""FontMapper.Set(FontMapper mapper) -> FontMapper""" """Set(FontMapper mapper) -> FontMapper"""
return _gdi_.FontMapper_Set(*args, **kwargs) return _gdi_.FontMapper_Set(*args, **kwargs)
Set = staticmethod(Set) Set = staticmethod(Set)
@@ -1449,27 +1559,27 @@ class FontMapper(object):
return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs) return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
def GetSupportedEncodingsCount(*args, **kwargs): def GetSupportedEncodingsCount(*args, **kwargs):
"""FontMapper.GetSupportedEncodingsCount() -> size_t""" """GetSupportedEncodingsCount() -> size_t"""
return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs) return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount) GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
def GetEncoding(*args, **kwargs): def GetEncoding(*args, **kwargs):
"""FontMapper.GetEncoding(size_t n) -> int""" """GetEncoding(size_t n) -> int"""
return _gdi_.FontMapper_GetEncoding(*args, **kwargs) return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
GetEncoding = staticmethod(GetEncoding) GetEncoding = staticmethod(GetEncoding)
def GetEncodingName(*args, **kwargs): def GetEncodingName(*args, **kwargs):
"""FontMapper.GetEncodingName(int encoding) -> String""" """GetEncodingName(int encoding) -> String"""
return _gdi_.FontMapper_GetEncodingName(*args, **kwargs) return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
GetEncodingName = staticmethod(GetEncodingName) GetEncodingName = staticmethod(GetEncodingName)
def GetEncodingDescription(*args, **kwargs): def GetEncodingDescription(*args, **kwargs):
"""FontMapper.GetEncodingDescription(int encoding) -> String""" """GetEncodingDescription(int encoding) -> String"""
return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs) return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
GetEncodingDescription = staticmethod(GetEncodingDescription) GetEncodingDescription = staticmethod(GetEncodingDescription)
def GetEncodingFromName(*args, **kwargs): def GetEncodingFromName(*args, **kwargs):
"""FontMapper.GetEncodingFromName(String name) -> int""" """GetEncodingFromName(String name) -> int"""
return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs) return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
GetEncodingFromName = staticmethod(GetEncodingFromName) GetEncodingFromName = staticmethod(GetEncodingFromName)
@@ -1482,7 +1592,7 @@ class FontMapper(object):
return _gdi_.FontMapper_SetConfigPath(*args, **kwargs) return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
def GetDefaultConfigPath(*args, **kwargs): def GetDefaultConfigPath(*args, **kwargs):
"""FontMapper.GetDefaultConfigPath() -> String""" """GetDefaultConfigPath() -> String"""
return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs) return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
GetDefaultConfigPath = staticmethod(GetDefaultConfigPath) GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
@@ -1681,12 +1791,12 @@ class Font(GDIObject):
return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs) return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
def GetDefaultEncoding(*args, **kwargs): def GetDefaultEncoding(*args, **kwargs):
"""Font.GetDefaultEncoding() -> int""" """GetDefaultEncoding() -> int"""
return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
GetDefaultEncoding = staticmethod(GetDefaultEncoding) GetDefaultEncoding = staticmethod(GetDefaultEncoding)
def SetDefaultEncoding(*args, **kwargs): def SetDefaultEncoding(*args, **kwargs):
"""Font.SetDefaultEncoding(int encoding)""" """SetDefaultEncoding(int encoding)"""
return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
SetDefaultEncoding = staticmethod(SetDefaultEncoding) SetDefaultEncoding = staticmethod(SetDefaultEncoding)
@@ -2065,17 +2175,17 @@ class Locale(object):
return val return val
def GetSystemLanguage(*args, **kwargs): def GetSystemLanguage(*args, **kwargs):
"""Locale.GetSystemLanguage() -> int""" """GetSystemLanguage() -> int"""
return _gdi_.Locale_GetSystemLanguage(*args, **kwargs) return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
GetSystemLanguage = staticmethod(GetSystemLanguage) GetSystemLanguage = staticmethod(GetSystemLanguage)
def GetSystemEncoding(*args, **kwargs): def GetSystemEncoding(*args, **kwargs):
"""Locale.GetSystemEncoding() -> int""" """GetSystemEncoding() -> int"""
return _gdi_.Locale_GetSystemEncoding(*args, **kwargs) return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
GetSystemEncoding = staticmethod(GetSystemEncoding) GetSystemEncoding = staticmethod(GetSystemEncoding)
def GetSystemEncodingName(*args, **kwargs): def GetSystemEncodingName(*args, **kwargs):
"""Locale.GetSystemEncodingName() -> String""" """GetSystemEncodingName() -> String"""
return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs) return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
GetSystemEncodingName = staticmethod(GetSystemEncodingName) GetSystemEncodingName = staticmethod(GetSystemEncodingName)
@@ -2101,7 +2211,7 @@ class Locale(object):
return _gdi_.Locale_GetCanonicalName(*args, **kwargs) return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
def AddCatalogLookupPathPrefix(*args, **kwargs): def AddCatalogLookupPathPrefix(*args, **kwargs):
"""Locale.AddCatalogLookupPathPrefix(String prefix)""" """AddCatalogLookupPathPrefix(String prefix)"""
return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs) return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
@@ -2114,22 +2224,22 @@ class Locale(object):
return _gdi_.Locale_IsLoaded(*args, **kwargs) return _gdi_.Locale_IsLoaded(*args, **kwargs)
def GetLanguageInfo(*args, **kwargs): def GetLanguageInfo(*args, **kwargs):
"""Locale.GetLanguageInfo(int lang) -> LanguageInfo""" """GetLanguageInfo(int lang) -> LanguageInfo"""
return _gdi_.Locale_GetLanguageInfo(*args, **kwargs) return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
GetLanguageInfo = staticmethod(GetLanguageInfo) GetLanguageInfo = staticmethod(GetLanguageInfo)
def GetLanguageName(*args, **kwargs): def GetLanguageName(*args, **kwargs):
"""Locale.GetLanguageName(int lang) -> String""" """GetLanguageName(int lang) -> String"""
return _gdi_.Locale_GetLanguageName(*args, **kwargs) return _gdi_.Locale_GetLanguageName(*args, **kwargs)
GetLanguageName = staticmethod(GetLanguageName) GetLanguageName = staticmethod(GetLanguageName)
def FindLanguageInfo(*args, **kwargs): def FindLanguageInfo(*args, **kwargs):
"""Locale.FindLanguageInfo(String locale) -> LanguageInfo""" """FindLanguageInfo(String locale) -> LanguageInfo"""
return _gdi_.Locale_FindLanguageInfo(*args, **kwargs) return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
FindLanguageInfo = staticmethod(FindLanguageInfo) FindLanguageInfo = staticmethod(FindLanguageInfo)
def AddLanguage(*args, **kwargs): def AddLanguage(*args, **kwargs):
"""Locale.AddLanguage(LanguageInfo info)""" """AddLanguage(LanguageInfo info)"""
return _gdi_.Locale_AddLanguage(*args, **kwargs) return _gdi_.Locale_AddLanguage(*args, **kwargs)
AddLanguage = staticmethod(AddLanguage) AddLanguage = staticmethod(AddLanguage)
@@ -2218,17 +2328,17 @@ class EncodingConverter(_core.Object):
return _gdi_.EncodingConverter_Convert(*args, **kwargs) return _gdi_.EncodingConverter_Convert(*args, **kwargs)
def GetPlatformEquivalents(*args, **kwargs): def GetPlatformEquivalents(*args, **kwargs):
"""EncodingConverter.GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs) return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
GetPlatformEquivalents = staticmethod(GetPlatformEquivalents) GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
def GetAllEquivalents(*args, **kwargs): def GetAllEquivalents(*args, **kwargs):
"""EncodingConverter.GetAllEquivalents(int enc) -> wxFontEncodingArray""" """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs) return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
GetAllEquivalents = staticmethod(GetAllEquivalents) GetAllEquivalents = staticmethod(GetAllEquivalents)
def CanConvert(*args, **kwargs): def CanConvert(*args, **kwargs):
"""EncodingConverter.CanConvert(int encIn, int encOut) -> bool""" """CanConvert(int encIn, int encOut) -> bool"""
return _gdi_.EncodingConverter_CanConvert(*args, **kwargs) return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
CanConvert = staticmethod(CanConvert) CanConvert = staticmethod(CanConvert)
@@ -3155,12 +3265,12 @@ class PostScriptDC(DC):
return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs) return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
def SetResolution(*args, **kwargs): def SetResolution(*args, **kwargs):
"""PostScriptDC.SetResolution(int ppi)""" """SetResolution(int ppi)"""
return _gdi_.PostScriptDC_SetResolution(*args, **kwargs) return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
SetResolution = staticmethod(SetResolution) SetResolution = staticmethod(SetResolution)
def GetResolution(*args, **kwargs): def GetResolution(*args, **kwargs):
"""PostScriptDC.GetResolution() -> int""" """GetResolution() -> int"""
return _gdi_.PostScriptDC_GetResolution(*args, **kwargs) return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
GetResolution = staticmethod(GetResolution) GetResolution = staticmethod(GetResolution)

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,6 @@ import _misc_
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SYS_OEM_FIXED_FONT = _misc_.SYS_OEM_FIXED_FONT SYS_OEM_FIXED_FONT = _misc_.SYS_OEM_FIXED_FONT
@@ -104,32 +103,32 @@ class SystemSettings(object):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def GetColour(*args, **kwargs): def GetColour(*args, **kwargs):
"""SystemSettings.GetColour(int index) -> Colour""" """GetColour(int index) -> Colour"""
return _misc_.SystemSettings_GetColour(*args, **kwargs) return _misc_.SystemSettings_GetColour(*args, **kwargs)
GetColour = staticmethod(GetColour) GetColour = staticmethod(GetColour)
def GetFont(*args, **kwargs): def GetFont(*args, **kwargs):
"""SystemSettings.GetFont(int index) -> Font""" """GetFont(int index) -> Font"""
return _misc_.SystemSettings_GetFont(*args, **kwargs) return _misc_.SystemSettings_GetFont(*args, **kwargs)
GetFont = staticmethod(GetFont) GetFont = staticmethod(GetFont)
def GetMetric(*args, **kwargs): def GetMetric(*args, **kwargs):
"""SystemSettings.GetMetric(int index) -> int""" """GetMetric(int index) -> int"""
return _misc_.SystemSettings_GetMetric(*args, **kwargs) return _misc_.SystemSettings_GetMetric(*args, **kwargs)
GetMetric = staticmethod(GetMetric) GetMetric = staticmethod(GetMetric)
def HasFeature(*args, **kwargs): def HasFeature(*args, **kwargs):
"""SystemSettings.HasFeature(int index) -> bool""" """HasFeature(int index) -> bool"""
return _misc_.SystemSettings_HasFeature(*args, **kwargs) return _misc_.SystemSettings_HasFeature(*args, **kwargs)
HasFeature = staticmethod(HasFeature) HasFeature = staticmethod(HasFeature)
def GetScreenType(*args, **kwargs): def GetScreenType(*args, **kwargs):
"""SystemSettings.GetScreenType() -> int""" """GetScreenType() -> int"""
return _misc_.SystemSettings_GetScreenType(*args, **kwargs) return _misc_.SystemSettings_GetScreenType(*args, **kwargs)
GetScreenType = staticmethod(GetScreenType) GetScreenType = staticmethod(GetScreenType)
def SetScreenType(*args, **kwargs): def SetScreenType(*args, **kwargs):
"""SystemSettings.SetScreenType(int screen)""" """SetScreenType(int screen)"""
return _misc_.SystemSettings_SetScreenType(*args, **kwargs) return _misc_.SystemSettings_SetScreenType(*args, **kwargs)
SetScreenType = staticmethod(SetScreenType) SetScreenType = staticmethod(SetScreenType)
@@ -175,27 +174,27 @@ class SystemOptions(_core.Object):
self.thisown = 1 self.thisown = 1
del newobj.thisown del newobj.thisown
def SetOption(*args, **kwargs): def SetOption(*args, **kwargs):
"""SystemOptions.SetOption(String name, String value)""" """SetOption(String name, String value)"""
return _misc_.SystemOptions_SetOption(*args, **kwargs) return _misc_.SystemOptions_SetOption(*args, **kwargs)
SetOption = staticmethod(SetOption) SetOption = staticmethod(SetOption)
def SetOptionInt(*args, **kwargs): def SetOptionInt(*args, **kwargs):
"""SystemOptions.SetOptionInt(String name, int value)""" """SetOptionInt(String name, int value)"""
return _misc_.SystemOptions_SetOptionInt(*args, **kwargs) return _misc_.SystemOptions_SetOptionInt(*args, **kwargs)
SetOptionInt = staticmethod(SetOptionInt) SetOptionInt = staticmethod(SetOptionInt)
def GetOption(*args, **kwargs): def GetOption(*args, **kwargs):
"""SystemOptions.GetOption(String name) -> String""" """GetOption(String name) -> String"""
return _misc_.SystemOptions_GetOption(*args, **kwargs) return _misc_.SystemOptions_GetOption(*args, **kwargs)
GetOption = staticmethod(GetOption) GetOption = staticmethod(GetOption)
def GetOptionInt(*args, **kwargs): def GetOptionInt(*args, **kwargs):
"""SystemOptions.GetOptionInt(String name) -> int""" """GetOptionInt(String name) -> int"""
return _misc_.SystemOptions_GetOptionInt(*args, **kwargs) return _misc_.SystemOptions_GetOptionInt(*args, **kwargs)
GetOptionInt = staticmethod(GetOptionInt) GetOptionInt = staticmethod(GetOptionInt)
def HasOption(*args, **kwargs): def HasOption(*args, **kwargs):
"""SystemOptions.HasOption(String name) -> bool""" """HasOption(String name) -> bool"""
return _misc_.SystemOptions_HasOption(*args, **kwargs) return _misc_.SystemOptions_HasOption(*args, **kwargs)
HasOption = staticmethod(HasOption) HasOption = staticmethod(HasOption)
@@ -554,12 +553,12 @@ class ToolTip(_core.Object):
return _misc_.ToolTip_GetWindow(*args, **kwargs) return _misc_.ToolTip_GetWindow(*args, **kwargs)
def Enable(*args, **kwargs): def Enable(*args, **kwargs):
"""ToolTip.Enable(bool flag)""" """Enable(bool flag)"""
return _misc_.ToolTip_Enable(*args, **kwargs) return _misc_.ToolTip_Enable(*args, **kwargs)
Enable = staticmethod(Enable) Enable = staticmethod(Enable)
def SetDelay(*args, **kwargs): def SetDelay(*args, **kwargs):
"""ToolTip.SetDelay(long milliseconds)""" """SetDelay(long milliseconds)"""
return _misc_.ToolTip_SetDelay(*args, **kwargs) return _misc_.ToolTip_SetDelay(*args, **kwargs)
SetDelay = staticmethod(SetDelay) SetDelay = staticmethod(SetDelay)
@@ -1095,17 +1094,17 @@ class Log(object):
self.thisown = 1 self.thisown = 1
del newobj.thisown del newobj.thisown
def IsEnabled(*args, **kwargs): def IsEnabled(*args, **kwargs):
"""Log.IsEnabled() -> bool""" """IsEnabled() -> bool"""
return _misc_.Log_IsEnabled(*args, **kwargs) return _misc_.Log_IsEnabled(*args, **kwargs)
IsEnabled = staticmethod(IsEnabled) IsEnabled = staticmethod(IsEnabled)
def EnableLogging(*args, **kwargs): def EnableLogging(*args, **kwargs):
"""Log.EnableLogging(bool doIt=True) -> bool""" """EnableLogging(bool doIt=True) -> bool"""
return _misc_.Log_EnableLogging(*args, **kwargs) return _misc_.Log_EnableLogging(*args, **kwargs)
EnableLogging = staticmethod(EnableLogging) EnableLogging = staticmethod(EnableLogging)
def OnLog(*args, **kwargs): def OnLog(*args, **kwargs):
"""Log.OnLog(wxLogLevel level, wxChar szString, time_t t)""" """OnLog(wxLogLevel level, wxChar szString, time_t t)"""
return _misc_.Log_OnLog(*args, **kwargs) return _misc_.Log_OnLog(*args, **kwargs)
OnLog = staticmethod(OnLog) OnLog = staticmethod(OnLog)
@@ -1114,102 +1113,102 @@ class Log(object):
return _misc_.Log_Flush(*args, **kwargs) return _misc_.Log_Flush(*args, **kwargs)
def FlushActive(*args, **kwargs): def FlushActive(*args, **kwargs):
"""Log.FlushActive()""" """FlushActive()"""
return _misc_.Log_FlushActive(*args, **kwargs) return _misc_.Log_FlushActive(*args, **kwargs)
FlushActive = staticmethod(FlushActive) FlushActive = staticmethod(FlushActive)
def GetActiveTarget(*args, **kwargs): def GetActiveTarget(*args, **kwargs):
"""Log.GetActiveTarget() -> Log""" """GetActiveTarget() -> Log"""
return _misc_.Log_GetActiveTarget(*args, **kwargs) return _misc_.Log_GetActiveTarget(*args, **kwargs)
GetActiveTarget = staticmethod(GetActiveTarget) GetActiveTarget = staticmethod(GetActiveTarget)
def SetActiveTarget(*args, **kwargs): def SetActiveTarget(*args, **kwargs):
"""Log.SetActiveTarget(Log pLogger) -> Log""" """SetActiveTarget(Log pLogger) -> Log"""
return _misc_.Log_SetActiveTarget(*args, **kwargs) return _misc_.Log_SetActiveTarget(*args, **kwargs)
SetActiveTarget = staticmethod(SetActiveTarget) SetActiveTarget = staticmethod(SetActiveTarget)
def Suspend(*args, **kwargs): def Suspend(*args, **kwargs):
"""Log.Suspend()""" """Suspend()"""
return _misc_.Log_Suspend(*args, **kwargs) return _misc_.Log_Suspend(*args, **kwargs)
Suspend = staticmethod(Suspend) Suspend = staticmethod(Suspend)
def Resume(*args, **kwargs): def Resume(*args, **kwargs):
"""Log.Resume()""" """Resume()"""
return _misc_.Log_Resume(*args, **kwargs) return _misc_.Log_Resume(*args, **kwargs)
Resume = staticmethod(Resume) Resume = staticmethod(Resume)
def SetVerbose(*args, **kwargs): def SetVerbose(*args, **kwargs):
"""Log.SetVerbose(bool bVerbose=True)""" """SetVerbose(bool bVerbose=True)"""
return _misc_.Log_SetVerbose(*args, **kwargs) return _misc_.Log_SetVerbose(*args, **kwargs)
SetVerbose = staticmethod(SetVerbose) SetVerbose = staticmethod(SetVerbose)
def SetLogLevel(*args, **kwargs): def SetLogLevel(*args, **kwargs):
"""Log.SetLogLevel(wxLogLevel logLevel)""" """SetLogLevel(wxLogLevel logLevel)"""
return _misc_.Log_SetLogLevel(*args, **kwargs) return _misc_.Log_SetLogLevel(*args, **kwargs)
SetLogLevel = staticmethod(SetLogLevel) SetLogLevel = staticmethod(SetLogLevel)
def DontCreateOnDemand(*args, **kwargs): def DontCreateOnDemand(*args, **kwargs):
"""Log.DontCreateOnDemand()""" """DontCreateOnDemand()"""
return _misc_.Log_DontCreateOnDemand(*args, **kwargs) return _misc_.Log_DontCreateOnDemand(*args, **kwargs)
DontCreateOnDemand = staticmethod(DontCreateOnDemand) DontCreateOnDemand = staticmethod(DontCreateOnDemand)
def SetTraceMask(*args, **kwargs): def SetTraceMask(*args, **kwargs):
"""Log.SetTraceMask(wxTraceMask ulMask)""" """SetTraceMask(wxTraceMask ulMask)"""
return _misc_.Log_SetTraceMask(*args, **kwargs) return _misc_.Log_SetTraceMask(*args, **kwargs)
SetTraceMask = staticmethod(SetTraceMask) SetTraceMask = staticmethod(SetTraceMask)
def AddTraceMask(*args, **kwargs): def AddTraceMask(*args, **kwargs):
"""Log.AddTraceMask(String str)""" """AddTraceMask(String str)"""
return _misc_.Log_AddTraceMask(*args, **kwargs) return _misc_.Log_AddTraceMask(*args, **kwargs)
AddTraceMask = staticmethod(AddTraceMask) AddTraceMask = staticmethod(AddTraceMask)
def RemoveTraceMask(*args, **kwargs): def RemoveTraceMask(*args, **kwargs):
"""Log.RemoveTraceMask(String str)""" """RemoveTraceMask(String str)"""
return _misc_.Log_RemoveTraceMask(*args, **kwargs) return _misc_.Log_RemoveTraceMask(*args, **kwargs)
RemoveTraceMask = staticmethod(RemoveTraceMask) RemoveTraceMask = staticmethod(RemoveTraceMask)
def ClearTraceMasks(*args, **kwargs): def ClearTraceMasks(*args, **kwargs):
"""Log.ClearTraceMasks()""" """ClearTraceMasks()"""
return _misc_.Log_ClearTraceMasks(*args, **kwargs) return _misc_.Log_ClearTraceMasks(*args, **kwargs)
ClearTraceMasks = staticmethod(ClearTraceMasks) ClearTraceMasks = staticmethod(ClearTraceMasks)
def GetTraceMasks(*args, **kwargs): def GetTraceMasks(*args, **kwargs):
"""Log.GetTraceMasks() -> wxArrayString""" """GetTraceMasks() -> wxArrayString"""
return _misc_.Log_GetTraceMasks(*args, **kwargs) return _misc_.Log_GetTraceMasks(*args, **kwargs)
GetTraceMasks = staticmethod(GetTraceMasks) GetTraceMasks = staticmethod(GetTraceMasks)
def SetTimestamp(*args, **kwargs): def SetTimestamp(*args, **kwargs):
"""Log.SetTimestamp(wxChar ts)""" """SetTimestamp(wxChar ts)"""
return _misc_.Log_SetTimestamp(*args, **kwargs) return _misc_.Log_SetTimestamp(*args, **kwargs)
SetTimestamp = staticmethod(SetTimestamp) SetTimestamp = staticmethod(SetTimestamp)
def GetVerbose(*args, **kwargs): def GetVerbose(*args, **kwargs):
"""Log.GetVerbose() -> bool""" """GetVerbose() -> bool"""
return _misc_.Log_GetVerbose(*args, **kwargs) return _misc_.Log_GetVerbose(*args, **kwargs)
GetVerbose = staticmethod(GetVerbose) GetVerbose = staticmethod(GetVerbose)
def GetTraceMask(*args, **kwargs): def GetTraceMask(*args, **kwargs):
"""Log.GetTraceMask() -> wxTraceMask""" """GetTraceMask() -> wxTraceMask"""
return _misc_.Log_GetTraceMask(*args, **kwargs) return _misc_.Log_GetTraceMask(*args, **kwargs)
GetTraceMask = staticmethod(GetTraceMask) GetTraceMask = staticmethod(GetTraceMask)
def IsAllowedTraceMask(*args, **kwargs): def IsAllowedTraceMask(*args, **kwargs):
"""Log.IsAllowedTraceMask(wxChar mask) -> bool""" """IsAllowedTraceMask(wxChar mask) -> bool"""
return _misc_.Log_IsAllowedTraceMask(*args, **kwargs) return _misc_.Log_IsAllowedTraceMask(*args, **kwargs)
IsAllowedTraceMask = staticmethod(IsAllowedTraceMask) IsAllowedTraceMask = staticmethod(IsAllowedTraceMask)
def GetLogLevel(*args, **kwargs): def GetLogLevel(*args, **kwargs):
"""Log.GetLogLevel() -> wxLogLevel""" """GetLogLevel() -> wxLogLevel"""
return _misc_.Log_GetLogLevel(*args, **kwargs) return _misc_.Log_GetLogLevel(*args, **kwargs)
GetLogLevel = staticmethod(GetLogLevel) GetLogLevel = staticmethod(GetLogLevel)
def GetTimestamp(*args, **kwargs): def GetTimestamp(*args, **kwargs):
"""Log.GetTimestamp() -> wxChar""" """GetTimestamp() -> wxChar"""
return _misc_.Log_GetTimestamp(*args, **kwargs) return _misc_.Log_GetTimestamp(*args, **kwargs)
GetTimestamp = staticmethod(GetTimestamp) GetTimestamp = staticmethod(GetTimestamp)
def TimeStamp(*args, **kwargs): def TimeStamp(*args, **kwargs):
"""Log.TimeStamp() -> String""" """TimeStamp() -> String"""
return _misc_.Log_TimeStamp(*args, **kwargs) return _misc_.Log_TimeStamp(*args, **kwargs)
TimeStamp = staticmethod(TimeStamp) TimeStamp = staticmethod(TimeStamp)
@@ -1577,17 +1576,17 @@ class Process(_core.EvtHandler):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Kill(*args, **kwargs): def Kill(*args, **kwargs):
"""Process.Kill(int pid, int sig=SIGTERM) -> int""" """Kill(int pid, int sig=SIGTERM) -> int"""
return _misc_.Process_Kill(*args, **kwargs) return _misc_.Process_Kill(*args, **kwargs)
Kill = staticmethod(Kill) Kill = staticmethod(Kill)
def Exists(*args, **kwargs): def Exists(*args, **kwargs):
"""Process.Exists(int pid) -> bool""" """Exists(int pid) -> bool"""
return _misc_.Process_Exists(*args, **kwargs) return _misc_.Process_Exists(*args, **kwargs)
Exists = staticmethod(Exists) Exists = staticmethod(Exists)
def Open(*args, **kwargs): def Open(*args, **kwargs):
"""Process.Open(String cmd, int flags=EXEC_ASYNC) -> Process""" """Open(String cmd, int flags=EXEC_ASYNC) -> Process"""
return _misc_.Process_Open(*args, **kwargs) return _misc_.Process_Open(*args, **kwargs)
Open = staticmethod(Open) Open = staticmethod(Open)
@@ -2051,12 +2050,12 @@ class Sound(object):
return _misc_.Sound_Play(*args) return _misc_.Sound_Play(*args)
def PlaySound(*args): def PlaySound(*args):
"""Sound.PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool""" """PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool"""
return _misc_.Sound_PlaySound(*args) return _misc_.Sound_PlaySound(*args)
PlaySound = staticmethod(PlaySound) PlaySound = staticmethod(PlaySound)
def Stop(*args, **kwargs): def Stop(*args, **kwargs):
"""Sound.Stop()""" """Stop()"""
return _misc_.Sound_Stop(*args, **kwargs) return _misc_.Sound_Stop(*args, **kwargs)
Stop = staticmethod(Stop) Stop = staticmethod(Stop)
@@ -2225,7 +2224,7 @@ class FileType(object):
return _misc_.FileType_Unassociate(*args, **kwargs) return _misc_.FileType_Unassociate(*args, **kwargs)
def ExpandCommand(*args, **kwargs): def ExpandCommand(*args, **kwargs):
"""FileType.ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String""" """ExpandCommand(String command, String filename, String mimetype=EmptyString) -> String"""
return _misc_.FileType_ExpandCommand(*args, **kwargs) return _misc_.FileType_ExpandCommand(*args, **kwargs)
ExpandCommand = staticmethod(ExpandCommand) ExpandCommand = staticmethod(ExpandCommand)
@@ -2245,7 +2244,7 @@ class MimeTypesManager(object):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def IsOfType(*args, **kwargs): def IsOfType(*args, **kwargs):
"""MimeTypesManager.IsOfType(String mimeType, String wildcard) -> bool""" """IsOfType(String mimeType, String wildcard) -> bool"""
return _misc_.MimeTypesManager_IsOfType(*args, **kwargs) return _misc_.MimeTypesManager_IsOfType(*args, **kwargs)
IsOfType = staticmethod(IsOfType) IsOfType = staticmethod(IsOfType)
@@ -2317,10 +2316,173 @@ def MimeTypesManager_IsOfType(*args, **kwargs):
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class ArtProvider(object): class ArtProvider(object):
"""
The wx.ArtProvider class is used to customize the look of wxWidgets
application. When wxWidgets needs to display an icon or a bitmap (e.g.
in the standard file dialog), it does not use hard-coded resource but
asks wx.ArtProvider for it instead. This way the users can plug in
their own wx.ArtProvider class and easily replace standard art with
his/her own version. It is easy thing to do: all that is needed is
to derive a class from wx.ArtProvider, override it's CreateBitmap
method and register the provider with wx.ArtProvider.PushProvider::
class MyArtProvider(wx.ArtProvider):
def __init__(self):
wx.ArtProvider.__init__(self)
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 these
predefined values:
* 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 server 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_OTHER (used for all requests that don't fit into any
of the categories above)
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""__init__(self) -> ArtProvider""" """
__init__(self) -> ArtProvider
The wx.ArtProvider class is used to customize the look of wxWidgets
application. When wxWidgets needs to display an icon or a bitmap (e.g.
in the standard file dialog), it does not use hard-coded resource but
asks wx.ArtProvider for it instead. This way the users can plug in
their own wx.ArtProvider class and easily replace standard art with
his/her own version. It is easy thing to do: all that is needed is
to derive a class from wx.ArtProvider, override it's CreateBitmap
method and register the provider with wx.ArtProvider.PushProvider::
class MyArtProvider(wx.ArtProvider):
def __init__(self):
wx.ArtProvider.__init__(self)
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 these
predefined values:
* 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 server 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_OTHER (used for all requests that don't fit into any
of the categories above)
"""
newobj = _misc_.new_ArtProvider(*args, **kwargs) newobj = _misc_.new_ArtProvider(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
self.thisown = 1 self.thisown = 1
@@ -2333,7 +2495,7 @@ class ArtProvider(object):
def PushProvider(*args, **kwargs): def PushProvider(*args, **kwargs):
""" """
ArtProvider.PushProvider(ArtProvider provider) PushProvider(ArtProvider provider)
Add new provider to the top of providers stack. Add new provider to the top of providers stack.
""" """
@@ -2342,7 +2504,7 @@ class ArtProvider(object):
PushProvider = staticmethod(PushProvider) PushProvider = staticmethod(PushProvider)
def PopProvider(*args, **kwargs): def PopProvider(*args, **kwargs):
""" """
ArtProvider.PopProvider() -> bool PopProvider() -> bool
Remove latest added provider and delete it. Remove latest added provider and delete it.
""" """
@@ -2351,17 +2513,17 @@ class ArtProvider(object):
PopProvider = staticmethod(PopProvider) PopProvider = staticmethod(PopProvider)
def RemoveProvider(*args, **kwargs): def RemoveProvider(*args, **kwargs):
""" """
ArtProvider.RemoveProvider(ArtProvider provider) -> bool RemoveProvider(ArtProvider provider) -> bool
Remove provider. The provider must have been added previously! Remove provider. The provider must have been added previously! The
The provider is _not_ deleted. provider is _not_ deleted.
""" """
return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) return _misc_.ArtProvider_RemoveProvider(*args, **kwargs)
RemoveProvider = staticmethod(RemoveProvider) RemoveProvider = staticmethod(RemoveProvider)
def GetBitmap(*args, **kwargs): def GetBitmap(*args, **kwargs):
""" """
ArtProvider.GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap GetBitmap(String id, String client=ART_OTHER, Size size=DefaultSize) -> Bitmap
Query the providers for bitmap with given ID and return it. Return Query the providers for bitmap with given ID and return it. Return
wx.NullBitmap if no provider provides it. wx.NullBitmap if no provider provides it.
@@ -2371,9 +2533,9 @@ class ArtProvider(object):
GetBitmap = staticmethod(GetBitmap) GetBitmap = staticmethod(GetBitmap)
def GetIcon(*args, **kwargs): def GetIcon(*args, **kwargs):
""" """
ArtProvider.GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon
Query the providers for icon with given ID and return it. Return Query the providers for icon with given ID and return it. Return
wx.NullIcon if no provider provides it. wx.NullIcon if no provider provides it.
""" """
return _misc_.ArtProvider_GetIcon(*args, **kwargs) return _misc_.ArtProvider_GetIcon(*args, **kwargs)
@@ -2449,8 +2611,8 @@ def ArtProvider_RemoveProvider(*args, **kwargs):
""" """
ArtProvider_RemoveProvider(ArtProvider provider) -> bool ArtProvider_RemoveProvider(ArtProvider provider) -> bool
Remove provider. The provider must have been added previously! Remove provider. The provider must have been added previously! The
The provider is _not_ deleted. provider is _not_ deleted.
""" """
return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) return _misc_.ArtProvider_RemoveProvider(*args, **kwargs)
@@ -2467,7 +2629,7 @@ def ArtProvider_GetIcon(*args, **kwargs):
""" """
ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon ArtProvider_GetIcon(String id, String client=ART_OTHER, Size size=DefaultSize) -> Icon
Query the providers for icon with given ID and return it. Return Query the providers for icon with given ID and return it. Return
wx.NullIcon if no provider provides it. wx.NullIcon if no provider provides it.
""" """
return _misc_.ArtProvider_GetIcon(*args, **kwargs) return _misc_.ArtProvider_GetIcon(*args, **kwargs)
@@ -2516,7 +2678,7 @@ class ConfigBase(object):
Type_Float = _misc_.ConfigBase_Type_Float Type_Float = _misc_.ConfigBase_Type_Float
def Set(*args, **kwargs): def Set(*args, **kwargs):
""" """
ConfigBase.Set(ConfigBase config) -> ConfigBase Set(ConfigBase config) -> ConfigBase
Sets the global config object (the one returned by Get) and Sets the global config object (the one returned by Get) and
returns a reference to the previous global config object. returns a reference to the previous global config object.
@@ -2526,7 +2688,7 @@ class ConfigBase(object):
Set = staticmethod(Set) Set = staticmethod(Set)
def Get(*args, **kwargs): def Get(*args, **kwargs):
""" """
ConfigBase.Get(bool createOnDemand=True) -> ConfigBase Get(bool createOnDemand=True) -> ConfigBase
Returns the current global config object, creating one if neccessary. Returns the current global config object, creating one if neccessary.
""" """
@@ -2535,7 +2697,7 @@ class ConfigBase(object):
Get = staticmethod(Get) Get = staticmethod(Get)
def Create(*args, **kwargs): def Create(*args, **kwargs):
""" """
ConfigBase.Create() -> ConfigBase Create() -> ConfigBase
Create and return a new global config object. This function will Create and return a new global config object. This function will
create the "best" implementation of wx.Config available for the create the "best" implementation of wx.Config available for the
@@ -2546,7 +2708,7 @@ class ConfigBase(object):
Create = staticmethod(Create) Create = staticmethod(Create)
def DontCreateOnDemand(*args, **kwargs): def DontCreateOnDemand(*args, **kwargs):
""" """
ConfigBase.DontCreateOnDemand() DontCreateOnDemand()
Should Get() try to create a new log object if there isn't a current one? Should Get() try to create a new log object if there isn't a current one?
""" """
@@ -2777,7 +2939,7 @@ class ConfigBase(object):
DeleteAll(self) -> bool DeleteAll(self) -> bool
Delete the whole underlying object (disk file, registry key, ...) Delete the whole underlying object (disk file, registry key, ...)
primarly intended for use by desinstallation routine. primarly intended for use by deinstallation routine.
""" """
return _misc_.ConfigBase_DeleteAll(*args, **kwargs) return _misc_.ConfigBase_DeleteAll(*args, **kwargs)
@@ -3157,62 +3319,62 @@ class DateTime(object):
Monday_First = _misc_.DateTime_Monday_First Monday_First = _misc_.DateTime_Monday_First
Sunday_First = _misc_.DateTime_Sunday_First Sunday_First = _misc_.DateTime_Sunday_First
def SetCountry(*args, **kwargs): def SetCountry(*args, **kwargs):
"""DateTime.SetCountry(int country)""" """SetCountry(int country)"""
return _misc_.DateTime_SetCountry(*args, **kwargs) return _misc_.DateTime_SetCountry(*args, **kwargs)
SetCountry = staticmethod(SetCountry) SetCountry = staticmethod(SetCountry)
def GetCountry(*args, **kwargs): def GetCountry(*args, **kwargs):
"""DateTime.GetCountry() -> int""" """GetCountry() -> int"""
return _misc_.DateTime_GetCountry(*args, **kwargs) return _misc_.DateTime_GetCountry(*args, **kwargs)
GetCountry = staticmethod(GetCountry) GetCountry = staticmethod(GetCountry)
def IsWestEuropeanCountry(*args, **kwargs): def IsWestEuropeanCountry(*args, **kwargs):
"""DateTime.IsWestEuropeanCountry(int country=Country_Default) -> bool""" """IsWestEuropeanCountry(int country=Country_Default) -> bool"""
return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs) return _misc_.DateTime_IsWestEuropeanCountry(*args, **kwargs)
IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry) IsWestEuropeanCountry = staticmethod(IsWestEuropeanCountry)
def GetCurrentYear(*args, **kwargs): def GetCurrentYear(*args, **kwargs):
"""DateTime.GetCurrentYear(int cal=Gregorian) -> int""" """GetCurrentYear(int cal=Gregorian) -> int"""
return _misc_.DateTime_GetCurrentYear(*args, **kwargs) return _misc_.DateTime_GetCurrentYear(*args, **kwargs)
GetCurrentYear = staticmethod(GetCurrentYear) GetCurrentYear = staticmethod(GetCurrentYear)
def ConvertYearToBC(*args, **kwargs): def ConvertYearToBC(*args, **kwargs):
"""DateTime.ConvertYearToBC(int year) -> int""" """ConvertYearToBC(int year) -> int"""
return _misc_.DateTime_ConvertYearToBC(*args, **kwargs) return _misc_.DateTime_ConvertYearToBC(*args, **kwargs)
ConvertYearToBC = staticmethod(ConvertYearToBC) ConvertYearToBC = staticmethod(ConvertYearToBC)
def GetCurrentMonth(*args, **kwargs): def GetCurrentMonth(*args, **kwargs):
"""DateTime.GetCurrentMonth(int cal=Gregorian) -> int""" """GetCurrentMonth(int cal=Gregorian) -> int"""
return _misc_.DateTime_GetCurrentMonth(*args, **kwargs) return _misc_.DateTime_GetCurrentMonth(*args, **kwargs)
GetCurrentMonth = staticmethod(GetCurrentMonth) GetCurrentMonth = staticmethod(GetCurrentMonth)
def IsLeapYear(*args, **kwargs): def IsLeapYear(*args, **kwargs):
"""DateTime.IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool""" """IsLeapYear(int year=Inv_Year, int cal=Gregorian) -> bool"""
return _misc_.DateTime_IsLeapYear(*args, **kwargs) return _misc_.DateTime_IsLeapYear(*args, **kwargs)
IsLeapYear = staticmethod(IsLeapYear) IsLeapYear = staticmethod(IsLeapYear)
def GetCentury(*args, **kwargs): def GetCentury(*args, **kwargs):
"""DateTime.GetCentury(int year=Inv_Year) -> int""" """GetCentury(int year=Inv_Year) -> int"""
return _misc_.DateTime_GetCentury(*args, **kwargs) return _misc_.DateTime_GetCentury(*args, **kwargs)
GetCentury = staticmethod(GetCentury) GetCentury = staticmethod(GetCentury)
def GetNumberOfDaysinYear(*args, **kwargs): def GetNumberOfDaysinYear(*args, **kwargs):
"""DateTime.GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int""" """GetNumberOfDaysinYear(int year, int cal=Gregorian) -> int"""
return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs) return _misc_.DateTime_GetNumberOfDaysinYear(*args, **kwargs)
GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear) GetNumberOfDaysinYear = staticmethod(GetNumberOfDaysinYear)
def GetNumberOfDaysInMonth(*args, **kwargs): def GetNumberOfDaysInMonth(*args, **kwargs):
"""DateTime.GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int""" """GetNumberOfDaysInMonth(int month, int year=Inv_Year, int cal=Gregorian) -> int"""
return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs) return _misc_.DateTime_GetNumberOfDaysInMonth(*args, **kwargs)
GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth) GetNumberOfDaysInMonth = staticmethod(GetNumberOfDaysInMonth)
def GetMonthName(*args, **kwargs): def GetMonthName(*args, **kwargs):
"""DateTime.GetMonthName(int month, int flags=Name_Full) -> String""" """GetMonthName(int month, int flags=Name_Full) -> String"""
return _misc_.DateTime_GetMonthName(*args, **kwargs) return _misc_.DateTime_GetMonthName(*args, **kwargs)
GetMonthName = staticmethod(GetMonthName) GetMonthName = staticmethod(GetMonthName)
def GetWeekDayName(*args, **kwargs): def GetWeekDayName(*args, **kwargs):
"""DateTime.GetWeekDayName(int weekday, int flags=Name_Full) -> String""" """GetWeekDayName(int weekday, int flags=Name_Full) -> String"""
return _misc_.DateTime_GetWeekDayName(*args, **kwargs) return _misc_.DateTime_GetWeekDayName(*args, **kwargs)
GetWeekDayName = staticmethod(GetWeekDayName) GetWeekDayName = staticmethod(GetWeekDayName)
@@ -3226,32 +3388,32 @@ class DateTime(object):
GetAmPmStrings = staticmethod(GetAmPmStrings) GetAmPmStrings = staticmethod(GetAmPmStrings)
def IsDSTApplicable(*args, **kwargs): def IsDSTApplicable(*args, **kwargs):
"""DateTime.IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool""" """IsDSTApplicable(int year=Inv_Year, int country=Country_Default) -> bool"""
return _misc_.DateTime_IsDSTApplicable(*args, **kwargs) return _misc_.DateTime_IsDSTApplicable(*args, **kwargs)
IsDSTApplicable = staticmethod(IsDSTApplicable) IsDSTApplicable = staticmethod(IsDSTApplicable)
def GetBeginDST(*args, **kwargs): def GetBeginDST(*args, **kwargs):
"""DateTime.GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" """GetBeginDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
return _misc_.DateTime_GetBeginDST(*args, **kwargs) return _misc_.DateTime_GetBeginDST(*args, **kwargs)
GetBeginDST = staticmethod(GetBeginDST) GetBeginDST = staticmethod(GetBeginDST)
def GetEndDST(*args, **kwargs): def GetEndDST(*args, **kwargs):
"""DateTime.GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime""" """GetEndDST(int year=Inv_Year, int country=Country_Default) -> DateTime"""
return _misc_.DateTime_GetEndDST(*args, **kwargs) return _misc_.DateTime_GetEndDST(*args, **kwargs)
GetEndDST = staticmethod(GetEndDST) GetEndDST = staticmethod(GetEndDST)
def Now(*args, **kwargs): def Now(*args, **kwargs):
"""DateTime.Now() -> DateTime""" """Now() -> DateTime"""
return _misc_.DateTime_Now(*args, **kwargs) return _misc_.DateTime_Now(*args, **kwargs)
Now = staticmethod(Now) Now = staticmethod(Now)
def UNow(*args, **kwargs): def UNow(*args, **kwargs):
"""DateTime.UNow() -> DateTime""" """UNow() -> DateTime"""
return _misc_.DateTime_UNow(*args, **kwargs) return _misc_.DateTime_UNow(*args, **kwargs)
UNow = staticmethod(UNow) UNow = staticmethod(UNow)
def Today(*args, **kwargs): def Today(*args, **kwargs):
"""DateTime.Today() -> DateTime""" """Today() -> DateTime"""
return _misc_.DateTime_Today(*args, **kwargs) return _misc_.DateTime_Today(*args, **kwargs)
Today = staticmethod(Today) Today = staticmethod(Today)
@@ -3757,52 +3919,52 @@ class TimeSpan(object):
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Seconds(*args, **kwargs): def Seconds(*args, **kwargs):
"""TimeSpan.Seconds(long sec) -> TimeSpan""" """Seconds(long sec) -> TimeSpan"""
return _misc_.TimeSpan_Seconds(*args, **kwargs) return _misc_.TimeSpan_Seconds(*args, **kwargs)
Seconds = staticmethod(Seconds) Seconds = staticmethod(Seconds)
def Second(*args, **kwargs): def Second(*args, **kwargs):
"""TimeSpan.Second() -> TimeSpan""" """Second() -> TimeSpan"""
return _misc_.TimeSpan_Second(*args, **kwargs) return _misc_.TimeSpan_Second(*args, **kwargs)
Second = staticmethod(Second) Second = staticmethod(Second)
def Minutes(*args, **kwargs): def Minutes(*args, **kwargs):
"""TimeSpan.Minutes(long min) -> TimeSpan""" """Minutes(long min) -> TimeSpan"""
return _misc_.TimeSpan_Minutes(*args, **kwargs) return _misc_.TimeSpan_Minutes(*args, **kwargs)
Minutes = staticmethod(Minutes) Minutes = staticmethod(Minutes)
def Minute(*args, **kwargs): def Minute(*args, **kwargs):
"""TimeSpan.Minute() -> TimeSpan""" """Minute() -> TimeSpan"""
return _misc_.TimeSpan_Minute(*args, **kwargs) return _misc_.TimeSpan_Minute(*args, **kwargs)
Minute = staticmethod(Minute) Minute = staticmethod(Minute)
def Hours(*args, **kwargs): def Hours(*args, **kwargs):
"""TimeSpan.Hours(long hours) -> TimeSpan""" """Hours(long hours) -> TimeSpan"""
return _misc_.TimeSpan_Hours(*args, **kwargs) return _misc_.TimeSpan_Hours(*args, **kwargs)
Hours = staticmethod(Hours) Hours = staticmethod(Hours)
def Hour(*args, **kwargs): def Hour(*args, **kwargs):
"""TimeSpan.Hour() -> TimeSpan""" """Hour() -> TimeSpan"""
return _misc_.TimeSpan_Hour(*args, **kwargs) return _misc_.TimeSpan_Hour(*args, **kwargs)
Hour = staticmethod(Hour) Hour = staticmethod(Hour)
def Days(*args, **kwargs): def Days(*args, **kwargs):
"""TimeSpan.Days(long days) -> TimeSpan""" """Days(long days) -> TimeSpan"""
return _misc_.TimeSpan_Days(*args, **kwargs) return _misc_.TimeSpan_Days(*args, **kwargs)
Days = staticmethod(Days) Days = staticmethod(Days)
def Day(*args, **kwargs): def Day(*args, **kwargs):
"""TimeSpan.Day() -> TimeSpan""" """Day() -> TimeSpan"""
return _misc_.TimeSpan_Day(*args, **kwargs) return _misc_.TimeSpan_Day(*args, **kwargs)
Day = staticmethod(Day) Day = staticmethod(Day)
def Weeks(*args, **kwargs): def Weeks(*args, **kwargs):
"""TimeSpan.Weeks(long days) -> TimeSpan""" """Weeks(long days) -> TimeSpan"""
return _misc_.TimeSpan_Weeks(*args, **kwargs) return _misc_.TimeSpan_Weeks(*args, **kwargs)
Weeks = staticmethod(Weeks) Weeks = staticmethod(Weeks)
def Week(*args, **kwargs): def Week(*args, **kwargs):
"""TimeSpan.Week() -> TimeSpan""" """Week() -> TimeSpan"""
return _misc_.TimeSpan_Week(*args, **kwargs) return _misc_.TimeSpan_Week(*args, **kwargs)
Week = staticmethod(Week) Week = staticmethod(Week)
@@ -4015,42 +4177,42 @@ class DateSpan(object):
except: pass except: pass
def Days(*args, **kwargs): def Days(*args, **kwargs):
"""DateSpan.Days(int days) -> DateSpan""" """Days(int days) -> DateSpan"""
return _misc_.DateSpan_Days(*args, **kwargs) return _misc_.DateSpan_Days(*args, **kwargs)
Days = staticmethod(Days) Days = staticmethod(Days)
def Day(*args, **kwargs): def Day(*args, **kwargs):
"""DateSpan.Day() -> DateSpan""" """Day() -> DateSpan"""
return _misc_.DateSpan_Day(*args, **kwargs) return _misc_.DateSpan_Day(*args, **kwargs)
Day = staticmethod(Day) Day = staticmethod(Day)
def Weeks(*args, **kwargs): def Weeks(*args, **kwargs):
"""DateSpan.Weeks(int weeks) -> DateSpan""" """Weeks(int weeks) -> DateSpan"""
return _misc_.DateSpan_Weeks(*args, **kwargs) return _misc_.DateSpan_Weeks(*args, **kwargs)
Weeks = staticmethod(Weeks) Weeks = staticmethod(Weeks)
def Week(*args, **kwargs): def Week(*args, **kwargs):
"""DateSpan.Week() -> DateSpan""" """Week() -> DateSpan"""
return _misc_.DateSpan_Week(*args, **kwargs) return _misc_.DateSpan_Week(*args, **kwargs)
Week = staticmethod(Week) Week = staticmethod(Week)
def Months(*args, **kwargs): def Months(*args, **kwargs):
"""DateSpan.Months(int mon) -> DateSpan""" """Months(int mon) -> DateSpan"""
return _misc_.DateSpan_Months(*args, **kwargs) return _misc_.DateSpan_Months(*args, **kwargs)
Months = staticmethod(Months) Months = staticmethod(Months)
def Month(*args, **kwargs): def Month(*args, **kwargs):
"""DateSpan.Month() -> DateSpan""" """Month() -> DateSpan"""
return _misc_.DateSpan_Month(*args, **kwargs) return _misc_.DateSpan_Month(*args, **kwargs)
Month = staticmethod(Month) Month = staticmethod(Month)
def Years(*args, **kwargs): def Years(*args, **kwargs):
"""DateSpan.Years(int years) -> DateSpan""" """Years(int years) -> DateSpan"""
return _misc_.DateSpan_Years(*args, **kwargs) return _misc_.DateSpan_Years(*args, **kwargs)
Years = staticmethod(Years) Years = staticmethod(Years)
def Year(*args, **kwargs): def Year(*args, **kwargs):
"""DateSpan.Year() -> DateSpan""" """Year() -> DateSpan"""
return _misc_.DateSpan_Year(*args, **kwargs) return _misc_.DateSpan_Year(*args, **kwargs)
Year = staticmethod(Year) Year = staticmethod(Year)
@@ -4853,15 +5015,19 @@ _misc_.FileDropTarget_swigregister(FileDropTargetPtr)
class Clipboard(_core.Object): class Clipboard(_core.Object):
""" """
wx.Clipboard represents the system clipboard and provides methods to copy data wx.Clipboard represents the system clipboard and provides methods to
to or paste data from it. Normally, you should only use wx.TheClipboard which copy data to it or paste data from it. Normally, you should only use
is a reference to a global wx.Clipboard instance. ``wx.TheClipboard`` which is a reference to a global wx.Clipboard
instance.
Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation Call ``wx.TheClipboard``'s `Open` method to get ownership of the
returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put clipboard. If this operation returns True, you now own the
data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the clipboard. Call `SetData` to put data on the clipboard, or `GetData`
clipboard. Call wx.TheClipboard.Close to close the clipboard and relinquish to retrieve data from the clipboard. Call `Close` to close the
ownership. You should keep the clipboard open only momentarily. clipboard and relinquish ownership. You should keep the clipboard open
only momentarily.
:see: `wx.DataObject`
""" """
def __repr__(self): def __repr__(self):
@@ -4882,10 +5048,10 @@ class Clipboard(_core.Object):
""" """
Open(self) -> bool Open(self) -> bool
Call this function to open the clipboard before calling SetData Call this function to open the clipboard before calling SetData and
and GetData. Call Close when you have finished with the clipboard. GetData. Call Close when you have finished with the clipboard. You
You should keep the clipboard open for only a very short time. should keep the clipboard open for only a very short time. Returns
Returns true on success. True on success.
""" """
return _misc_.Clipboard_Open(*args, **kwargs) return _misc_.Clipboard_Open(*args, **kwargs)
@@ -4909,10 +5075,12 @@ class Clipboard(_core.Object):
""" """
AddData(self, DataObject data) -> bool AddData(self, DataObject data) -> bool
Call this function to add the data object to the clipboard. You Call this function to add the data object to the clipboard. You may
may call this function repeatedly after having cleared the clipboard. call this function repeatedly after having cleared the clipboard.
After this function has been called, the clipboard owns the data, so After this function has been called, the clipboard owns the data, so
do not delete the data explicitly. do not delete the data explicitly.
:see: `wx.DataObject`
""" """
return _misc_.Clipboard_AddData(*args, **kwargs) return _misc_.Clipboard_AddData(*args, **kwargs)
@@ -4920,7 +5088,10 @@ class Clipboard(_core.Object):
""" """
SetData(self, DataObject data) -> bool SetData(self, DataObject data) -> bool
Set the clipboard data, this is the same as Clear followed by AddData. Set the clipboard data, this is the same as `Clear` followed by
`AddData`.
:see: `wx.DataObject`
""" """
return _misc_.Clipboard_SetData(*args, **kwargs) return _misc_.Clipboard_SetData(*args, **kwargs)
@@ -4937,8 +5108,8 @@ class Clipboard(_core.Object):
""" """
GetData(self, DataObject data) -> bool GetData(self, DataObject data) -> bool
Call this function to fill data with data on the clipboard, if available Call this function to fill data with data on the clipboard, if
in the required format. Returns true on success. available in the required format. Returns true on success.
""" """
return _misc_.Clipboard_GetData(*args, **kwargs) return _misc_.Clipboard_GetData(*args, **kwargs)
@@ -4946,7 +5117,7 @@ class Clipboard(_core.Object):
""" """
Clear(self) Clear(self)
Clears data from the clipboard object and also the system's clipboard Clears data from the clipboard object and also the system's clipboard
if possible. if possible.
""" """
return _misc_.Clipboard_Clear(*args, **kwargs) return _misc_.Clipboard_Clear(*args, **kwargs)
@@ -4956,9 +5127,9 @@ class Clipboard(_core.Object):
Flush(self) -> bool Flush(self) -> bool
Flushes the clipboard: this means that the data which is currently on Flushes the clipboard: this means that the data which is currently on
clipboard will stay available even after the application exits (possibly clipboard will stay available even after the application exits,
eating memory), otherwise the clipboard will be emptied on exit. possibly eating memory, otherwise the clipboard will be emptied on
Returns False if the operation is unsuccesful for any reason. exit. Returns False if the operation is unsuccesful for any reason.
""" """
return _misc_.Clipboard_Flush(*args, **kwargs) return _misc_.Clipboard_Flush(*args, **kwargs)
@@ -4966,9 +5137,9 @@ class Clipboard(_core.Object):
""" """
UsePrimarySelection(self, bool primary=True) UsePrimarySelection(self, bool primary=True)
On platforms supporting it (the X11 based platforms), selects the so On platforms supporting it (the X11 based platforms), selects the
called PRIMARY SELECTION as the clipboard as opposed to the normal so called PRIMARY SELECTION as the clipboard as opposed to the
clipboard, if primary is True. normal clipboard, if primary is True.
""" """
return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs) return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs)
@@ -4982,8 +5153,8 @@ _misc_.Clipboard_swigregister(ClipboardPtr)
class ClipboardLocker(object): class ClipboardLocker(object):
""" """
A helpful class for opening the clipboard and automatically closing it when A helpful class for opening the clipboard and automatically
the locker is destroyed. closing it when the locker is destroyed.
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -4991,8 +5162,8 @@ class ClipboardLocker(object):
""" """
__init__(self, Clipboard clipboard=None) -> ClipboardLocker __init__(self, Clipboard clipboard=None) -> ClipboardLocker
A helpful class for opening the clipboard and automatically closing it when A helpful class for opening the clipboard and automatically
the locker is destroyed. closing it when the locker is destroyed.
""" """
newobj = _misc_.new_ClipboardLocker(*args, **kwargs) newobj = _misc_.new_ClipboardLocker(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -5134,7 +5305,7 @@ class Display(object):
def GetCount(*args, **kwargs): def GetCount(*args, **kwargs):
""" """
Display.GetCount() -> size_t GetCount() -> size_t
Return the number of available displays. Return the number of available displays.
""" """
@@ -5143,7 +5314,7 @@ class Display(object):
GetCount = staticmethod(GetCount) GetCount = staticmethod(GetCount)
def GetFromPoint(*args, **kwargs): def GetFromPoint(*args, **kwargs):
""" """
Display.GetFromPoint(Point pt) -> int GetFromPoint(Point pt) -> int
Find the display where the given point lies, return wx.NOT_FOUND Find the display where the given point lies, return wx.NOT_FOUND
if it doesn't belong to any display if it doesn't belong to any display
@@ -5153,7 +5324,7 @@ class Display(object):
GetFromPoint = staticmethod(GetFromPoint) GetFromPoint = staticmethod(GetFromPoint)
def GetFromWindow(*args, **kwargs): def GetFromWindow(*args, **kwargs):
""" """
Display.GetFromWindow(Window window) -> int GetFromWindow(Window window) -> int
Find the display where the given window lies, return wx.NOT_FOUND Find the display where the given window lies, return wx.NOT_FOUND
if it is not shown at all. if it is not shown at all.

View File

@@ -5,7 +5,6 @@ import _windows_
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class Panel(_core.Window): class Panel(_core.Window):
@@ -1937,7 +1936,11 @@ EVT_TASKBAR_RIGHT_DCLICK = wx.PyEventBinder ( wxEVT_TASKBAR_RIGHT_DCLICK )
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
class ColourData(_core.Object): class ColourData(_core.Object):
"""This class holds a variety of information related to colour dialogs.""" """
This class holds a variety of information related to the colour
chooser dialog. This class is used to transfer settings and results
to and from the `wx.ColourDialog`.
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxColourData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxColourData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -1960,9 +1963,9 @@ class ColourData(_core.Object):
""" """
GetChooseFull(self) -> bool GetChooseFull(self) -> bool
Under Windows, determines whether the Windows colour dialog will display Under Windows, determines whether the Windows colour dialog will
the full dialog with custom colour selection controls. Has no meaning display the full dialog with custom colour selection controls. Has no
under other platforms. The default value is true. meaning under other platforms. The default value is true.
""" """
return _windows_.ColourData_GetChooseFull(*args, **kwargs) return _windows_.ColourData_GetChooseFull(*args, **kwargs)
@@ -1978,8 +1981,9 @@ class ColourData(_core.Object):
""" """
GetCustomColour(self, int i) -> Colour GetCustomColour(self, int i) -> Colour
Gets the i'th custom colour associated with the colour dialog. i should Gets the i'th custom colour associated with the colour dialog. i
be an integer between 0 and 15. The default custom colours are all white. should be an integer between 0 and 15. The default custom colours are
all white.
""" """
return _windows_.ColourData_GetCustomColour(*args, **kwargs) return _windows_.ColourData_GetCustomColour(*args, **kwargs)
@@ -1987,9 +1991,9 @@ class ColourData(_core.Object):
""" """
SetChooseFull(self, int flag) SetChooseFull(self, int flag)
Under Windows, tells the Windows colour dialog to display the full dialog Under Windows, tells the Windows colour dialog to display the full
with custom colour selection controls. Under other platforms, has no effect. dialog with custom colour selection controls. Under other platforms,
The default value is true. has no effect. The default value is true.
""" """
return _windows_.ColourData_SetChooseFull(*args, **kwargs) return _windows_.ColourData_SetChooseFull(*args, **kwargs)
@@ -1997,7 +2001,8 @@ class ColourData(_core.Object):
""" """
SetColour(self, Colour colour) SetColour(self, Colour colour)
Sets the default colour for the colour dialog. The default colour is black. Sets the default colour for the colour dialog. The default colour is
black.
""" """
return _windows_.ColourData_SetColour(*args, **kwargs) return _windows_.ColourData_SetColour(*args, **kwargs)
@@ -2005,8 +2010,8 @@ class ColourData(_core.Object):
""" """
SetCustomColour(self, int i, Colour colour) SetCustomColour(self, int i, Colour colour)
Sets the i'th custom colour for the colour dialog. i should be an integer Sets the i'th custom colour for the colour dialog. i should be an
between 0 and 15. The default custom colours are all white. integer between 0 and 15. The default custom colours are all white.
""" """
return _windows_.ColourData_SetCustomColour(*args, **kwargs) return _windows_.ColourData_SetCustomColour(*args, **kwargs)
@@ -2032,8 +2037,9 @@ class ColourDialog(Dialog):
""" """
__init__(self, Window parent, ColourData data=None) -> ColourDialog __init__(self, Window parent, ColourData data=None) -> ColourDialog
Constructor. Pass a parent window, and optionally a ColourData, which Constructor. Pass a parent window, and optionally a `wx.ColourData`,
will be copied to the colour dialog's internal ColourData instance. which will be copied to the colour dialog's internal ColourData
instance.
""" """
newobj = _windows_.new_ColourDialog(*args, **kwargs) newobj = _windows_.new_ColourDialog(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -2045,7 +2051,7 @@ class ColourDialog(Dialog):
""" """
GetColourData(self) -> ColourData GetColourData(self) -> ColourData
Returns a reference to the ColourData used by the dialog. Returns a reference to the `wx.ColourData` used by the dialog.
""" """
return _windows_.ColourDialog_GetColourData(*args, **kwargs) return _windows_.ColourDialog_GetColourData(*args, **kwargs)
@@ -2058,7 +2064,21 @@ class ColourDialogPtr(ColourDialog):
_windows_.ColourDialog_swigregister(ColourDialogPtr) _windows_.ColourDialog_swigregister(ColourDialogPtr)
class DirDialog(Dialog): class DirDialog(Dialog):
"""This class represents the directory chooser dialog.""" """
wx.DirDialog allows the user to select a directory by browising the
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.
==================== ==========================================
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -2125,7 +2145,49 @@ class DirDialogPtr(DirDialog):
_windows_.DirDialog_swigregister(DirDialogPtr) _windows_.DirDialog_swigregister(DirDialogPtr)
class FileDialog(Dialog): class FileDialog(Dialog):
"""This class represents the file chooser dialog.""" """
wx.FileDialog allows the user to select one or more files from the
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.
================== ==========================================
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -2155,8 +2217,8 @@ class FileDialog(Dialog):
""" """
SetPath(self, String path) SetPath(self, String path)
Sets the path (the combined directory and filename that will Sets the path (the combined directory and filename that will be
be returned when the dialog is dismissed). returned when the dialog is dismissed).
""" """
return _windows_.FileDialog_SetPath(*args, **kwargs) return _windows_.FileDialog_SetPath(*args, **kwargs)
@@ -2180,8 +2242,11 @@ class FileDialog(Dialog):
""" """
SetWildcard(self, String wildCard) SetWildcard(self, String wildCard)
Sets the wildcard, which can contain multiple file types, for example: Sets the wildcard, which can contain multiple file types, for
example::
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
""" """
return _windows_.FileDialog_SetWildcard(*args, **kwargs) return _windows_.FileDialog_SetWildcard(*args, **kwargs)
@@ -2255,8 +2320,8 @@ class FileDialog(Dialog):
Returns the index into the list of filters supplied, optionally, in Returns the index into the list of filters supplied, optionally, in
the wildcard parameter. Before the dialog is shown, this is the index the wildcard parameter. Before the dialog is shown, this is the index
which will be used when the dialog is first displayed. After the dialog which will be used when the dialog is first displayed. After the
is shown, this is the index selected by the user. dialog is shown, this is the index selected by the user.
""" """
return _windows_.FileDialog_GetFilterIndex(*args, **kwargs) return _windows_.FileDialog_GetFilterIndex(*args, **kwargs)
@@ -2264,8 +2329,8 @@ class FileDialog(Dialog):
""" """
GetFilenames(self) -> PyObject GetFilenames(self) -> PyObject
Returns a list of filenames chosen in the dialog. This function should Returns a list of filenames chosen in the dialog. This function
only be used with the dialogs which have wx.MULTIPLE style, use should only be used with the dialogs which have wx.MULTIPLE style, use
GetFilename for the others. GetFilename for the others.
""" """
return _windows_.FileDialog_GetFilenames(*args, **kwargs) return _windows_.FileDialog_GetFilenames(*args, **kwargs)
@@ -2275,8 +2340,8 @@ class FileDialog(Dialog):
GetPaths(self) -> PyObject GetPaths(self) -> PyObject
Fills the array paths with the full paths of the files chosen. This Fills the array paths with the full paths of the files chosen. This
function should only be used with the dialogs which have wx.MULTIPLE style, function should only be used with the dialogs which have wx.MULTIPLE
use GetPath for the others. style, use GetPath for the others.
""" """
return _windows_.FileDialog_GetPaths(*args, **kwargs) return _windows_.FileDialog_GetPaths(*args, **kwargs)
@@ -2311,7 +2376,8 @@ class MultiChoiceDialog(Dialog):
""" """
SetSelections(List selections) SetSelections(List selections)
Specify the items in the list that shoudl be selected, using a list of integers. Specify the items in the list that should be selected, using a list of
integers.
""" """
return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs) return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs)
@@ -2425,14 +2491,18 @@ class TextEntryDialogPtr(TextEntryDialog):
_windows_.TextEntryDialog_swigregister(TextEntryDialogPtr) _windows_.TextEntryDialog_swigregister(TextEntryDialogPtr)
class FontData(_core.Object): class FontData(_core.Object):
"""This class holds a variety of information related to font dialogs.""" """
This class holds a variety of information related to font dialogs and
is used to transfer settings to and results from a `wx.FontDialog`.
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxFontData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxFontData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """
__init__(self) -> FontData __init__(self) -> FontData
This class holds a variety of information related to font dialogs. This class holds a variety of information related to font dialogs and
is used to transfer settings to and results from a `wx.FontDialog`.
""" """
newobj = _windows_.new_FontData(*args, **kwargs) newobj = _windows_.new_FontData(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -2448,8 +2518,8 @@ class FontData(_core.Object):
""" """
EnableEffects(self, bool enable) EnableEffects(self, bool enable)
Enables or disables 'effects' under MS Windows only. This refers Enables or disables 'effects' under MS Windows only. This refers to
to the controls for manipulating colour, strikeout and underline the controls for manipulating colour, strikeout and underline
properties. The default value is true. properties. The default value is true.
""" """
return _windows_.FontData_EnableEffects(*args, **kwargs) return _windows_.FontData_EnableEffects(*args, **kwargs)
@@ -2458,8 +2528,9 @@ class FontData(_core.Object):
""" """
GetAllowSymbols(self) -> bool GetAllowSymbols(self) -> bool
Under MS Windows, returns a flag determining whether symbol fonts can be Under MS Windows, returns a flag determining whether symbol fonts can
selected. Has no effect on other platforms. The default value is true. be selected. Has no effect on other platforms. The default value is
true.
""" """
return _windows_.FontData_GetAllowSymbols(*args, **kwargs) return _windows_.FontData_GetAllowSymbols(*args, **kwargs)
@@ -2467,7 +2538,8 @@ class FontData(_core.Object):
""" """
GetColour(self) -> Colour GetColour(self) -> Colour
Gets the colour associated with the font dialog. The default value is black. Gets the colour associated with the font dialog. The default value is
black.
""" """
return _windows_.FontData_GetColour(*args, **kwargs) return _windows_.FontData_GetColour(*args, **kwargs)
@@ -2491,8 +2563,8 @@ class FontData(_core.Object):
""" """
GetInitialFont(self) -> Font GetInitialFont(self) -> Font
Gets the font that will be initially used by the font dialog. This should have Gets the font that will be initially used by the font dialog. This
previously been set by the application. should have previously been set by the application.
""" """
return _windows_.FontData_GetInitialFont(*args, **kwargs) return _windows_.FontData_GetInitialFont(*args, **kwargs)
@@ -2500,8 +2572,8 @@ class FontData(_core.Object):
""" """
GetShowHelp(self) -> bool GetShowHelp(self) -> bool
Returns true if the Help button will be shown (Windows only). The default Returns true if the Help button will be shown (Windows only). The
value is false. default value is false.
""" """
return _windows_.FontData_GetShowHelp(*args, **kwargs) return _windows_.FontData_GetShowHelp(*args, **kwargs)
@@ -2509,8 +2581,8 @@ class FontData(_core.Object):
""" """
SetAllowSymbols(self, bool allowSymbols) SetAllowSymbols(self, bool allowSymbols)
Under MS Windows, determines whether symbol fonts can be selected. Has no Under MS Windows, determines whether symbol fonts can be selected. Has
effect on other platforms. The default value is true. no effect on other platforms. The default value is true.
""" """
return _windows_.FontData_SetAllowSymbols(*args, **kwargs) return _windows_.FontData_SetAllowSymbols(*args, **kwargs)
@@ -2518,7 +2590,8 @@ class FontData(_core.Object):
""" """
SetChosenFont(self, Font font) SetChosenFont(self, Font font)
Sets the font that will be returned to the user (for internal use only). Sets the font that will be returned to the user (normally for internal
use only).
""" """
return _windows_.FontData_SetChosenFont(*args, **kwargs) return _windows_.FontData_SetChosenFont(*args, **kwargs)
@@ -2526,8 +2599,8 @@ class FontData(_core.Object):
""" """
SetColour(self, Colour colour) SetColour(self, Colour colour)
Sets the colour that will be used for the font foreground colour. The default Sets the colour that will be used for the font foreground colour. The
colour is black. default colour is black.
""" """
return _windows_.FontData_SetColour(*args, **kwargs) return _windows_.FontData_SetColour(*args, **kwargs)
@@ -2543,8 +2616,8 @@ class FontData(_core.Object):
""" """
SetRange(self, int min, int max) SetRange(self, int min, int max)
Sets the valid range for the font point size (Windows only). The default is Sets the valid range for the font point size (Windows only). The
0, 0 (unrestricted range). default is 0, 0 (unrestricted range).
""" """
return _windows_.FontData_SetRange(*args, **kwargs) return _windows_.FontData_SetRange(*args, **kwargs)
@@ -2552,8 +2625,8 @@ class FontData(_core.Object):
""" """
SetShowHelp(self, bool showHelp) SetShowHelp(self, bool showHelp)
Determines whether the Help button will be displayed in the font dialog Determines whether the Help button will be displayed in the font
(Windows only). The default value is false. dialog (Windows only). The default value is false.
""" """
return _windows_.FontData_SetShowHelp(*args, **kwargs) return _windows_.FontData_SetShowHelp(*args, **kwargs)
@@ -2566,15 +2639,22 @@ class FontDataPtr(FontData):
_windows_.FontData_swigregister(FontDataPtr) _windows_.FontData_swigregister(FontDataPtr)
class FontDialog(Dialog): class FontDialog(Dialog):
"""This class represents the font chooser dialog.""" """
wx.FontDialog allows the user to select a system font and its attributes.
:see: `wx.FontData`
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxFontDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxFontDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """
__init__(self, Window parent, FontData data) -> FontDialog __init__(self, Window parent, FontData data) -> FontDialog
Constructor. Pass a parent window and the FontData object to be Constructor. Pass a parent window and the `wx.FontData` object to be
used to initialize the dialog controls. used to initialize the dialog controls. Call `ShowModal` to display
the dialog. If ShowModal returns ``wx.ID_OK`` then you can fetch the
results with via the `wx.FontData` returned by `GetFontData`.
""" """
newobj = _windows_.new_FontDialog(*args, **kwargs) newobj = _windows_.new_FontDialog(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -2586,7 +2666,8 @@ class FontDialog(Dialog):
""" """
GetFontData(self) -> FontData GetFontData(self) -> FontData
Returns a reference to the internal FontData used by the FontDialog. Returns a reference to the internal `wx.FontData` used by the
wx.FontDialog.
""" """
return _windows_.FontDialog_GetFontData(*args, **kwargs) return _windows_.FontDialog_GetFontData(*args, **kwargs)
@@ -2600,8 +2681,29 @@ _windows_.FontDialog_swigregister(FontDialogPtr)
class MessageDialog(Dialog): class MessageDialog(Dialog):
""" """
This class provides a dialog that shows a single or multi-line message, with This class provides a simple dialog that shows a single or multi-line
a choice of OK, Yes, No and Cancel buttons. 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).
================= =============================================
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxMessageDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxMessageDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -2611,8 +2713,7 @@ class MessageDialog(Dialog):
long style=wxOK|wxCANCEL|wxCENTRE, long style=wxOK|wxCANCEL|wxCENTRE,
Point pos=DefaultPosition) -> MessageDialog Point pos=DefaultPosition) -> MessageDialog
This class provides a dialog that shows a single or multi-line message, with Constructor, use `ShowModal` to display the dialog.
a choice of OK, Yes, No and Cancel buttons.
""" """
newobj = _windows_.new_MessageDialog(*args, **kwargs) newobj = _windows_.new_MessageDialog(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -2630,8 +2731,36 @@ _windows_.MessageDialog_swigregister(MessageDialogPtr)
class ProgressDialog(Frame): class ProgressDialog(Frame):
""" """
A dialog that shows a short message and a progress bar. Optionally, it can A dialog that shows a short message and a progress bar. Optionally, it
display an ABORT button. 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.
================= =============================================
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxProgressDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxProgressDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -2640,8 +2769,9 @@ class ProgressDialog(Frame):
__init__(self, String title, String message, int maximum=100, Window parent=None, __init__(self, String title, String message, int maximum=100, Window parent=None,
int style=wxPD_AUTO_HIDE|wxPD_APP_MODAL) -> ProgressDialog int style=wxPD_AUTO_HIDE|wxPD_APP_MODAL) -> ProgressDialog
Constructor. Creates the dialog, displays it and disables user input for other Constructor. Creates the dialog, displays it and disables user input
windows, or, if wxPD_APP_MODAL flag is not given, for its parent window only. for other windows, or, if wx.PD_APP_MODAL flag is not given, for its
parent window only.
""" """
newobj = _windows_.new_ProgressDialog(*args, **kwargs) newobj = _windows_.new_ProgressDialog(*args, **kwargs)
self.this = newobj.this self.this = newobj.this
@@ -2653,13 +2783,13 @@ class ProgressDialog(Frame):
""" """
Update(self, int value, String newmsg=EmptyString) -> bool Update(self, int value, String newmsg=EmptyString) -> bool
Updates the dialog, setting the progress bar to the new value and, if given Updates the dialog, setting the progress bar to the new value and, if
changes the message above it. Returns true unless the Cancel button has been given changes the message above it. Returns true unless the Cancel
pressed. button has been pressed.
If false is returned, the application can either immediately destroy the If false is returned, the application can either immediately destroy
dialog or ask the user for the confirmation and if the abort is not confirmed the dialog or ask the user for the confirmation and if the abort is
the dialog may be resumed with Resume function. not confirmed the dialog may be resumed with Resume function.
""" """
return _windows_.ProgressDialog_Update(*args, **kwargs) return _windows_.ProgressDialog_Update(*args, **kwargs)
@@ -2667,7 +2797,8 @@ class ProgressDialog(Frame):
""" """
Resume(self) Resume(self)
Can be used to continue with the dialog, after the user had chosen to abort. Can be used to continue with the dialog, after the user had chosen to
abort.
""" """
return _windows_.ProgressDialog_Resume(*args, **kwargs) return _windows_.ProgressDialog_Resume(*args, **kwargs)
@@ -2739,8 +2870,8 @@ class FindDialogEvent(_core.CommandEvent):
""" """
GetReplaceString(self) -> String GetReplaceString(self) -> String
Return the string to replace the search string with (only Return the string to replace the search string with (only for replace
for replace and replace all events). and replace all events).
""" """
return _windows_.FindDialogEvent_GetReplaceString(*args, **kwargs) return _windows_.FindDialogEvent_GetReplaceString(*args, **kwargs)
@@ -2774,22 +2905,26 @@ _windows_.FindDialogEvent_swigregister(FindDialogEventPtr)
class FindReplaceData(_core.Object): class FindReplaceData(_core.Object):
""" """
FindReplaceData holds the data for FindReplaceDialog. It is used to initialize wx.FindReplaceData holds the data for wx.FindReplaceDialog. It is used
the dialog with the default values and will keep the last values from the to initialize the dialog with the default values and will keep the
dialog when it is closed. It is also updated each time a wxFindDialogEvent is last values from the dialog when it is closed. It is also updated each
generated so instead of using the wxFindDialogEvent methods you can also time a `wx.FindDialogEvent` is generated so instead of using the
directly query this object. `wx.FindDialogEvent` methods you can also directly query this object.
Note that all SetXXX() methods may only be called before showing the dialog Note that all SetXXX() methods may only be called before showing the
and calling them has no effect later. dialog and calling them has no effect later.
Flags Flags
wxFR_DOWN: downward search/replace selected (otherwise, upwards) -----
================ ===============================================
wx.FR_DOWN Downward search/replace selected (otherwise,
upwards)
wxFR_WHOLEWORD: whole word search/replace selected wx.FR_WHOLEWORD Whole word search/replace selected
wxFR_MATCHCASE: case sensitive search/replace selected (otherwise, wx.FR_MATCHCASE Case sensitive search/replace selected
case insensitive) (otherwise, case insensitive)
================ ===============================================
""" """
def __repr__(self): def __repr__(self):
@@ -2868,13 +3003,28 @@ _windows_.FindReplaceData_swigregister(FindReplaceDataPtr)
class FindReplaceDialog(Dialog): class FindReplaceDialog(Dialog):
""" """
FindReplaceDialog is a standard modeless dialog which is used to allow the wx.FindReplaceDialog is a standard modeless dialog which is used to
user to search for some text (and possibly replace it with something allow the user to search for some text (and possibly replace it with
else). The actual searching is supposed to be done in the owner window which something else). The actual searching is supposed to be done in the
is the parent of this dialog. Note that it means that unlike for the other owner window which is the parent of this dialog. Note that it means
standard dialogs this one must have a parent window. Also note that there is that unlike for the other standard dialogs this one must have a parent
no way to use this dialog in a modal way; it is always, by design and window. Also note that there is no way to use this dialog in a modal
implementation, modeless. 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
===================== =========================================
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxFindReplaceDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxFindReplaceDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -4031,7 +4181,7 @@ class Printer(_core.Object):
return _windows_.Printer_GetAbort(*args, **kwargs) return _windows_.Printer_GetAbort(*args, **kwargs)
def GetLastError(*args, **kwargs): def GetLastError(*args, **kwargs):
"""Printer.GetLastError() -> int""" """GetLastError() -> int"""
return _windows_.Printer_GetLastError(*args, **kwargs) return _windows_.Printer_GetLastError(*args, **kwargs)
GetLastError = staticmethod(GetLastError) GetLastError = staticmethod(GetLastError)

View File

@@ -6,7 +6,7 @@ import _calendar
import _misc import _misc
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
CAL_SUNDAY_FIRST = _calendar.CAL_SUNDAY_FIRST CAL_SUNDAY_FIRST = _calendar.CAL_SUNDAY_FIRST
CAL_MONDAY_FIRST = _calendar.CAL_MONDAY_FIRST CAL_MONDAY_FIRST = _calendar.CAL_MONDAY_FIRST
CAL_SHOW_HOLIDAYS = _calendar.CAL_SHOW_HOLIDAYS CAL_SHOW_HOLIDAYS = _calendar.CAL_SHOW_HOLIDAYS
@@ -25,8 +25,8 @@ CAL_BORDER_SQUARE = _calendar.CAL_BORDER_SQUARE
CAL_BORDER_ROUND = _calendar.CAL_BORDER_ROUND CAL_BORDER_ROUND = _calendar.CAL_BORDER_ROUND
class CalendarDateAttr(object): class CalendarDateAttr(object):
""" """
A set of customization attributes for a calendar date, which can be used to A set of customization attributes for a calendar date, which can be
control the look of the Calendar object. used to control the look of the Calendar object.
""" """
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxCalendarDateAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxCalendarDateAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -165,7 +165,70 @@ EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1)
EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1) EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1)
class CalendarCtrl(_core.Control): class CalendarCtrl(_core.Control):
"""The calendar control allows the user to pick a date interactively.""" """
The calendar control allows the user to pick a date interactively.
The CalendarCtrl displays a window containing several parts: the
control to pick the month and the year at the top (either or both of
them may be disabled) and a month area below them which shows all the
days in the month. The user can move the current selection using the
keyboard and select the date (generating EVT_CALENDAR event) by
pressing <Return> or double clicking it.
It has advanced possibilities for the customization of its
display. All global settings (such as colours and fonts used) can, of
course, be changed. But also, the display style for each day in the
month can be set independently using CalendarDateAttr class.
An item without custom attributes is drawn with the default colours
and font and without border, but setting custom attributes with
SetAttr allows to modify its appearance. Just create a custom
attribute object and set it for the day you want to be displayed
specially A day may be marked as being a holiday, (even if it is not
recognized as one by wx.DateTime) by using the SetHoliday method.
As the attributes are specified for each day, they may change when the
month is changed, so you will often want to update them in an
EVT_CALENDAR_MONTH event handler.
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.
"""
def __repr__(self): def __repr__(self):
return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
@@ -190,7 +253,8 @@ class CalendarCtrl(_core.Control):
long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS, long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS,
String name=CalendarNameStr) -> bool String name=CalendarNameStr) -> bool
Acutally create the GUI portion of the CalendarCtrl for 2-phase creation. Acutally create the GUI portion of the CalendarCtrl for 2-phase
creation.
""" """
return _calendar.CalendarCtrl_Create(*args, **kwargs) return _calendar.CalendarCtrl_Create(*args, **kwargs)
@@ -264,9 +328,10 @@ class CalendarCtrl(_core.Control):
""" """
EnableMonthChange(self, bool enable=True) EnableMonthChange(self, bool enable=True)
This function should be used instead of changing CAL_NO_MONTH_CHANGE style This function should be used instead of changing CAL_NO_MONTH_CHANGE
bit. It allows or disallows the user to change the month interactively. Note style bit. It allows or disallows the user to change the month
that if the month can not be changed, the year can not be changed either. interactively. Note that if the month can not be changed, the year can
not be changed either.
""" """
return _calendar.CalendarCtrl_EnableMonthChange(*args, **kwargs) return _calendar.CalendarCtrl_EnableMonthChange(*args, **kwargs)
@@ -274,8 +339,9 @@ class CalendarCtrl(_core.Control):
""" """
EnableHolidayDisplay(self, bool display=True) EnableHolidayDisplay(self, bool display=True)
This function should be used instead of changing CAL_SHOW_HOLIDAYS style This function should be used instead of changing CAL_SHOW_HOLIDAYS
bit directly. It enables or disables the special highlighting of the holidays. style bit directly. It enables or disables the special highlighting of
the holidays.
""" """
return _calendar.CalendarCtrl_EnableHolidayDisplay(*args, **kwargs) return _calendar.CalendarCtrl_EnableHolidayDisplay(*args, **kwargs)
@@ -283,7 +349,7 @@ class CalendarCtrl(_core.Control):
""" """
SetHeaderColours(self, Colour colFg, Colour colBg) SetHeaderColours(self, Colour colFg, Colour colBg)
header colours are used for painting the weekdays at the top Header colours are used for painting the weekdays at the top.
""" """
return _calendar.CalendarCtrl_SetHeaderColours(*args, **kwargs) return _calendar.CalendarCtrl_SetHeaderColours(*args, **kwargs)
@@ -291,7 +357,7 @@ class CalendarCtrl(_core.Control):
""" """
GetHeaderColourFg(self) -> Colour GetHeaderColourFg(self) -> Colour
header colours are used for painting the weekdays at the top Header colours are used for painting the weekdays at the top.
""" """
return _calendar.CalendarCtrl_GetHeaderColourFg(*args, **kwargs) return _calendar.CalendarCtrl_GetHeaderColourFg(*args, **kwargs)
@@ -299,7 +365,7 @@ class CalendarCtrl(_core.Control):
""" """
GetHeaderColourBg(self) -> Colour GetHeaderColourBg(self) -> Colour
header colours are used for painting the weekdays at the top Header colours are used for painting the weekdays at the top.
""" """
return _calendar.CalendarCtrl_GetHeaderColourBg(*args, **kwargs) return _calendar.CalendarCtrl_GetHeaderColourBg(*args, **kwargs)
@@ -307,7 +373,7 @@ class CalendarCtrl(_core.Control):
""" """
SetHighlightColours(self, Colour colFg, Colour colBg) SetHighlightColours(self, Colour colFg, Colour colBg)
highlight colour is used for the currently selected date Highlight colour is used for the currently selected date.
""" """
return _calendar.CalendarCtrl_SetHighlightColours(*args, **kwargs) return _calendar.CalendarCtrl_SetHighlightColours(*args, **kwargs)
@@ -315,7 +381,7 @@ class CalendarCtrl(_core.Control):
""" """
GetHighlightColourFg(self) -> Colour GetHighlightColourFg(self) -> Colour
highlight colour is used for the currently selected date Highlight colour is used for the currently selected date.
""" """
return _calendar.CalendarCtrl_GetHighlightColourFg(*args, **kwargs) return _calendar.CalendarCtrl_GetHighlightColourFg(*args, **kwargs)
@@ -323,7 +389,7 @@ class CalendarCtrl(_core.Control):
""" """
GetHighlightColourBg(self) -> Colour GetHighlightColourBg(self) -> Colour
highlight colour is used for the currently selected date Highlight colour is used for the currently selected date.
""" """
return _calendar.CalendarCtrl_GetHighlightColourBg(*args, **kwargs) return _calendar.CalendarCtrl_GetHighlightColourBg(*args, **kwargs)
@@ -331,7 +397,8 @@ class CalendarCtrl(_core.Control):
""" """
SetHolidayColours(self, Colour colFg, Colour colBg) SetHolidayColours(self, Colour colFg, Colour colBg)
holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used).
""" """
return _calendar.CalendarCtrl_SetHolidayColours(*args, **kwargs) return _calendar.CalendarCtrl_SetHolidayColours(*args, **kwargs)
@@ -339,7 +406,8 @@ class CalendarCtrl(_core.Control):
""" """
GetHolidayColourFg(self) -> Colour GetHolidayColourFg(self) -> Colour
holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used).
""" """
return _calendar.CalendarCtrl_GetHolidayColourFg(*args, **kwargs) return _calendar.CalendarCtrl_GetHolidayColourFg(*args, **kwargs)
@@ -347,7 +415,8 @@ class CalendarCtrl(_core.Control):
""" """
GetHolidayColourBg(self) -> Colour GetHolidayColourBg(self) -> Colour
holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is used) Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
used).
""" """
return _calendar.CalendarCtrl_GetHolidayColourBg(*args, **kwargs) return _calendar.CalendarCtrl_GetHolidayColourBg(*args, **kwargs)
@@ -355,8 +424,8 @@ class CalendarCtrl(_core.Control):
""" """
GetAttr(self, size_t day) -> CalendarDateAttr GetAttr(self, size_t day) -> CalendarDateAttr
Returns the attribute for the given date (should be in the range 1...31). Returns the attribute for the given date (should be in the range
The returned value may be None 1...31). The returned value may be None
""" """
return _calendar.CalendarCtrl_GetAttr(*args, **kwargs) return _calendar.CalendarCtrl_GetAttr(*args, **kwargs)
@@ -364,8 +433,9 @@ class CalendarCtrl(_core.Control):
""" """
SetAttr(self, size_t day, CalendarDateAttr attr) SetAttr(self, size_t day, CalendarDateAttr attr)
Associates the attribute with the specified date (in the range 1...31). Associates the attribute with the specified date (in the range
If the attribute passed is None, the items attribute is cleared. 1...31). If the attribute passed is None, the items attribute is
cleared.
""" """
return _calendar.CalendarCtrl_SetAttr(*args, **kwargs) return _calendar.CalendarCtrl_SetAttr(*args, **kwargs)
@@ -381,7 +451,8 @@ class CalendarCtrl(_core.Control):
""" """
ResetAttr(self, size_t day) ResetAttr(self, size_t day)
Clears any attributes associated with the given day (in the range 1...31). Clears any attributes associated with the given day (in the range
1...31).
""" """
return _calendar.CalendarCtrl_ResetAttr(*args, **kwargs) return _calendar.CalendarCtrl_ResetAttr(*args, **kwargs)
@@ -389,13 +460,16 @@ class CalendarCtrl(_core.Control):
""" """
HitTest(Point pos) -> (result, date, weekday) HitTest(Point pos) -> (result, date, weekday)
Returns 3-tuple with information about the given position on the calendar Returns 3-tuple with information about the given position on the
control. The first value of the tuple is a result code and determines the calendar control. The first value of the tuple is a result code and
validity of the remaining two values. The result codes are: 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_NOWHERE hit outside of anything
CAL_HITTEST_DAY: hit on a day in the calendar, date is set. CAL_HITTEST_HEADER hit on the header, weekday is valid
CAL_HITTEST_DAY hit on a day in the calendar, date is set.
=================== ============================================
""" """
return _calendar.CalendarCtrl_HitTest(*args, **kwargs) return _calendar.CalendarCtrl_HitTest(*args, **kwargs)
@@ -404,7 +478,7 @@ class CalendarCtrl(_core.Control):
""" """
GetMonthControl(self) -> Control GetMonthControl(self) -> Control
get the currently shown control for month Get the currently shown control for month.
""" """
return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs) return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs)
@@ -412,7 +486,7 @@ class CalendarCtrl(_core.Control):
""" """
GetYearControl(self) -> Control GetYearControl(self) -> Control
get the currently shown control for year Get the currently shown control for year.
""" """
return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs) return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs)

View File

@@ -6,7 +6,7 @@ import _grid
import _windows import _windows
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
GRID_VALUE_STRING = _grid.GRID_VALUE_STRING GRID_VALUE_STRING = _grid.GRID_VALUE_STRING
GRID_VALUE_BOOL = _grid.GRID_VALUE_BOOL GRID_VALUE_BOOL = _grid.GRID_VALUE_BOOL
GRID_VALUE_NUMBER = _grid.GRID_VALUE_NUMBER GRID_VALUE_NUMBER = _grid.GRID_VALUE_NUMBER

View File

@@ -6,7 +6,7 @@ import _html
import _windows import _windows
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__docfilter__ __docfilter__ = wx.__DocFilter(globals())
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
HTML_ALIGN_LEFT = _html.HTML_ALIGN_LEFT HTML_ALIGN_LEFT = _html.HTML_ALIGN_LEFT
@@ -1057,7 +1057,7 @@ class HtmlWindow(_windows.ScrolledWindow):
return _html.HtmlWindow_HasAnchor(*args, **kwargs) return _html.HtmlWindow_HasAnchor(*args, **kwargs)
def AddFilter(*args, **kwargs): def AddFilter(*args, **kwargs):
"""HtmlWindow.AddFilter(HtmlFilter filter)""" """AddFilter(HtmlFilter filter)"""
return _html.HtmlWindow_AddFilter(*args, **kwargs) return _html.HtmlWindow_AddFilter(*args, **kwargs)
AddFilter = staticmethod(AddFilter) AddFilter = staticmethod(AddFilter)
@@ -1199,12 +1199,12 @@ class HtmlPrintout(_windows.Printout):
return _html.HtmlPrintout_SetMargins(*args, **kwargs) return _html.HtmlPrintout_SetMargins(*args, **kwargs)
def AddFilter(*args, **kwargs): def AddFilter(*args, **kwargs):
"""HtmlPrintout.AddFilter(wxHtmlFilter filter)""" """AddFilter(wxHtmlFilter filter)"""
return _html.HtmlPrintout_AddFilter(*args, **kwargs) return _html.HtmlPrintout_AddFilter(*args, **kwargs)
AddFilter = staticmethod(AddFilter) AddFilter = staticmethod(AddFilter)
def CleanUpStatics(*args, **kwargs): def CleanUpStatics(*args, **kwargs):
"""HtmlPrintout.CleanUpStatics()""" """CleanUpStatics()"""
return _html.HtmlPrintout_CleanUpStatics(*args, **kwargs) return _html.HtmlPrintout_CleanUpStatics(*args, **kwargs)
CleanUpStatics = staticmethod(CleanUpStatics) CleanUpStatics = staticmethod(CleanUpStatics)

View File

@@ -6,6 +6,7 @@ import _wizard
import _windows import _windows
import _core import _core
wx = _core wx = _core
__docfilter__ = wx.__DocFilter(globals())
WIZARD_EX_HELPBUTTON = _wizard.WIZARD_EX_HELPBUTTON WIZARD_EX_HELPBUTTON = _wizard.WIZARD_EX_HELPBUTTON
wxEVT_WIZARD_PAGE_CHANGED = _wizard.wxEVT_WIZARD_PAGE_CHANGED wxEVT_WIZARD_PAGE_CHANGED = _wizard.wxEVT_WIZARD_PAGE_CHANGED
wxEVT_WIZARD_PAGE_CHANGING = _wizard.wxEVT_WIZARD_PAGE_CHANGING wxEVT_WIZARD_PAGE_CHANGING = _wizard.wxEVT_WIZARD_PAGE_CHANGING
@@ -209,7 +210,7 @@ class WizardPageSimple(WizardPage):
return _wizard.WizardPageSimple_SetNext(*args, **kwargs) return _wizard.WizardPageSimple_SetNext(*args, **kwargs)
def Chain(*args, **kwargs): def Chain(*args, **kwargs):
"""WizardPageSimple.Chain(WizardPageSimple first, WizardPageSimple second)""" """Chain(WizardPageSimple first, WizardPageSimple second)"""
return _wizard.WizardPageSimple_Chain(*args, **kwargs) return _wizard.WizardPageSimple_Chain(*args, **kwargs)
Chain = staticmethod(Chain) Chain = staticmethod(Chain)