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
EnumValuevariant.
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
-
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), )The
Propertyvariant.
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
PropertyGroupvariant.
A typed PropertyItem value used by the model capability.
pub type PropertyItem {
PropItem(Property)
SysPropItem(SystemProperty)
}
Constructors
-
PropItem(Property)The
PropItemvariant. -
SysPropItem(SystemProperty)The
SysPropItemvariant.
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
-
TypeStringThe
TypeStringvariant. -
TypeBooleanThe
TypeBooleanvariant. -
TypeIntegerThe
TypeIntegervariant. -
TypeDecimalThe
TypeDecimalvariant. -
TypeEnumerationThe
TypeEnumerationvariant. -
TypeIconThe
TypeIconvariant. -
TypeImageThe
TypeImagevariant. -
TypeWidgetsThe
TypeWidgetsvariant. -
TypeFileThe
TypeFilevariant. -
TypeExpressionThe
TypeExpressionvariant. -
TypeTextTemplateThe
TypeTextTemplatevariant. -
TypeActionThe
TypeActionvariant. -
TypeAttributeThe
TypeAttributevariant. -
TypeAssociationThe
TypeAssociationvariant. -
TypeObjectThe
TypeObjectvariant. -
TypeDatasourceThe
TypeDatasourcevariant. -
TypeSelectionThe
TypeSelectionvariant.
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
ReturnTypevariant.
A typed SystemProperty value used by the model capability.
pub type SystemProperty {
SystemProperty(key: String)
}
Constructors
-
SystemProperty(key: String)The
SystemPropertyvariant.
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
WidgetMetavariant.
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 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.