Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AG_FONT_SELECTOR(3)    FreeBSD Library Functions Manual	   AG_FONT_SELECTOR(3)

NAME
     AG_FontSelector --	agar font selection widget

SYNOPSIS
     #include <agar/core.h>
     #include <agar/gui.h>

DESCRIPTION
     The AG_FontSelector widget	allows the user	to select a font given face,
     size and style parameters.	 Available fonts do not	need to	reside in mem-
     ory.  AG_FontSelector binds to an AG_Font pointer,	and will load the nec-
     essary fonts on demand.

INHERITANCE HIERARCHY
     AG_Object(3) -> AG_Widget(3) -> AG_FontSelector.

INITIALIZATION
     AG_FontSelector * AG_FontSelectorNew(AG_Widget *parent, Uint flags)

     The AG_FontSelectorNew() function allocates, initializes, and attaches a
     new AG_FontSelector widget.  Acceptable flags include:

     AG_FONTSELECTOR_HFILL    Expand horizontally in parent (equivalent	to in-
			      voking AG_ExpandHoriz(3)).

     AG_FONTSELECTOR_VFILL    Expand vertically	in parent (equivalent to in-
			      voking AG_ExpandVert(3)).

     AG_FONTSELECTOR_EXPAND   Shorthand	for
			      AG_FONTSELECTOR_HFILL|AG_FONTSELECTOR_VFILL.

BINDINGS
     The AG_FontSelector widget	provides the following bindings:

     AG_Font **font   Pointer to an AG_Font(3) pointer which will be modified
		      according	to the user's selection.

EVENTS
     The AG_FontSelector widget	does not generate any event.

EXAMPLES
     The following code	fragment creates a new window containing a
     AG_FontSelector widget:

	   AG_Window *win;
	   AG_FontSelector *fs;
	   AG_Font *myFont;

	   win = AG_WindowNew(0);
	   fs =	AG_FontSelectorNew(win,	AG_FONTSELECTOR_EXPAND);
	   myFont = AG_TextFontPct(150);
	   AG_BindPointer(fs, "font", (void **)&myFont);
	   AG_WindowShow(win);

SEE ALSO
     AG_Intro(3), AG_Text(3), AG_Widget(3), AG_Window(3)

HISTORY
     The AG_FontSelector widget	first appeared in Agar 1.3.4.

FreeBSD	13.0			 May 21, 2005			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | INHERITANCE HIERARCHY | INITIALIZATION | BINDINGS | EVENTS | EXAMPLES | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=AG_FontSelector&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help