| 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 define special colors used to colorize |
|---|
| 24 | // groups of genes or species (or any other items) |
|---|
| 25 | // |
|---|
| 26 | // to activate color_group-colors you need the following: |
|---|
| 27 | // |
|---|
| 28 | // - call AW_init_color_group_defaults with current program name |
|---|
| 29 | // |
|---|
| 30 | // - call AW_manage_GC with define_color_groups set to true |
|---|
| 31 | // This defines extra GC's for color_groups (named color_group_xxx) |
|---|
| 32 | // If such GCs are defined the normal properties window (AW_create_gc_window) |
|---|
| 33 | // automatically gets a sub-window called 'Edit color-groups' |
|---|
| 34 | // |
|---|
| 35 | // - add a label in your GC enum (at the end before BLA_GC_MAX) |
|---|
| 36 | // like this: |
|---|
| 37 | // |
|---|
| 38 | // BLA_GC_FIRST_COLOR_GROUP, |
|---|
| 39 | // BLA_GC_MAX = BLA_GC_FIRST_COLOR_GROUP + AW_COLOR_GROUPS |
|---|
| 40 | // |
|---|
| 41 | // - use AW_set_color_group to set and AW_find_color_group to read the |
|---|
| 42 | // color of a species/gene/experiment/organism/etc. |
|---|
| 43 | |
|---|
| 44 | #define AWAR_COLOR_GROUPS_PREFIX "color_groups" |
|---|
| 45 | #define AWAR_COLOR_GROUPS_USE AWAR_COLOR_GROUPS_PREFIX "/use" // int : whether to use the colors in display or not |
|---|
| 46 | |
|---|
| 47 | #define AW_COLOR_GROUP_PREFIX "color_group_" |
|---|
| 48 | #define AW_COLOR_GROUP_PREFIX_LEN 12 |
|---|
| 49 | #define AW_COLOR_GROUP_NAME_LEN (AW_COLOR_GROUP_PREFIX_LEN+2) |
|---|
| 50 | |
|---|
| 51 | #define AW_COLOR_GROUP_ENTRY "ARB_color" |
|---|
| 52 | #define AW_COLOR_GROUPS 12 |
|---|
| 53 | |
|---|
| 54 | GB_ERROR AW_set_color_group(GBDATA *gbd, long color_group); |
|---|
| 55 | long AW_find_color_group(GBDATA *gbd, bool ignore_usage_flag = false); |
|---|
| 56 | char *AW_get_color_group_name(AW_root *awr, int color_group); |
|---|
| 57 | |
|---|
| 58 | void AW_init_color_group_defaults(const char *for_program); |
|---|
| 59 | |
|---|
| 60 | #else |
|---|
| 61 | #error aw_color_groups.hxx included twice |
|---|
| 62 | #endif // AW_COLOR_GROUPS_HXX |
|---|
| 63 | |
|---|