MCPcopy Create free account
hub / github.com/andlabs/ui / Font

Method Font

fontbutton.go:33–41  ·  view source on GitHub ↗

Font returns the font currently selected in the FontButton.

()

Source from the content-addressed store, hash-verified

31
32// Font returns the font currently selected in the FontButton.
33func (b *FontButton) Font() *FontDescriptor {
34 cfd := C.pkguiNewFontDescriptor()
35 defer C.pkguiFreeFontDescriptor(cfd)
36 C.uiFontButtonFont(b.b, cfd)
37 defer C.uiFreeFontButtonFont(cfd)
38 fd := &FontDescriptor{}
39 fd.fromLibui(cfd)
40 return fd
41}
42
43// OnChanged registers f to be run when the user changes the
44// currently selected font in the FontButton. Only one function can

Callers 1

DrawMethod · 0.80

Calls 1

fromLibuiMethod · 0.95

Tested by

no test coverage detected