2022-11-14 14:30:28 -06:00
|
|
|
package main
|
2022-10-16 10:09:16 -05:00
|
|
|
|
2023-02-25 14:05:25 -06:00
|
|
|
import (
|
|
|
|
"github.com/andlabs/ui"
|
|
|
|
_ "github.com/andlabs/ui/winmanifest"
|
2022-10-16 10:09:16 -05:00
|
|
|
|
2023-02-25 14:05:25 -06:00
|
|
|
"git.wit.org/wit/gui/toolkit"
|
|
|
|
)
|
2022-10-16 10:09:16 -05:00
|
|
|
|
2023-03-23 12:35:12 -05:00
|
|
|
func newLabel(a *toolkit.Action) {
|
2023-03-01 11:35:36 -06:00
|
|
|
var newt *andlabsT
|
2023-04-03 10:26:47 -05:00
|
|
|
log(debugToolkit, "NewLabel()", a.Name)
|
2022-11-14 14:30:28 -06:00
|
|
|
|
2023-03-29 23:03:04 -05:00
|
|
|
t := andlabs[a.ParentId]
|
2023-02-25 14:05:25 -06:00
|
|
|
if (t == nil) {
|
2023-03-01 11:35:36 -06:00
|
|
|
listMap(debugError)
|
|
|
|
log(debugError, "ERROR newLabel() listMap()")
|
|
|
|
log(debugError, "ERROR FFFFFFFFFFFF listMap()")
|
|
|
|
log(debugError, "ERROR FFFFFFFFFFFF listMap()")
|
2022-11-14 14:30:28 -06:00
|
|
|
return
|
|
|
|
}
|
2022-10-16 10:09:16 -05:00
|
|
|
|
2023-04-03 10:26:47 -05:00
|
|
|
log(debugToolkit, "NewLabel()", a.Name)
|
2022-11-14 14:30:28 -06:00
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
newt = new(andlabsT)
|
|
|
|
|
2023-04-03 10:26:47 -05:00
|
|
|
c := ui.NewLabel(a.Name)
|
2023-03-01 11:35:36 -06:00
|
|
|
newt.uiLabel = c
|
2023-03-23 12:35:12 -05:00
|
|
|
newt.uiControl = c
|
2023-03-01 11:35:36 -06:00
|
|
|
|
2023-03-23 12:35:12 -05:00
|
|
|
place(a, t, newt)
|
2022-10-16 10:09:16 -05:00
|
|
|
}
|