|
Last change
on this file was
17944,
checked in by westram, 6 years ago
|
- FIXES crash in RELEASE version (when invalid color group occurs in database).
- add assertions against
- invalid color_groups and
- invalid unshaded GCs.
- ARBDB color-group interface:
- define number of allowed color groups in ARBDB
- fix interface types (long→int)
- report error when color_group passed to GBT_set_color_group is out-of-range.
- GBT_get_color_group does range check. returns 0 if out-of-range.
|
|
File size:
1.4 KB
|
| Line | |
|---|
| 1 | // ============================================================ // |
|---|
| 2 | // // |
|---|
| 3 | // File : ad_colorset.h // |
|---|
| 4 | // Purpose : item-colors and colorsets // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in July 2015 // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // ============================================================ // |
|---|
| 10 | |
|---|
| 11 | #ifndef AD_COLORSET_H |
|---|
| 12 | #define AD_COLORSET_H |
|---|
| 13 | |
|---|
| 14 | #ifndef ARBDB_BASE_H |
|---|
| 15 | #include "arbdb_base.h" |
|---|
| 16 | #endif |
|---|
| 17 | #ifndef ARB_STRARRAY_H |
|---|
| 18 | #include <arb_strarray.h> |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | #define GB_COLORGROUP_ENTRY "ARB_color" |
|---|
| 22 | #define GB_COLOR_GROUPS 12 |
|---|
| 23 | |
|---|
| 24 | int GBT_get_color_group(GBDATA *gb_item); |
|---|
| 25 | GB_ERROR GBT_set_color_group(GBDATA *gb_item, int color_group); |
|---|
| 26 | |
|---|
| 27 | GBDATA *GBT_colorset_root(GBDATA *gb_main, const char *itemname); |
|---|
| 28 | void GBT_get_colorset_names(ConstStrArray& colorsetNames, GBDATA *gb_colorset_root); |
|---|
| 29 | GBDATA *GBT_find_colorset(GBDATA *gb_colorset_root, const char *name); |
|---|
| 30 | GBDATA *GBT_find_or_create_colorset(GBDATA *gb_colorset_root, const char *name); |
|---|
| 31 | |
|---|
| 32 | GB_ERROR GBT_load_colorset(GBDATA *gb_colorset, ConstStrArray& colorsetDefs); |
|---|
| 33 | GB_ERROR GBT_save_colorset(GBDATA *gb_colorset, CharPtrArray& colorsetDefs); |
|---|
| 34 | |
|---|
| 35 | #else |
|---|
| 36 | #error ad_colorset.h included twice |
|---|
| 37 | #endif // AD_COLORSET_H |
|---|
Note: See
TracBrowser
for help on using the repository browser.