PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Tutorial
  • Element Reference
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • REPEAT
Data model
  • PARAM
  • ACTION
    • Action types
  • ACTION_TRIGGER
  • TIMER
UI Layout and positioning
  • CELL
  • TABLE
UI Widgets
  • CANVAS
    • Graphics API
  • COLOR_SCALE
  • FILE_SELECT_MENU
  • GRID
  • INVISIBLE_PARAM_MENU_BUTTON
  • MENU_ITEM
  • MENU_SEPARATOR
  • POPUP_MENU
  • svg
  • RULER
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • XY_PARAM_PAD
  • XY_ZOOM_SELECT_PAD
  • XYZ_PARAM_SCRATCH_PAD
  • XYZ_PARAM_CLICK_PAD
  • XYZ_IMAGE_PARAM_JOYSTICK
UI 3D Objects
  • COLOR_SURFACE_3D
  • GRID_3D
  • GL_OBJECT_3D
Data model commands
  • REQUIRED_OBJECTS
  • EXPOSED_OBJECTS
  • PERSISTENT_OBJECTS
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • 3D Objects
  • Parameters mapping
  • LetiMix
KUIMLElement ReferenceINCLUDE
March 25, 2024

INCLUDE

You can use this element to split your SKIN file into several parts, so that your code is nicely separated. Don't forget to add DUMMY (or another root) element to the content of the included files.

Warning: cycles are not allowed for includes. Do not include a file that directly or indirectly includes the same file. To avoid cycles, it is possible to use the INCLUDE_ONCE element instead

Attributes brief detailed show all inherited

Name DescriptionDefault
filePath to the XML file to includeThe file to include has to be a valid XML file with a single root elementempty
contentXML content to includeCan be used to include generated XML content from build time variables. Overrides the file attribute when present. NOT available for INCLUDE_ONCE directiveempty
ignore_missingWhen set to true, no error is thrown if the file is missingBeware that this may cause errors that may be difficult to catch (missing objects...) if not used with carefalse
Name Value type Default Description Comment
fileValid file path to XML fileemptyPath to the XML file to includeThe file to include has to be a valid XML file with a single root element
contentValid XML contentemptyXML content to includeCan be used to include generated XML content from build time variables. Overrides the file attribute when present. NOT available for INCLUDE_ONCE directive
ignore_missingbooleanfalseWhen set to true, no error is thrown if the file is missingBeware that this may cause errors that may be difficult to catch (missing objects...) if not used with care

Examples

The following file:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SKIN language_version="1.0" background_color="#ffffff" repeat="true" h_margin="10" layout_type="row">
  3. <INCLUDE file="include.xml" />
  4. </SKIN>

if the include.xml file contains the following lines:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" />

Will be equivalent to the following file:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SKIN language_version="1.0" background_color="#ffffff" repeat="true" h_margin="10" layout_type="row">
  3. <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" />
  4. </SKIN>

Just as if the code below the <?xml version="1.0" encoding="utf-8" ?> line had been pasted inside the including file.

Note that the included file has to be a valid XML file: the first line is mandatory, and the file must have a root element. If you want to include a file containing several elements in a list, they have to be enclosed in a root element. The DUMMY element can be used for this purpose.

Generating content on the fly

Using build-time scripting for VARIABLE and content attribute for INCLUDE you can generate SKIN content on the fly.

  1. <VARIABLE id="CONTENT" value="&lt;TEXT value=&quot;hi there&quot;&gt;&lt;/TEXT&gt;" />;
  2. <INCLUDE content="$CONTENT$" />

However, note that using REPEAT as "IF" to paste or skip some blocks of code (see examples in REPEAT) can be more convenient in many cases.

2020 - 2025 © Site by LetiMix  |  Plug'n Script and KUIML by Blue Cat Audio