self.this = newobj.this
self.thisown = 1
del newobj.thisown
+ self._setCallbackInfo(self, PyTipProvider)
+
def _setCallbackInfo(*args, **kwargs):
"""_setCallbackInfo(self, PyObject self, PyObject _class)"""
return _misc_.PyTipProvider__setCallbackInfo(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
- self._setCallbackInfo(self, Timer, 0)
+ self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self)
def __del__(self, destroy=_misc_.delete_Timer):
"""__del__(self)"""
"""SetOwner(self, EvtHandler owner, int id=-1)"""
return _misc_.Timer_SetOwner(*args, **kwargs)
+ def GetOwner(*args, **kwargs):
+ """GetOwner(self) -> EvtHandler"""
+ return _misc_.Timer_GetOwner(*args, **kwargs)
+
def Start(*args, **kwargs):
"""Start(self, int milliseconds=-1, bool oneShot=False) -> bool"""
return _misc_.Timer_Start(*args, **kwargs)
class Sound(object):
def __repr__(self):
return "<%s.%s; proxy of C++ wxSound instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
- def __init__(self, *args):
- """
- __init__(self) -> Sound
- __init__(self, String fileName, bool isResource=false) -> Sound
- __init__(self, int size, wxByte data) -> Sound
- """
- newobj = _misc_.new_Sound(*args)
+ def __init__(self, *args, **kwargs):
+ """__init__(self, String fileName=EmptyString) -> Sound"""
+ newobj = _misc_.new_Sound(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
if self.thisown: destroy(self)
except: pass
- def Create(*args):
- """
- Create(self, String fileName, bool isResource=false) -> bool
- Create(self, int size, wxByte data) -> bool
- """
- return _misc_.Sound_Create(*args)
+ def Create(*args, **kwargs):
+ """Create(self, String fileName) -> bool"""
+ return _misc_.Sound_Create(*args, **kwargs)
+
+ def CreateFromData(*args, **kwargs):
+ """CreateFromData(self, PyObject data) -> bool"""
+ return _misc_.Sound_CreateFromData(*args, **kwargs)
def IsOk(*args, **kwargs):
"""IsOk(self) -> bool"""
return _misc_.Sound_IsOk(*args, **kwargs)
- def Play(*args):
+ def Play(*args, **kwargs):
"""Play(self, unsigned int flags=SOUND_ASYNC) -> bool"""
- return _misc_.Sound_Play(*args)
+ return _misc_.Sound_Play(*args, **kwargs)
- def PlaySound(*args):
+ def PlaySound(*args, **kwargs):
"""PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool"""
- return _misc_.Sound_PlaySound(*args)
+ return _misc_.Sound_PlaySound(*args, **kwargs)
PlaySound = staticmethod(PlaySound)
def Stop(*args, **kwargs):
self.__class__ = Sound
_misc_.Sound_swigregister(SoundPtr)
-def Sound_PlaySound(*args):
+def SoundFromData(*args, **kwargs):
+ """SoundFromData(PyObject data) -> Sound"""
+ val = _misc_.new_SoundFromData(*args, **kwargs)
+ val.thisown = 1
+ return val
+
+def Sound_PlaySound(*args, **kwargs):
"""Sound_PlaySound(String filename, unsigned int flags=SOUND_ASYNC) -> bool"""
- return _misc_.Sound_PlaySound(*args)
+ return _misc_.Sound_PlaySound(*args, **kwargs)
def Sound_Stop(*args, **kwargs):
"""Sound_Stop()"""
...
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):
return "<%s.%s; proxy of C++ wxPyArtProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
...
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)
self.this = newobj.this
class ConfigBase(object):
"""
wx.ConfigBase class defines the basic interface of all config
- classes. It can not be used by itself (it is an abstract base
- class) and you will always use one of its derivations: wx.Config
- or wx.FileConfig.
-
- wx.ConfigBase organizes the items in a tree-like structure,
- modeled after the Unix/Dos filesystem. There are groups that act
- like directories and entries, key/value pairs that act like
- files. There is always one current group given by the current
- path. As in the file system case, to specify a key in the config
- class you must use a path to it. Config classes also support the
- notion of the current group, which makes it possible to use
- relative paths.
+ classes. It can not be used by itself (it is an abstract base class)
+ and you will always use one of its derivations: wx.Config or
+ wx.FileConfig.
+
+ wx.ConfigBase organizes the items in a tree-like structure, modeled
+ after the Unix/Dos filesystem. There are groups that act like
+ directories and entries, key/value pairs that act like files. There
+ is always one current group given by the current path. As in the file
+ system case, to specify a key in the config class you must use a path
+ to it. Config classes also support the notion of the current group,
+ which makes it possible to use relative paths.
Keys are pairs "key_name = value" where value may be of string,
integer floating point or boolean, you can not store binary data
- without first encoding it as a string. For performance reasons
- items should be kept small, no more than a couple kilobytes.
+ without first encoding it as a string. For performance reasons items
+ should be kept small, no more than a couple kilobytes.
"""
def __init__(self): raise RuntimeError, "No constructor defined"
"""
Set(ConfigBase config) -> ConfigBase
- Sets the global config object (the one returned by Get) and
- returns a reference to the previous global config object.
+ Sets the global config object (the one returned by Get) and returns a
+ reference to the previous global config object.
"""
return _misc_.ConfigBase_Set(*args, **kwargs)
"""
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?
"""
return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs)
"""
SetPath(self, String path)
- Set current path: if the first character is '/', it's the absolute path,
- otherwise it's a relative path. '..' is supported. If the strPath
- doesn't exist it is created.
+ Set current path: if the first character is '/', it's the absolute
+ path, otherwise it's a relative path. '..' is supported. If the
+ strPath doesn't exist it is created.
"""
return _misc_.ConfigBase_SetPath(*args, **kwargs)
"""
GetFirstGroup() -> (more, value, index)
- Allows enumerating the subgroups in a config object. Returns
- a tuple containing a flag indicating there are more items, the
- name of the current item, and an index to pass to GetNextGroup to
- fetch the next item.
+ Allows enumerating the subgroups in a config object. Returns a tuple
+ containing a flag indicating there are more items, the name of the
+ current item, and an index to pass to GetNextGroup to fetch the next
+ item.
"""
return _misc_.ConfigBase_GetFirstGroup(*args, **kwargs)
"""
GetNextGroup(long index) -> (more, value, index)
- Allows enumerating the subgroups in a config object. Returns
- a tuple containing a flag indicating there are more items, the
- name of the current item, and an index to pass to GetNextGroup to
- fetch the next item.
+ Allows enumerating the subgroups in a config object. Returns a tuple
+ containing a flag indicating there are more items, the name of the
+ current item, and an index to pass to GetNextGroup to fetch the next
+ item.
"""
return _misc_.ConfigBase_GetNextGroup(*args, **kwargs)
GetFirstEntry() -> (more, value, index)
Allows enumerating the entries in the current group in a config
- object. Returns a tuple containing a flag indicating there are
- more items, the name of the current item, and an index to pass to
+ object. Returns a tuple containing a flag indicating there are more
+ items, the name of the current item, and an index to pass to
GetNextGroup to fetch the next item.
"""
return _misc_.ConfigBase_GetFirstEntry(*args, **kwargs)
GetNextEntry(long index) -> (more, value, index)
Allows enumerating the entries in the current group in a config
- object. Returns a tuple containing a flag indicating there are
- more items, the name of the current item, and an index to pass to
+ object. Returns a tuple containing a flag indicating there are more
+ items, the name of the current item, and an index to pass to
GetNextGroup to fetch the next item.
"""
return _misc_.ConfigBase_GetNextEntry(*args, **kwargs)
"""
GetNumberOfEntries(self, bool recursive=False) -> size_t
- Get the number of entries in the current group, with or
- without its subgroups.
+ Get the number of entries in the current group, with or without its
+ subgroups.
"""
return _misc_.ConfigBase_GetNumberOfEntries(*args, **kwargs)
"""
GetNumberOfGroups(self, bool recursive=False) -> size_t
- Get the number of subgroups in the current group, with or
- without its subgroups.
+ Get the number of subgroups in the current group, with or without its
+ subgroups.
"""
return _misc_.ConfigBase_GetNumberOfGroups(*args, **kwargs)
"""
RenameGroup(self, String oldName, String newName) -> bool
- Rename aa group. Returns False on failure (probably because the new
+ Rename a group. Returns False on failure (probably because the new
name is already taken by an existing entry)
"""
return _misc_.ConfigBase_RenameGroup(*args, **kwargs)
"""
DeleteEntry(self, String key, bool deleteGroupIfEmpty=True) -> bool
- Deletes the specified entry and the group it belongs to if
- it was the last key in it and the second parameter is True
+ Deletes the specified entry and the group it belongs to if it was the
+ last key in it and the second parameter is True
"""
return _misc_.ConfigBase_DeleteEntry(*args, **kwargs)
"""
SetExpandEnvVars(self, bool doIt=True)
- We can automatically expand environment variables in the config entries
- (this option is on by default, you can turn it on/off at any time)
+ We can automatically expand environment variables in the config
+ entries this option is on by default, you can turn it on/off at any
+ time)
"""
return _misc_.ConfigBase_SetExpandEnvVars(*args, **kwargs)
"""
ConfigBase_Set(ConfigBase config) -> ConfigBase
- Sets the global config object (the one returned by Get) and
- returns a reference to the previous global config object.
+ Sets the global config object (the one returned by Get) and returns a
+ reference to the previous global config object.
"""
return _misc_.ConfigBase_Set(*args, **kwargs)
"""
ConfigBase_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?
"""
return _misc_.ConfigBase_DontCreateOnDemand(*args, **kwargs)
class ConfigPathChanger(object):
"""
- A handy little class which changes current path to the path of
- given entry and restores it in the destructoir: so if you declare
- a local variable of this type, you work in the entry directory
- and the path is automatically restored when the function returns.
+ A handy little class which changes current path to the path of given
+ entry and restores it in the destructoir: so if you declare a local
+ variable of this type, you work in the entry directory and the path is
+ automatically restored when the function returns.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxConfigPathChanger instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
ExpandEnvVars(String sz) -> String
Replace environment variables ($SOMETHING) with their values. The
- format is $VARNAME or ${VARNAME} where VARNAME contains
- alphanumeric characters and '_' only. '$' must be escaped ('\$')
- in order to be taken literally.
+ format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric
+ characters and '_' only. '$' must be escaped ('\$') in order to be
+ taken literally.
"""
return _misc_.ExpandEnvVars(*args, **kwargs)
#---------------------------------------------------------------------------
GetWeekDayName = staticmethod(GetWeekDayName)
def GetAmPmStrings(*args, **kwargs):
- """
- GetAmPmStrings() -> (am, pm)
-
- Get the AM and PM strings in the current locale (may be empty)
- """
+ """GetAmPmStrings() -> (am, pm)"""
return _misc_.DateTime_GetAmPmStrings(*args, **kwargs)
GetAmPmStrings = staticmethod(GetAmPmStrings)
return _misc_.DateTime_GetWeekDayName(*args, **kwargs)
def DateTime_GetAmPmStrings(*args, **kwargs):
- """
- GetAmPmStrings() -> (am, pm)
-
- Get the AM and PM strings in the current locale (may be empty)
- """
+ """GetAmPmStrings() -> (am, pm)"""
return _misc_.DateTime_GetAmPmStrings(*args, **kwargs)
def DateTime_IsDSTApplicable(*args, **kwargs):
class DataFormat(object):
"""
A wx.DataFormat is an encapsulation of a platform-specific format
- handle which is used by the system for the clipboard and drag and
- drop operations. The applications are usually only interested in,
- for example, pasting data from the clipboard only if the data is
- in a format the program understands. A data format is is used to
- uniquely identify this format.
-
- On the system level, a data format is usually just a number
- (CLIPFORMAT under Windows or Atom under X11, for example).
+ handle which is used by the system for the clipboard and drag and drop
+ operations. The applications are usually only interested in, for
+ example, pasting data from the clipboard only if the data is in a
+ format the program understands. A data format is is used to uniquely
+ identify this format.
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxDataFormat instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
"""
__init__(self, int type) -> DataFormat
- Constructs a data format object for one of the standard data
- formats or an empty data object (use SetType or SetId later in
- this case)
+ Constructs a data format object for one of the standard data formats
+ or an empty data object (use SetType or SetId later in this case)
"""
newobj = _misc_.new_DataFormat(*args, **kwargs)
self.this = newobj.this
"""
SetType(self, int format)
- Sets the format to the given value, which should be one of wx.DF_XXX constants.
+ Sets the format to the given value, which should be one of wx.DF_XXX
+ constants.
"""
return _misc_.DataFormat_SetType(*args, **kwargs)
"""
GetId(self) -> String
- Returns the name of a custom format (this function will fail for a standard format).
+ Returns the name of a custom format (this function will fail for a
+ standard format).
"""
return _misc_.DataFormat_GetId(*args, **kwargs)
"""
CustomDataFormat(String format) -> DataFormat
- Constructs a data format object for a custom format identified by its name.
+ Constructs a data format object for a custom format identified by its
+ name.
"""
val = _misc_.new_CustomDataFormat(*args, **kwargs)
val.thisown = 1
return val
class DataObject(object):
+ """
+ A wxDataObject represents data that can be copied to or from the
+ clipboard, or dragged and dropped. The important thing about
+ wxDataObject is that this is a 'smart' piece of data unlike usual
+ 'dumb' data containers such as memory buffers or files. Being 'smart'
+ here means that the data object itself should know what data formats
+ it supports and how to render itself in each of supported formats.
+
+
+ """
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
+ self._setCallbackInfo(self, DropSource, 0)
+
def _setCallbackInfo(*args, **kwargs):
"""_setCallbackInfo(self, PyObject self, PyObject _class, int incref)"""
return _misc_.DropSource__setCallbackInfo(*args, **kwargs)
"""
Matches(self, VideoMode other) -> bool
- Returns true if this mode matches the other one in the sense that
- all non zero fields of the other mode have the same value in this
+ Returns true if this mode matches the other one in the sense that all
+ non zero fields of the other mode have the same value in this
one (except for refresh which is allowed to have a greater value)
"""
return _misc_.VideoMode_Matches(*args, **kwargs)
"""
GetWidth(self) -> int
- Returns the screen width in pixels (e.g. 640*480), 0 means
- unspecified
+ Returns the screen width in pixels (e.g. 640*480), 0 means unspecified
"""
return _misc_.VideoMode_GetWidth(*args, **kwargs)
"""
GetDepth(self) -> int
- Returns the screen's bits per pixel (e.g. 32), 1 is monochrome
- and 0 means unspecified/known
+ Returns the screen's bits per pixel (e.g. 32), 1 is monochrome and 0
+ means unspecified/known
"""
return _misc_.VideoMode_GetDepth(*args, **kwargs)
"""
__init__(self, size_t index=0) -> Display
- Set up a Display instance with the specified display. The
- displays are numbered from 0 to GetCount() - 1, 0 is always the
- primary display and the only one which is always supported
+ Set up a Display instance with the specified display. The displays
+ are numbered from 0 to GetCount() - 1, 0 is always the primary display
+ and the only one which is always supported
"""
newobj = _misc_.new_Display(*args, **kwargs)
self.this = newobj.this
"""
GetFromPoint(Point pt) -> int
- Find the display where the given point lies, return wx.NOT_FOUND
- if it doesn't belong to any display
+ Find the display where the given point lies, return wx.NOT_FOUND if it
+ doesn't belong to any display
"""
return _misc_.Display_GetFromPoint(*args, **kwargs)
"""
GetFromWindow(Window window) -> int
- Find the display where the given window lies, return wx.NOT_FOUND
- if it is not shown at all.
+ Find the display where the given window lies, return wx.NOT_FOUND if
+ it is not shown at all.
"""
return _misc_.Display_GetFromWindow(*args, **kwargs)
"""
GetGeometry(self) -> Rect
- Returns the bounding rectangle of the display whose index was
- passed to the constructor.
+ Returns the bounding rectangle of the display whose index was passed
+ to the constructor.
"""
return _misc_.Display_GetGeometry(*args, **kwargs)
"""
GetModes(VideoMode mode=DefaultVideoMode) -> [videoMode...]
- Enumerate all video modes supported by this display matching the
- given one (in the sense of VideoMode.Match()).
+ Enumerate all video modes supported by this display matching the given
+ one (in the sense of VideoMode.Match()).
- As any mode matches the default value of the argument and there
- is always at least one video mode supported by display, the
- returned array is only empty for the default value of the
- argument if this function is not supported at all on this
- platform.
+ As any mode matches the default value of the argument and there is
+ always at least one video mode supported by display, the returned
+ array is only empty for the default value of the argument if this
+ function is not supported at all on this platform.
"""
return _misc_.Display_GetModes(*args, **kwargs)
"""
Display_GetFromPoint(Point pt) -> int
- Find the display where the given point lies, return wx.NOT_FOUND
- if it doesn't belong to any display
+ Find the display where the given point lies, return wx.NOT_FOUND if it
+ doesn't belong to any display
"""
return _misc_.Display_GetFromPoint(*args, **kwargs)
"""
Display_GetFromWindow(Window window) -> int
- Find the display where the given window lies, return wx.NOT_FOUND
- if it is not shown at all.
+ Find the display where the given window lies, return wx.NOT_FOUND if
+ it is not shown at all.
"""
return _misc_.Display_GetFromWindow(*args, **kwargs)