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

FreeBSD Manual Pages

  
 
  

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

NAME
     AG_Fixed -- agar pixel-precision container

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

DESCRIPTION
     The AG_Fixed container widgets positions its children at specific loca-
     tions given in pixels.  It	is useful for positioning cosmetic components
     applications such as games, running at fixed resolutions.

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

INITIALIZATION
     AG_Fixed *	AG_FixedNew(AG_Widget *parent, Uint flags)

     The AG_FixedNew() function	allocates, initializes,	and attaches a new
     AG_Fixed widget.  The flags may include:

     AG_FIXED_FILLBG	  Fill the widget background with FIXED_BG_COLOR.

     AG_FIXED_BOX	  Draw a decorative 3D-style box in the	background.

     AG_FIXED_FRAME	  Draw a decorative frame in the background.

     AG_FIXED_NO_UPDATE	  Disable automatic invocation of AG_WidgetUpdate(3)
			  whenever widgets are repositioned.  As an optimisa-
			  tion when large number of widgets are	to be posi-
			  tioned, this option can be used and
			  AG_WidgetUpdate(3) manually invoked only once	all
			  widgets are in place.

     AG_FIXED_HFILL	  Expand horizontally in parent	(equivalent to invok-
			  ing AG_ExpandHoriz(3)).

     AG_FIXED_VFILL	  Expand vertically in parent (equivalent to invoking
			  AG_ExpandVert(3)).

     AG_FIXED_EXPAND	  Shorthand for	AG_FIXED_HFILL|AG_FIXED_VFILL.

CHILD WIDGETS
     void AG_FixedPut(AG_Fixed *fixed, void *child, int	x, int y)

     void AG_FixedDel(AG_Fixed *fixed, void *child)

     void AG_FixedSize(AG_Fixed	*fixed,	void *child, int width,	int height)

     void AG_FixedMove(AG_Fixed	*fixed,	void *child, int new_x,	int new_y)

     The AG_FixedPut() function	attaches the widget child and positions	it at
     the given coordinates.  AG_FixedDel() detaches the	given widget.

     Alternatively, you	can avoid AG_FixedPut()	and AG_FixedDel() altogether
     and instead use AG_ObjectAttach(3)	and AG_ObjectDetach(3) followed	by
     calls to AG_FixedSize() and AG_FixedMove().

     Functions AG_FixedSize() and AG_FixedMove() set the size and location of
     a given widget in pixels.

EVENTS
     The AG_Fixed widget does not generate any event.

EXAMPLES
     See tests/fixedres.c in the Agar source distribution.

SEE ALSO
     AG_Box(3),	AG_HBox(3), AG_Intro(3), AG_MPane(3), AG_Pane(3), AG_VBox(3),
     AG_Widget(3), AG_Window(3)

HISTORY
     The AG_Fixed widget first appeared	in Agar	1.0.

FreeBSD	13.0			August 29, 2006			  FreeBSD 13.0

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

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

home | help