CHK_CHECKED = _controls.CHK_CHECKED
CHK_UNDETERMINED = _controls.CHK_UNDETERMINED
class CheckBox(core.Control):
+ """
+ A checkbox is a labelled box which by default is either on (checkmark is
+ visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
+ is set) it can have a third state, called the mixed or undetermined
+ state. Often this is used as a "Does Not Apply" state.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
__init__(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox
+
+ Creates and shows a CheckBox control
"""
newobj = _controls.new_CheckBox(*args, **kwargs)
self.this = newobj.this
Create(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool
+
+ Actually create the GUI CheckBox for 2-phase creation.
"""
return _controls.CheckBox_Create(*args, **kwargs)
def GetValue(*args, **kwargs):
- """GetValue() -> bool"""
+ """
+ GetValue() -> bool
+
+ Gets the state of a 2-state CheckBox. Returns True if it is checked,
+ False otherwise.
+ """
return _controls.CheckBox_GetValue(*args, **kwargs)
def IsChecked(*args, **kwargs):
- """IsChecked() -> bool"""
+ """
+ IsChecked() -> bool
+
+ Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
+ """
return _controls.CheckBox_IsChecked(*args, **kwargs)
def SetValue(*args, **kwargs):
- """SetValue(bool state)"""
+ """
+ SetValue(bool state)
+
+ Set the state of a 2-state CheckBox. Pass True for checked,
+ False for unchecked.
+ """
return _controls.CheckBox_SetValue(*args, **kwargs)
def Get3StateValue(*args, **kwargs):
- """Get3StateValue() -> int"""
+ """
+ Get3StateValue() -> int
+
+ Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when
+ it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.
+ Raises an exceptiion when the function is used with a 2-state CheckBox.
+ """
return _controls.CheckBox_Get3StateValue(*args, **kwargs)
def Set3StateValue(*args, **kwargs):
- """Set3StateValue(int state)"""
+ """
+ Set3StateValue(int state)
+
+ Sets the CheckBox to the given state. The state parameter can be
+ one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED
+ (Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
+ exception when the CheckBox is a 2-state checkbox and setting the state
+ to wx.CHK_UNDETERMINED.
+ """
return _controls.CheckBox_Set3StateValue(*args, **kwargs)
def Is3State(*args, **kwargs):
- """Is3State() -> bool"""
+ """
+ Is3State() -> bool
+
+ Returns whether or not the CheckBox is a 3-state CheckBox.
+ """
return _controls.CheckBox_Is3State(*args, **kwargs)
def Is3rdStateAllowedForUser(*args, **kwargs):
- """Is3rdStateAllowedForUser() -> bool"""
+ """
+ Is3rdStateAllowedForUser() -> bool
+
+ Returns whether or not the user can set the CheckBox to the third state.
+ """
return _controls.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs)
CheckBoxNameStr = cvar.CheckBoxNameStr
def PreCheckBox(*args, **kwargs):
- """PreCheckBox() -> CheckBox"""
+ """
+ PreCheckBox() -> CheckBox
+
+ Precreate a CheckBox for 2-phase creation.
+ """
val = _controls.new_PreCheckBox(*args, **kwargs)
val.thisown = 1
return val
#---------------------------------------------------------------------------
class Choice(core.ControlWithItems):
+ """
+ A Choice control is used to select one of a list of strings. Unlike a ListBox,
+ only the selection is visible until the user pulls down the menu of choices.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
- __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> Choice
+
+ Create and show a Choice control
"""
newobj = _controls.new_Choice(*args, **kwargs)
self.this = newobj.this
def Create(*args, **kwargs):
"""
- Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool
+
+ Actually create the GUI Choice control for 2-phase creation
"""
return _controls.Choice_Create(*args, **kwargs)
- def GetColumns(*args, **kwargs):
- """GetColumns() -> int"""
- return _controls.Choice_GetColumns(*args, **kwargs)
-
- def SetColumns(*args, **kwargs):
- """SetColumns(int n=1)"""
- return _controls.Choice_SetColumns(*args, **kwargs)
-
def SetSelection(*args, **kwargs):
- """SetSelection(int n)"""
+ """
+ SetSelection(int n)
+
+ Select the n'th item (zero based) in the list.
+ """
return _controls.Choice_SetSelection(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
- """SetStringSelection(String string)"""
+ """
+ SetStringSelection(String string)
+
+ Select the item with the specifed string
+ """
return _controls.Choice_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
- """SetString(int n, String s)"""
+ """
+ SetString(int n, String string)
+
+ Set the label for the n'th item (zero based) in the list.
+ """
return _controls.Choice_SetString(*args, **kwargs)
+ Select = SetSelection
class ChoicePtr(Choice):
def __init__(self, this):
ChoiceNameStr = cvar.ChoiceNameStr
def PreChoice(*args, **kwargs):
- """PreChoice() -> Choice"""
+ """
+ PreChoice() -> Choice
+
+ Precreate a Choice control for 2-phase creation.
+ """
val = _controls.new_PreChoice(*args, **kwargs)
val.thisown = 1
return val
}
-static PyObject *_wrap_Choice_GetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxChoice *arg1 = (wxChoice *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Choice_GetColumns",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->GetColumns();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Choice_SetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxChoice *arg1 = (wxChoice *) 0 ;
- int arg2 = (int) (int)1 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "n", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Choice_SetColumns",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- if (obj1) {
- {
- arg2 = (int const) SWIG_PyObj_AsInt(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- }
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->SetColumns(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject *_wrap_Choice_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxChoice *arg1 = (wxChoice *) 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
- (char *) "self",(char *) "n",(char *) "s", NULL
+ (char *) "self",(char *) "n",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Choice_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
{ (char *)"new_Choice", (PyCFunction) _wrap_new_Choice, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_PreChoice", (PyCFunction) _wrap_new_PreChoice, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_Create", (PyCFunction) _wrap_Choice_Create, METH_VARARGS | METH_KEYWORDS },
- { (char *)"Choice_GetColumns", (PyCFunction) _wrap_Choice_GetColumns, METH_VARARGS | METH_KEYWORDS },
- { (char *)"Choice_SetColumns", (PyCFunction) _wrap_Choice_SetColumns, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetSelection", (PyCFunction) _wrap_Choice_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetStringSelection", (PyCFunction) _wrap_Choice_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetString", (PyCFunction) _wrap_Choice_SetString, METH_VARARGS | METH_KEYWORDS },
self.this = newobj.this
self.thisown = 1
del newobj.thisown
- val._dc = args[0] # save a ref so the other dc will not be deleted before self
+ self._dc = args[0] # save a ref so the other dc will not be deleted before self
def UnMask(*args, **kwargs):
"""UnMask()"""
#---------------------------------------------------------------------------
class Clipboard(core.Object):
+ """
+ wx.Clipboard represents the system clipboard and provides methods to copy data
+ to or paste data from it. Normally, you should only use wx.TheClipboard which
+ is a reference to a global wx.Clipboard instance.
+
+ Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation
+ returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put
+ data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the
+ clipboard. Call wx.TheClipboard.Close to close the clipboard and relinquish
+ ownership. You should keep the clipboard open only momentarily.
+
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxClipboard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
except: pass
def Open(*args, **kwargs):
- """Open() -> bool"""
+ """
+ Open() -> bool
+
+ Call this function to open the clipboard before calling SetData
+ and GetData. Call Close when you have finished with the clipboard.
+ You should keep the clipboard open for only a very short time.
+ Returns true on success.
+ """
return _misc.Clipboard_Open(*args, **kwargs)
def Close(*args, **kwargs):
- """Close()"""
+ """
+ Close()
+
+ Closes the clipboard.
+ """
return _misc.Clipboard_Close(*args, **kwargs)
def IsOpened(*args, **kwargs):
- """IsOpened() -> bool"""
+ """
+ IsOpened() -> bool
+
+ Query whether the clipboard is opened
+ """
return _misc.Clipboard_IsOpened(*args, **kwargs)
def AddData(*args, **kwargs):
- """AddData(DataObject data) -> bool"""
+ """
+ AddData(DataObject data) -> bool
+
+ Call this function to add the data object to the clipboard. You
+ may call this function repeatedly after having cleared the clipboard.
+ After this function has been called, the clipboard owns the data, so
+ do not delete the data explicitly.
+ """
return _misc.Clipboard_AddData(*args, **kwargs)
def SetData(*args, **kwargs):
- """SetData(DataObject data) -> bool"""
+ """
+ SetData(DataObject data) -> bool
+
+ Set the clipboard data, this is the same as Clear followed by AddData.
+ """
return _misc.Clipboard_SetData(*args, **kwargs)
def IsSupported(*args, **kwargs):
- """IsSupported(DataFormat format) -> bool"""
+ """
+ IsSupported(DataFormat format) -> bool
+
+ Returns True if the given format is available in the data object(s) on
+ the clipboard.
+ """
return _misc.Clipboard_IsSupported(*args, **kwargs)
def GetData(*args, **kwargs):
- """GetData(DataObject data) -> bool"""
+ """
+ GetData(DataObject data) -> bool
+
+ Call this function to fill data with data on the clipboard, if available
+ in the required format. Returns true on success.
+ """
return _misc.Clipboard_GetData(*args, **kwargs)
def Clear(*args, **kwargs):
- """Clear()"""
+ """
+ Clear()
+
+ Clears data from the clipboard object and also the system's clipboard
+ if possible.
+ """
return _misc.Clipboard_Clear(*args, **kwargs)
def Flush(*args, **kwargs):
- """Flush() -> bool"""
+ """
+ Flush() -> bool
+
+ Flushes the clipboard: this means that the data which is currently on
+ clipboard will stay available even after the application exits (possibly
+ eating memory), otherwise the clipboard will be emptied on exit.
+ Returns False if the operation is unsuccesful for any reason.
+ """
return _misc.Clipboard_Flush(*args, **kwargs)
def UsePrimarySelection(*args, **kwargs):
- """UsePrimarySelection(bool primary=False)"""
+ """
+ UsePrimarySelection(bool primary=True)
+
+ On platforms supporting it (the X11 based platforms), selects the so
+ called PRIMARY SELECTION as the clipboard as opposed to the normal
+ clipboard, if primary is True.
+ """
return _misc.Clipboard_UsePrimarySelection(*args, **kwargs)
_misc.Clipboard_swigregister(ClipboardPtr)
class ClipboardLocker(object):
+ """
+ A helpful class for opening the clipboard and automatically closing it when
+ the locker is destroyed.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Clipboard clipboard=None) -> ClipboardLocker"""
+ """
+ __init__(Clipboard clipboard=None) -> ClipboardLocker
+
+ A helpful class for opening the clipboard and automatically closing it when
+ the locker is destroyed.
+ """
newobj = _misc.new_ClipboardLocker(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def __nonzero__(*args, **kwargs):
- """__nonzero__() -> bool"""
+ """
+ __nonzero__() -> bool
+
+ A ClipboardLocker instance evaluates to True if the clipboard was
+ successfully opened.
+ """
return _misc.ClipboardLocker___nonzero__(*args, **kwargs)
static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxClipboard *arg1 = (wxClipboard *) 0 ;
- bool arg2 = (bool) False ;
+ bool arg2 = (bool) True ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
#---------------------------------------------------------------------------
class ColourData(core.Object):
+ """This class holds a variety of information related to colour dialogs."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColourData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__() -> ColourData"""
+ """
+ __init__() -> ColourData
+
+ Constructor, sets default values.
+ """
newobj = _windows.new_ColourData(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def GetChooseFull(*args, **kwargs):
- """GetChooseFull() -> bool"""
+ """
+ GetChooseFull() -> bool
+
+ Under Windows, determines whether the Windows colour dialog will display
+ the full dialog with custom colour selection controls. Has no meaning
+ under other platforms. The default value is true.
+ """
return _windows.ColourData_GetChooseFull(*args, **kwargs)
def GetColour(*args, **kwargs):
- """GetColour() -> Colour"""
+ """
+ GetColour() -> Colour
+
+ Gets the colour (pre)selected by the dialog.
+ """
return _windows.ColourData_GetColour(*args, **kwargs)
def GetCustomColour(*args, **kwargs):
- """GetCustomColour(int i) -> Colour"""
+ """
+ GetCustomColour(int i) -> Colour
+
+ Gets the i'th custom colour associated with the colour dialog. i should
+ be an integer between 0 and 15. The default custom colours are all white.
+ """
return _windows.ColourData_GetCustomColour(*args, **kwargs)
def SetChooseFull(*args, **kwargs):
- """SetChooseFull(int flag)"""
+ """
+ SetChooseFull(int flag)
+
+ Under Windows, tells the Windows colour dialog to display the full dialog
+ with custom colour selection controls. Under other platforms, has no effect.
+ The default value is true.
+ """
return _windows.ColourData_SetChooseFull(*args, **kwargs)
def SetColour(*args, **kwargs):
- """SetColour(Colour colour)"""
+ """
+ SetColour(Colour colour)
+
+ Sets the default colour for the colour dialog. The default colour is black.
+ """
return _windows.ColourData_SetColour(*args, **kwargs)
def SetCustomColour(*args, **kwargs):
- """SetCustomColour(int i, Colour colour)"""
+ """
+ SetCustomColour(int i, Colour colour)
+
+ Sets the i'th custom colour for the colour dialog. i should be an integer
+ between 0 and 15. The default custom colours are all white.
+ """
return _windows.ColourData_SetCustomColour(*args, **kwargs)
MessageBoxCaptionStr = cvar.MessageBoxCaptionStr
class ColourDialog(Dialog):
+ """This class represents the colour chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColourDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Window parent, ColourData data=None) -> ColourDialog"""
+ """
+ __init__(Window parent, ColourData data=None) -> ColourDialog
+
+ Constructor. Pass a parent window, and optionally a ColourData, which
+ will be copied to the colour dialog's internal ColourData instance.
+ """
newobj = _windows.new_ColourDialog(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
self._setOORInfo(self)
def GetColourData(*args, **kwargs):
- """GetColourData() -> ColourData"""
- return _windows.ColourDialog_GetColourData(*args, **kwargs)
+ """
+ GetColourData() -> ColourData
- def ShowModal(*args, **kwargs):
- """ShowModal() -> int"""
- return _windows.ColourDialog_ShowModal(*args, **kwargs)
+ Returns a reference to the ColourData used by the dialog.
+ """
+ return _windows.ColourDialog_GetColourData(*args, **kwargs)
class ColourDialogPtr(ColourDialog):
_windows.ColourDialog_swigregister(ColourDialogPtr)
class DirDialog(Dialog):
+ """This class represents the directory chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
String defaultPath=EmptyString, long style=0,
Point pos=DefaultPosition, Size size=DefaultSize,
String name=DirDialogNameStr) -> DirDialog
+
+ Constructor. Use ShowModal method to show the dialog.
"""
newobj = _windows.new_DirDialog(*args, **kwargs)
self.this = newobj.this
self._setOORInfo(self)
def GetPath(*args, **kwargs):
- """GetPath() -> String"""
+ """
+ GetPath() -> String
+
+ Returns the default or user-selected path.
+ """
return _windows.DirDialog_GetPath(*args, **kwargs)
def GetMessage(*args, **kwargs):
- """GetMessage() -> String"""
+ """
+ GetMessage() -> String
+
+ Returns the message that will be displayed on the dialog.
+ """
return _windows.DirDialog_GetMessage(*args, **kwargs)
def GetStyle(*args, **kwargs):
- """GetStyle() -> long"""
+ """
+ GetStyle() -> long
+
+ Returns the dialog style.
+ """
return _windows.DirDialog_GetStyle(*args, **kwargs)
def SetMessage(*args, **kwargs):
- """SetMessage(String message)"""
+ """
+ SetMessage(String message)
+
+ Sets the message that will be displayed on the dialog.
+ """
return _windows.DirDialog_SetMessage(*args, **kwargs)
def SetPath(*args, **kwargs):
- """SetPath(String path)"""
- return _windows.DirDialog_SetPath(*args, **kwargs)
+ """
+ SetPath(String path)
- def ShowModal(*args, **kwargs):
- """ShowModal() -> int"""
- return _windows.DirDialog_ShowModal(*args, **kwargs)
+ Sets the default path.
+ """
+ return _windows.DirDialog_SetPath(*args, **kwargs)
class DirDialogPtr(DirDialog):
_windows.DirDialog_swigregister(DirDialogPtr)
class FileDialog(Dialog):
+ """This class represents the file chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
String defaultDir=EmptyString, String defaultFile=EmptyString,
String wildcard=FileSelectorDefaultWildcardStr,
long style=0, Point pos=DefaultPosition) -> FileDialog
+
+ Constructor. Use ShowModal method to show the dialog.
"""
newobj = _windows.new_FileDialog(*args, **kwargs)
self.this = newobj.this
self._setOORInfo(self)
def SetMessage(*args, **kwargs):
- """SetMessage(String message)"""
+ """
+ SetMessage(String message)
+
+ Sets the message that will be displayed on the dialog.
+ """
return _windows.FileDialog_SetMessage(*args, **kwargs)
def SetPath(*args, **kwargs):
- """SetPath(String path)"""
+ """
+ SetPath(String path)
+
+ Sets the path (the combined directory and filename that will
+ be returned when the dialog is dismissed).
+ """
return _windows.FileDialog_SetPath(*args, **kwargs)
def SetDirectory(*args, **kwargs):
- """SetDirectory(String dir)"""
+ """
+ SetDirectory(String dir)
+
+ Sets the default directory.
+ """
return _windows.FileDialog_SetDirectory(*args, **kwargs)
def SetFilename(*args, **kwargs):
- """SetFilename(String name)"""
+ """
+ SetFilename(String name)
+
+ Sets the default filename.
+ """
return _windows.FileDialog_SetFilename(*args, **kwargs)
def SetWildcard(*args, **kwargs):
- """SetWildcard(String wildCard)"""
+ """
+ SetWildcard(String wildCard)
+
+ Sets the wildcard, which can contain multiple file types, for example:
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+ """
return _windows.FileDialog_SetWildcard(*args, **kwargs)
def SetStyle(*args, **kwargs):
- """SetStyle(long style)"""
+ """
+ SetStyle(long style)
+
+ Sets the dialog style.
+ """
return _windows.FileDialog_SetStyle(*args, **kwargs)
def SetFilterIndex(*args, **kwargs):
- """SetFilterIndex(int filterIndex)"""
+ """
+ SetFilterIndex(int filterIndex)
+
+ Sets the default filter index, starting from zero.
+ """
return _windows.FileDialog_SetFilterIndex(*args, **kwargs)
def GetMessage(*args, **kwargs):
- """GetMessage() -> String"""
+ """
+ GetMessage() -> String
+
+ Returns the message that will be displayed on the dialog.
+ """
return _windows.FileDialog_GetMessage(*args, **kwargs)
def GetPath(*args, **kwargs):
- """GetPath() -> String"""
+ """
+ GetPath() -> String
+
+ Returns the full path (directory and filename) of the selected file.
+ """
return _windows.FileDialog_GetPath(*args, **kwargs)
def GetDirectory(*args, **kwargs):
- """GetDirectory() -> String"""
+ """
+ GetDirectory() -> String
+
+ Returns the default directory.
+ """
return _windows.FileDialog_GetDirectory(*args, **kwargs)
def GetFilename(*args, **kwargs):
- """GetFilename() -> String"""
+ """
+ GetFilename() -> String
+
+ Returns the default filename.
+ """
return _windows.FileDialog_GetFilename(*args, **kwargs)
def GetWildcard(*args, **kwargs):
- """GetWildcard() -> String"""
+ """
+ GetWildcard() -> String
+
+ Returns the file dialog wildcard.
+ """
return _windows.FileDialog_GetWildcard(*args, **kwargs)
def GetStyle(*args, **kwargs):
- """GetStyle() -> long"""
+ """
+ GetStyle() -> long
+
+ Returns the dialog style.
+ """
return _windows.FileDialog_GetStyle(*args, **kwargs)
def GetFilterIndex(*args, **kwargs):
- """GetFilterIndex() -> int"""
+ """
+ GetFilterIndex() -> int
+
+ Returns the index into the list of filters supplied, optionally, in
+ the wildcard parameter. Before the dialog is shown, this is the index
+ which will be used when the dialog is first displayed. After the dialog
+ is shown, this is the index selected by the user.
+ """
return _windows.FileDialog_GetFilterIndex(*args, **kwargs)
def GetFilenames(*args, **kwargs):
- """GetFilenames() -> PyObject"""
+ """
+ GetFilenames() -> PyObject
+
+ Returns a list of filenames chosen in the dialog. This function should
+ only be used with the dialogs which have wx.MULTIPLE style, use
+ GetFilename for the others.
+ """
return _windows.FileDialog_GetFilenames(*args, **kwargs)
def GetPaths(*args, **kwargs):
- """GetPaths() -> PyObject"""
+ """
+ GetPaths() -> PyObject
+
+ Fills the array paths with the full paths of the files chosen. This
+ function should only be used with the dialogs which have wx.MULTIPLE style,
+ use GetPath for the others.
+ """
return _windows.FileDialog_GetPaths(*args, **kwargs)
}
-static PyObject *_wrap_ColourDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxColourDialog *arg1 = (wxColourDialog *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ColourDialog_ShowModal",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColourDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->ShowModal();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject * ColourDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
}
-static PyObject *_wrap_DirDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxDirDialog *arg1 = (wxDirDialog *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DirDialog_ShowModal",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDirDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->ShowModal();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject * DirDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"ColourData_swigregister", ColourData_swigregister, METH_VARARGS },
{ (char *)"new_ColourDialog", (PyCFunction) _wrap_new_ColourDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ColourDialog_GetColourData", (PyCFunction) _wrap_ColourDialog_GetColourData, METH_VARARGS | METH_KEYWORDS },
- { (char *)"ColourDialog_ShowModal", (PyCFunction) _wrap_ColourDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ColourDialog_swigregister", ColourDialog_swigregister, METH_VARARGS },
{ (char *)"new_DirDialog", (PyCFunction) _wrap_new_DirDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_GetPath", (PyCFunction) _wrap_DirDialog_GetPath, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_GetStyle", (PyCFunction) _wrap_DirDialog_GetStyle, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_SetMessage", (PyCFunction) _wrap_DirDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_SetPath", (PyCFunction) _wrap_DirDialog_SetPath, METH_VARARGS | METH_KEYWORDS },
- { (char *)"DirDialog_ShowModal", (PyCFunction) _wrap_DirDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_swigregister", DirDialog_swigregister, METH_VARARGS },
{ (char *)"new_FileDialog", (PyCFunction) _wrap_new_FileDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FileDialog_SetMessage", (PyCFunction) _wrap_FileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },
CHK_CHECKED = _controls.CHK_CHECKED
CHK_UNDETERMINED = _controls.CHK_UNDETERMINED
class CheckBox(core.Control):
+ """
+ A checkbox is a labelled box which by default is either on (checkmark is
+ visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
+ is set) it can have a third state, called the mixed or undetermined
+ state. Often this is used as a "Does Not Apply" state.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
__init__(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox
+
+ Creates and shows a CheckBox control
"""
newobj = _controls.new_CheckBox(*args, **kwargs)
self.this = newobj.this
Create(Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool
+
+ Actually create the GUI CheckBox for 2-phase creation.
"""
return _controls.CheckBox_Create(*args, **kwargs)
def GetValue(*args, **kwargs):
- """GetValue() -> bool"""
+ """
+ GetValue() -> bool
+
+ Gets the state of a 2-state CheckBox. Returns True if it is checked,
+ False otherwise.
+ """
return _controls.CheckBox_GetValue(*args, **kwargs)
def IsChecked(*args, **kwargs):
- """IsChecked() -> bool"""
+ """
+ IsChecked() -> bool
+
+ Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.
+ """
return _controls.CheckBox_IsChecked(*args, **kwargs)
def SetValue(*args, **kwargs):
- """SetValue(bool state)"""
+ """
+ SetValue(bool state)
+
+ Set the state of a 2-state CheckBox. Pass True for checked,
+ False for unchecked.
+ """
return _controls.CheckBox_SetValue(*args, **kwargs)
def Get3StateValue(*args, **kwargs):
- """Get3StateValue() -> int"""
+ """
+ Get3StateValue() -> int
+
+ Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when
+ it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.
+ Raises an exceptiion when the function is used with a 2-state CheckBox.
+ """
return _controls.CheckBox_Get3StateValue(*args, **kwargs)
def Set3StateValue(*args, **kwargs):
- """Set3StateValue(int state)"""
+ """
+ Set3StateValue(int state)
+
+ Sets the CheckBox to the given state. The state parameter can be
+ one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED
+ (Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an
+ exception when the CheckBox is a 2-state checkbox and setting the state
+ to wx.CHK_UNDETERMINED.
+ """
return _controls.CheckBox_Set3StateValue(*args, **kwargs)
def Is3State(*args, **kwargs):
- """Is3State() -> bool"""
+ """
+ Is3State() -> bool
+
+ Returns whether or not the CheckBox is a 3-state CheckBox.
+ """
return _controls.CheckBox_Is3State(*args, **kwargs)
def Is3rdStateAllowedForUser(*args, **kwargs):
- """Is3rdStateAllowedForUser() -> bool"""
+ """
+ Is3rdStateAllowedForUser() -> bool
+
+ Returns whether or not the user can set the CheckBox to the third state.
+ """
return _controls.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs)
CheckBoxNameStr = cvar.CheckBoxNameStr
def PreCheckBox(*args, **kwargs):
- """PreCheckBox() -> CheckBox"""
+ """
+ PreCheckBox() -> CheckBox
+
+ Precreate a CheckBox for 2-phase creation.
+ """
val = _controls.new_PreCheckBox(*args, **kwargs)
val.thisown = 1
return val
#---------------------------------------------------------------------------
class Choice(core.ControlWithItems):
+ """
+ A Choice control is used to select one of a list of strings. Unlike a ListBox,
+ only the selection is visible until the user pulls down the menu of choices.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
- __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> Choice
+
+ Create and show a Choice control
"""
newobj = _controls.new_Choice(*args, **kwargs)
self.this = newobj.this
def Create(*args, **kwargs):
"""
- Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- wxArrayString choices=wxPyEmptyStringArray,
- long style=0, Validator validator=DefaultValidator,
+ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ List choices=[], long style=0, Validator validator=DefaultValidator,
String name=ChoiceNameStr) -> bool
+
+ Actually create the GUI Choice control for 2-phase creation
"""
return _controls.Choice_Create(*args, **kwargs)
- def GetColumns(*args, **kwargs):
- """GetColumns() -> int"""
- return _controls.Choice_GetColumns(*args, **kwargs)
-
- def SetColumns(*args, **kwargs):
- """SetColumns(int n=1)"""
- return _controls.Choice_SetColumns(*args, **kwargs)
-
def SetSelection(*args, **kwargs):
- """SetSelection(int n)"""
+ """
+ SetSelection(int n)
+
+ Select the n'th item (zero based) in the list.
+ """
return _controls.Choice_SetSelection(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
- """SetStringSelection(String string)"""
+ """
+ SetStringSelection(String string)
+
+ Select the item with the specifed string
+ """
return _controls.Choice_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
- """SetString(int n, String s)"""
+ """
+ SetString(int n, String string)
+
+ Set the label for the n'th item (zero based) in the list.
+ """
return _controls.Choice_SetString(*args, **kwargs)
+ Select = SetSelection
class ChoicePtr(Choice):
def __init__(self, this):
ChoiceNameStr = cvar.ChoiceNameStr
def PreChoice(*args, **kwargs):
- """PreChoice() -> Choice"""
+ """
+ PreChoice() -> Choice
+
+ Precreate a Choice control for 2-phase creation.
+ """
val = _controls.new_PreChoice(*args, **kwargs)
val.thisown = 1
return val
}
-static PyObject *_wrap_Choice_GetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxChoice *arg1 = (wxChoice *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Choice_GetColumns",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->GetColumns();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Choice_SetColumns(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxChoice *arg1 = (wxChoice *) 0 ;
- int arg2 = (int) (int)1 ;
- PyObject * obj0 = 0 ;
- PyObject * obj1 = 0 ;
- char *kwnames[] = {
- (char *) "self",(char *) "n", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Choice_SetColumns",kwnames,&obj0,&obj1)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxChoice,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- if (obj1) {
- {
- arg2 = (int const) SWIG_PyObj_AsInt(obj1);
- if (PyErr_Occurred()) SWIG_fail;
- }
- }
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- (arg1)->SetColumns(arg2);
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- Py_INCREF(Py_None); resultobj = Py_None;
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject *_wrap_Choice_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxChoice *arg1 = (wxChoice *) 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
- (char *) "self",(char *) "n",(char *) "s", NULL
+ (char *) "self",(char *) "n",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Choice_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
{ (char *)"new_Choice", (PyCFunction) _wrap_new_Choice, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_PreChoice", (PyCFunction) _wrap_new_PreChoice, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_Create", (PyCFunction) _wrap_Choice_Create, METH_VARARGS | METH_KEYWORDS },
- { (char *)"Choice_GetColumns", (PyCFunction) _wrap_Choice_GetColumns, METH_VARARGS | METH_KEYWORDS },
- { (char *)"Choice_SetColumns", (PyCFunction) _wrap_Choice_SetColumns, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetSelection", (PyCFunction) _wrap_Choice_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetStringSelection", (PyCFunction) _wrap_Choice_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"Choice_SetString", (PyCFunction) _wrap_Choice_SetString, METH_VARARGS | METH_KEYWORDS },
self.this = newobj.this
self.thisown = 1
del newobj.thisown
- val._dc = args[0] # save a ref so the other dc will not be deleted before self
+ self._dc = args[0] # save a ref so the other dc will not be deleted before self
def UnMask(*args, **kwargs):
"""UnMask()"""
#---------------------------------------------------------------------------
class Clipboard(core.Object):
+ """
+ wx.Clipboard represents the system clipboard and provides methods to copy data
+ to or paste data from it. Normally, you should only use wx.TheClipboard which
+ is a reference to a global wx.Clipboard instance.
+
+ Call wx.TheClipboard.Open to get ownership of the clipboard. If this operation
+ returns True, you now own the clipboard. Call wx.TheClipboard.SetData to put
+ data on the clipboard, or wx.TheClipboard.GetData to retrieve data from the
+ clipboard. Call wx.TheClipboard.Close to close the clipboard and relinquish
+ ownership. You should keep the clipboard open only momentarily.
+
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxClipboard instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
except: pass
def Open(*args, **kwargs):
- """Open() -> bool"""
+ """
+ Open() -> bool
+
+ Call this function to open the clipboard before calling SetData
+ and GetData. Call Close when you have finished with the clipboard.
+ You should keep the clipboard open for only a very short time.
+ Returns true on success.
+ """
return _misc.Clipboard_Open(*args, **kwargs)
def Close(*args, **kwargs):
- """Close()"""
+ """
+ Close()
+
+ Closes the clipboard.
+ """
return _misc.Clipboard_Close(*args, **kwargs)
def IsOpened(*args, **kwargs):
- """IsOpened() -> bool"""
+ """
+ IsOpened() -> bool
+
+ Query whether the clipboard is opened
+ """
return _misc.Clipboard_IsOpened(*args, **kwargs)
def AddData(*args, **kwargs):
- """AddData(DataObject data) -> bool"""
+ """
+ AddData(DataObject data) -> bool
+
+ Call this function to add the data object to the clipboard. You
+ may call this function repeatedly after having cleared the clipboard.
+ After this function has been called, the clipboard owns the data, so
+ do not delete the data explicitly.
+ """
return _misc.Clipboard_AddData(*args, **kwargs)
def SetData(*args, **kwargs):
- """SetData(DataObject data) -> bool"""
+ """
+ SetData(DataObject data) -> bool
+
+ Set the clipboard data, this is the same as Clear followed by AddData.
+ """
return _misc.Clipboard_SetData(*args, **kwargs)
def IsSupported(*args, **kwargs):
- """IsSupported(DataFormat format) -> bool"""
+ """
+ IsSupported(DataFormat format) -> bool
+
+ Returns True if the given format is available in the data object(s) on
+ the clipboard.
+ """
return _misc.Clipboard_IsSupported(*args, **kwargs)
def GetData(*args, **kwargs):
- """GetData(DataObject data) -> bool"""
+ """
+ GetData(DataObject data) -> bool
+
+ Call this function to fill data with data on the clipboard, if available
+ in the required format. Returns true on success.
+ """
return _misc.Clipboard_GetData(*args, **kwargs)
def Clear(*args, **kwargs):
- """Clear()"""
+ """
+ Clear()
+
+ Clears data from the clipboard object and also the system's clipboard
+ if possible.
+ """
return _misc.Clipboard_Clear(*args, **kwargs)
def Flush(*args, **kwargs):
- """Flush() -> bool"""
+ """
+ Flush() -> bool
+
+ Flushes the clipboard: this means that the data which is currently on
+ clipboard will stay available even after the application exits (possibly
+ eating memory), otherwise the clipboard will be emptied on exit.
+ Returns False if the operation is unsuccesful for any reason.
+ """
return _misc.Clipboard_Flush(*args, **kwargs)
def UsePrimarySelection(*args, **kwargs):
- """UsePrimarySelection(bool primary=False)"""
+ """
+ UsePrimarySelection(bool primary=True)
+
+ On platforms supporting it (the X11 based platforms), selects the so
+ called PRIMARY SELECTION as the clipboard as opposed to the normal
+ clipboard, if primary is True.
+ """
return _misc.Clipboard_UsePrimarySelection(*args, **kwargs)
_misc.Clipboard_swigregister(ClipboardPtr)
class ClipboardLocker(object):
+ """
+ A helpful class for opening the clipboard and automatically closing it when
+ the locker is destroyed.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxClipboardLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Clipboard clipboard=None) -> ClipboardLocker"""
+ """
+ __init__(Clipboard clipboard=None) -> ClipboardLocker
+
+ A helpful class for opening the clipboard and automatically closing it when
+ the locker is destroyed.
+ """
newobj = _misc.new_ClipboardLocker(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def __nonzero__(*args, **kwargs):
- """__nonzero__() -> bool"""
+ """
+ __nonzero__() -> bool
+
+ A ClipboardLocker instance evaluates to True if the clipboard was
+ successfully opened.
+ """
return _misc.ClipboardLocker___nonzero__(*args, **kwargs)
static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxClipboard *arg1 = (wxClipboard *) 0 ;
- bool arg2 = (bool) False ;
+ bool arg2 = (bool) True ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
#---------------------------------------------------------------------------
class ColourData(core.Object):
+ """This class holds a variety of information related to colour dialogs."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColourData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__() -> ColourData"""
+ """
+ __init__() -> ColourData
+
+ Constructor, sets default values.
+ """
newobj = _windows.new_ColourData(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def GetChooseFull(*args, **kwargs):
- """GetChooseFull() -> bool"""
+ """
+ GetChooseFull() -> bool
+
+ Under Windows, determines whether the Windows colour dialog will display
+ the full dialog with custom colour selection controls. Has no meaning
+ under other platforms. The default value is true.
+ """
return _windows.ColourData_GetChooseFull(*args, **kwargs)
def GetColour(*args, **kwargs):
- """GetColour() -> Colour"""
+ """
+ GetColour() -> Colour
+
+ Gets the colour (pre)selected by the dialog.
+ """
return _windows.ColourData_GetColour(*args, **kwargs)
def GetCustomColour(*args, **kwargs):
- """GetCustomColour(int i) -> Colour"""
+ """
+ GetCustomColour(int i) -> Colour
+
+ Gets the i'th custom colour associated with the colour dialog. i should
+ be an integer between 0 and 15. The default custom colours are all white.
+ """
return _windows.ColourData_GetCustomColour(*args, **kwargs)
def SetChooseFull(*args, **kwargs):
- """SetChooseFull(int flag)"""
+ """
+ SetChooseFull(int flag)
+
+ Under Windows, tells the Windows colour dialog to display the full dialog
+ with custom colour selection controls. Under other platforms, has no effect.
+ The default value is true.
+ """
return _windows.ColourData_SetChooseFull(*args, **kwargs)
def SetColour(*args, **kwargs):
- """SetColour(Colour colour)"""
+ """
+ SetColour(Colour colour)
+
+ Sets the default colour for the colour dialog. The default colour is black.
+ """
return _windows.ColourData_SetColour(*args, **kwargs)
def SetCustomColour(*args, **kwargs):
- """SetCustomColour(int i, Colour colour)"""
+ """
+ SetCustomColour(int i, Colour colour)
+
+ Sets the i'th custom colour for the colour dialog. i should be an integer
+ between 0 and 15. The default custom colours are all white.
+ """
return _windows.ColourData_SetCustomColour(*args, **kwargs)
MessageBoxCaptionStr = cvar.MessageBoxCaptionStr
class ColourDialog(Dialog):
+ """This class represents the colour chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColourDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Window parent, ColourData data=None) -> ColourDialog"""
+ """
+ __init__(Window parent, ColourData data=None) -> ColourDialog
+
+ Constructor. Pass a parent window, and optionally a ColourData, which
+ will be copied to the colour dialog's internal ColourData instance.
+ """
newobj = _windows.new_ColourDialog(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
self._setOORInfo(self)
def GetColourData(*args, **kwargs):
- """GetColourData() -> ColourData"""
- return _windows.ColourDialog_GetColourData(*args, **kwargs)
+ """
+ GetColourData() -> ColourData
- def ShowModal(*args, **kwargs):
- """ShowModal() -> int"""
- return _windows.ColourDialog_ShowModal(*args, **kwargs)
+ Returns a reference to the ColourData used by the dialog.
+ """
+ return _windows.ColourDialog_GetColourData(*args, **kwargs)
class ColourDialogPtr(ColourDialog):
_windows.ColourDialog_swigregister(ColourDialogPtr)
class DirDialog(Dialog):
+ """This class represents the directory chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxDirDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
String defaultPath=EmptyString, long style=0,
Point pos=DefaultPosition, Size size=DefaultSize,
String name=DirDialogNameStr) -> DirDialog
+
+ Constructor. Use ShowModal method to show the dialog.
"""
newobj = _windows.new_DirDialog(*args, **kwargs)
self.this = newobj.this
self._setOORInfo(self)
def GetPath(*args, **kwargs):
- """GetPath() -> String"""
+ """
+ GetPath() -> String
+
+ Returns the default or user-selected path.
+ """
return _windows.DirDialog_GetPath(*args, **kwargs)
def GetMessage(*args, **kwargs):
- """GetMessage() -> String"""
+ """
+ GetMessage() -> String
+
+ Returns the message that will be displayed on the dialog.
+ """
return _windows.DirDialog_GetMessage(*args, **kwargs)
def GetStyle(*args, **kwargs):
- """GetStyle() -> long"""
+ """
+ GetStyle() -> long
+
+ Returns the dialog style.
+ """
return _windows.DirDialog_GetStyle(*args, **kwargs)
def SetMessage(*args, **kwargs):
- """SetMessage(String message)"""
+ """
+ SetMessage(String message)
+
+ Sets the message that will be displayed on the dialog.
+ """
return _windows.DirDialog_SetMessage(*args, **kwargs)
def SetPath(*args, **kwargs):
- """SetPath(String path)"""
- return _windows.DirDialog_SetPath(*args, **kwargs)
+ """
+ SetPath(String path)
- def ShowModal(*args, **kwargs):
- """ShowModal() -> int"""
- return _windows.DirDialog_ShowModal(*args, **kwargs)
+ Sets the default path.
+ """
+ return _windows.DirDialog_SetPath(*args, **kwargs)
class DirDialogPtr(DirDialog):
_windows.DirDialog_swigregister(DirDialogPtr)
class FileDialog(Dialog):
+ """This class represents the file chooser dialog."""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFileDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
String defaultDir=EmptyString, String defaultFile=EmptyString,
String wildcard=FileSelectorDefaultWildcardStr,
long style=0, Point pos=DefaultPosition) -> FileDialog
+
+ Constructor. Use ShowModal method to show the dialog.
"""
newobj = _windows.new_FileDialog(*args, **kwargs)
self.this = newobj.this
self._setOORInfo(self)
def SetMessage(*args, **kwargs):
- """SetMessage(String message)"""
+ """
+ SetMessage(String message)
+
+ Sets the message that will be displayed on the dialog.
+ """
return _windows.FileDialog_SetMessage(*args, **kwargs)
def SetPath(*args, **kwargs):
- """SetPath(String path)"""
+ """
+ SetPath(String path)
+
+ Sets the path (the combined directory and filename that will
+ be returned when the dialog is dismissed).
+ """
return _windows.FileDialog_SetPath(*args, **kwargs)
def SetDirectory(*args, **kwargs):
- """SetDirectory(String dir)"""
+ """
+ SetDirectory(String dir)
+
+ Sets the default directory.
+ """
return _windows.FileDialog_SetDirectory(*args, **kwargs)
def SetFilename(*args, **kwargs):
- """SetFilename(String name)"""
+ """
+ SetFilename(String name)
+
+ Sets the default filename.
+ """
return _windows.FileDialog_SetFilename(*args, **kwargs)
def SetWildcard(*args, **kwargs):
- """SetWildcard(String wildCard)"""
+ """
+ SetWildcard(String wildCard)
+
+ Sets the wildcard, which can contain multiple file types, for example:
+ "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
+ """
return _windows.FileDialog_SetWildcard(*args, **kwargs)
def SetStyle(*args, **kwargs):
- """SetStyle(long style)"""
+ """
+ SetStyle(long style)
+
+ Sets the dialog style.
+ """
return _windows.FileDialog_SetStyle(*args, **kwargs)
def SetFilterIndex(*args, **kwargs):
- """SetFilterIndex(int filterIndex)"""
+ """
+ SetFilterIndex(int filterIndex)
+
+ Sets the default filter index, starting from zero.
+ """
return _windows.FileDialog_SetFilterIndex(*args, **kwargs)
def GetMessage(*args, **kwargs):
- """GetMessage() -> String"""
+ """
+ GetMessage() -> String
+
+ Returns the message that will be displayed on the dialog.
+ """
return _windows.FileDialog_GetMessage(*args, **kwargs)
def GetPath(*args, **kwargs):
- """GetPath() -> String"""
+ """
+ GetPath() -> String
+
+ Returns the full path (directory and filename) of the selected file.
+ """
return _windows.FileDialog_GetPath(*args, **kwargs)
def GetDirectory(*args, **kwargs):
- """GetDirectory() -> String"""
+ """
+ GetDirectory() -> String
+
+ Returns the default directory.
+ """
return _windows.FileDialog_GetDirectory(*args, **kwargs)
def GetFilename(*args, **kwargs):
- """GetFilename() -> String"""
+ """
+ GetFilename() -> String
+
+ Returns the default filename.
+ """
return _windows.FileDialog_GetFilename(*args, **kwargs)
def GetWildcard(*args, **kwargs):
- """GetWildcard() -> String"""
+ """
+ GetWildcard() -> String
+
+ Returns the file dialog wildcard.
+ """
return _windows.FileDialog_GetWildcard(*args, **kwargs)
def GetStyle(*args, **kwargs):
- """GetStyle() -> long"""
+ """
+ GetStyle() -> long
+
+ Returns the dialog style.
+ """
return _windows.FileDialog_GetStyle(*args, **kwargs)
def GetFilterIndex(*args, **kwargs):
- """GetFilterIndex() -> int"""
+ """
+ GetFilterIndex() -> int
+
+ Returns the index into the list of filters supplied, optionally, in
+ the wildcard parameter. Before the dialog is shown, this is the index
+ which will be used when the dialog is first displayed. After the dialog
+ is shown, this is the index selected by the user.
+ """
return _windows.FileDialog_GetFilterIndex(*args, **kwargs)
def GetFilenames(*args, **kwargs):
- """GetFilenames() -> PyObject"""
+ """
+ GetFilenames() -> PyObject
+
+ Returns a list of filenames chosen in the dialog. This function should
+ only be used with the dialogs which have wx.MULTIPLE style, use
+ GetFilename for the others.
+ """
return _windows.FileDialog_GetFilenames(*args, **kwargs)
def GetPaths(*args, **kwargs):
- """GetPaths() -> PyObject"""
+ """
+ GetPaths() -> PyObject
+
+ Fills the array paths with the full paths of the files chosen. This
+ function should only be used with the dialogs which have wx.MULTIPLE style,
+ use GetPath for the others.
+ """
return _windows.FileDialog_GetPaths(*args, **kwargs)
}
-static PyObject *_wrap_ColourDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxColourDialog *arg1 = (wxColourDialog *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ColourDialog_ShowModal",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColourDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->ShowModal();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject * ColourDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
}
-static PyObject *_wrap_DirDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject *resultobj;
- wxDirDialog *arg1 = (wxDirDialog *) 0 ;
- int result;
- PyObject * obj0 = 0 ;
- char *kwnames[] = {
- (char *) "self", NULL
- };
-
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:DirDialog_ShowModal",kwnames,&obj0)) goto fail;
- if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDirDialog,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
- {
- PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = (int)(arg1)->ShowModal();
-
- wxPyEndAllowThreads(__tstate);
- if (PyErr_Occurred()) SWIG_fail;
- }
- resultobj = SWIG_PyObj_FromInt((int)result);
- return resultobj;
- fail:
- return NULL;
-}
-
-
static PyObject * DirDialog_swigregister(PyObject *self, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"ColourData_swigregister", ColourData_swigregister, METH_VARARGS },
{ (char *)"new_ColourDialog", (PyCFunction) _wrap_new_ColourDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ColourDialog_GetColourData", (PyCFunction) _wrap_ColourDialog_GetColourData, METH_VARARGS | METH_KEYWORDS },
- { (char *)"ColourDialog_ShowModal", (PyCFunction) _wrap_ColourDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ColourDialog_swigregister", ColourDialog_swigregister, METH_VARARGS },
{ (char *)"new_DirDialog", (PyCFunction) _wrap_new_DirDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_GetPath", (PyCFunction) _wrap_DirDialog_GetPath, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_GetStyle", (PyCFunction) _wrap_DirDialog_GetStyle, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_SetMessage", (PyCFunction) _wrap_DirDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_SetPath", (PyCFunction) _wrap_DirDialog_SetPath, METH_VARARGS | METH_KEYWORDS },
- { (char *)"DirDialog_ShowModal", (PyCFunction) _wrap_DirDialog_ShowModal, METH_VARARGS | METH_KEYWORDS },
{ (char *)"DirDialog_swigregister", DirDialog_swigregister, METH_VARARGS },
{ (char *)"new_FileDialog", (PyCFunction) _wrap_new_FileDialog, METH_VARARGS | METH_KEYWORDS },
{ (char *)"FileDialog_SetMessage", (PyCFunction) _wrap_FileDialog_SetMessage, METH_VARARGS | METH_KEYWORDS },