glendix/define/types

Types

열거형 값

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

Constructors

  • EnumValue(key: String, caption: String)

속성 정의 (Option 필드 — 타입별 해당 없으면 None)

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

속성 그룹

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

Constructors

그룹 내 항목

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

Constructors

속성 타입

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

Constructors

  • TypeString
  • TypeBoolean
  • TypeInteger
  • TypeDecimal
  • TypeEnumeration
  • TypeIcon
  • TypeImage
  • TypeWidgets
  • TypeFile
  • TypeExpression
  • TypeTextTemplate
  • TypeAction
  • TypeAttribute
  • TypeAssociation
  • TypeObject
  • TypeDatasource
  • TypeSelection

returnType (expression 속성에서 사용)

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

Constructors

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

시스템 속성 (Label, Name, TabIndex, Visibility, Editability)

pub type SystemProperty {
  SystemProperty(key: String)
}

Constructors

  • SystemProperty(key: String)

위젯 XML 최상위 정보

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),
    )

Values

pub fn all_association_types() -> List(String)

연관에 사용 가능한 타입 목록

pub fn all_attribute_types() -> List(String)

속성 바인딩에 사용 가능한 타입 목록

pub fn all_selection_types() -> List(String)

선택에 사용 가능한 타입 목록

pub fn all_system_keys() -> List(String)

시스템 속성 키 목록

pub fn all_types() -> List(PropertyType)

모든 PropertyType 목록 (타입 선택 화면에서 사용)

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

속성의 타입을 변경한다 (key, caption, description 보존, 나머지 기본값)

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

기본 Property 생성 (타입별 기본값)

pub fn string_to_type(s: String) -> Result(PropertyType, Nil)

XML 문자열 → PropertyType

pub fn type_index(t: PropertyType) -> Int

PropertyType의 인덱스 (all_types 목록에서의 위치)

pub fn type_label(t: PropertyType) -> String

PropertyType의 한국어 설명

pub fn type_to_string(t: PropertyType) -> String

PropertyType → XML 문자열

pub fn widget_meta_name(meta: WidgetMeta) -> String

위젯 메타 정보의 이름을 반환한다.

Search Document