File: radio.h

package info (click to toggle)
vis5d 4.3-5
  • links: PTS
  • area: main
  • in suites: slink
  • size: 16,856 kB
  • ctags: 6,127
  • sloc: ansic: 66,158; fortran: 4,470; makefile: 1,683; tcl: 414; sh: 69
file content (48 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* radio.h */


/*
 * Radio button widget.  Exactly one of a set of buttons can be selected
 * at once.
 */


#ifndef LUI_RADIO_H
#define LUI_RADIO_H



typedef struct lui_radio {
   Window window;
   int x, y;
   int width, height;

   int numbuttons;                             /* how many radio buttons */
   char **labels;                              /* button labels */
   int current;                                /* current selection */

   int (*callback)( struct lui_radio *, int ); /* User callback function*/
   int context_index;                   /* for example, Vis5D context */
} LUI_RADIO;



extern LUI_RADIO *LUI_RadioCreate( Window parent,
                                   int x, int y, int width,
                                   int numbuttons, char **labels );


extern void LUI_RadioCallback( LUI_RADIO *r, int (*callback)() );


extern void LUI_RadioSetCurrent( LUI_RADIO *r, int current );


extern int LUI_RadioGetCurrent( LUI_RADIO *r );


extern void LUI_RadioDestroy( LUI_RADIO *r );



#endif