1 | #ifndef awtlocal_hxx_included |
---|
2 | #define awtlocal_hxx_included |
---|
3 | |
---|
4 | struct adawcbstruct { |
---|
5 | // @@@ FIXME: rethink design - maybe split into base class + |
---|
6 | // several derived classes for the different usages. |
---|
7 | |
---|
8 | AW_window *aws; |
---|
9 | AW_root *awr; |
---|
10 | GBDATA *gb_main; |
---|
11 | GBDATA *gb_user; |
---|
12 | GBDATA *gb_edit; |
---|
13 | AW_selection_list *id; |
---|
14 | char *comm; |
---|
15 | char *def_name; |
---|
16 | char *def_gbd; |
---|
17 | char *def_alignment; |
---|
18 | char *def_source; |
---|
19 | char *def_dest; |
---|
20 | char *def_filter; |
---|
21 | char *previous_filename; |
---|
22 | char *pwd; |
---|
23 | char *pwdx; // additional directories |
---|
24 | AW_BOOL show_dir; |
---|
25 | AW_BOOL leave_wildcards; |
---|
26 | char may_be_an_error; |
---|
27 | char show_only_marked; |
---|
28 | char scannermode; |
---|
29 | char *def_dir; |
---|
30 | const ad_item_selector *selector; |
---|
31 | AW_BOOL add_all_fields_pseudo_field; // true = > add a pseudo-field named '[all_fields]' (used by 'awt_create_selection_list_on_scandb_cb') |
---|
32 | AW_BOOL include_hidden_fields; // true = > show hidden fields in selection list |
---|
33 | }; |
---|
34 | |
---|
35 | struct awt_sel_list_for_tables { |
---|
36 | AW_window *aws; |
---|
37 | GBDATA *gb_main; |
---|
38 | AW_selection_list *id; |
---|
39 | const char *table_name; |
---|
40 | }; |
---|
41 | |
---|
42 | struct awt_sel_list_for_sai { |
---|
43 | AW_window *aws; |
---|
44 | GBDATA *gb_main; |
---|
45 | AW_selection_list *id; |
---|
46 | char *(*filter_poc)(GBDATA *gb_ext, AW_CL); |
---|
47 | AW_CL filter_cd; |
---|
48 | AW_BOOL add_selected_species; |
---|
49 | }; |
---|
50 | |
---|
51 | typedef enum { |
---|
52 | AWT_QUERY_GENERATE, |
---|
53 | AWT_QUERY_ENLARGE, |
---|
54 | AWT_QUERY_REDUCE |
---|
55 | } AWT_QUERY_MODES; |
---|
56 | |
---|
57 | typedef enum { |
---|
58 | AWT_QUERY_MARKED, |
---|
59 | AWT_QUERY_MATCH, |
---|
60 | AWT_QUERY_DONT_MATCH |
---|
61 | } AWT_QUERY_TYPES; |
---|
62 | |
---|
63 | #define AWT_QUERY_SEARCHES 3 // no of search-lines in search tool |
---|
64 | |
---|
65 | struct adaqbsstruct { |
---|
66 | AW_window *aws; |
---|
67 | GBDATA *gb_main; |
---|
68 | GBDATA *gb_ref; // second reference database |
---|
69 | AW_BOOL look_in_ref_list; // for querys |
---|
70 | AWAR species_name; |
---|
71 | AWAR tree_name; |
---|
72 | AWAR awar_keys[AWT_QUERY_SEARCHES]; |
---|
73 | AWAR awar_setkey; |
---|
74 | AWAR awar_setprotection; |
---|
75 | AWAR awar_setvalue; |
---|
76 | AWAR awar_parskey; |
---|
77 | AWAR awar_parsvalue; |
---|
78 | AWAR awar_parspredefined; |
---|
79 | AWAR awar_queries[AWT_QUERY_SEARCHES]; |
---|
80 | AWAR awar_not[AWT_QUERY_SEARCHES]; // not flags for queries |
---|
81 | AWAR awar_operator[AWT_QUERY_SEARCHES]; // not flags for queries |
---|
82 | AWAR awar_ere; |
---|
83 | AWAR awar_where; |
---|
84 | AWAR awar_by; |
---|
85 | AWAR awar_use_tag; |
---|
86 | AWAR awar_double_pars; |
---|
87 | AWAR awar_deftag; |
---|
88 | AWAR awar_tag; |
---|
89 | AWAR awar_count; |
---|
90 | AW_selection_list *result_id; |
---|
91 | int select_bit; // one of 1 2 4 8 .. 128 (one for each query box) |
---|
92 | |
---|
93 | const ad_item_selector *selector; |
---|
94 | }; |
---|
95 | |
---|
96 | #define AWAR_TABLE_FIELD_REORDER_SOURCE_TEMPLATE "tmp/table/%s/field/reorder_source" |
---|
97 | #define AWAR_TABLE_FIELD_REORDER_DEST_TEMPLATE "tmp/table/%s/field/reorder_dest" |
---|
98 | #define AWAR_TABLE_FIELD_NEW_NAME_TEMPLATE "tmp/table/%s/new_name" |
---|
99 | #define AWAR_TABLE_FIELD_REM_TEMPLATE "tmp/table/%s/rem" |
---|
100 | #define AWAR_TABLE_FIELD_NEW_TYPE_TEMPLATE "tmp/table/%s/new_type" |
---|
101 | #define AWAR_TABLE_SELECTED_FIELD_TEMPLATE "tmp/table/%s/selected_field" |
---|
102 | |
---|
103 | struct awt_table { |
---|
104 | GBDATA *gb_main; |
---|
105 | char *table_name; |
---|
106 | char *awar_field_reorder_source; |
---|
107 | char *awar_field_reorder_dest; |
---|
108 | char *awar_field_new_name; |
---|
109 | char *awar_field_new_type; |
---|
110 | char *awar_field_rem; |
---|
111 | char *awar_selected_field; |
---|
112 | awt_table(GBDATA *gb_main,AW_root *awr,const char *table_name); |
---|
113 | ~awt_table(); |
---|
114 | }; |
---|
115 | |
---|
116 | #define AWAR_TABLE_NAME "tmp/ad_table/table_name" |
---|
117 | #define AWAR_TABLE_DEST "tmp/ad_table/table_dest" |
---|
118 | #define AWAR_TABLE_REM "tmp/ad_table/table_rem" |
---|
119 | #define AWAR_TABLE_EXPORT "tmp/ad_table/export_table" |
---|
120 | #define AWAR_TABLE_IMPORT "tmp/ad_table/import_table" |
---|
121 | |
---|
122 | #define ALL_FIELDS_PSEUDO_FIELD "[any field]" |
---|
123 | |
---|
124 | long awt_query_update_list(void *dummy, struct adaqbsstruct *cbs); |
---|
125 | |
---|
126 | |
---|
127 | #endif |
---|