39 using namespace QUERY;
41 #define ui_assert(cond) arb_assert(cond)
44 #define AWAR_FIELD_REORDER_ORDER "tmp/adreorder/order"
47 #define AWAR_FIELD_REORDER_SOURCE_TMPL "tmp/adreorder/%s/source"
48 #define AWAR_FIELD_REORDER_DEST_TMPL "tmp/adreorder/%s/dest"
49 #define AWAR_FIELD_CREATE_NAME_TMPL "tmp/adfield/%s/name"
50 #define AWAR_FIELD_CREATE_TYPE_TMPL "tmp/adfield/%s/type"
51 #define AWAR_FIELD_DELETE_TMPL "tmp/adfield/%s/source"
52 #define AWAR_FIELD_CONVERT_SOURCE_TMPL "tmp/adconvert/%s/source"
53 #define AWAR_FIELD_CONVERT_TYPE_TMPL "tmp/adconvert/%s/type"
57 #define AWAR_NN_COMPLEMENT AWAR_NN_BASE "complement"
58 #define AWAR_NN_RANGE_START AWAR_NN_BASE "range_start"
59 #define AWAR_NN_RANGE_END AWAR_NN_BASE "range_end"
60 #define AWAR_NN_MIN_SCORE AWAR_NN_BASE "min_scored"
61 #define AWAR_NN_MAX_HITS AWAR_NN_BASE "max_hits"
64 #define AWAR_NN_BASE_SELECTED AWAR_NN_BASE "selected/"
65 #define AWAR_NN_SELECTED_HIT_COUNT "tmp/" AWAR_NN_BASE_SELECTED "hit_count"
66 #define AWAR_NN_SELECTED_AUTO_SEARCH "tmp/" AWAR_NN_BASE_SELECTED "auto_search"
67 #define AWAR_NN_SELECTED_AUTO_MARK "tmp/" AWAR_NN_BASE_SELECTED "auto_mark"
70 #define AWAR_NN_BASE_LISTED AWAR_NN_BASE "listed/"
71 #define AWAR_NN_LISTED_DEST_FIELD AWAR_NN_BASE_LISTED "dest_field"
72 #define AWAR_NN_LISTED_SCORED_ENTRIES AWAR_NN_BASE_LISTED "scored_entries"
95 if (!initialized[itype.
type]) {
104 initialized[itype.
type] =
true;
120 else if (gb_species) {
131 else error =
"Please select a species";
160 error =
"Please enter a name for the new species";
176 else aw_message(
"Please select a species first");
179 if (give_name) *give_name = name;
213 error = ta.
close(error);
226 if (strcmp(old_fullname, new_fullname) == 0) {
227 error =
"[nothing changed]";
237 "Regenerate species identifier ('name')?\n"
238 "(only do this if you know what you're doing)");
246 error = ta.
close(error);
255 const char *full_name;
273 error =
"Please select a species first";
278 error = ta.
close(error);
300 if (gb_field) ++count;
319 bool legal_pos(
int p) {
return p >= 0 && p<key_count; }
320 bool legal_field_pos(
int p)
const {
return p >= 0 && p<field_count; }
321 bool legal_field_pos(
int p1,
int p2)
const {
return legal_field_pos(p1) && legal_field_pos(p2); }
323 void swap(
int p1,
int p2) {
331 order_changed =
true;
334 const char *field_name(
int p)
const {
344 int field_freq(
int p)
const {
345 const char *name = field_name(p);
352 if (sort_progress) sort_progress->
inc();
364 case ORDER_TYPE:
return field_type(p2)-field_type(p1);
365 case ORDER_ALPHA:
return strcasecmp(field_name(p1), field_name(p2));
366 case ORDER_FREQ:
return field_freq(p2)-field_freq(p1);
384 int container_count = 0;
390 key[key_count-1-container_count++] = gb_key;
393 key[field_count++] = gb_key;
396 ui_assert((container_count+field_count) == key_count);
397 reverse_order(field_count, key_count-1);
399 order_changed =
false;
410 if (legal_field_pos(p1, p2)) {
412 sort_progress =
new arb_progress(
"Calculating field frequencies",
long(p2-p1+1));
414 bitem_selector = selector;
416 bool changed =
false;
420 if (compare(i-1, i, mode)>0) {
434 delete sort_progress;
435 sort_progress =
NULp;
441 if (legal_field_pos(p1, p2))
while (p1<p2)
swap(p1++, p2--);
446 for (i = 0; i<key_count; i++) {
447 if (gb_key == key[i])
break;
449 if (i == key_count) {
456 void move_to(
int to_move,
int wanted_position) {
457 if (legal_field_pos(to_move, wanted_position)) {
458 while (to_move<wanted_position) {
459 swap(to_move, to_move+1);
462 while (to_move>wanted_position) {
463 swap(to_move, to_move-1);
476 order_changed =
false;
505 if (!gb_left_field || !gb_right_field || gb_left_field == gb_right_field) {
506 warning =
"Please select different fields in both list";
512 int left_key_idx = sorter.
index_of(gb_left_field);
513 int right_key_idx = sorter.
index_of(gb_right_field);
517 sorter.
move_to(right_key_idx, left_key_idx+(left_key_idx<right_key_idx));
518 if (right_index>left_index) { left_index++; right_index++; }
526 sorter.
bubble_sort(left_key_idx, right_key_idx, mode, &bis);
564 warning =
"Please select the item to move in the right box";
570 int curr_index = sorter.
index_of(gb_field);
573 dest_index = curr_index+dir;
580 sorter.
move_to(curr_index, dest_index);
594 if (!awsa[selector.
type]) {
595 AW_window_simple *aws =
new AW_window_simple;
596 awsa[selector.
type] = aws;
600 aws->load_xfig(
"ad_kreo.fig");
604 aws->create_button(
"CLOSE",
"Close",
"C");
607 const char *HELPFILE =
"spaf_reorder.hlp";
609 aws->create_button(
"HELP",
"Help",
"H");
614 aws->button_length(8);
617 aws->callback(makeWindowCallback(
sort_keys, sel1, sel2));
618 aws->help_text(HELPFILE);
619 aws->create_button(
"SORT",
"Sort by");
625 aws->insert_option(
"frequency",
"f",
ORDER_FREQ);
626 aws->update_option_menu();
628 aws->at(
"leftright");
630 aws->help_text(HELPFILE);
631 aws->create_autosize_button(
"MOVE_RIGHT_BEHIND_LEFT",
"Move right\nbehind left");
635 aws->help_text(HELPFILE);
636 aws->create_autosize_button(
"REVERSE",
"Reverse");
638 aws->button_length(6);
644 {
"Top",
"MOVE_TOP_RIGHT", -2 },
645 {
"Up",
"MOVE_UP_RIGHT", -1 },
646 {
"Down",
"MOVE_DOWN_RIGHT", +1 },
647 {
"Bottom",
"MOVE_BOT_RIGHT", +2 },
650 for (
int i = 0; i<4; ++i) {
651 aws->at(reorder[i].tag);
652 aws->callback(makeWindowCallback(
reorder_up_down, sel2, reorder[i].dir));
653 aws->help_text(HELPFILE);
654 aws->create_button(reorder[i].macro, reorder[i].tag);
658 return awsa[selector.
type];
670 if (!gb_source) error =
"Please select the field you want to (un)hide";
690 if (!gb_source) error =
"Please select the field you want to delete";
694 !error && gb_item_container;
724 if (!awsa[selector.
type]) {
725 AW_window_simple *aws =
new AW_window_simple;
726 awsa[selector.
type] = aws;
730 aws->load_xfig(
"ad_delof.fig");
731 aws->button_length(6);
734 aws->create_button(
"CLOSE",
"Close",
"C");
737 aws->create_button(
"HELP",
"Help",
"H");
741 aws->button_length(13);
743 aws->callback(makeWindowCallback(
hide_field_cb, item_sel, 1));
744 aws->create_button(
"HIDE_FIELD",
"Hide field",
"H");
747 aws->callback(makeWindowCallback(
hide_field_cb, item_sel, 0));
748 aws->create_button(
"UNHIDE_FIELD",
"Unhide field",
"U");
752 aws->create_button(
"DELETE_FIELD",
"Delete field\n(data deleted)",
"C");
755 return awsa[selector.
type];
765 if (error && !error2) {
766 aw_message(
"Warning: Your key contain a '/' character,\n"
767 " that means it is a hierarchical key");
791 if (awsa[selector.
type])
return awsa[selector.
type];
793 AW_window_simple *aws =
new AW_window_simple;
794 awsa[selector.
type] = aws;
798 aws->load_xfig(
"ad_fcrea.fig");
802 aws->create_button(
"CLOSE",
"Close",
"C");
805 aws->label(
"FIELD NAME");
811 aws->update_toggle_field();
815 aws->create_button(
"CREATE",
"Create",
"C");
855 if (awsa[selector.
type])
return awsa[selector.
type];
857 AW_window_simple *aws =
new AW_window_simple;
858 awsa[selector.
type] = aws;
862 aws->load_xfig(
"ad_conv.fig");
866 aws->create_button(
"CLOSE",
"Close",
"C");
870 aws->create_button(
"HELP",
"Help",
"H");
879 aws->update_toggle_field();
883 aws->create_button(
"CONVERT",
"Convert",
"T");
903 int bpos = atoi(input);
928 if (new_query != query) {
934 if (new_resultList != resultList) {
936 resultList = new_resultList;
968 const char *dest_field =
NULp;
977 arb_progress progress(
"Searching next neighbours", queriedCount);
996 !error && gb_species;
1004 PT_FamilyFinder ff(gb_main, pts, oligo_len, mismatches, fast_mode, rel_matches, rel_scaling);
1008 error = ff.
searchFamily(sequence, compl_mode, wanted_entries, min_score);
1014 const char *thisValue =
NULp;
1017 thisValue = scored_entries
1023 thisValue = scored_entries
1035 value->
cat(thisValue);
1051 if (gb_dest) error =
GB_delete(gb_dest);
1083 char *sequence =
NULp;
1091 error =
"Select a species first";
1101 error =
GBS_global_string(
"Species '%s' has no sequence '%s'", sel_species, ali_name);
1117 PT_FamilyFinder ff(gb_main, pts, oligo_len, mismatches, fast_mode, rel_matches, rel_scaling);
1127 error = ff.
searchFamily(sequence, compl_mode, max_hits, min_score);
1142 int shownHits = max_hits>0 ? max_hits : ff.
getRealHits();
1143 int numWidth = log(shownHits)/log(10)+1;
1148 dis =
GBS_global_string(
"#%0*i %-12s Rel.hits: %5.1f%%", numWidth, count, fm->name, fm->rel_matches*100);
1151 dis =
GBS_global_string(
"#%0*i %-12s Hits: %4li", numWidth, count, fm->name, fm->matches);
1154 sel->
insert(dis, fm->name);
1176 if (!current_species) current_species = strdup(
"<unknown>");
1182 free(hit_description);
1183 free(current_species);
1218 nn_of_sel_win && nn_of_sel_win->
is_shown())
1225 static bool created =
false;
1270 cdef.
add(next_neighbour_config_mapping);
1282 aws->
at(
"pt_server");
1285 const int SCALER_LENGTH = 200;
1309 aws->
at(
"min_score");
1317 static AW_window_simple *aws =
NULp;
1322 aws =
new AW_window_simple;
1323 aws->init(aw_root,
"SEARCH_NEXT_NEIGHBOURS_OF_LISTED",
"Search Next Neighbours of Listed");
1324 aws->load_xfig(
"ad_spec_nnm.fig");
1328 aws->create_button(
"CLOSE",
"Close",
"C");
1332 aws->create_button(
"HELP",
"Help",
"H");
1336 aws->at(
"add_score");
1344 aws->button_length(10);
1345 aws->create_button(
"WRITE_FIELDS",
"GO");
1351 static AW_window_simple *aws =
NULp;
1356 aws =
new AW_window_simple;
1357 aws->init(aw_root,
"SEARCH_NEXT_RELATIVE_OF_SELECTED",
"Search Next Neighbours of Selected");
1358 aws->load_xfig(
"ad_spec_nn.fig");
1362 aws->create_button(
"CLOSE",
"Close",
"C");
1366 aws->create_button(
"HELP",
"Help",
"H");
1370 aws->button_length(10);
1371 aws->at(
"hit_count");
1382 aws->create_button(
"SEARCH",
"Search");
1385 aws->label(
"Auto search on change");
1390 aws->create_autosize_button(
"MARK_HITS",
"Mark hits");
1392 aws->at(
"auto_mark");
1398 aws->create_autosize_button(
"MOVE_TO_HITLIST",
"Move to hitlist");
1400 nn_of_sel_win = aws;
1449 aws,
"box",
"field",
"enable",
DB_KEYVIEWER,
"mark", itemType);
1477 int windowIdx = (
int)organismWindow;
1480 if (!AWS[windowIdx]) {
1505 aws->
init(aw_root,
"SPECIES_QUERY",
"SEARCH and QUERY");
1535 GLOBAL_species_query = query;
GB_ERROR GB_begin_transaction(GBDATA *gbd)
GB_ERROR GB_check_key(const char *key) __ATTR__USERESULT
void insert_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
void AWTC_create_common_next_neighbour_fields(AW_window *aws, int scaler_length)
GB_ERROR GB_copy_dropProtectMarksAndTempstate(GBDATA *dest, GBDATA *source)
GB_ERROR GBT_add_new_changekey_to_keypath(GBDATA *gb_main, const char *name, GB_TYPES type, const char *keypath)
static void create_common_next_neighbour_fields(AW_window *aws, bool for_listed)
AW_window * create_species_query_window(AW_root *aw_root, GBDATA *gb_main)
static void awtc_nn_search_all_listed(AW_window *aww)
const InfoWindow * find_reusable_of_same_type_as(const InfoWindow &other)
#define AWAR_NN_LISTED_SCORED_ENTRIES
void insert_toggle(AW_label toggle_label, const char *mnemonic, const char *var_value)
GB_ERROR GB_commit_transaction(GBDATA *gbd)
static GB_ERROR species_rename_handler(const char *new_fullname, GBDATA *gb_species)
void popup_organism_info_window(AW_root *aw_root, GBDATA *gb_main)
void button_length(int length)
void add(const char *awar_name, const char *config_name)
#define AWAR_FIELD_REORDER_SOURCE_TMPL
static void nn_trigger_delayed_autosearch_cb(AW_root *awr)
void reverse_order(int p1, int p2)
static bool autosearch_triggered
long GB_read_int(GBDATA *gbd)
GBDATA * GB_child(GBDATA *father)
long GBS_write_hash(GB_HASH *hs, const char *key, long val)
const char * config_pos_fig
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const WindowCallback &wcb)
void select_element_at(int wanted_index)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
static void reverse_key_order(AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
void load_xfig(const char *file, bool resize=true)
void DbQuery_update_list(DbQuery *query)
void species_field_selection_list_unhide_all_cb(AW_window *, GBDATA *gb_main)
void create_dbui_awars(AW_root *aw_root)
void insert_default(const char *displayed, const AW_scalar &value)
static void field_create_cb(AW_window *aws, BoundItemSel *bound_selector)
ItemSelector & ORGANISM_get_selector()
static void nn_auto_search_changed_cb(AW_root *awr)
GBDATA * get_gb_main() const
static const int MAIN_WINDOW
void popup_species_info_window(AW_root *aw_root, GBDATA *gb_main)
static void species_delete_cb(AW_window *aww, GBDATA *gb_main)
GBDATA * query_get_gb_main(DbQuery *query)
int allocate_detach_id(const InfoWindow &other)
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
#define AWAR_FIELD_REORDER_DEST_TMPL
static void init_itemspecific_DBUI_awars(AW_root *aw_root, ItemSelector &itype)
static void field_convert_commit_cb(AW_window *aws, BoundItemSel *bound_selector)
void copy_selection_list_2_query_box(DbQuery *query, AW_selection_list *srclist, const char *hit_description)
static void move_species_to_extended(AW_window *aww, GBDATA *gb_main)
AW_selection_list * resultList
void AWT_insert_config_manager(AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store_cb, const RestoreConfigCallback &load_or_reset_cb, const char *macro_id, const AWT_predefined_config *predef)
#define AWAR_FIELD_CONVERT_TYPE_TMPL
#define AWAR_DEFAULT_ALIGNMENT
void GB_end_transaction_show_error(GBDATA *gbd, GB_ERROR error, void(*error_handler)(GB_ERROR))
#define AWAR_NN_RANGE_START
AW_awar * set_minmax(float min, float max)
static void hide_field_cb(AW_window *aws, Itemfield_Selection *item_sel, int hide)
static void popup_speciesOrganismWindow(AW_root *aw_root, GBDATA *gb_main, bool organismWindow)
static void species_create_cb(AW_window *, GBDATA *gb_main)
DbQuery * create_query_box(AW_window *aws, query_spec *awtqs, const char *query_id)
const char * GBS_global_string(const char *templat,...)
void warning(int warning_num, const char *warning_message)
const char * result_pos_fig
void AW_POPDOWN(AW_window *window)
void unquery_all(void *dummy, DbQuery *query)
void GBS_free_hash(GB_HASH *hs)
void auto_subtitles(const char *prefix)
void cat(const char *from)
void add_timed_callback(int ms, const TimedCallback &tcb)
int get_index_of_selected()
static void species_rename_cb(AW_window *aww, GBDATA *gb_main)
static void reorder_up_down(AW_window *aws, Itemfield_Selection *sel_right, int dir)
long count_queried_items(DbQuery *query, QUERY_RANGE range)
const char * open_parser_pos_fig
KeySorter(GBDATA *gb_key_data)
void insert_field_admin_menuitems(AW_window *aws, GBDATA *gb_main)
static NN_GlobalData NN_GLOBAL
static AW_window * create_next_neighbours_selected_window(AW_root *aw_root, DbQuery *query)
GBDATA * GB_get_father(GBDATA *gbd)
void update_option_menu()
GB_ERROR GB_push_transaction(GBDATA *gbd)
bool speciesOrOrganism(QUERY_ITEM_TYPE type)
bool mapsOrganism() const
GB_ERROR searchFamily(const char *sequence, FF_complement compl_mode, int max_results, double min_score) OVERRIDE __ATTR__USERESULT
const char * itemAwar(const char *name_template, ItemSelector &itype)
char * AWTC_makeUniqueShortName(const char *prefix, UniqueNameDetector &existingNames)
int index_of(GBDATA *gb_key)
#define AWAR_NN_REL_SCALING
AW_awar * add_callback(const RootCallback &cb)
GB_ERROR GB_delete(GBDATA *&source)
#define AWAR_NN_FAST_MODE
void create_input_field_with_scaler(const char *awar_name, int textcolumns=4, int scaler_length=250, AW_ScalerType scalerType=AW_SCALER_LINEAR)
void insert(const char *displayed, const AW_scalar &value)
void create_itemfield_selection_button(AW_window *aws, const FieldSelDef &selDef, const char *at)
static HelixNrInfo * start
static void sort_keys(AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
GB_ERROR GB_check_hkey(const char *key) __ATTR__USERESULT
const char * read_char_pntr() const
static void reorder_keys(AW_window *aws, ReorderMode mode, Itemfield_Selection *sel_left, Itemfield_Selection *sel_right)
static AWT_config_mapping_def next_neighbour_config_mapping[]
GB_ERROR GBT_convert_changekey(GBDATA *gb_main, const char *name, GB_TYPES target_type)
GB_ERROR GB_await_error()
static void popup_detached_speciesOrganismWindow(AW_window *aw_parent, const InfoWindow *infoWin)
static AW_root * SINGLETON
DbQuery * get_query() const
GBDATA * GB_create_container(GBDATA *father, const char *key)
WindowCallback makeHelpCallback(const char *helpfile)
long GB_read_count(GBDATA *gbd)
TYPE * ARB_alloc(size_t nelem)
static void species_copy_cb(AW_window *aww, GBDATA *gb_main)
void restrict_2_region(const PosRange &range_)
AW_awar * awar_float(const char *var_name, float default_value=0.0, AW_default default_file=AW_ROOT_DEFAULT)
GB_HASH * to_hash(bool case_sens)
ItemSelector & get_queried_itemtype(DbQuery *query)
const char * change_key_path
void init_itemType_specific_window(AW_root *aw_root, class AW_window_simple *aws, const ItemSelector &itemType, const char *id, const char *title_format, bool plural=false)
GBDATA * get_gbmain() const
CONSTEXPR long FIELD_FILTER_STRING_WRITEABLE
void create_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
const char * qbox_pos_fig
#define AWAR_FIELD_CREATE_TYPE_TMPL
bool hits_were_truncated() const
void init_info_window(AW_root *aw_root, AW_window_simple_menu *aws, const ItemSelector &itemType, int detach_id)
GBDATA *(* get_first_item_container)(GBDATA *, AW_root *, QUERY_RANGE)
static void error(const char *msg)
GBDATA * GB_get_root(GBDATA *gbd)
GBDATA *(* get_next_item_container)(GBDATA *, QUERY_RANGE)
#define AWAR_TREE_REFRESH
void set_query(DbQuery *new_query)
GBDATA * GBT_find_or_create_species_rel_species_data(GBDATA *gb_species_data, const char *name, bool markCreated)
static void setup_next_neighbour_config(AWT_config_definition &cdef, bool for_listed)
CONSTEXPR_INLINE_Cxx14 void swap(unsigned char &c1, unsigned char &c2)
static void reorder_right_behind_left(AW_window *aws, Itemfield_Selection *selleft, Itemfield_Selection *selright)
static InfoWindowRegistry infowin
static void reactivate(AW_window *aww)
static long count_field_occurrence(BoundItemSel *bsel, const char *field_name)
#define AWAR_SPECIES_NAME
const char * count_pos_fig
AW_selection_list * get_result_list() const
void attach_selected_item() const
#define AWAR_NN_RANGE_END
char * read_sequence_region(GBDATA *gb_data, const PosRange &range)
static DbScanner * create(GBDATA *gb_main, const char *scanner_id, AW_window *aws, const char *box_pos_fig, const char *edit_pos_fig, const char *edit_enable_pos_fig, DB_SCANNERMODE scannermode, const char *mark_pos_fig, ItemSelector &selector)
static void nn_searchRel_awar_changed_cb(AW_root *awr)
#define AWAR_NN_SELECTED_AUTO_MARK
const char * prepare_and_get_selected_itemfield(AW_root *awr, const char *awar_name, GBDATA *gb_main, const ItemSelector &itemtype, FailIfField failIf)
void AWTC_create_common_next_neighbour_vars(AW_root *aw_root, const RootCallback &awar_changed_cb)
GBDATA * GBT_find_species_rel_species_data(GBDATA *gb_species_data, const char *name)
char * read_string() const
static AW_window * create_next_neighbours_listed_window(AW_root *aw_root, DbQuery *query)
AW_awar * awar(const char *awar)
GB_ERROR GB_pop_transaction(GBDATA *gbd)
GB_TYPES GBT_get_type_of_changekey(GBDATA *gb_main, const char *field_name, const char *change_key_path)
void species_field_selection_list_update_cb(AW_window *, GBDATA *gb_main)
GBDATA *(* get_first_item)(GBDATA *, QUERY_RANGE)
#define AWAR_NN_SELECTED_HIT_COUNT
GBDATA * GBT_find_sequence(GBDATA *gb_species, const char *aliname)
AW_window * create_fields_reorder_window(AW_root *root, BoundItemSel *bound_selector)
AW_awar * remove_callback(const RootCallback &cb)
void search_duplicated_field_content(AW_window *dummy, DbQuery *query, bool tokenize)
#define AWAR_FIELD_DELETE_TMPL
void create_autosize_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, unsigned xtraSpace=1)
void awt_create_PTSERVER_selection_button(AW_window *aws, const char *varname)
void insert_default_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
int get_field_count() const
#define AWAR_NN_MIN_SCORE
GBDATA *(* get_next_item)(GBDATA *, QUERY_RANGE)
bool aw_ask_sure(const char *unique_id, const char *msg)
__ATTR__USERESULT GB_ERROR save_changes()
GB_ERROR AWTC_recreate_name(GBDATA *gb_species)
void create_input_field(const char *awar_name, int columns=0)
ASSERTING_CONSTEXPR_INLINE int bio2info(int biopos)
#define AWAR_NN_COMPLEMENT
void move_to(int to_move, int wanted_position)
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
static unsigned nn_perform_delayed_autosearch_cb(AW_root *)
void auto_space(int xspace, int yspace)
popup_info_window_cb popup_info_window
GB_ERROR close(GB_ERROR error)
void GB_write_flag(GBDATA *gbd, long flag)
static void create_next_neighbours_vars(AW_root *aw_root)
GB_ERROR GBT_write_string(GBDATA *gb_container, const char *fieldpath, const char *content)
GBDATA * GBT_get_changekey(GBDATA *gb_main, const char *key, const char *change_key_path)
AW_window * create_field_create_window(AW_root *root, BoundItemSel *bound_selector)
const char * do_mark_pos_fig
bool IS_QUERIED(GBDATA *gb_item, const query_spec *aqs)
void move_selection(int offset)
Itemfield_Selection * create_itemfield_selection_list(AW_window *aws, const FieldSelDef &selDef, const char *at)
static DbQuery * GLOBAL_species_query
#define __ATTR__USERESULT
bool ARB_in_expert_mode(AW_root *awr)
#define AWAR_PROBE_ADMIN_PT_SERVER
ItemSelector & SPECIES_get_selector()
GBDATA * GBT_first_species(GBDATA *gb_main)
static void awtc_move_hits(AW_window *aww)
AW_window * create_field_delete_window(AW_root *root, BoundItemSel *bound_selector)
const FamilyList * getFamilyList() const
static GBDATA * expect_species_selected(AW_root *aw_root, GBDATA *gb_main, char **give_name=NULp)
const char * query_pos_fig
static AW_window * popup_new_speciesOrganismWindow(AW_root *aw_root, GBDATA *gb_main, bool organismWindow, int detach_id)
void aw_message(const char *msg)
const char * do_query_pos_fig
AW_option_menu_struct * create_option_menu(const char *awar_name)
void add_detach_area(detached_uppopper popup_detached_cb) const
GBDATA * GBT_next_species(GBDATA *gb_species)
#define AWAR_NN_SELECTED_AUTO_SEARCH
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
static PosRange get_nn_range_from_awars(AW_root *aw_root)
void bubble_sort(int p1, int p2, ReorderMode mode, BoundItemSel *selector)
GB_ERROR write_string(const char *aw_string)
char * dup_corresponding_part(const char *source, size_t source_len) const
ItemSelector & get_selector() const
const char * get_data() const
const char * GBT_get_name(GBDATA *gb_item)
GBDATA * GBT_find_SAI_rel_SAI_data(GBDATA *gb_sai_data, const char *name)
#define GB_USERFLAG_QUERY
static GB_ERROR species_create_handler(const char *dest, GBDATA *gb_main)
#define AWAR_NN_MISMATCHES
static void awtc_mark_hits(AW_window *)
const char * local_id(const char *id) const
#define AWAR_NN_LISTED_DEST_FIELD
GBDATA * GB_nextChild(GBDATA *child)
#define AWAR_FIELD_REORDER_ORDER
GB_transaction ta(gb_var)
GB_ERROR GBT_write_int(GBDATA *gb_container, const char *fieldpath, long content)
void callback(const WindowCallback &cb)
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
static AW_window * nn_of_sel_win
static void awtc_nn_search(AW_window *)
GB_ERROR GB_resort_data_base(GBDATA *gb_main, GBDATA **new_order_list, long listsize)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
GBDATA * GBT_get_SAI_data(GBDATA *gb_main)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
void hide_or_notify(const char *error)
GB_CSTR GBT_get_name_or_description(GBDATA *gb_item)
const char * do_set_pos_fig
#define AWAR_FIELD_CONVERT_SOURCE_TMPL
int get_and_fix_range_from_awar(AW_awar *awar)
#define AWAR_FIELD_CREATE_NAME_TMPL
static AW_window * create_field_convert_window(AW_root *root, BoundItemSel *bound_selector)
static void field_delete_cb(AW_window *aws, Itemfield_Selection *item_sel)
GB_ERROR write_int(long aw_int)
const MutableBoundItemSel BoundItemSel
const InfoWindow & registerInfoWindow(AW_window *aww, DbScanner *scanner, int detach_id)
long GBS_read_hash(const GB_HASH *hs, const char *key)
static void field_convert_update_typesel_cb(AW_root *root, BoundItemSel *bound_selector)
GBDATA * GB_entry(GBDATA *father, const char *key)
void inc_and_check_user_abort(GB_ERROR &error)
void set_result_list(AW_selection_list *new_resultList)
AW_selection_list * get_sellist()
const char * do_delete_pos_fig
CONSTEXPR long FIELD_FILTER_STRING_READABLE
const char * do_unmark_pos_fig
char * GBS_global_string_copy(const char *templat,...)
const char * do_refresh_pos_fig
void insert_fieldtype_toggles(AW_window *aws)
CONSTEXPR long FIELD_UNFILTERED
static const char * localize_scanner_id(const char *scanner_id, int detach_id)
GB_HASH * GBS_create_hash(long estimated_elements, GB_CASE case_sens)
#define AWAR_NN_OLIGO_LEN
void create_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, const char *color=NULp)
#define AWAR_NN_REL_MATCHES
void AWT_activate_prompt(const char *title, const char *prompt, const char *defaultResult, const char *button, const ResultHandler &handle_result, const char *helpfile, const char *srt)
GBDATA * GBT_get_species_data(GBDATA *gb_main)