GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AG_FIXED(3) FreeBSD Library Functions Manual AG_FIXED(3)

AG_Fixed
agar pixel-precision container

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

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

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

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 optimisation when large number of widgets are to be positioned, 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 invoking 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.

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.

The AG_Fixed widget does not generate any event.

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

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

The AG_Fixed widget first appeared in Agar 1.0.
August 29, 2006 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.