Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы IRidium studio 2019 Programming. Перевод выполнен на 86%.

  • iRidium studio 2019
  • Actions when an interface item is pressed
  • Содержание

    • 1 Actions when an interface item is pressed
      • 1.1 Sequence of interface events
      • 1.2 Macros Editor
        • 1.2.1 Script Call. Activating JS functions
        • 1.2.2 Relations: item relations

    Actions when an interface item is pressed

    Interface items, that do commands when they are pressed are pages, graphic items - text, buttons, levels, joysticks, etc.

    Popups can't do commands when they are pressed.

    Besides presses, pages can process gestures, for example, swipes.


    There are graphic items on pages and popups of a visualization interface. They do certain actions when they are pressed or change their appearance when data are received from equipment. Item behavior depends on its settings, all commands that it sends are shown in the PROGRAMMING folder.

    Select an item in the workspace and open the PROGRAMMING tab to see what actions and when it will do:

    Programming1.png

    Press, release and move are different events, a graphical interface can react to. Pages, graphical items, list items support different sets of events, thus they follow different rules to send commands.

    Main events:

    • Press sends a command the moment a button is pressed;
    • Release sends a command the moment a button is released;
    • Hold sends commands in cycles as long as an item is held;
    • End Of Hold send a command one time when a button is released after it is held for a long time;
    • Move sends commands when a slider bar or a joystick is moved;
    • Select selects an item and a subite in a List (script list). Access via List API;
    • Enter - pressing the Enter button in Edit Box;
    • Change - an event of entering a simbol in Edit Box. Access via GUI API;
    • Lost Focus - an event generated by any item regardless of its type and conditions the moment an item is released. The event means that an item lost focus (activity). The event is available for processing only via GUI API;
    • Gestures - gestures (swipe). A gesture can be processed only by a page (a gesture for a popup or area or item can't be set). A gesture can start on the page itself, on a graphical item or in a popup, but it is sent to the parent page and commands set for a page are done. There is an exception: Level, Joystic, List and Static List, that proccess Move event instead of gestures. Download an example of gesture use.


    Sequence of interface events

    On pages and popups which are not parts of Static List or List, buttons behave as follows:

    1. short press on an item generates the Press > Release events;
    2. long press on an item generate the Press > Hold > End Of Hold events;
    3. moving of Level and Joystick slider generates the Press > Move > Releaseevents;
    4. release of any item generates the Lost Focus event.


    In List and Static List the sequence of events can be interrupted with scrolling a list. Scrolling can start on a popup and a graphical item, that stops doing commands:

    1. start of scrolling turns off the Release event. That's why when there is a short press and a shoft, the Press event of a button is activated and then scrolling;
    2. start of scrolling turns off the Hold event and End Of Hold is generated;
    3. When any item is released the Lost Focus event is generated.


    Tips on setting commands:

    • If a button works on a regular page, commands must be assigned to the Press event, if a button is in a list - to the Release event;
    • If a button must do different commands by short and long press, assign the "short" command to Release, and the "long one" to Hold and then set HoldTime;
    • If an pulse must be sent (first 1, then 0) by short press, there are two ways:
      • assign sending 1 to Press 1, and sending 0 - to Release. It allows to control the length of pulse with the time a button is held. But in the list, scrolling cancels the Release event, that's whye sending 0 must be repeated in End Of Hold;
      • assign both 1 and 0 commands to Release and set a Delay between them. The pulse has a set length and it's work is predictable in a list.

    Macros Editor

    Commands that are done when an event happens are macros, They are set by clicking [+] next to the name of an event:

    Programming2.png

    Macros commands are done one after another from top to bottom. Here are possible commands:

    • Actions (commands to change pages):
      • Show page [page name]. Open a page (only one page can be opened at a time in a project). The name of the page that must be opened is entered in the parameters of the command;
      • Show previous page. Show the previous open page of the project;
      • Show popup [popup name]. Show a popup (numerous popups can be opened at a time). The name of the popup that must be opened is entered in the parameters of the command and optionally coordinates of the place where to show it can be entered;
      • Hide popup [popup name]. Hide a popup;
      • Toggle popup [popup name]. Toggle a popup (show if it is hidden, hide if it is shown);
      • Hide popup group [name of popup group]. Hide popups, included in the group;
      • Hide popups on page [page name]. Hide all popups on the page;
      • Hide all popups. Hide all popups in the interface.
    • Sounds (control of sounds):
      • Play sound [file, track number, volume, cycle]. Start playing an audio file;
      • Play system sound [sound, track number, volume]. Play a standard sound;
      • Stop sound [file]. Stop playing an audio file;
      • Stop slot [track number]. Stop playing an audio file on a selected track;
      • Stop all sounds. Stop playing all sounds in a project;
    • Send to driver (sending values to driver commands):
      • Number. Send a constant, a decimal number (DEC);
      • Text. Send a constant, data string (ASCII);
      • Data. Send a constant, binary data (BIN);
      • Value from object. Send data extracted from project variables (Value, coordinates, dimensions, etc., value variables defined by object properties).
    • Send to object (sending data to variables - element properties, drivers, project tokens):
      • Number. Write a constant number (DEC) to a variable;
      • Text. Write a constant string (ASCII) to a variable;
      • Value from object. Write a variable to a variable (e.g., an element property to a project token).
    • Other (other commands):
      • Delay [ms]. Set a delay between macros commands (set as required);
      • Script Call. Call iRidium Script function by name;
      • Keyboard [type of keyboard]. Show a virtual keyboard of a control panel;
      • Hide keyboard. Hide a virtual keyboard of a control panel;
      • Minimize (for Windows). Minimize i3 pro app;
      • Execute [command line]. Do a standard command of the operation system, for example, open a link http://iridi.com/ in a browser, send a letter to a certain address (mailto:example@mail.ru), open a calculator and othe standard commands for different operation systems;
      • Show system menu. Open the system menu;
      • Show project menu. Open the side menu for choosing i3 pro projects;
      • Paste from clipboard. Paste text from the clipboard into the active Editbox;
      • Show paste helper. Above the cursor in the active EditBox will display a native, scalable popup window according to the project resolution: PasteHelper with the caption Paste, similar to the Paste tool on iOS and Android devices. Pressing this popup window executes the "Paste from clipboard" command. Clicking the paste window, clicking the input field again, or changing the focus will immediately close PasteHelper;
      • Exit. Close iRidium App on a control panel (only for Windows and Android).
    • Routines ( setting up editable routines):
      • Reset settings of all routines. Reset all routines settings;
      • Edit routine settings [routines name]. Edit routine settings;
      • Show list of all routines. Open the list of all routines available for editing;
      • Edit routine settings in list [routines name] (old). Edit routine settings in list.


    Script Call. Activating JS functions

    Script Call macro calls a JS function that is created in the Script editor but it can't send it the call parameters. But a link to the items that called the function is sent as the call context (this).

    Here is an example of a function that takes a value from the Text property of an item that called the function, increases it by one and writes back:

    var a = 0;
    function action() {
        a += 1;
        this.Text = a;    // this - element that called the function, .Text - item "text" property
        IR.Log(this.Name); // name of the item that called the function
        IR.Log(this.Parent.Name); // name of the page on which the element that called the function is located
    };


    Download the example


    Relations: item relations

    Connections to send data from one object to another are created in the Relations window:

    Programming3.png

    For example, with the help of a value received from the slider of Item 1 level you can change the coordinate of Item 2 item. Interaction can be set between graphical items, pages and popups, as well as, channels and tokens (global variables).

    Источник — «https://dev.iridi.com/index.php?title=IRidium_studio_2019_Programming/en&oldid=130786»
    Категория:
    • Studio2019
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy