24 #define AWAR_SELECTED_VALNAME "tmp/validNames/selectedName"
25 #define AWAR_INPUT_INITIALS "tmp/validNames/inputInitials"
42 const char* searchstr = svnp -> initials;
43 size_t length = strlen(searchstr);
49 if (!GB_validNamesCont) { std::cout <<
"validNames Container not found\n"; }
55 for (
GBDATA *GB_validNamePair =
GB_entry(GB_validNamesCont,
"pair");
56 GB_validNamePair && !err;
62 if (strcmp(typeString,
"NOTYPE") != 0) {
73 if (strncmp (validName, searchstr, length) == 0) {
107 aw_message(
"ValidNameSelectionList was created");
127 if (selectedSpeciesName[0] == 0) err =
"No species selected";
132 if (!gb_selected_species) {
133 err =
GBS_global_string(
"species '%s' not found in database", selectedSpeciesName);
138 if (!gb_name_cont) err =
"could not create Valid Name container in database";
150 free(selectedSpeciesName);
151 free(selectedValName);
155 AW_window_simple *aws =
new AW_window_simple;
156 aws->init(aw_root,
"SEARCH_VALID_NAMES_MANUALLY",
"Search Names Manually");
161 aws->create_button(
"CLOSE",
"CLOSE",
"C");
165 aws->create_button(
"HELP",
"HELP",
"H");
174 aws->create_button(
"SELECT",
"SELECT");
176 aws->at(
"enterInitial");
GB_ERROR GB_begin_transaction(GBDATA *gbd)
AW_selection_list * validNamesList
void sort(bool backward, bool case_sensitive)
void load_xfig(const char *file, bool resize=true)
static void updateValNameList(AW_root *awr, selectValidNameStruct *svnp)
void insert_default(const char *displayed, const AW_scalar &value)
GBDATA * GB_nextEntry(GBDATA *entry)
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
const char * GBS_global_string(const char *templat,...)
void AW_POPDOWN(AW_window *window)
void NT_createValidNamesAwars(AW_root *aw_root, AW_default aw_def)
AW_awar * add_callback(const RootCallback &cb)
void insert(const char *displayed, const AW_scalar &value)
#define AWAR_SELECTED_VALNAME
WindowCallback makeHelpCallback(const char *helpfile)
AW_window * NT_create_searchManuallyNames_window(AW_root *aw_root)
static void fillSelNamList(selectValidNameStruct *svnp)
#define AWAR_INPUT_INITIALS
#define AWAR_SPECIES_NAME
char * read_string() const
AW_awar * awar(const char *awar)
static void selectValidNameFromList(AW_window *selManWindowRoot)
GB_ERROR GBT_write_string(GBDATA *gb_container, const char *fieldpath, const char *content)
char * GB_read_string(GBDATA *gbd)
AW_selection_list * create_selection_list(const char *awar_name, int columns, int rows)
void aw_message(const char *msg)
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
static selectValidNameStruct * createValNameList(GBDATA *gb_main, AW_window *aws, const char *awarName)
GBDATA * GB_entry(GBDATA *father, const char *key)