Finally documented the remaining functions in ui_attrstr.h.
This commit is contained in:
parent
9aea7fa62e
commit
8944a3fc55
|
@ -22,3 +22,4 @@ should uiNewFamilyAttribute() accept NULL
|
|||
it is an error in ForEach too
|
||||
invalid values for uiDrawTextAlign
|
||||
empty text layouts have one line
|
||||
TODO figure out what to do if any field (particularly the font family name) in uiFontDescriptor is unset
|
||||
|
|
|
@ -488,11 +488,20 @@ _UI_EXTERN void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, dou
|
|||
|
||||
// TODO number of lines visible for clipping rect, range visible for clipping rect?
|
||||
|
||||
// uiFontButton is a button that allows users to choose a font when they click on it.
|
||||
typedef struct uiFontButton uiFontButton;
|
||||
#define uiFontButton(this) ((uiFontButton *) (this))
|
||||
// uiFontButtonFont() returns the font currently selected in the uiFontButton in desc.
|
||||
// uiFontButtonFont() allocates resources in desc; when you are done with the font, call uiFreeFontButtonFont() to release them.
|
||||
// uiFontButtonFont() does not allocate desc itself; you must do so.
|
||||
// TODO have a function that sets an entire font descriptor to a range in a uiAttributedString at once, for SetFont?
|
||||
_UI_EXTERN void uiFontButtonFont(uiFontButton *b, uiFontDescriptor *desc);
|
||||
// TOOD SetFont, mechanics
|
||||
// uiFontButtonOnChanged() sets the function that is called when the font in the uiFontButton is changed.
|
||||
_UI_EXTERN void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, void *), void *data);
|
||||
// uiNewFontButton() creates a new uiFontButton. The default font selected into the uiFontButton is OS-defined.
|
||||
_UI_EXTERN uiFontButton *uiNewFontButton(void);
|
||||
// uiFreeFontButtonFont() frees resources allocated in desc by uiFontButtonFont().
|
||||
// After calling uiFreeFontButtonFont(), the contents of desc should be assumed to be undefined (though since you allocate desc itself, you can safely reuse desc for other font descriptors).
|
||||
// Calling uiFreeFontButtonFont() on a uiFontDescriptor not returned by uiFontButtonFont() results in undefined behavior.
|
||||
_UI_EXTERN void uiFreeFontButtonFont(uiFontDescriptor *desc);
|
||||
|
|
Loading…
Reference in New Issue