1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : aw_color_groups.cxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Coded by Ralf Westram (coder@reallysoft.de) in June 2001 // |
---|
7 | // Institute of Microbiology (Technical University Munich) // |
---|
8 | // http://www.arb-home.de/ // |
---|
9 | // // |
---|
10 | // =============================================================== // |
---|
11 | |
---|
12 | #ifndef AW_COLOR_GROUPS_HXX |
---|
13 | #define AW_COLOR_GROUPS_HXX |
---|
14 | |
---|
15 | #ifndef AW_BASE_HXX |
---|
16 | #include "aw_base.hxx" |
---|
17 | #endif |
---|
18 | #ifndef ARBDB_BASE_H |
---|
19 | #include <arbdb_base.h> |
---|
20 | #endif |
---|
21 | #ifndef AD_COLORSET_H |
---|
22 | #include <ad_colorset.h> |
---|
23 | #endif |
---|
24 | |
---|
25 | // ---------------------- |
---|
26 | // color groups |
---|
27 | // |
---|
28 | // color groups define special colors used to colorize |
---|
29 | // groups of genes or species (or any other items) |
---|
30 | // |
---|
31 | // to activate color_group-colors you need the following: |
---|
32 | // |
---|
33 | // - call AW_init_color_group_defaults with current program name |
---|
34 | // |
---|
35 | // - call AW_manage_GC with define_color_groups set to true |
---|
36 | // This defines extra GC's for color_groups (named color_group_xxx) |
---|
37 | // If such GCs are defined the normal properties window (AW_create_gc_window) |
---|
38 | // automatically gets a sub-window called 'Edit color-groups' |
---|
39 | // |
---|
40 | // - add a label in your GC enum (at the end before BLA_GC_MAX) |
---|
41 | // like this: |
---|
42 | // |
---|
43 | // BLA_GC_FIRST_COLOR_GROUP, |
---|
44 | // BLA_GC_MAX = BLA_GC_FIRST_COLOR_GROUP + AW_COLOR_GROUPS |
---|
45 | // |
---|
46 | // - use |
---|
47 | // GBT_set_color_group() to set and |
---|
48 | // GBT_get_color_group() to read |
---|
49 | // the color of an item. |
---|
50 | // |
---|
51 | // - use AW_color_groups_active() to detect whether color groups shall be shown at all. |
---|
52 | |
---|
53 | #define AW_COLOR_GROUP_PREFIX "ColorGroup" |
---|
54 | #define AW_COLOR_GROUP_NAME_LEN 50 |
---|
55 | #define AW_COLOR_GROUPS GB_COLOR_GROUPS |
---|
56 | |
---|
57 | void AW_init_color_group_defaults(const char *for_program); |
---|
58 | bool AW_color_groups_active(); |
---|
59 | const char *AW_get_color_groups_active_awarname(); |
---|
60 | char *AW_get_color_group_name(AW_root *awr, int color_group); |
---|
61 | |
---|
62 | // ---------------------- |
---|
63 | // color ranges |
---|
64 | // |
---|
65 | // color ranges provide blended colors (e.g. red .. green or black .. white) |
---|
66 | |
---|
67 | #define AW_RANGE_COLORS 4096 // amount of gcs used for color-ranges (4096 = 64*64 = 16*16*16) |
---|
68 | // #define AW_RANGE_COLORS 16384 |
---|
69 | // #define AW_RANGE_COLORS 65536 |
---|
70 | // #define AW_RANGE_COLORS 262144 |
---|
71 | |
---|
72 | // #define AW_RANGE_COLORS 1048576 // test 1 million gcs (uses several Gb of memory; in arb_ntree and XOrg) |
---|
73 | |
---|
74 | #define AW_PLANAR_COLORS 64 // color-steps per channel in planar color-range |
---|
75 | #define AW_SPATIAL_COLORS 16 // color-steps per channel in spatial color-range |
---|
76 | |
---|
77 | #else |
---|
78 | #error aw_color_groups.hxx included twice |
---|
79 | #endif // AW_COLOR_GROUPS_HXX |
---|
80 | |
---|