From OpenSCADAWiki
Jump to: navigation, search

Enter a message name below to show all available translations.

Message

Found 3 translations.

NameCurrent message text
 h English (en)=== {{Anch|UserAPI|User programming API}} ===
Due to the support of the logical type parameters, it makes sense to provide a number of functions of the user API for calling them from the template of the logical parameter.
<section begin=API />
'''The object "Parameter" [this]'''
* ''bool attrAdd( string id, string name, string tp = "real", string selValsNms = "" )'' [<span style="color: red">for enabled parameter of the logical type</span>] — adds the attribute ''id'' with the name ''name'' and the type ''tp''. If the attribute is already present, the properties will be applied that can be changed on the go: name, selection mode and selection options.
** ''id, name'' — identifier and name of the new attribute;
** ''tp'' — attribute type [boolean | integer | real | string | text | object] + selection mode [sel | seled] + read-only [ro];
** ''selValsNms'' — two lines with values in first and their names in second, separated by ";".
* ''bool attrDel( string id )'' [<span style="color: red">for enabled parameter of the logical type</span>] — removes the attribute ''id''.
<section end=API />
 h Russian (ru)=== {{Anch|UserAPI|API пользовательского программирования}} ===
В виду поддержки параметров логического типа, имеет смысл предоставление ряда функций пользовательского API для их вызова из шаблона логического параметра.
<section begin=API />
'''Объект "Параметр" [this]'''
* ''bool attrAdd( string id, string name, string tp = "real", string selValsNms = "" )'' [<span style="color: red">для включенного параметра логического типа</span>] — добавление атрибута ''id'' с именем ''name'' и типом ''tp''. Если атрибут уже присутствует то будут применены свойства, которые возможно изменить "на ходу": имя, режим выбора и параметры выбора.
** ''id, name'' — идентификатор и имя нового атрибута;
** ''tp'' — тип атрибута [boolean | integer | real | string | text | object] + режим выбора [sel | seled] + только для чтения [ro];
** ''selValsNms'' — две строки со значениями в первой и их именами во второй, разделённые ";".
* ''bool attrDel( string id )'' [<span style="color: red">для включенного параметра логического типа</span>] — удаление атрибута ''id''.
<section end=API />
 h Ukrainian (uk)=== {{Anch|UserAPI|API користувацького програмування}} ===
У зв'язку із підтримкою параметрів логічного типу, має сенс надання низки функцій користувацького API для їх виклику із шаблону логічного параметру.
<section begin=API />
'''Об'єкт "Параметр" [this]'''
* ''bool attrAdd( string id, string name, string tp = "real", string selValsNms = "" )'' [<span style="color: red">для включеного параметру логічного типу</span>] — додання атрибуту ''id'' з ім'ям ''name'' та типом ''tp''. Якщо атрибут вже присутній то будуть застосовані властивості, які можливо змінити "на ходу": ім'я, режим вибору та параметри вибору.
** ''id, name'' — ідентифікатор та ім'я нового атрибуту;
** ''tp'' — тип атрибута [boolean | integer | real | string | text | object] + режим вибору [sel | seled] + тільки для читання [ro];
** ''selValsNms'' — два рядки зі значеннями у першому та їх іменами у другому, поділені ";".
* ''bool attrDel( string id )'' [<span style="color: red">для включеного параметру логічного типу</span>] — видалення атрибуту ''id''.
<section end=API />