Bixby Developer Center

References

macro-def

optionalvalue required

Defines a reusable macro that can include layouts or dialog.

Note

Do not define both layouts and dialogs within a single macro. Doing so will result in an error anywhere the macro is invoked.

This key and its child keys must be defined in a macro.bxb file. This file must be in a locale-specific resources folder or the base folder. Bixby Studio can create layout and dialog macro files for you in the appropriate folders:

  1. Select Menu > New File.
  2. Select Layout or Dialog as the file type, and select Macro as the template.
  3. Edit the name of the file and click Create.

Example

macro-def (my-macro) {
params {
param (myParam) {
type (MyConcept)
min (Required) max (Many)
}
}

content {
// defines a layout "section" component, but you could also use a dialog "template (...)" here
section {
content {
paragraph: value ("This is a test macro: #{value(myParam)}")
}
}
}
}

Child Keys

content
required
Layout container that holds informational content
params
optional
List of parameters to be defined in the macro-def