Gnm.Func¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Is function being used? |
||
r/w/co |
The name of the function. |
||
r/w |
The translation domain for help texts |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Signals that a function call’s derivative should be calculated |
|
Signals that an expressions that is a call to func is being linked or unlinked. |
|
Signals that func, which is a stub, needs to be loaded now. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
arg_names |
[ |
r |
|
arg_spec |
r |
||
arg_types |
r |
||
args_func |
r |
||
base |
r |
||
flags |
r |
||
fn_group |
r |
||
fn_type |
r |
||
help |
r |
||
help_count |
r |
||
impl_status |
r |
||
localized_name |
r |
||
max_args |
r |
||
min_args |
r |
||
name |
r |
||
nodes_func |
r |
||
tdomain |
r |
||
test_status |
r |
||
usage_count |
r |
Class Details¶
- class Gnm.Func(**kwargs)¶
- Bases:
- Abstract:
No
- classmethod add(group, descriptor, tdomain)¶
- Parameters:
group (
Gnm.FuncGroup
) –descriptor (
Gnm.FuncDescriptor
) –
- Returns:
a new
Gnm.Func
.- Return type:
- classmethod add_placeholder(scope, name, type)¶
- classmethod add_placeholder_localized(gname, lname)¶
- classmethod convert_markup_to_pango(desc, target)¶
- Parameters:
desc (
str
) – the fn or arg description stringtarget (
Gtk.Widget
) – target widget for the markup.
- Returns:
the escaped string with @{} markup converted to pango markup
- Return type:
- classmethod lookup(name, scope)¶
- classmethod lookup_localized(name, scope)¶
- classmethod lookup_or_add_placeholder(name)¶
- classmethod lookup_prefix(prefix, scope, trans)¶
- Parameters:
prefix (
str
) – prefix to search forscope (
Gnm.Workbook
) –trans (
bool
) – whether to search translated function names
- Returns:
A list of functions whose names start with prefix.
- Return type:
[
Gnm.Func
]
- count_args()¶
- Returns:
- min:
location for minimum args
- max:
location for maximum args
- Return type:
This calculates the maximum and minimum number of args that can be passed. For a vararg function, the maximum will be set to
GObject.G_MAXINT
.
- dec_usage()¶
This function decrements the usage
GOffice.count
of self. When the usageGOffice.count
reaches zero, the function may be unloaded, for example by unloading the plugin that defines it.
- derivative(expr, ep, info)¶
- Parameters:
expr (
Gnm.Expr
) – expression that calls selfep (
Gnm.EvalPos
) – position of exprinfo (
Gnm.ExprDeriv
) –Gnm.ExprDeriv
- Returns:
the derivative of expr with respect to info.
- Return type:
- dispose()¶
- get_arg_description(arg_idx)¶
- get_arg_name(arg_idx)¶
- get_arg_type(arg_idx)¶
- get_arg_type_string(arg_idx)¶
- get_flags()¶
- Return type:
- get_function_group()¶
- Returns:
the function group to which self belongs.
- Return type:
- get_help()¶
- Returns:
self's help items.
- Return type:
[
Gnm.FuncHelp
] orNone
- get_impl_status()¶
- Return type:
- get_name(localized)¶
- get_test_status()¶
- Return type:
- gettext(str)¶
- inc_usage()¶
- Returns:
a new reference to self.
- Return type:
This function increments the usage
GOffice.count
of self. A non-zero usageGOffice.count
prevents the unloading of the function.
- link_dep(ei, qlink)¶
- Parameters:
ei (
Gnm.FuncEvalInfo
) –qlink (
bool
) –
- Return type:
- load_if_stub()¶
- set_flags(f)¶
- Parameters:
f (
Gnm.FuncFlags
) –
- set_from_desc(desc)¶
- Parameters:
desc (
Gnm.FuncDescriptor
) –
- set_function_group(group)¶
- Parameters:
group (
Gnm.FuncGroup
) –
- set_help(help, n)¶
- Parameters:
help (
Gnm.FuncHelp
) –n (
int
) –
- set_impl_status(st)¶
- Parameters:
st (
Gnm.FuncImplStatus
) –
- set_stub()¶
- set_test_status(st)¶
- Parameters:
st (
Gnm.FuncTestStatus
) –
Signal Details¶
- Gnm.Func.signals.derivative(func, expr, ep, info)¶
- Signal Name:
derivative
- Flags:
- Parameters:
func (
Gnm.Func
) – The object which received the signalexpr (
Gnm.Expr
) –Gnm.Expr
for the call for which the derivative is soughtep (
Gnm.EvalPos
) – position f exprinfo (
Gnm.ExprDeriv
) –Gnm.ExprDeriv
telling which derivative is sought
- Returns:
- Return type:
Signals that a function call’s derivative should be calculated
- Gnm.Func.signals.link_dep(func, ei, qlink)¶
- Signal Name:
link-dep
- Flags:
- Parameters:
- Returns:
A
Gnm.DependentFlags
allowing arguments not be be linked if that is appropriate.- Return type:
Signals that an expressions that is a call to func is being linked or unlinked. Most functions do not need this.
- Gnm.Func.signals.load_stub(func)¶
- Signal Name:
load-stub
- Flags:
- Parameters:
func (
Gnm.Func
) – The object which received the signal
Signals that func, which is a stub, needs to be loaded now. Anyone creating a stub function should arrange for this signal to be caught and the function to be properly instantiated.
Property Details¶
- Gnm.Func.props.in_use¶
-
Is function being used?
- Gnm.Func.props.name¶
- Name:
name
- Type:
- Default Value:
- Flags:
The name of the function.