Font returns the font currently selected in the FontButton.
()
| 31 | |
| 32 | // Font returns the font currently selected in the FontButton. |
| 33 | func (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 |