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

idunn: tabs: a muted strip of tab names, the active one a raised pill, and below it the page of the active tab (the others are hidden). More...

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

Macros

#define PAD   3
#define GAP   2
#define TAB_H   24
#define TAB_PAD   12
#define PAGE_GAP   16

Functions

idunn_widget_t * idunn_tabs (idunn_callback_t on_change, void *data)
 tabs: a strip of names and the page of the active one below it.
idunn_widget_t * idunn_tabs_add (idunn_widget_t *tabs, const char *name, idunn_widget_t *page)
 add a tab with its page (the tabs own it); the first one is active
int idunn_tabs_active (const idunn_widget_t *tabs)
void idunn_tabs_set_active (idunn_widget_t *tabs, int active)

Detailed Description

idunn: tabs: a muted strip of tab names, the active one a raised pill, and below it the page of the active tab (the others are hidden).

the strip is one stop for Tab; the arrows go to the tab before or after it, as shadcn's tabs do.

Macro Definition Documentation

◆ PAD

#define PAD   3

◆ GAP

#define GAP   2

◆ TAB_H

#define TAB_H   24

◆ TAB_PAD

#define TAB_PAD   12

◆ PAGE_GAP

#define PAGE_GAP   16

Function Documentation

◆ idunn_tabs()

idunn_widget_t * idunn_tabs ( idunn_callback_t on_change,
void * data )

tabs: a strip of names and the page of the active one below it.

the strip is one Tab stop; the arrows change the tab.

◆ idunn_tabs_add()

idunn_widget_t * idunn_tabs_add ( idunn_widget_t * tabs,
const char * name,
idunn_widget_t * page )

add a tab with its page (the tabs own it); the first one is active

◆ idunn_tabs_active()

int idunn_tabs_active ( const idunn_widget_t * tabs)

◆ idunn_tabs_set_active()

void idunn_tabs_set_active ( idunn_widget_t * tabs,
int active )