Class: Gnm::Func

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.add(group, descriptor, tdomain) ⇒ Gnm::Func

Returns a new Gnm::Func.

Parameters:

  • group (Gnm::FuncGroup)
  • descriptor (Gnm::FuncDescriptor)
  • tdomain (String)

Returns:

.add_placeholder(scope, name, type) ⇒ Gnm::Func

Returns a placeholder with the given name.

Parameters:

  • scope (Gnm::Workbook)

    scope to defined placeholder, nil for global

  • name (String)

    function name

  • type (String)

Returns:

  • (Gnm::Func)

    a placeholder with the given name.

.add_placeholder_localized(gname, lname) ⇒ Gnm::Func

Returns a placeholder with the given localized name.

Parameters:

  • gname (String)

    function name

  • lname (String)

    localized function name

Returns:

  • (Gnm::Func)

    a placeholder with the given localized name.

.builtin_initnil

Returns:

  • (nil)

.builtin_shutdownnil

Returns:

  • (nil)

.convert_markup_to_pango(desc, target) ⇒ String

Returns the escaped string with @{} markup converted to pango markup.

Parameters:

  • desc (String)

    the fn or arg description string

  • target (Gtk::Widget)

    target widget for the markup.

Returns:

  • (String)

    the escaped string with @{} markup converted to pango markup

.enumerateArray<Gnm::Func>

Returns:

.init_nil

Returns:

  • (nil)

.lookup(name, scope) ⇒ Gnm::Func

Returns the function of that name.

Parameters:

  • name (String)

    name of function

  • scope (Gnm::Workbook)

    scope of function, nil for global

Returns:

.lookup_localized(name, scope) ⇒ Gnm::Func

Returns the function of that name.

Parameters:

  • name (String)

    localized name of function

  • scope (Gnm::Workbook)

    scope of function, nil for global

Returns:

.lookup_or_add_placeholder(name) ⇒ Gnm::Func

one or a placeholder.

Parameters:

  • name (String)

    function name

Returns:

  • (Gnm::Func)

    a Gnm::Func named name, either an existing

.lookup_prefix(prefix, scope, trans) ⇒ GLib::SList<Gnm::Func>

whose names start with prefix.

Parameters:

  • prefix (String)

    prefix to search for

  • scope (Gnm::Workbook)
  • trans (Boolean)

    whether to search translated function names

Returns:

  • (GLib::SList<Gnm::Func>)

    A list of functions

.shutdown_nil

Returns:

  • (nil)

Instance Method Details

#count_args(min, max) ⇒ nil

This calculates the maximum and minimum number of args that can be passed. For a vararg function, the maximum will be set to G_MAXINT.

Parameters:

  • min (Integer)

    location for minimum args

  • max (Integer)

    location for maximum args

Returns:

  • (nil)

#dec_usagenil

This function decrements the usage count of func. When the usage count reaches zero, the function may be unloaded, for example by unloading the plugin that defines it.

Returns:

  • (nil)

#derivative(expr, ep, info) ⇒ Gnm::Expr

info.

Parameters:

  • expr (Gnm::Expr)

    expression that calls func

  • ep (Gnm::EvalPos)

    position of expr

  • info (Gnm::ExprDeriv)

    Gnm::ExprDeriv

Returns:

  • (Gnm::Expr)

    the derivative of expr with respect to

#descriptionString

Returns the description of the function.

Returns:

  • (String)

    the description of the function

#disposenil

Returns:

  • (nil)

#flagsGnm::FuncFlags

Returns:

#flags=(f) ⇒ nil

Parameters:

Returns:

  • (nil)

#from_desc=(desc) ⇒ nil

Parameters:

  • desc (Gnm::FuncDescriptor)

Returns:

  • (nil)

#function_groupGnm::FuncGroup

Returns the function group to which func belongs.

Returns:

  • (Gnm::FuncGroup)

    the function group to which func belongs.

#function_group=(group) ⇒ nil

Parameters:

  • group (Gnm::FuncGroup)

Returns:

  • (nil)

#get_arg_description(arg_idx) ⇒ String

Returns the description of the argument.

Parameters:

  • arg_idx (Integer)

    zero-based argument offset

Returns:

  • (String)

    the description of the argument

#get_arg_name(arg_idx) ⇒ String

Returns the name of the argument.

Parameters:

  • arg_idx (Integer)

    zero-based argument offset

Returns:

  • (String)

    the name of the argument

#get_arg_type(arg_idx) ⇒ Gnm::gchar

Returns the type of the argument.

Parameters:

  • arg_idx (Integer)

    zero-based argument offset

Returns:

  • (Gnm::gchar)

    the type of the argument

#get_arg_type_string(arg_idx) ⇒ String

Returns the type of the argument as a string.

Parameters:

  • arg_idx (Integer)

    zero-based argument offset

Returns:

  • (String)

    the type of the argument as a string

#get_help(n) ⇒ Array<Gnm::FuncHelp>

Returns func's help items.

Parameters:

  • n (Integer)

    number of help items, not counting the end item

Returns:

  • (Array<Gnm::FuncHelp>)

    func's help items.

#get_name(localized) ⇒ String

Returns func's name.

Parameters:

  • localized (Boolean)

    if true, use localized name

Returns:

  • (String)

    func's name

#gettext(str) ⇒ String

domain.

Parameters:

  • str (String)

    string to translate

Returns:

  • (String)

    str translated in func's translation

#impl_statusGnm::FuncImplStatus

Returns:

#impl_status=(st) ⇒ nil

Parameters:

Returns:

  • (nil)

#in_useBoolean

Returns:

  • (Boolean)

#in_use=(in_use) ⇒ Boolean

Parameters:

  • in_use (Boolean)

Returns:

  • (Boolean)

    in-use

  • (Boolean)

    in-use

#in_use?Boolean

Returns in-use.

Returns:

  • (Boolean)

    in-use

#inc_usageGnm::Func

This function increments the usage count of func. A non-zero usage count prevents the unloading of the function.

Returns:

#is_fixargsBoolean

Returns:

  • (Boolean)

#is_varargsBoolean

Returns:

  • (Boolean)

Parameters:

  • ei (Gnm::FuncEvalInfo)
  • qlink (Boolean)

Returns:

#load_if_stubnil

Returns:

  • (nil)

#nameString

Returns name.

Returns:

  • (String)

    name

#name=(name) ⇒ String

Parameters:

  • name (String)

Returns:

  • (String)

    name

  • (String)

    name

#set_fixargs(fn, spec) ⇒ nil

Parameters:

  • fn (Gnm::FuncArgs)

    evaluation function

  • spec (String)

    argument type specification

Returns:

  • (nil)

#set_help(help, n) ⇒ nil

Parameters:

  • help (Gnm::FuncHelp)
  • n (Integer)

Returns:

  • (nil)

#set_stubnil

Returns:

  • (nil)

#set_varargs(fn, spec) ⇒ nil

Parameters:

  • fn (Gnm::FuncNodes)

    evaluation function

  • spec (String)

    argument type specification

Returns:

  • (nil)

#test_statusGnm::FuncTestStatus

Returns:

#test_status=(st) ⇒ nil

Parameters:

Returns:

  • (nil)

#translation_domainString

Returns translation-domain.

Returns:

  • (String)

    translation-domain

#translation_domain=(translation_domain) ⇒ String

Parameters:

  • translation_domain (String)

Returns:

  • (String)

    translation-domain

  • (String)

    translation-domain