glendix/define/ui

Types

pub type EditField {
  TextField(label: String, value: String)
  BoolField(label: String, value: Bool)
  ReadOnlyField(label: String, value: String)
  ListField(label: String, count: Int)
  SelectField(label: String, value: String)
}

Constructors

  • TextField(label: String, value: String)
  • BoolField(label: String, value: Bool)
  • ReadOnlyField(label: String, value: String)
  • ListField(label: String, count: Int)
  • SelectField(label: String, value: String)

트리뷰 행 데이터

pub type TreeRow {
  GroupRow(
    flat_index: Int,
    group_index: Int,
    caption: String,
    item_count: Int,
    is_collapsed: Bool,
  )
  PropertyRow(
    flat_index: Int,
    group_index: Int,
    item_index: Int,
    prop: types.Property,
  )
  SystemRow(
    flat_index: Int,
    group_index: Int,
    item_index: Int,
    key: String,
  )
}

Constructors

  • GroupRow(
      flat_index: Int,
      group_index: Int,
      caption: String,
      item_count: Int,
      is_collapsed: Bool,
    )
  • PropertyRow(
      flat_index: Int,
      group_index: Int,
      item_index: Int,
      prop: types.Property,
    )
  • SystemRow(
      flat_index: Int,
      group_index: Int,
      item_index: Int,
      key: String,
    )

Values

pub fn build_tree_rows(
  groups: List(types.PropertyGroup),
  collapsed: List(Int),
  group_start: Int,
  flat_start: Int,
) -> List(TreeRow)

그룹/속성을 평탄화한 행 목록을 생성한다.

pub fn fields_to_property(
  original: types.Property,
  fields: List(EditField),
) -> types.Property

편집 폼 필드에서 Property를 재구성한다. 폼에 표시된 모든 필드를 추출하며, 빈 텍스트 필드는 None으로 변환한다.

pub fn fields_to_widget_meta(
  original: types.WidgetMeta,
  fields: List(EditField),
) -> types.WidgetMeta

편집 폼 필드에서 WidgetMeta를 재구성한다.

pub fn property_to_fields(
  prop: types.Property,
) -> List(EditField)

Property를 편집 가능한 필드 목록으로 변환한다. 타입별 관련 필드를 모두 표시한다.

pub fn render_confirm_delete_screen(
  target_label: String,
) -> String

삭제 확인 화면을 문자열로 생성한다.

pub fn render_confirm_quit_screen() -> String

종료 확인 화면을 문자열로 생성한다.

pub fn render_edit_screen(
  prop_key: String,
  prop_type: String,
  fields: List(EditField),
  cursor: Int,
  editing: Bool,
  edit_buffer: String,
  edit_cursor_pos: Int,
) -> String

속성 편집 폼 화면을 문자열로 생성한다.

pub fn render_enum_edit_screen(
  values: List(types.EnumValue),
  cursor: Int,
  status_msg: option.Option(String),
) -> String

열거형 값 편집 화면을 문자열로 생성한다.

pub fn render_input_screen(
  title: String,
  buffer: String,
  cursor_pos: Int,
) -> String

텍스트 입력 화면을 문자열로 생성한다.

pub fn render_multi_select_screen(
  title: String,
  options: List(String),
  selected: List(String),
  cursor: Int,
) -> String

멀티선택 화면을 문자열로 생성한다.

pub fn render_sys_prop_screen(
  options: List(String),
  cursor: Int,
) -> String

시스템 속성 선택 화면을 문자열로 생성한다.

pub fn render_tree_screen(
  widget_name: String,
  groups: List(types.PropertyGroup),
  cursor: Int,
  collapsed: List(Int),
  dirty: Bool,
  status_msg: option.Option(String),
  scroll_offset: Int,
  term_rows: Int,
) -> String

메인 트리뷰 화면을 문자열로 생성한다.

pub fn render_type_select_screen(cursor: Int) -> String

타입 선택 화면을 문자열로 생성한다.

pub fn widget_meta_to_fields(
  meta: types.WidgetMeta,
) -> List(EditField)

WidgetMeta를 편집 가능한 필드 목록으로 변환한다.

Search Document