add_keyarg(self,
name=None,
default=None,
py_type=None,
arg_type=None,
dim=None,
min=0,
max=1000,
desc_short=None,
desc=None,
list_titles=None,
wiz_element_type=' default ' ,
wiz_combo_choices=None,
wiz_combo_data=None,
wiz_combo_iter=None,
wiz_combo_list_min=None,
wiz_filesel_wildcard=u' * ' ,
wiz_filesel_style=None,
wiz_dirsel_style=536877120,
wiz_read_only=None,
wiz_filesel_preview=True,
can_be_none=False,
can_be_empty=False,
none_elements=False)
| source code
|
Wrapper method for adding keyword argument information to the
container.
- Parameters:
name (str) - The name of the argument.
default (anything) - The default value of the argument.
py_type (str) - The Python object type that the argument must match (taking the
can_be_none flag into account).
arg_type (str) - The type of argument. This is reserved for special UI elements:
-
'file sel' will indicate to certain UIs that a file selection
dialog is required.
-
'dir' will cause the argument to not be shown in certain UIs,
as this indicates that the user function already has a 'file
sel' type argument and hence a directory is not required.
-
'dir sel' will indicate to certain UIs that a dir selection
dialog is required.
dim (int, tuple of int or None) - The fixed dimensions that a list or tuple must conform to. For a
1D sequence, this can be a single value or a tuple of possible
sizes. For a 2D sequence (a numpy matrix or list of lists), this
must be a tuple of the fixed dimension sizes, e.g. a 3x5 matrix
should be specified as (3, 5).
min (int) - The minimum value allowed for integer types. This is used in the
wx.SpinCtrl for example.
max (int) - The maximum value allowed for integer types. This is used in the
wx.SpinCtrl for example.
desc_short (str) - The short human-readable description of the argument. This is
used in the RelaxError messages to refer to the argument, as well
as in the GUI user function page elements.
desc (str) - The long human-readable description of the argument.
list_titles (list of str) - The titles of each of the elements of the fixed width second
dimension. This only applies to list of lists.
wiz_element_type (str) - The type of GUI element to create. If left to 'default', then
the currently set default element will be used. If set to
'text', a wx.TextCtrl element will be used. If set to 'combo', a
wx.ComboBox element will be used.
wiz_combo_choices (list of str) - The list of choices to present to the user. This is only used if
the element_type is set to 'combo'.
wiz_combo_data (list) - The data returned by a call to GetValue(). This is only used if
the element_type is set to 'combo'. If supplied, it should be
the same length at the combo_choices list. If not supplied, the
combo_choices list will be used for the returned data.
wiz_combo_iter (iterator or None) - An iterator method for regenerating the ComboBox choices.
wiz_combo_list_min (int or None) - The minimum length of the Combo_list element.
wiz_filesel_wildcard (str or None) - The file selection dialog wildcard string. For example for
opening PDB files, this could be "PDB files
(*.pdb)|*.pdb;*.PDB".
wiz_filesel_style (int) - The file selection dialog style.
wiz_dirsel_style (int) - The directory selection dialog style.
wiz_read_only (bool or None) - A flag which if True means that the text of the GUI wizard page
element cannot be edited. If the default of None is given, then
each UI element will decide for itself what to do.
wiz_filesel_preview (bool) - A flag which if True will enable the preview button in the file
selection GUI wizard page element.
can_be_none (bool) - A flag which specifies if the argument is allowed to have the
None value.
can_be_empty (bool) - A flag which if True allows the sequence type object to be empty.
none_elements (bool) - A flag which if True allows the sequence type object to contain
None elements.
|