ui.uimodel #
enum ComponentCat #
enum ComponentCat {
bootstrap
htmx
bulma
}
MORE THAN ONE COMPONENT CAN BE ADDED TO INFO
enum EditorCat #
enum EditorCat {
txt
markdown
heroscript
}
defines colors as used in the representation layer
enum InfoCat #
enum InfoCat {
txt
html
markdown
}
defines colors as used in the representation layer
enum LogCat #
enum LogCat {
info
log
warning
header
debug
error
}
defines colors as used in the representation layer
struct DropDownArgs #
@[params]
struct DropDownArgs {
pub mut:
description string
question string
items []string
default []string
warning string
clear bool
all bool
choice_message string
validation fn (string) bool = fn (s string) bool {
return true
}
}
struct EditArgs #
@[params]
struct EditArgs {
pub mut:
content string // in specified format
cat EditorCat
}
struct InfoArgs #
@[params]
struct InfoArgs {
pub mut:
content string // in specified format
clear bool // means screen is reset for content above
lf_before int // line feed before content
lf_after int
cat InfoCat
components []ComponentCat
}
struct LogArgs #
@[params]
struct LogArgs {
pub mut:
content string
clear bool // means screen is reset for content above
lf_before int // line feed before content
lf_after int
cat LogCat
}
struct PayArgs #
@[params]
struct PayArgs {
pub mut:
amount f64
currency string = 'USD' // use currency module to do conversions where needed,
// TODO: what else do we need
}
struct QuestionArgs #
@[params]
struct QuestionArgs {
pub mut:
description string
question string
warning string
clear bool
regex string
minlen int
reset bool
default string
validation fn (string) bool = fn (s string) bool {
return true
}
}
struct YesNoArgs #
@[params]
struct YesNoArgs {
pub mut:
description string
question string
warning string
clear bool
reset bool
default bool
validation fn (string) bool = fn (s string) bool {
return true
}
}
validation responds with either true or an error message