File: getline.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 (63 lines) | stat: -rw-r--r-- 1,173 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
#ifndef getline_h
#define getline_h

#include "win.h"
#include "history.h"
#include "buttons.h"
#include "bool.h"

class Getline
  {public:

   win     *w;
   int     x;
   int     y;
   int     dx;
   int     dy;
   char    name [128];   

   bool    with_history;
   history *hist;
   button  *hist_button;

   int    c_light;
   int    c_dark;
   int    c_background;
   int    c_foreground;
   int    c_cursor;

   int     pos_0;
   int     pos;
   char    *line;
   int     lx;
   int     ly;   
   int     key;
   int     key_cnt;
   bool    is_active;
   bool    was_deactive;
   bool    is_single_char;
   
   Getline      (char name [],
                 win  *w,
                 char string [],
                 int  x,
                 int  y,
                 int  dx,
                 int  dy,
                 bool with_history     = false,
                 bool show_histroy_top = false,
                 bool single_char      = false);

   ~Getline     ();

   bool on               ();
   void check_activation ();
   void refresh          ();
   void active           (bool mode);
   bool eval             ();
   bool get              ();

  }; 

#endif