The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
slider.c File Reference

idunn: a slider: a 4 pixel round track in the muted colour, filled with the accent up to a 16 pixel thumb. More...

#include "idunn_internal.h"
#include <stdlib.h>

Macros

#define HEIGHT   16
#define TRACK   4
#define THUMB   16
#define WIDTH   200

Functions

idunn_widget_t * idunn_slider (int32_t min, int32_t max, int32_t step, int32_t value, idunn_callback_t on_change, void *data)
 a slider from min to max in steps (the arrows move it by one step).
int32_t idunn_slider_value (const idunn_widget_t *slider)
void idunn_slider_set_value (idunn_widget_t *slider, int32_t value)

Detailed Description

idunn: a slider: a 4 pixel round track in the muted colour, filled with the accent up to a 16 pixel thumb.

a press puts the thumb under the pointer and dragging moves it; the arrows move it by a step, Page Up and Page Down by ten, Home and End to the ends.

Macro Definition Documentation

◆ HEIGHT

#define HEIGHT   16

◆ TRACK

#define TRACK   4

◆ THUMB

#define THUMB   16

◆ WIDTH

#define WIDTH   200

Function Documentation

◆ idunn_slider()

idunn_widget_t * idunn_slider ( int32_t min,
int32_t max,
int32_t step,
int32_t value,
idunn_callback_t on_change,
void * data )

a slider from min to max in steps (the arrows move it by one step).

◆ idunn_slider_value()

int32_t idunn_slider_value ( const idunn_widget_t * slider)

◆ idunn_slider_set_value()

void idunn_slider_set_value ( idunn_widget_t * slider,
int32_t value )