File: file_selector.h

package info (click to toggle)
craft 3.5-12
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,172 kB
  • ctags: 1,605
  • sloc: cpp: 3,794; makefile: 2,322; ansic: 857; sh: 842
file content (57 lines) | stat: -rw-r--r-- 1,163 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
#ifndef file_selector_h
#define file_selector_h

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

#define max_file_selector_cases 1000

class file_selector
  {public:

   char     name [128];
   win      *w;

   selector *sel;
   Getline  *get_name;
   Getline  *get_pattern;

   int      num_files;
   char     file_list [max_selector_cases][128];

   bool     is_force_exist;
   char     file_pattern [128];
   char     file_name    [256];

   char     last_pattern [128];
   char     last_name    [256];
   char     last_path    [256];

   button   *cancel;
  
   file_selector      (char name [], 
                       int  x,
                       int  y,
                       char file_name    [],
                       char file_pattern [],
                       bool must_exists = true);

   file_selector      (char name [],
                       int  x,
                       int  y,
                       char full_file_name [],
                       bool must_exist = true);

   ~file_selector     ();

   bool eval          (char file_name []);

   void get_file_list ();

  }; 

#endif