glendix/define/model

Defines the editable Mendix widget property model used by the Glendix TUI.

Types

A typed EnumValue value used by the model capability.

pub type EnumValue {
  EnumValue(key: String, caption: String)
}

Constructors

  • EnumValue(key: String, caption: String)

    The EnumValue variant.

A typed Property value used by the model capability.

pub type Property {
  Property(
    key: String,
    type_: PropertyType,
    caption: String,
    description: String,
    required: option.Option(Bool),
    default_value: option.Option(String),
    multiline: option.Option(Bool),
    is_list: option.Option(Bool),
    data_source: option.Option(String),
    allow_upload: option.Option(Bool),
    on_change: option.Option(String),
    set_label: option.Option(Bool),
    return_type: option.Option(ReturnType),
    enumeration_values: List(EnumValue),
    attribute_types: List(String),
    association_types: List(String),
    selection_types: List(String),
    default_type: option.Option(String),
    selectable_objects: option.Option(String),
    sub_properties: List(PropertyGroup),
  )
}

Constructors

A typed PropertyGroup value used by the model capability.

pub type PropertyGroup {
  PropertyGroup(caption: String, items: List(PropertyItem))
}

Constructors

  • PropertyGroup(caption: String, items: List(PropertyItem))

    The PropertyGroup variant.

A typed PropertyItem value used by the model capability.

pub type PropertyItem {
  PropItem(Property)
  SysPropItem(SystemProperty)
}

Constructors

A typed PropertyType value used by the model capability.

pub type PropertyType {
  TypeString
  TypeBoolean
  TypeInteger
  TypeDecimal
  TypeEnumeration
  TypeIcon
  TypeImage
  TypeWidgets
  TypeFile
  TypeExpression
  TypeTextTemplate
  TypeAction
  TypeAttribute
  TypeAssociation
  TypeObject
  TypeDatasource
  TypeSelection
}

Constructors

  • TypeString

    The TypeString variant.

  • TypeBoolean

    The TypeBoolean variant.

  • TypeInteger

    The TypeInteger variant.

  • TypeDecimal

    The TypeDecimal variant.

  • TypeEnumeration

    The TypeEnumeration variant.

  • TypeIcon

    The TypeIcon variant.

  • TypeImage

    The TypeImage variant.

  • TypeWidgets

    The TypeWidgets variant.

  • TypeFile

    The TypeFile variant.

  • TypeExpression

    The TypeExpression variant.

  • TypeTextTemplate

    The TypeTextTemplate variant.

  • TypeAction

    The TypeAction variant.

  • TypeAttribute

    The TypeAttribute variant.

  • TypeAssociation

    The TypeAssociation variant.

  • TypeObject

    The TypeObject variant.

  • TypeDatasource

    The TypeDatasource variant.

  • TypeSelection

    The TypeSelection variant.

Describes a property-type decoding failure.

pub type PropertyTypeError {
  UnknownPropertyType(value: String)
}

Constructors

  • UnknownPropertyType(value: String)

    The serialized property type is not one of the supported Mendix values.

A typed ReturnType value used by the model capability.

pub type ReturnType {
  ReturnType(
    type_name: String,
    assignable_to: option.Option(String),
  )
}

Constructors

  • ReturnType(
      type_name: String,
      assignable_to: option.Option(String),
    )

    The ReturnType variant.

A typed SystemProperty value used by the model capability.

pub type SystemProperty {
  SystemProperty(key: String)
}

Constructors

  • SystemProperty(key: String)

    The SystemProperty variant.

A typed WidgetMeta value used by the model capability.

pub type WidgetMeta {
  WidgetMeta(
    id: String,
    plugin_widget: Bool,
    offline_capable: Bool,
    supported_platform: String,
    needs_entity_context: Bool,
    name: String,
    description: String,
    studio_pro_category: option.Option(String),
    help_url: option.Option(String),
    icon: String,
    prompt: option.Option(String),
  )
}

Constructors

  • WidgetMeta(
      id: String,
      plugin_widget: Bool,
      offline_capable: Bool,
      supported_platform: String,
      needs_entity_context: Bool,
      name: String,
      description: String,
      studio_pro_category: option.Option(String),
      help_url: option.Option(String),
      icon: String,
      prompt: option.Option(String),
    )

    The WidgetMeta variant.

Values

pub fn all_association_types() -> List(String)

Returns all the association types.

pub fn all_attribute_types() -> List(String)

Returns all the attribute types.

pub fn all_selection_types() -> List(String)

Returns all the selection types.

pub fn all_system_keys() -> List(String)

Returns all the system keys.

pub fn all_types() -> List(PropertyType)

Returns all the types.

pub fn change_property_type(
  prop prop: Property,
  new_type new_type: PropertyType,
) -> Property

Rebuilds a property for a newly selected type.

pub fn default_property(
  key key: String,
  t t: PropertyType,
) -> Property

Creates a property with defaults for the selected type.

pub fn string_to_type(
  from value: String,
) -> Result(PropertyType, PropertyTypeError)

Parses a serialized Mendix property type.

pub fn type_index(t t: PropertyType) -> Int

Returns the display order for a property type.

pub fn type_label(t t: PropertyType) -> String

Returns the user-facing label for a property type.

pub fn type_to_string(t t: PropertyType) -> String

Serializes a property type for widget XML.

pub fn widget_meta_name(meta meta: WidgetMeta) -> String

Returns the widget display name.

Search Document