| 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 | |
|---|
| 22 | // ---------------------- |
|---|
| 23 | // color groups |
|---|
| 24 | // |
|---|
| 25 | // color groups define special colors used to colorize |
|---|
| 26 | // groups of genes or species (or any other items) |
|---|
| 27 | // |
|---|
| 28 | // to activate color_group-colors you need the following: |
|---|
| 29 | // |
|---|
| 30 | // - call AW_init_color_group_defaults with current program name |
|---|
| 31 | // |
|---|
| 32 | // - call AW_manage_GC with define_color_groups set to true |
|---|
| 33 | // This defines extra GC's for color_groups (named color_group_xxx) |
|---|
| 34 | // If such GCs are defined the normal properties window (AW_create_gc_window) |
|---|
| 35 | // automatically gets a sub-window called 'Edit color-groups' |
|---|
| 36 | // |
|---|
| 37 | // - add a label in your GC enum (at the end before BLA_GC_MAX) |
|---|
| 38 | // like this: |
|---|
| 39 | // |
|---|
| 40 | // BLA_GC_FIRST_COLOR_GROUP, |
|---|
| 41 | // BLA_GC_MAX = BLA_GC_FIRST_COLOR_GROUP + AW_COLOR_GROUPS |
|---|
| 42 | // |
|---|
| 43 | // - use |
|---|
| 44 | // GBT_set_color_group() to set and |
|---|
| 45 | // GBT_get_color_group() to read |
|---|
| 46 | // the color of an item. |
|---|
| 47 | // |
|---|
| 48 | // - use AW_color_groups_active() to detect whether color groups shall be shown at all. |
|---|
| 49 | |
|---|
| 50 | #define AW_COLOR_GROUP_PREFIX "color_group_" |
|---|
| 51 | #define AW_COLOR_GROUP_PREFIX_LEN 12 |
|---|
| 52 | #define AW_COLOR_GROUP_NAME_LEN (AW_COLOR_GROUP_PREFIX_LEN+2) |
|---|
| 53 | #define AW_COLOR_GROUPS 12 |
|---|
| 54 | |
|---|
| 55 | void AW_init_color_group_defaults(const char *for_program); |
|---|
| 56 | bool AW_color_groups_active(); |
|---|
| 57 | const char *AW_get_color_groups_active_awarname(); |
|---|
| 58 | char *AW_get_color_group_name(AW_root *awr, int color_group); |
|---|
| 59 | |
|---|
| 60 | // ---------------------- |
|---|
| 61 | // color ranges |
|---|
| 62 | // |
|---|
| 63 | // color ranges provide blended colors (e.g. red .. green or black .. white) |
|---|
| 64 | |
|---|
| 65 | #define AW_RANGE_COLORS 4096 // amount of gcs used for color-ranges (4096 = 64*64 = 16*16*16) |
|---|
| 66 | // #define AW_RANGE_COLORS 16384 |
|---|
| 67 | // #define AW_RANGE_COLORS 65536 |
|---|
| 68 | // #define AW_RANGE_COLORS 262144 |
|---|
| 69 | |
|---|
| 70 | // #define AW_RANGE_COLORS 1048576 // test 1 million gcs (uses several Gb of memory; in arb_ntree and XOrg) |
|---|
| 71 | |
|---|
| 72 | #define AW_PLANAR_COLORS 64 // color-steps per channel in planar color-range |
|---|
| 73 | #define AW_SPATIAL_COLORS 16 // color-steps per channel in spatial color-range |
|---|
| 74 | |
|---|
| 75 | #else |
|---|
| 76 | #error aw_color_groups.hxx included twice |
|---|
| 77 | #endif // AW_COLOR_GROUPS_HXX |
|---|
| 78 | |
|---|