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_SLIDER(3) FreeBSD Library Functions Manual AG_SLIDER(3)

AG_Slider
agar slider widget

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

The AG_Slider widget allows the user to control an integer or floating-point value within a specified range. It can be thought as a graphical alternative to AG_Numerical(3).

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

AG_Slider *
AG_SliderNew(AG_Widget *parent, enum ag_slider_type type, Uint flags);


void
AG_SliderSetControlSize(AG_Slider *slider, int pixels);

The AG_SliderNew() function allocates, initializes, and attaches a new AG_Slider widget. type defines the orientation of the slider:

enum ag_slider_type {
	AG_SLIDER_HORIZ,
	AG_SLIDER_VERT
};

Acceptable flags include:

AG_SLIDER_EXCL
Advise that no external changes to the value, min and max bindings are expected. By default, the binding values are periodically checked and the slider is redrawn if a change is detected. Note that this setting only influences redraw -- external changes to the binding values are handled safely regardless.
AG_SLIDER_HFILL
Expand horizontally in parent (equivalent to invoking AG_ExpandHoriz(3)).
AG_SLIDER_VFILL
Expand vertically in parent (equivalent to invoking AG_ExpandVert(3)).
AG_SLIDER_EXPAND
Shorthand for AG_SLIDER_HFILL|AG_SLIDER_VFILL.

The AG_SliderSetControlSize() function specifies a preferred size for the slider control, in pixels.

The AG_Slider widget provides the following bindings:

float *{value,min,max,inc}
Single precision number
double *{value,min,max,inc}
Double precision number
long double *{value,min,max,inc}
Quad precision number
int *{value,min,max,inc}
Natural integer
Uint *{value,min,max,inc}
Unsigned integer
[SU]int8 *{value,min,max,inc}
Fixed 8-bit integer
[SU]int16 *{value,min,max,inc}
Fixed 16-bit integer
[SU]int32 *{value,min,max,inc}
Fixed 32-bit integer
[SU]int64 *{value,min,max,inc}
Fixed 64-bit integer

The slider is positioned to represent value inside of the range defined by min and max.

The optional inc binding specifies the increment effected by the buttons, or keyboard. If not specified, it defaults to 0.1 (for floating-point values), or 1 (for integer values).

Note that the min, max and inc bindings must share the same type as value. The 64-bit types are only available if AG_HAVE_64BIT is set, and long double is only available if AG_HAVE_LONG_DOUBLE is set.

The AG_Slider widget generates the following events:

slider-changed(void)
The slider's value has changed.
slider-drag-begin(void)
User is starting to drag the slider.
slider-drag-end(void)
User is done dragging the slider.

AG_Intro(3), AG_Numerical(3), AG_Scrollbar(3), AG_Widget(3), AG_Window(3)

The AG_Slider widget first appeared in Agar 1.3.2.
March 1, 2008 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.