1 | // ========================================================= // |
---|
2 | // // |
---|
3 | // File : nds.h // |
---|
4 | // Purpose : Node Display Setup // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // ========================================================= // |
---|
10 | |
---|
11 | #ifndef NDS_H |
---|
12 | #define NDS_H |
---|
13 | |
---|
14 | #ifndef ARBDB_BASE_H |
---|
15 | #include <arbdb_base.h> |
---|
16 | #endif |
---|
17 | #ifndef AW_BASE_HXX |
---|
18 | #include <aw_base.hxx> |
---|
19 | #endif |
---|
20 | #ifndef ARB_ASSERT_H |
---|
21 | #include <arb_assert.h> |
---|
22 | #endif |
---|
23 | #ifndef ARBTOOLS_H |
---|
24 | #include <arbtools.h> |
---|
25 | #endif |
---|
26 | #ifndef TREELABELER_H |
---|
27 | #include <TreeLabeler.h> |
---|
28 | #endif |
---|
29 | |
---|
30 | #define AWAR_SELECT_ACISRT "tmp/acisrt/select" |
---|
31 | #define AWAR_SELECT_ACISRT_PRE "tmp/acisrt/select_pre" |
---|
32 | |
---|
33 | // -------------------------------------------------------------------------------- |
---|
34 | |
---|
35 | enum NDS_Type { |
---|
36 | NDS_OUTPUT_LEAFTEXT = 0, // compress info (no tabbing, separate single fields by comma, completely skip empty fields); used in: ARB_NTREE-tree-display |
---|
37 | NDS_OUTPUT_LEAFTEXT_UNLIMITED = 1, // like NDS_OUTPUT_LEAFTEXT, but unlimited used in: ARB_NTREE-tree-export + ARB_DIST-matrix-export |
---|
38 | NDS_OUTPUT_TAB_SEPARATED = 2, // format info (using 1 tab per column - for easy import into star-calc, excel, etc. ); used in: ARB_NTREE-nds-export + -nds-list-display |
---|
39 | NDS_OUTPUT_COMMA_SEPARATED = 3, // like NDS_OUTPUT_TAB_SEPARATED, but using commas; used in: ARB_NTREE-nds-export |
---|
40 | }; |
---|
41 | |
---|
42 | class NDS_Labeler FINAL_TYPE : public TreeLabeler, virtual Noncopyable { |
---|
43 | NDS_Type type; |
---|
44 | |
---|
45 | mutable class NodeTextBuilder *builder; // pimpl |
---|
46 | NodeTextBuilder& theBuilder(GBDATA *gb_main) const; |
---|
47 | |
---|
48 | public: |
---|
49 | |
---|
50 | explicit NDS_Labeler(NDS_Type type_); |
---|
51 | virtual ~NDS_Labeler(); |
---|
52 | |
---|
53 | const char *speciesLabel(GBDATA *gb_main, GBDATA *gb_species, TreeNode *species, const char *tree_name) const OVERRIDE; |
---|
54 | const char *groupLabel(GBDATA *gb_main, GBDATA *gb_group, TreeNode *species, const char *tree_name) const OVERRIDE; |
---|
55 | |
---|
56 | NDS_Type get_NDS_Type() const { return type; } |
---|
57 | |
---|
58 | long max_columns(GBDATA *gb_main) const; |
---|
59 | }; |
---|
60 | |
---|
61 | // -------------------------------------------------------------------------------- |
---|
62 | |
---|
63 | AW_window *NDS_create_window(AW_root *aw_root, GBDATA *gb_main); |
---|
64 | void NDS_create_vars(AW_root *aw_root, AW_default awdef, GBDATA *gb_main); |
---|
65 | void NDS_popup_select_srtaci_window(AW_window *aww, const char *acisrt_awarname); |
---|
66 | char *NDS_mask_nonprintable_chars(char *inStr); |
---|
67 | |
---|
68 | #else |
---|
69 | #error nds.h included twice |
---|
70 | #endif // NDS_H |
---|