/usr/lib/goo/mods/samurui/starbursttest.goo is in goo 0.155-14.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | (use goo)
(use samurui/samurui)
(use samurui/gtk.swig)
(use samurui/starburst)
(dc <simple-app> (<any>))
;; There is no need to actually wrap a string. Just pretend this is a more complicated class that
;; does something of value.
(dc <str-hold> (<any>))
(iprop <str-hold> da-str <str> "DaString")
(dm hold (s|<str>)
(def o (new <str-hold>))
(set (da-str o) s)
o
)
(dm to-str (h|<str-hold> => <str>)
(da-str h)
)
;; Ditto on numbers. No need to wrap, but pretend there's other stuff going on.
(dc <int-hold> (<any>))
(ipropc <int-hold> da-int <int> "DaInt" (num-constraint 0 100))
(dm hold (i|<int>)
(def o (new <int-hold>))
(set (da-int o) i)
o
)
(dm to-str (h|<int-hold> => <str>)
(to-str (da-int h))
)
(iprop <simple-app> tree-nodes <visi-col> "Tree Nodes")
(dv my-app (new <simple-app>))
(set (tree-nodes my-app) (visi-wrap-col
(vec (hold "Apples")
(hold "Bananas")
(hold "Pears" )
(vec (hold 1)
(hold 2)
(hold 3))
(vec (vec (hold "Spaceships")
(hold "Monkeys")
(hold "Dogs")
(vec (hold "Enterprise")
(hold "Endeavor")
(hold "Challenger"))
(vec (hold "Soup")
(hold "Crackers"))
(hold "Zoos"))
(hold "Kings")
(hold "Queens")
(hold "Pawns"))
)))
(iview <int-hold>
"Current Int"
da-int
)
(iview <str-hold>
"Current String"
da-str
)
(iview <simple-app>
(attr (columns
(master bob (attr tree-nodes fill))
(slave bob)
) fill)
)
(samurui-init)
(present my-app)
(samurui-go)
|