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

idunn: a scroll view: one child that can be taller than the view. More...

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

Macros

#define STEP   48
#define BAR   6
#define BAR_NEAR   10
#define NEAR   14
#define INSET   2
#define THUMB_MIN   24
#define GLIDE_MS   150
#define MARGIN   8

Functions

idunn_widget_t * idunn_scroll_view (idunn_widget_t *child)
 a scroll view: the child can be taller than the view.
int32_t idunn_scroll_view_offset (const idunn_widget_t *view)
void idunn_scroll_view_scroll_to (idunn_widget_t *view, int32_t offset)

Detailed Description

idunn: a scroll view: one child that can be taller than the view.

the wheel, the keys a child does not use (the arrows, Page Up and Page Down, Home and End) and a thin scroll bar move it. the bar is 6 pixels wide, 10 near the pointer, and shows only when there is something to scroll. wheel and key steps glide in 150 ms.

Macro Definition Documentation

◆ STEP

#define STEP   48

◆ BAR

#define BAR   6

◆ BAR_NEAR

#define BAR_NEAR   10

◆ NEAR

#define NEAR   14

◆ INSET

#define INSET   2

◆ THUMB_MIN

#define THUMB_MIN   24

◆ GLIDE_MS

#define GLIDE_MS   150

◆ MARGIN

#define MARGIN   8

Function Documentation

◆ idunn_scroll_view()

idunn_widget_t * idunn_scroll_view ( idunn_widget_t * child)

a scroll view: the child can be taller than the view.

the view takes the height it is given (let it grow, or give it a size), as a CSS box with min-height 0. the wheel, the keys its children do not use and a thin scroll bar scroll it; Tab scrolls the focus into view.

◆ idunn_scroll_view_offset()

int32_t idunn_scroll_view_offset ( const idunn_widget_t * view)

◆ idunn_scroll_view_scroll_to()

void idunn_scroll_view_scroll_to ( idunn_widget_t * view,
int32_t offset )