File: dial.h

package info (click to toggle)
craft 3.5-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,000 kB
  • ctags: 1,602
  • sloc: cpp: 3,794; makefile: 2,319; ansic: 857; sh: 385
file content (75 lines) | stat: -rw-r--r-- 1,806 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef dial_h
#define dial_h

/*======================================================================*/
/*= CHANGES AND UPDATES                                                =*/
/*======================================================================*/
/*= date   person file       subject                                   =*/
/*=--------------------------------------------------------------------=*/
/*=                                                                    =*/
/*= 291193 hua    dial.h     created                                   =*/
/*=                                                                    =*/
/*======================================================================*/

#include "bool.h"
#include "buttons.h"
#include "getline.h"

class dial
  {public :

     win *w;
     char title [128];
     int  title_dx;
     int  x;
     int  y;

     int  v_min;
     int  v_max;
     int  incr;
     int  incr2;
     bool is_bool;
     bool b_val;
     char s_value [128];
     bool is_hist;

     int  val_dx;

     Getline *g_value;
     button  *up;
     button  *down;
     button  *up2;
     button  *down2;
     history *hist;
     button  *hist_button;
     dial    *d_mark;
     bool    with_edit;

   dial  (win  *w, 
          char title [],
          int  title_dx,
          int  x, 
          int  y,
          int  v_min,
          int  val,
          int  v_max,
          int  incr,
          bool with_hist   = false,
          int  value_dx    = 80,
          bool may_edit    = true,
          int  incr2       = 0,
          bool auto_repeat = false);
   dial  (win  *w, 
          char title [],
          int  title_dx,
          int  x, 
          int  y,
          bool val);
   ~dial ();

   bool eval (int &val);
   void set  (int val);

 };

#endif