ARB
NT_extern.cxx
Go to the documentation of this file.
1 // =============================================================== //
2 // //
3 // File : NT_extern.cxx //
4 // Purpose : //
5 // //
6 // Institute of Microbiology (Technical University Munich) //
7 // http://www.arb-home.de/ //
8 // //
9 // =============================================================== //
10 
11 #include "map_viewer.h"
12 #include "NT_local.h"
13 #include "ad_trees.h"
14 #include "NT_group_search.h"
15 
16 #include <seq_quality.h>
17 #include <multi_probe.hxx>
18 #include <st_window.hxx>
19 #include <GEN.hxx>
20 #include <EXP.hxx>
21 
22 #include <TreeCallbacks.hxx>
23 #include <AW_rename.hxx>
24 #include <probe_gui.hxx>
25 #include <primer_design.hxx>
26 #include <gde.hxx>
27 #include <awtc_submission.hxx>
28 
29 #include <macros.hxx>
30 #include <nds.h>
31 #include <db_query.h>
32 #include <dbui.h>
33 #include <refentries.h>
34 #include <insdel.h>
35 
36 #include <awti_export.hxx>
37 #include <awti_import.hxx>
38 
39 #include <awt.hxx>
40 #include <awt_input_mask.hxx>
41 #include <awt_sel_boxes.hxx>
42 #include <awt_www.hxx>
43 #include <awt_TreeAwars.hxx>
44 #include <awt_misc.hxx>
45 
46 #include <aw_color_groups.hxx>
47 #include <aw_advice.hxx>
48 #include <aw_preset.hxx>
49 #include <aw_awars.hxx>
50 #include <aw_global_awars.hxx>
51 #include <aw_file.hxx>
52 #include <aw_msg.hxx>
53 #include <arb_progress.h>
54 #include <aw_root.hxx>
55 #include <aw_question.hxx>
56 #include <aw_select.hxx>
57 #include <rootAsWin.h>
58 
59 #include <ad_cb.h>
60 
61 #include <arb_strbuf.h>
62 #include <arb_file.h>
63 #include <arb_version.h>
64 
65 #include <saicalc.h>
66 #if defined(DEVEL_RALF)
67 # define TRACE_GROUP_SELECTION
68 #endif
69 
70 #define AWAR_EXPORT_NDS "tmp/export_nds"
71 #define AWAR_EXPORT_NDS_SEPARATOR AWAR_EXPORT_NDS "/separator"
72 #define AWAR_MARKED_SPECIES_COUNTER "tmp/disp_marked_species"
73 #define AWAR_NTREE_TITLE_MODE "tmp/title_mode"
74 
76 
80 
82 
83 static void nt_changesecurity(AW_root *aw_root) {
84  int level = aw_root->awar(AWAR_SECURITY_LEVEL)->read_int();
86  GB_change_my_security(GLOBAL.gb_main, level); // changes user security
88 }
89 
90 static void export_nds_cb(AW_window *aww, bool do_print) {
91  AW_root *aw_root = aww->get_root();
92  char *name = aw_root->awar(AWAR_EXPORT_NDS"/file_name")->read_string();
93  FILE *out = fopen(name, "w");
94 
95  if (!out) {
96  aw_message("Error: Cannot open and write to file");
97  }
98  else {
100 
102  NDS_Type nds_type = (NDS_Type)aw_root->awar(AWAR_EXPORT_NDS_SEPARATOR)->read_int();
103  char *tree_name = aw_root->awar(AWAR_TREE)->read_string();
104 
105  for (GBDATA *gb_species = GBT_first_marked_species(GLOBAL.gb_main);
106  gb_species;
107  gb_species = GBT_next_marked_species(gb_species))
108  {
109  const char *buf = make_node_text_nds(GLOBAL.gb_main, gb_species, nds_type, NULp, tree_name);
110  fprintf(out, "%s\n", buf);
111  }
113  fclose(out);
114  if (do_print) {
115  GB_ERROR error = GB_textprint(name);
116  if (error) aw_message(error);
117  }
118  free(tree_name);
119  }
120  free(name);
121 }
122 
124  AW_window_simple *aws = new AW_window_simple;
125  aws->init(root, "EXPORT_NDS_OF_MARKED", "EXPORT NDS OF MARKED SPECIES");
126  aws->load_xfig("sel_box_nds.fig");
127 
128  aws->callback(AW_POPDOWN);
129  aws->at("close");
130  aws->create_button("CLOSE", "CLOSE", "C");
131 
132  aws->callback(makeHelpCallback("arb_export_nds.hlp"));
133  aws->at("help");
134  aws->create_button("HELP", "HELP", "H");
135 
136  aws->at("save");
137  aws->callback(makeWindowCallback(export_nds_cb, false));
138  aws->create_button("SAVE", "SAVE", "S");
139 
140  aws->at("print");
141  aws->callback(makeWindowCallback(export_nds_cb, true));
142  aws->create_button("PRINT", "PRINT", "P");
143 
144  aws->at("toggle1");
145  aws->label("Column output");
146  aws->create_option_menu(AWAR_EXPORT_NDS_SEPARATOR, true);
147  aws->insert_default_option("Space padded", "S", NDS_OUTPUT_SPACE_PADDED);
148  aws->insert_option ("TAB separated", "T", NDS_OUTPUT_TAB_SEPARATED);
149  aws->insert_option ("Comma separated", "C", NDS_OUTPUT_COMMA_SEPARATED);
150  aws->update_option_menu();
151 
153 
154  return aws;
155 }
156 
158  AW_create_fileselection_awars(awr, AWAR_EXPORT_NDS, "", ".nds", "export.nds");
160 }
161 
163  const char *value = awr->awar(AWAR_SPECIES_NAME)->read_char_pntr();
164  awr->awar(AWAR_INFO_BUTTON_TEXT)->write_string(value[0] ? value : "Species Info");
165  if (value[0]) {
166  awr->awar(AWAR_GROUP)->write_pointer(NULp); // deselect group when species gets selected
167 #if defined(TRACE_GROUP_SELECTION)
168  fputs("clear AWAR_GROUP (because species selected)\n", stderr);
169 #endif
170  }
171 }
172 
173 static void expert_mode_changed_cb(AW_root *aw_root) {
174  aw_root->awar(AWAR_AWM_MASK)->write_int(aw_root->awar(AWAR_EXPERT)->read_int() ? AWM_ALL : AWM_BASIC); // publish expert-mode globally
175 }
176 
179 
180 static void nt_create_all_awars(AW_root *awr) {
181  // creates awars for all modules reachable from ARB_NT main window
182 
184  if (GB_read_clients(GLOBAL.gb_main)>=0) {
185  awr->awar_string(AWAR_TREE, "", GLOBAL.gb_main);
186  }
187  else {
189  }
190 
191  awr->awar_string(AWAR_TOPAREA_SAIS, "ECOLI;HELIX;HELIX_NR", AW_ROOT_DEFAULT);
192 
197  awr->awar_string(AWAR_INFO_BUTTON_TEXT, "Species Info", GLOBAL.gb_main);
200 
201  awr->awar_string(AWAR_SAI_COLOR_STR, "", GLOBAL.gb_main); // sai visualization in probe match
202 
205 #if defined(DEBUG)
206  AWT_create_db_browser_awars(awr, AW_ROOT_DEFAULT);
207 #endif // DEBUG
208 
210 
213 #if defined(DEBUG) && 0
214  awr->awar(AWAR_SECURITY_LEVEL)->write_int(6); // no security for debugging..
215 #endif // DEBUG
216 
223  {
225  if (gde_err) GBK_terminatef("Fatal: %s", gde_err);
226  }
231 
238 
240  awr->awar_string(AWAR_DB_COMMENT, "<no description>", GLOBAL.gb_main);
241 
247 
249 
251  if (!error) {
252  AW_awar *awar_expert = awr->awar(AWAR_EXPERT);
253  awar_expert->add_callback(expert_mode_changed_cb);
254  awar_expert->touch();
255 
257  }
258 
259  if (error) aw_message(error);
260 }
261 
262 // --------------------------------------------------------------------------------
263 
264 static bool nt_disconnect_from_db(AW_root *aw_root, GBDATA*& gb_main_ref) {
265  // ask user if DB was not saved
266  // returns true if user allows to quit
267 
268  // @@@ code here could as well be applied to both merge DBs
269  // - question about saving only with target DB!
270 
271  if (gb_main_ref) {
272  if (GB_read_clients(gb_main_ref)>=0) {
273  if (GB_read_clock(gb_main_ref) > GB_last_saved_clock(gb_main_ref)) {
274  long secs;
275  secs = GB_last_saved_time(gb_main_ref);
276 
277 #if defined(DEBUG)
278  secs = GB_time_of_day(); // simulate "just saved"
279 #endif // DEBUG
280 
281  const char *quit_buttons = "Quit ARB,Do NOT quit";
282  if (secs) {
283  secs = GB_time_of_day() - secs;
284  if (secs>10) {
285  char *question = GBS_global_string_copy("You last saved your data %li:%li minutes ago\nSure to quit ?", secs/60, secs%60);
286  int dontQuit = aw_question("quit_arb", question, quit_buttons);
287  free(question);
288  if (dontQuit) {
289  return false;
290  }
291  }
292  }
293  else {
294  if (aw_question("quit_arb", "You never saved any data\nSure to quit ???", quit_buttons)) {
295  return false;
296  }
297  }
298  }
299  }
300 
301  GBCMS_shutdown(gb_main_ref);
302 
303  GBDATA *gb_main = gb_main_ref;
304  gb_main_ref = NULp; // avoid further usage
305 
306  nt_assert(aw_root);
307 #if defined(WARN_TODO)
308 #warning instead of directly calling the following functions, try to add them as GB_atclose_callback
309 #endif
310  aw_root->unlink_awars_from_DB(gb_main);
312 #if defined(DEBUG)
313  AWT_browser_forget_db(gb_main);
314 #endif // DEBUG
315 
316  GB_close(gb_main);
317  }
318  return true;
319 }
320 
321 static void nt_run(const char *command) {
322  GB_ERROR error = GBK_system(command);
323  if (error) {
324  fprintf(stderr, "nt_run: Failed to run '%s' (Reason: %s)\n", command, error);
325 #if defined(DEBUG)
326  GBK_dump_backtrace(stderr, "nt_run-error");
327 #endif
328  }
329 }
330 
331 void NT_start(const char *arb_ntree_args, bool restart_with_new_ARB_PID) {
332  char *command = GBS_global_string_copy("arb_launcher --async %s %s", restart_with_new_ARB_PID ? "arb" : "arb_ntree", arb_ntree_args);
333  nt_run(command);
334  free(command);
335 }
336 
337 __ATTR__NORETURN static void really_exit(int exitcode, bool kill_my_clients) {
338  if (kill_my_clients) {
339  nt_run("(arb_clean session; echo ARB done) &"); // kills all clients
340  }
341  exit(exitcode);
342 }
343 
344 void NT_exit(AW_window *aws, int exitcode) {
345  AW_root *aw_root = aws->get_root();
347  shutdown_macro_recording(aw_root);
348  bool is_server_and_has_clients = GLOBAL.gb_main && GB_read_clients(GLOBAL.gb_main)>0;
349  if (nt_disconnect_from_db(aw_root, GLOBAL.gb_main)) {
350  really_exit(exitcode, is_server_and_has_clients);
351  }
352 }
353 void NT_restart(AW_root *aw_root, const char *arb_ntree_args) {
354  // restarts arb_ntree (with new ARB_PID)
355  bool is_server_and_has_clients = GLOBAL.gb_main && GB_read_clients(GLOBAL.gb_main)>0;
356  if (nt_disconnect_from_db(aw_root, GLOBAL.gb_main)) {
357  NT_start(arb_ntree_args, true);
358  really_exit(EXIT_SUCCESS, is_server_and_has_clients);
359  }
360 }
361 
362 static void nt_start_2nd_arb(AW_window *aww, bool quit) {
363  // start 2nd arb with intro window
364  AW_root *aw_root = aww->get_root();
365  char *dir4intro;
366  GB_split_full_path(aw_root->awar(AWAR_DB_PATH)->read_char_pntr(), &dir4intro, NULp, NULp, NULp);
367  if (!dir4intro) {
368  dir4intro = ARB_strdup(".");
369  }
370 
371  if (quit) {
372  NT_restart(aw_root, dir4intro);
373  }
374  else {
375  NT_start(dir4intro, true);
376  }
377  free(dir4intro);
378 }
379 
380 // --------------------------------------------------------------------------------
381 
382 static void NT_save_quick_cb(AW_window *aww) {
383  AW_root *awr = aww->get_root();
384  char *filename = awr->awar(AWAR_DB_PATH)->read_string();
385 
387 
389  free( filename);
390  if (error) aw_message(error);
392 }
393 
394 
395 static void NT_save_quick_as_cb(AW_window *aww) {
396  AW_root *awr = aww->get_root();
397  char *filename = awr->awar(AWAR_DB_PATH)->read_string();
399  if (!error) AW_refresh_fileselection(awr, AWAR_DBBASE);
400  aww->hide_or_notify(error);
401 
402  free(filename);
403 }
404 
405 #define AWAR_DB_TYPE AWAR_DBBASE "/type" // created by AWT_insert_DBsaveType_selector
406 #define AWAR_DB_COMPRESSION AWAR_DBBASE "/compression" // created by AWT_insert_DBcompression_selector
407 #define AWAR_DB_OPTI_TREENAME AWAR_DBBASE "/optimize_tree_name"
408 
409 static void NT_save_as_cb(AW_window *aww) {
410  AW_root *awr = aww->get_root();
411  char *filename = awr->awar(AWAR_DB_PATH)->read_string();
412  const char *atype = awr->awar(AWAR_DB_TYPE)->read_char_pntr();
413  const char *ctype = awr->awar(AWAR_DB_COMPRESSION)->read_char_pntr();
414  char *savetype = GBS_global_string_copy("%s%s", atype, ctype);
415 
417  GB_ERROR error = GB_save(GLOBAL.gb_main, filename, savetype);
418  if (!error) AW_refresh_fileselection(awr, AWAR_DBBASE);
419  aww->hide_or_notify(error);
420 
421  free(savetype);
422  free(filename);
423 }
424 
425 static AW_window *NT_create_save_quick_as_window(AW_root *aw_root, const char *base_name) {
426  static AW_window_simple *aws = NULp;
427  if (!aws) {
428  aws = new AW_window_simple;
429  aws->init(aw_root, "SAVE_CHANGES_TO", "Quicksave changes as");
430  aws->load_xfig("save_as.fig");
431 
432  aws->at("close");
433  aws->callback(AW_POPDOWN);
434  aws->create_button("CLOSE", "CLOSE", "C");
435 
436  aws->callback(makeHelpCallback("save.hlp"));
437  aws->at("help");
438  aws->create_button("HELP", "HELP", "H");
439 
440  AW_create_standard_fileselection(aws, base_name);
441 
442  aws->at("comment");
443  aws->create_text_field(AWAR_DB_COMMENT);
444 
445  aws->at("save");
446  aws->callback(NT_save_quick_as_cb);
447  aws->create_button("SAVE", "SAVE", "S");
448  }
449  return aws;
450 }
451 
453  arb_progress progress("Optimizing database compression", 2L);
455 
457  if (!error) {
458  ConstStrArray ali_names;
460 
461  arb_progress ali_progress("Optimizing sequence data", ali_names.size());
462  ali_progress.allow_title_reuse();
463 
464  error = GBT_check_data(GLOBAL.gb_main, NULp);
465  error = GB_end_transaction(GLOBAL.gb_main, error);
466 
467  if (!error) {
468  char *tree_name = aww->get_root()->awar(AWAR_DB_OPTI_TREENAME)->read_string();
469  for (int i = 0; ali_names[i]; ++i) {
470  error = GBT_compress_sequence_tree2(GLOBAL.gb_main, tree_name, ali_names[i]);
471  ali_progress.inc_and_check_user_abort(error);
472  }
473  free(tree_name);
474  }
475  }
476  progress.inc_and_check_user_abort(error);
477 
478  if (!error) {
479  error = GB_optimize(GLOBAL.gb_main);
480  progress.inc_and_check_user_abort(error);
481  }
482  aww->hide_or_notify(error);
483 }
484 
486  static AW_window_simple *aws = NULp;
487  if (aws) return aws;
489 
490  const char *largest_tree = GBT_name_of_largest_tree(GLOBAL.gb_main);
491  aw_root->awar_string(AWAR_DB_OPTI_TREENAME, largest_tree);
492 
493  aws = new AW_window_simple;
494  aws->init(aw_root, "OPTIMIZE_DATABASE", "Optimize database compression");
495  aws->load_xfig("optimize.fig");
496 
497  aws->at("trees");
499 
500  aws->at("close");
501  aws->callback(AW_POPDOWN);
502  aws->create_button("CLOSE", "CLOSE", "C");
503 
504  aws->callback(makeHelpCallback("optimize.hlp"));
505  aws->at("help");
506  aws->create_button("HELP", "HELP", "H");
507 
508  aws->at("go");
509  aws->callback(NT_database_optimization);
510  aws->create_button("GO", "GO");
511  return aws;
512 }
513 
514 static AW_window *NT_create_save_as(AW_root *aw_root, const char *base_name) {
515  static AW_window_simple *aws = NULp;
516  if (aws) return aws;
517 
518  aws = new AW_window_simple;
519  aws->init(aw_root, "SAVE_DB", "SAVE ARB DB");
520  aws->load_xfig("save_as.fig");
521 
522  aws->at("close");
523  aws->callback(AW_POPDOWN);
524  aws->create_button("CLOSE", "CLOSE", "C");
525 
526  aws->at("help");
527  aws->callback(makeHelpCallback("save.hlp"));
528  aws->create_button("HELP", "HELP", "H");
529 
530  AW_create_standard_fileselection(aws, base_name);
531 
532  aws->at("type");
534 
535  aws->at("compression");
537 
538  aws->at("optimize");
540  aws->help_text("optimize.hlp");
541  aws->create_autosize_button("OPTIMIZE", "Optimize database compression");
542 
543  aws->at("save");
544  aws->callback(NT_save_as_cb);
545  aws->create_button("SAVE", "SAVE", "S");
546 
547  aws->at("comment");
548  aws->create_text_field(AWAR_DB_COMMENT);
549 
550  return aws;
551 }
552 
553 static void NT_undo_cb(AW_window*, GB_UNDO_TYPE undo_type, TREE_canvas *ntw) {
554  GB_ERROR error = GB_undo(GLOBAL.gb_main, undo_type);
555  if (error) aw_message(error);
556  else {
558  AWT_auto_refresh allowed_on(ntw);
559  ntw->request_refresh();
560  }
561 }
562 
564 static char *stream2str(streamSource source, const char *commandOrFile) {
565  char *output = NULp;
566  FILE *in = NULp;
567 
568  switch (source) {
569  case FROM_PIPE: in = popen(commandOrFile, "r"); break;
570  case FROM_FILE: in = fopen(commandOrFile, "rt"); break;
571  }
572 
573  if (in) {
574  GBS_strstruct *out = GBS_stropen(2000);
575  int c;
576 
577  while (EOF != (c = fgetc(in))) GBS_chrcat(out, c);
578 
579  switch (source) {
580  case FROM_PIPE: pclose(in); break;
581  case FROM_FILE: fclose(in); break;
582  }
583 
584  // skip trailing linefeeds
585  long offset = GBS_memoffset(out);
586  while (offset>0 && GBS_mempntr(out)[offset-1] == '\n') {
587  GBS_str_cut_tail(out, 1);
588  offset--;
589  }
590 
591  output = GBS_strclose(out);
592  }
593  return output;
594 }
595 
596 inline void removeTrailingNewlines(char *str) {
597  char *eos = strchr(str, 0)-1;
598  while (eos >= str && eos[0] == '\n') *eos-- = 0;
599 }
600 
601 inline void append_named_value(GBS_strstruct *out, const char *prefix, const char *value) {
602  GBS_strcat(out, GBS_global_string("%-*s: %s\n", 12, prefix, value));
603 }
604 inline void append_command_output(GBS_strstruct *out, const char *prefix, const char *command) {
605  char *output = stream2str(FROM_PIPE, command);
606  if (output) {
607  removeTrailingNewlines(output);
608  if (strcmp(output, "unknown") != 0) append_named_value(out, prefix, output);
609  free(output);
610  }
611 }
612 
613 static void NT_infomode_cb(UNFIXED, TREE_canvas *canvas, AWT_COMMAND_MODE mode) {
614  DBUI::popup_species_info_window(canvas->awr, canvas->gb_main);
615  nt_mode_event(NULp, canvas, mode);
616 }
617 
619  AP_tree *tree_root = AWT_TREE(ntw)->get_root_node();
620  if (tree_root) {
621  AWT_auto_refresh allowed_on(ntw);
622  GB_transaction ta(ntw->gb_main);
623 
624  NT_mark_all_cb(NULp, ntw, 0); // unmark all
625  tree_root->mark_duplicates();
627  }
628 }
629 
631  GB_transaction ta(ntw->gb_main);
632  AP_tree *tree_root = AWT_TREE(ntw)->get_root_node();
633 
634  if (tree_root) {
635  AWT_auto_refresh allowed_on(ntw);
636  tree_root->justify_branch_lenghs(ntw->gb_main);
638  }
639 }
640 
641 #if defined(DEBUG)
642 static void NT_fix_database(AW_window *) {
643  GB_ERROR err = NULp;
645  if (err) aw_message(err);
646 }
647 #endif
648 
649 static void relink_pseudo_species_to_organisms(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash) {
650  if (ref_gb_node) {
651  if (GEN_is_pseudo_gene_species(ref_gb_node)) {
652  GBDATA *gb_organism = GEN_find_origin_organism(ref_gb_node, organism_hash);
653 
654  if (gb_organism) {
655  char *name = GBT_read_string(gb_organism, "name");
656 
657  if (name) {
658  freeset(ref_name, name);
659  ref_gb_node = gb_organism;
660  }
661  }
662  }
663  }
664 }
665 
667  GB_transaction ta(ntw->gb_main);
668  AP_tree *tree_root = AWT_TREE(ntw)->get_root_node();
669 
670  if (tree_root) {
671  AWT_auto_refresh allowed_on(ntw);
672 
673  GB_HASH *organism_hash = GBT_create_organism_hash(ntw->gb_main);
674  tree_root->relink_tree(ntw->gb_main, relink_pseudo_species_to_organisms, organism_hash);
675  GBS_free_hash(organism_hash);
676  ntw->request_save();
677  }
678 }
679 
680 
681 // #########################################
682 // #########################################
683 // ### ###
684 // ## user mask section ##
685 // ### ###
686 // #########################################
687 // #########################################
688 
689 struct nt_item_type_species_selector FINAL_TYPE : public awt_item_type_selector {
692 
693  const char *get_self_awar() const OVERRIDE {
694  return AWAR_SPECIES_NAME;
695  }
697  return 12; // should be enough for "nnaammee.999"
698  }
699  GBDATA *current(AW_root *root, GBDATA *gb_main) const OVERRIDE { // give the current item
700  char *species_name = root->awar(get_self_awar())->read_string();
701  GBDATA *gb_species = NULp;
702 
703  if (species_name[0]) {
705  gb_species = GBT_find_species(gb_main, species_name);
706  }
707 
708  free(species_name);
709  return gb_species;
710  }
711  const char *getKeyPath() const OVERRIDE { // give the keypath for items
712  return CHANGE_KEY_PATH;
713  }
714 };
715 
716 static nt_item_type_species_selector item_type_species;
717 
718 static void NT_open_mask_window(AW_window *aww, int id, GBDATA *gb_main) {
719  const awt_input_mask_descriptor *descriptor = AWT_look_input_mask(id);
720  nt_assert(descriptor);
721  if (descriptor) AWT_initialize_input_mask(aww->get_root(), gb_main, &item_type_species, descriptor->get_internal_maskname(), descriptor->is_local_mask());
722 }
723 
726 }
729 }
730 
736  const char *buffer = count ? GBS_global_string("%li marked", count) : "";
738  char *oldval = counter->read_string();
739  if (strcmp(oldval, buffer)) {
740  counter->write_string(buffer);
741  aww->get_root()->awar(AWAR_TREE_REFRESH)->touch();
742  }
743  free(oldval);
744 }
745 
746 // --------------------------------------------------------------------------------------------------
747 
749  GB_ERROR error = NULp;
750  GB_transaction ta(gb_main);
751 
752  ConstStrArray tree_names;
753  GBT_get_tree_names(tree_names, gb_main, false);
754 
755  if (!tree_names.empty()) {
756  long treeCount = tree_names.size();
757 
758  const char *whats_removed = NULp;
759  switch (mode) {
760  case GBT_REMOVE_ZOMBIES: whats_removed = "zombies"; break;
761  case GBT_REMOVE_MARKED: whats_removed = "marked"; break;
762  default: nt_assert(0); break;
763  }
764 
765  const char *task = GBS_global_string("Deleting %s from %li trees", whats_removed, treeCount);
766 
767  arb_progress progress(task, treeCount);
768  GB_HASH *species_hash = GBT_create_species_hash(gb_main);
769 
770  int modified = 0;
771 
772  for (int t = 0; t<treeCount && !error; t++) {
773  progress.subtitle(tree_names[t]);
774  TreeNode *tree = GBT_read_tree(gb_main, tree_names[t], new SimpleRoot);
775  if (!tree) {
776  aw_message(GBS_global_string("Can't load tree '%s' - skipped", tree_names[t]));
777  }
778  else {
779  int removed = 0;
780  int groups_removed = 0;
781 
782  tree = GBT_remove_leafs(tree, mode, species_hash, &removed, &groups_removed);
783 
784  nt_assert(removed >= groups_removed);
785 
786  if (!tree) {
787  aw_message(GBS_global_string("'%s' would disappear. Please delete tree manually.", tree_names[t]));
788  }
789  else {
790  if (removed>0) {
791  error = GBT_write_tree(gb_main, tree_names[t], tree);
792  if (error) {
793  aw_message(GBS_global_string("Failed to write '%s' (Reason: %s)", tree_names[t], error));
794  }
795  else {
796  if (groups_removed>0) {
797  aw_message(GBS_global_string("Removed %i species and %i groups from '%s'", removed, groups_removed, tree_names[t]));
798  }
799  else {
800  aw_message(GBS_global_string("Removed %i species from '%s'", removed, tree_names[t]));
801  }
802  modified++;
803  }
804  }
805  UNCOVERED();
806  destroy(tree);
807  }
808  }
809  progress.inc_and_check_user_abort(error);
810  }
811 
812  if (modified) {
813  aw_message(GBS_global_string("Changed %i of %li trees.", modified, treeCount));
814  }
815  else {
816  aw_message("No tree modified");
817  }
818 
819  GBS_free_hash(species_hash);
820  }
821 
822  aw_message_if(ta.close(error));
823 }
824 
827  if (tree) {
828  AP_tree *root = tree->get_root_node();
829  if (root) return root;
830  }
831  return NULp;
832 }
833 
834 // --------------------------------------------------------------------------------------------------
835 
837  GB_transaction ta(gb_main);
838  GBT_mark_all(gb_main, 0);
839 
840  DBItemSetIter end = referred.end();
841  for (DBItemSetIter s = referred.begin(); s != end; ++s) {
842  GB_write_flag(*s, 1);
843  }
844  return ARB_ERROR();
845 }
846 
848  static AW_window *aws = NULp;
849  if (!aws) {
851  aws = RefEntries::create_refentries_window(awr, &reh, "markbyref", "Mark by reference", "markbyref.hlp", NULp, "Mark referenced", mark_referred_species);
852  }
853  return aws;
854 }
855 
856 // --------------------------------------------------------------------------------------------------
857 
858 static void merge_from_to(AW_root *awr, const char *db_awar_name, bool merge_to) {
859  const char *db_name = awr->awar(db_awar_name)->read_char_pntr();
860  char *quotedDB = GBK_singlequote(db_name);
861 
864  merge_to
865  ? "arb_ntree : %s &"
866  : "arb_ntree %s : &",
867  quotedDB)
868  );
869 
870  free(quotedDB);
871 }
872 
873 static void merge_from_cb(AW_window *aww, AW_CL cl_awarNamePtr) { merge_from_to(aww->get_root(), *(const char**)cl_awarNamePtr, false); }
874 static void merge_into_cb(AW_window *aww, AW_CL cl_awarNamePtr) { merge_from_to(aww->get_root(), *(const char**)cl_awarNamePtr, true); }
875 
877  static char *awar_name = NULp; // do not free, bound to callback
878  AW_window *aw_from =
879  awt_create_load_box(awr, "Merge data from", "other ARB database",
880  ".", ".arb", &awar_name,
881  makeWindowCallback(merge_from_cb, AW_CL(&awar_name)));
882  return aw_from;
883 }
885  static char *awar_name = NULp; // do not free, bound to callback
886  AW_window *aw_to =
887  awt_create_load_box(awr, "Merge data to", "other ARB database",
888  ".", ".arb", &awar_name,
889  makeWindowCallback(merge_into_cb, AW_CL(&awar_name)),
890  makeWindowCallback(AW_POPDOWN), NULp);
891  return aw_to;
892 }
893 
894 // --------------------------------------------------------------------------------------------------
895 
896 static void update_main_window_title(AW_root* awr, AW_window_menu_modes* aww, int clone) {
897  const char* filename = awr->awar(AWAR_DB_NAME)->read_char_pntr();
898  if (clone) {
899  aww->set_window_title(GBS_global_string("%s - ARB (%i)", filename, clone));
900  }
901  else {
902  aww->set_window_title(GBS_global_string("%s - ARB", filename));
903  }
904 }
905 
906 static void canvas_tree_awar_changed_cb(AW_awar *, bool, TREE_canvas *ntw) {
908  AW_root::SINGLETON->awar(AWAR_NTREE_MAIN_WINDOW_COUNT)->touch(); // refresh canvas selection lists
910 }
911 
913  int count;
914  TREE_canvas *canvas[MAX_NT_WINDOWS];
915 
916  static TREE_canvas_registry *SINGLETON;
917 
918  TREE_canvas_registry() : count(0) {
920  }
921 
922 public:
924  if (!SINGLETON) SINGLETON = new TREE_canvas_registry;
925  return *SINGLETON;
926  }
927 
929  nt_assert(count<MAX_NT_WINDOWS);
930  nt_assert(count == ntw->get_index()); // you have to register TREE_canvas'es in order of creation!
931  canvas[count++] = ntw;
932  ntw->awr->awar(AWAR_NTREE_MAIN_WINDOW_COUNT)->write_int(count); // trigger callbacks
933  }
934 
935  int get_count() const { return count; }
936 
937  TREE_canvas *get_canvas(int idx) const {
938  if (idx<0 || idx>=count) return NULp;
939  return canvas[idx];
940  }
941 };
942 
943 TREE_canvas_registry *TREE_canvas_registry::SINGLETON = NULp;
944 
947  nt_assert(idx>=0 && idx<MAX_NT_WINDOWS);
949 }
950 
951 #if defined(TRACE_GROUP_SELECTION)
952 static TREE_canvas *find_canvas_showing(AWT_graphic_tree *agt) {
953  // look for (registered) canvas showing given AWT_graphic_tree
954  // returns NULp if none found
956 
957  int maxIdx = reg.get_count();
958  for (int32_t i = 0; i<maxIdx; ++i) {
959  TREE_canvas *ntw = reg.get_canvas(i);
960  if (ntw->gfx == agt) return ntw;
961  }
962  return NULp;
963 }
964 #endif
965 
970 
971  int maxIdx = reg.get_count();
972  for (int32_t i = 0; i<maxIdx; ++i) {
973  TREE_canvas *ntw = reg.get_canvas(i);
974  if (ntw && ntw != to_skip) {
975  nt_assert(ntw->get_awar_tree());
976  const char *treename = ntw->get_awar_tree()->read_char_pntr();
977  const char *description = i
978  ? GBS_global_string("ARB (%i): %s", i, treename)
979  : GBS_global_string("ARB main: %s", treename);
980  sellst->insert(description, i);
981  }
982  }
983 }
984 
985 // ----------------------------------
986 // group-selection handlers
987 
990 }
991 
993 
995  const Group& group = gfx->get_selected_group();
996 
997 #if defined(TRACE_GROUP_SELECTION)
998  fprintf(stderr, "[%s] ", track_group_selection_by_canvas ? "track" : "dont track");
999  TREE_canvas *ntw = find_canvas_showing(gfx);
1000  if (group.is_valid()) {
1001  fprintf(stderr, "canvas %i selects group '%s'\n", ntw->get_index(), group.get_name());
1002  }
1003  else {
1004  fprintf(stderr, "canvas %i de-selects group\n", ntw->get_index());
1005  }
1006 #endif
1007 
1008  if (track_group_selection_by_canvas) {
1009  // set group-awar:
1010  gfx->get_root()->awar(AWAR_GROUP)->write_pointer(group.get_group_data()); // writes NULp if !group.is_valid()
1011  }
1012 }
1013 
1014 static void group_awar_changed_cb(AW_root *awr) {
1015  AW_awar *awar_group = awr->awar(AWAR_GROUP);
1016  GBDATA *gb_wanted_group = awar_group->read_pointer();
1017 
1018  GBDATA *gb_wanted_tree = NULp;
1019  {
1020  if (gb_wanted_group) {
1021  GB_transaction ta(gb_wanted_group);
1022  gb_wanted_tree = GB_get_father(gb_wanted_group);
1023  awr->awar(AWAR_SPECIES_NAME)->write_string(""); // deselect species when group gets selected
1024 #if defined(TRACE_GROUP_SELECTION)
1025  fputs("clear AWAR_SPECIES_NAME (because group selected)\n", stderr);
1026 #endif
1027  }
1028 #if defined(TRACE_GROUP_SELECTION)
1029  const char *group_name = NULp;
1030  if (gb_wanted_group) {
1031  GB_transaction ta(gb_wanted_group);
1032  GBDATA *gb_name = GB_entry(gb_wanted_group, "group_name");
1033  if (gb_name) group_name = GB_read_char_pntr(gb_name);
1034  }
1035  fprintf(stderr, "group awar changed to %p", gb_wanted_group);
1036  if (group_name) fprintf(stderr, " (='%s')", group_name);
1037  fputc('\n', stderr);
1038 #endif
1039  }
1040 
1041  LocallyModify<bool> ignore_group_selection_by_canvas(track_group_selection_by_canvas, false);
1042 
1043  {
1045 
1046  int maxIdx = reg.get_count();
1047  for (int32_t i = 0; i<maxIdx; ++i) {
1048  TREE_canvas *ntw = reg.get_canvas(i);
1049  AWT_graphic_tree *agt = AWT_TREE(ntw);
1050  const Group& curr_group = agt->get_selected_group();
1051 
1052  GBDATA *gb_curr_tree = agt->get_tree_root()->get_gb_tree();
1053  if (gb_curr_tree == gb_wanted_tree) {
1054  AWT_auto_refresh allowed_on(ntw);
1055  if (!curr_group.is_valid() || // no group selected
1056  curr_group.get_group_data() != gb_wanted_group) // wrong group selected
1057  {
1058  agt->select_group(gb_wanted_group);
1059  ntw->request_refresh();
1060  }
1061  // perform auto-jump (also if group was already selected, otherwise group-traversal keys will not follow the selected group)
1063  }
1064  else {
1065  if (curr_group.is_valid()) {
1066  AWT_auto_refresh allowed_on(ntw);
1067  agt->deselect_group();
1068  ntw->request_refresh();
1069  }
1070  }
1071  }
1072  }
1073 }
1074 
1075 // ----------------------------
1076 // create main window
1077 
1078 static AW_window *popup_new_main_window(AW_root *awr, int clone, TREE_canvas **result_ntw) {
1085 
1086  char window_title[256];
1087  const char *awar_tree = NULp;
1088 
1089  if (clone) {
1090  awar_tree = ARB_keep_string(GBS_global_string_copy(AWAR_TREE "_%i", clone));
1091  sprintf(window_title, "ARB_NT_%i", clone);
1092  }
1093  else {
1094  awar_tree = AWAR_TREE;
1095  sprintf(window_title, "ARB_NT");
1096  }
1098  awm->init(awr, window_title, window_title, 0, 0);
1099 
1100  awr->awar(AWAR_DB_NAME)
1101  ->add_callback(makeRootCallback(update_main_window_title, awm, clone))
1102  ->update();
1103 
1104  awm->button_length(5);
1105 
1106  if (!clone) AW_init_color_group_defaults("arb_ntree");
1107 
1109 
1110  if (!clone) { // while creating initial window
1113  }
1114 
1115  TREE_canvas *ntw;
1116  {
1117  AW_awar *tree_awar = awr->awar_string(awar_tree);
1118  {
1119  AP_tree_display_style prev_style = tree->get_tree_style();
1120  tree->set_tree_style(AP_LIST_SIMPLE, NULp); // avoid NDS warnings during startup
1121 
1122  ntw = new TREE_canvas(GLOBAL.gb_main, awm, "ARB_NT", tree, tree_awar);
1123  tree->set_tree_style(prev_style, ntw);
1124  ntw->set_mode(AWT_MODE_SELECT);
1125  }
1126 
1127  if (result_ntw) *result_ntw = ntw;
1128 
1129  {
1130  const char *tree_name = tree_awar->read_char_pntr();
1131  const char *existing_tree_name = GBT_existing_tree(GLOBAL.gb_main, tree_name);
1132 
1133  if (existing_tree_name) {
1134  tree_awar->write_string(existing_tree_name);
1135  NT_reload_tree_event(awr, ntw, true); // load first tree
1136  }
1137  else {
1138  AW_advice("Your database contains no tree.", AW_ADVICE_TOGGLE_AND_HELP, NULp, "no_tree.hlp");
1139  tree->set_tree_style(AP_LIST_NDS, ntw); // no tree -> show NDS list
1140  }
1141 
1143  AWT_registerTreeAwarCallback(tree_awar, makeTreeAwarCallback(canvas_tree_awar_changed_cb, ntw), false);
1144  }
1145  }
1146 
1148 
1149  bool is_genome_db = GEN_is_genome_db(GLOBAL.gb_main, 0); // is this a genome database ? (default = 0 = not a genom db)
1150 
1152 
1153  // --------------
1154  // File
1155 
1156 #if defined(DEBUG)
1157  AWT_create_debug_menu(awm);
1158 #endif // DEBUG
1159 
1160  bool allow_new_window = (ntw->get_index()+1) < MAX_NT_WINDOWS;
1161 
1162  if (clone) {
1163  awm->create_menu("File", "F", AWM_ALL);
1164  if (allow_new_window) {
1165  awm->insert_menu_topic(awm->local_id("new_window"), "New window (same database)", "N", "newwindow.hlp", AWM_ALL, makeCreateWindowCallback(popup_new_main_window, clone+1, (TREE_canvas**)NULp));
1166  }
1167  awm->insert_menu_topic("close", "Close", "C", NULp, AWM_ALL, AW_POPDOWN);
1168  }
1169  else {
1170 #if defined(DEBUG)
1171  // add more to debug-menu
1172  awm->sep______________();
1173  awm->insert_menu_topic("fix_db", "Fix database", "F", NULp, AWM_ALL, NT_fix_database);
1174  awm->insert_menu_topic("debug_arbdb", "Print debug information", "d", NULp, AWM_ALL, makeWindowCallback(GB_print_debug_information, GLOBAL.gb_main));
1175  awm->insert_menu_topic("test_compr", "Test compression", "T", NULp, AWM_ALL, makeWindowCallback(GBT_compression_test, GLOBAL.gb_main));
1176 #endif // DEBUG
1177 
1178  awm->create_menu("File", "F", AWM_ALL);
1179  {
1180  // keep the following entries in sync with ../EDIT4/ED4_root.cxx@common_save_menu_entries
1181  awm->insert_menu_topic("save_changes", "Quicksave changes", "s", "save.hlp", AWM_ALL, NT_save_quick_cb);
1182  awm->insert_menu_topic("save_all_as", "Save whole database as ...", "w", "save.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_save_as, AWAR_DBBASE));
1183  if (allow_new_window) {
1184  awm->sep______________();
1185  awm->insert_menu_topic("new_window", "New window (same database)", "N", "newwindow.hlp", AWM_ALL, makeCreateWindowCallback(popup_new_main_window, clone+1, (TREE_canvas**)NULp));
1186  }
1187  awm->sep______________();
1188  awm->insert_menu_topic("optimize_db", "Optimize database compression", "O", "optimize.hlp", AWM_ALL, NT_create_database_optimization_window);
1189  awm->sep______________();
1190 
1191  awm->insert_sub_menu("Import", "I");
1192  {
1193  awm->insert_menu_topic("merge_from", "Merge from other ARB database", "d", "arb_merge_into.hlp", AWM_ALL, NT_create_merge_from_window);
1194  awm->insert_menu_topic("import_seq", "Import from external format", "I", "arb_import.hlp", AWM_ALL, makeWindowCallback(NT_import_sequences, ntw));
1195  GDE_load_menu(awm, AWM_EXP, "Import");
1196  }
1197  awm->close_sub_menu();
1198 
1199  awm->insert_sub_menu("Export", "E");
1200  {
1201  awm->insert_menu_topic("export_to_ARB", "Merge to (new) ARB database", "A", "arb_merge_outof.hlp", AWM_ALL, NT_create_merge_to_window);
1202  awm->insert_menu_topic("export_seqs", "Export to external format", "f", "arb_export.hlp", AWM_ALL, makeCreateWindowCallback(create_AWTC_export_window, GLOBAL.gb_main));
1203  GDE_load_menu(awm, AWM_ALL, "Export");
1204  awm->insert_menu_topic("export_nds", "Export fields (to calc-sheet using NDS)", "N", "arb_export_nds.hlp", AWM_ALL, create_nds_export_window);
1205  }
1206  awm->close_sub_menu();
1207  awm->sep______________();
1208 
1209  insert_macro_menu_entry(awm, false);
1210 
1211  awm->insert_sub_menu("VersionInfo/Bugreport/MailingList", "V");
1212  {
1213  awm->insert_menu_topic("version_info", "Version info (" ARB_VERSION_DETAILED ")", "V", "version.hlp", AWM_ALL, makeHelpCallback ("version.hlp"));
1214  awm->insert_menu_topic("bug_report", "Report bug", "b", NULp, AWM_ALL, makeWindowCallback(AWT_openURL, "http://bugs.arb-home.de/wiki/BugReport"));
1215  awm->insert_menu_topic("mailing_list", "Mailing list", "M", NULp, AWM_ALL, makeWindowCallback(AWT_openURL, "http://bugs.arb-home.de/wiki/ArbMailingList"));
1216  }
1217  awm->close_sub_menu();
1218  awm->sep______________();
1219 
1220  awm->insert_menu_topic("new_arb", "Start second database", "d", "quit.hlp", AWM_ALL, makeWindowCallback(nt_start_2nd_arb, false));
1221  awm->insert_menu_topic("restart_arb", "Quit + load other database", "l", "quit.hlp", AWM_ALL, makeWindowCallback(nt_start_2nd_arb, true));
1222  awm->insert_menu_topic("quit", "Quit", "Q", "quit.hlp", AWM_ALL, makeWindowCallback(NT_exit, EXIT_SUCCESS));
1223  }
1224 
1225  // -----------------
1226  // Species
1227 
1228  awm->create_menu("Species", "c", AWM_ALL);
1229  {
1230  awm->insert_menu_topic("species_search", "Search and query", "q", "sp_search.hlp", AWM_ALL, makeCreateWindowCallback(DBUI::create_species_query_window, GLOBAL.gb_main));
1231  awm->insert_menu_topic("species_info", "Species information", "i", "sp_info.hlp", AWM_ALL, popupinfo_wcb);
1232 
1233  awm->sep______________();
1234 
1235  NT_insert_mark_submenus(awm, ntw, 1);
1236  awm->insert_menu_topic("mark_by_ref", "Mark by reference..", "r", "markbyref.hlp", AWM_EXP, makeCreateWindowCallback(create_mark_by_refentries_window, GLOBAL.gb_main));
1237  awm->insert_menu_topic("species_colors", "Colors ...", "l", "colorize.hlp", AWM_ALL, create_colorize_species_window);
1238  awm->insert_menu_topic("selection_admin", "Selections ...", "o", "species_configs.hlp", AWM_ALL, makeWindowCallback(NT_popup_configuration_admin, ntw));
1239 
1240  awm->sep______________();
1241 
1242  awm->insert_sub_menu("Database fields admin", "f");
1244  awm->close_sub_menu();
1246 
1247  awm->sep______________();
1248 
1249  awm->insert_menu_topic("del_marked", "Delete Marked Species", "D", "sp_del_mrkd.hlp", AWM_ALL, makeWindowCallback(NT_delete_mark_all_cb, ntw));
1250 
1251  awm->insert_sub_menu("Sort Species", "s");
1252  {
1253  awm->insert_menu_topic("$sort_by_field", "According to Database Entries", "D", "sp_sort_fld.hlp", AWM_ALL, NT_create_resort_window);
1254  awm->insert_menu_topic("$sort_by_tree", "According to Phylogeny", "P", "sp_sort_phyl.hlp", AWM_ALL, makeWindowCallback(NT_resort_data_by_phylogeny, ntw));
1255  }
1256  awm->close_sub_menu();
1257 
1258  awm->insert_sub_menu("Merge Species", "g", AWM_EXP);
1259  {
1260  awm->insert_menu_topic("merge_species", "Create merged species from similar species", "m", "merge_species.hlp", AWM_EXP, NT_createMergeSimilarSpeciesWindow);
1261  awm->insert_menu_topic("join_marked", "Join Marked Species", "J", "species_join.hlp", AWM_EXP, NT_create_species_join_window);
1262  }
1263  awm->close_sub_menu();
1264 
1265  awm->sep______________();
1266 
1267  awm->insert_menu_topic("species_submission", "Submit Species", "b", "submission.hlp", AWM_EXP, makeCreateWindowCallback(AWTC_create_submission_window, GLOBAL.gb_main));
1268 
1269  awm->sep______________();
1270 
1271  awm->insert_menu_topic("new_names", "Synchronize IDs", "e", "rename.hlp", AWM_ALL, makeCreateWindowCallback(AWTC_create_rename_window, GLOBAL.gb_main));
1272 
1273  awm->insert_sub_menu("Valid Names ...", "V", AWM_EXP);
1274  {
1275  awm->insert_menu_topic("imp_names", "Import names from file", "I", "vn_import.hlp", AWM_EXP, NT_importValidNames);
1276  awm->insert_menu_topic("del_names", "Delete names from DB", "D", "vn_delete.hlp", AWM_EXP, NT_deleteValidNames);
1277  awm->insert_menu_topic("sug_names", "Suggest valid names", "v", "vn_suggest.hlp", AWM_EXP, NT_suggestValidNames);
1278  awm->insert_menu_topic("search_names", "Search manually", "m", "vn_search.hlp", AWM_EXP, NT_create_searchManuallyNames_window);
1279  }
1280  awm->close_sub_menu();
1281  }
1282 
1283  // ----------------------------
1284  // Genes + Experiment
1285 
1286  if (is_genome_db) GEN_create_genes_submenu(awm, GLOBAL.gb_main, true);
1287 
1288  // ------------------
1289  // Sequence
1290 
1291  awm->create_menu("Sequence", "S", AWM_ALL);
1292  {
1293  awm->insert_menu_topic("seq_admin", "Sequence/Alignment Admin", "A", "ad_align.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_alignment_admin_window, (AW_window*)NULp));
1294  awm->insert_sub_menu("Insert/delete", "I");
1295  {
1296  awm->insert_menu_topic("ins_del_col", ".. column", "c", "insdel.hlp", AWM_ALL, create_insertDeleteColumn_window);
1297  awm->insert_menu_topic("ins_del_sai", ".. using SAI", "S", "insdel_sai.hlp", AWM_ALL, makeCreateWindowCallback(create_insertDeleteBySAI_window, GLOBAL.gb_main));
1298  }
1299  awm->close_sub_menu();
1300  awm->sep______________();
1301 
1302  awm->insert_sub_menu("Edit Sequences", "E");
1303  {
1304  awm->insert_menu_topic("new_arb_edit4", "Using marked species and tree", "m", "arb_edit4.hlp", AWM_ALL, makeWindowCallback(NT_start_editor_on_tree, 0, ntw));
1305  awm->insert_menu_topic("new2_arb_edit4", "... plus relatives", "r", "arb_edit4.hlp", AWM_ALL, makeWindowCallback(NT_start_editor_on_tree, -1, ntw));
1306  awm->insert_menu_topic("old_arb_edit4", "Using earlier configuration", "c", "arb_edit4.hlp", AWM_ALL, NT_create_startEditorOnOldConfiguration_window);
1307  }
1308  awm->close_sub_menu();
1309 
1310  awm->sep______________();
1311 
1312  awm->insert_sub_menu("Align Sequences", "S");
1313  {
1314  awm->insert_menu_topic("realign_dna", "Realign DNA according to aligned protein", "R", "realign_dna.hlp", AWM_ALL, NT_create_realign_dna_window);
1315  GDE_load_menu(awm, AWM_ALL, "Align");
1316  }
1317  awm->close_sub_menu();
1318  awm->insert_menu_topic("seq_concat", "Concatenate Sequences/Alignments", "C", "concatenate.hlp", AWM_ALL, NT_createConcatenationWindow);
1319  awm->insert_menu_topic("track_changes", "Track alignment changes", "k", "track_ali_changes.hlp", AWM_EXP, NT_create_trackAliChanges_window);
1320  awm->sep______________();
1321 
1322  awm->insert_menu_topic("dna_2_pro", "Perform translation", "t", "translate_dna_2_pro.hlp", AWM_ALL, NT_create_dna_2_pro_window);
1323  awm->insert_menu_topic("arb_dist", "Distance Matrix + ARB NJ", "D", "dist.hlp", AWM_ALL, makeWindowCallback(AWT_system_cb, "arb_dist &"));
1324  awm->sep______________();
1325 
1326  awm->insert_menu_topic("seq_quality", "Check Sequence Quality", "Q", "seq_quality.hlp", AWM_EXP, makeCreateWindowCallback(SQ_create_seq_quality_window, GLOBAL.gb_main));
1327  awm->insert_menu_topic("chimera_check", "Chimera Check", "m", "chimera_check.hlp", AWM_EXP, makeCreateWindowCallback(STAT_create_chimera_check_window, GLOBAL.gb_main));
1328 
1329  awm->sep______________();
1330 
1331  GDE_load_menu(awm, AWM_ALL, "Print");
1332  }
1333 
1334  // -------------
1335  // SAI
1336 
1337  awm->create_menu("SAI", "A", AWM_ALL);
1338  {
1339  awm->insert_menu_topic("sai_admin", "Manage SAIs", "S", "ad_extended.hlp", AWM_ALL, NT_create_extendeds_window);
1340  awm->insert_menu_topic("sai_calc", "Combine SAIs", "b", "saicalc.hlp", AWM_ALL, makeWindowCallback(SAI_popup_calculator_window, GLOBAL.gb_main));
1341  awm->insert_sub_menu("Create SAI using ...", "C");
1342  {
1343  awm->insert_menu_topic("sai_max_freq", "Max. Frequency", "M", "max_freq.hlp", AWM_EXP, AP_create_max_freq_window);
1344  awm->insert_menu_topic("sai_consensus", "Consensus", "C", "consensus.hlp", AWM_ALL, AP_create_con_expert_window);
1345  awm->insert_menu_topic("pos_var_pars", "Positional variability + Column statistic (parsimony method)", "a", "pos_var_pars.hlp", AWM_ALL, AP_create_pos_var_pars_window);
1346  awm->insert_menu_topic("arb_phyl", "Filter by base frequency", "F", "phylo.hlp", AWM_ALL, makeWindowCallback(AWT_system_cb, "arb_phylo &"));
1347  awm->insert_menu_topic("sai_pfold", "Protein secondary structure (field \"sec_struct\")", "P", "pfold.hlp", AWM_EXP, NT_create_sai_from_pfold);
1348 
1349  GDE_load_menu(awm, AWM_EXP, "SAI");
1350  }
1351  awm->close_sub_menu();
1352 
1353  awm->insert_sub_menu("Other functions", "O");
1354  {
1355  awm->insert_menu_topic("count_different_chars", "Count different chars/column", "C", "count_chars.hlp", AWM_EXP, makeWindowCallback(NT_count_different_chars, GLOBAL.gb_main));
1356  awm->insert_menu_topic("corr_mutat_analysis", "Compute clusters of correlated positions", "m", "", AWM_ALL, makeWindowCallback(AWT_system_in_console_cb, "arb_rnacma", XCMD_ASYNC_WAIT_ON_ERROR));
1357  awm->insert_menu_topic("export_pos_var", "Export Column Statistic (GNUPLOT format)", "E", "csp_2_gnuplot.hlp", AWM_ALL, NT_create_colstat_2_gnuplot_window);
1358  }
1359  awm->close_sub_menu();
1360  }
1361 
1362  // ----------------
1363  // Probes
1364 
1365  awm->create_menu("Probes", "P", AWM_ALL);
1366  {
1367  awm->insert_menu_topic("probe_design", "Design Probes", "D", "probedesign.hlp", AWM_ALL, makeCreateWindowCallback(create_probe_design_window, GLOBAL.gb_main));
1368  awm->insert_menu_topic("probe_multi", "Calculate Multi-Probes", "u", "multiprobe.hlp", AWM_ALL, makeCreateWindowCallback(create_multiprobe_window, ntw));
1369  awm->insert_menu_topic("probe_match", "Match Probes", "M", "probematch.hlp", AWM_ALL, makeCreateWindowCallback(create_probe_match_window, GLOBAL.gb_main));
1370  awm->sep______________();
1371  awm->insert_menu_topic("probe_match_sp", "Match Probes with Specificity", "f", "probespec.hlp", AWM_ALL, makeCreateWindowCallback(create_probe_match_with_specificity_window, ntw));
1372  awm->sep______________();
1373  awm->insert_menu_topic("primer_design_new", "Design Primers", "P", "primer_new.hlp", AWM_EXP, makeCreateWindowCallback(create_primer_design_window, GLOBAL.gb_main));
1374  awm->insert_menu_topic("primer_design", "Design Sequencing Primers", "S", "primer.hlp", AWM_EXP, makeWindowCallback(AWT_system_in_console_cb, "arb_primer", XCMD_ASYNC_WAITKEY));
1375  awm->sep______________();
1376  awm->insert_menu_topic("pt_server_admin", "PT_SERVER Admin", "A", "probeadmin.hlp", AWM_ALL, makeCreateWindowCallback(create_probe_admin_window, GLOBAL.gb_main));
1377  }
1378 
1379  }
1380 
1381  // --------------
1382  // Tree
1383 
1384  awm->create_menu("Tree", "T", AWM_ALL);
1385  {
1386  if (!clone) {
1387  awm->insert_sub_menu("Add Species to Existing Tree", "A");
1388  {
1389  awm->insert_menu_topic("arb_pars_quick", "ARB Parsimony (Quick add marked)", "Q", "pars.hlp", AWM_ALL, makeWindowCallback(AWT_system_cb, "arb_pars -add_marked -quit &"));
1390  awm->insert_menu_topic("arb_pars", "ARB Parsimony interactive", "i", "pars.hlp", AWM_ALL, makeWindowCallback(AWT_system_cb, "arb_pars &"));
1391  GDE_load_menu(awm, AWM_EXP, "Incremental phylogeny");
1392  }
1393  awm->close_sub_menu();
1394  }
1395 
1396  awm->insert_sub_menu("Remove Species from Tree", "R");
1397  {
1398  awm->insert_menu_topic(awm->local_id("tree_remove_deleted"), "Remove zombies", "z", "trm_del.hlp", AWM_ALL, makeWindowCallback(NT_remove_leafs, ntw, AWT_REMOVE_ZOMBIES));
1399  awm->insert_menu_topic(awm->local_id("tree_remove_marked"), "Remove marked", "m", "trm_mrkd.hlp", AWM_ALL, makeWindowCallback(NT_remove_leafs, ntw, AWT_REMOVE_MARKED));
1400  awm->insert_menu_topic(awm->local_id("tree_keep_marked"), "Keep marked", "K", "tkeep_mrkd.hlp", AWM_ALL, makeWindowCallback(NT_remove_leafs, ntw, AWT_KEEP_MARKED));
1401  awm->sep______________();
1402  awm->insert_menu_topic("all_tree_remove_deleted", "Remove zombies from ALL trees", "A", "trm_del.hlp", AWM_ALL, makeWindowCallback(NT_alltree_remove_leafs, GBT_REMOVE_ZOMBIES, GLOBAL.gb_main));
1403  awm->insert_menu_topic("all_tree_remove_marked", "Remove marked from ALL trees", "L", "trm_mrkd.hlp", AWM_ALL, makeWindowCallback(NT_alltree_remove_leafs, GBT_REMOVE_MARKED, GLOBAL.gb_main));
1404  }
1405  awm->close_sub_menu();
1406 
1407  if (!clone) {
1408  awm->insert_sub_menu("Build tree from sequence data", "B");
1409  {
1410  awm->insert_sub_menu("Distance matrix methods", "D");
1411  awm->insert_menu_topic("arb_dist", "Distance Matrix + ARB NJ", "J", "dist.hlp", AWM_ALL, makeWindowCallback(AWT_system_cb, "arb_dist &"));
1412  GDE_load_menu(awm, AWM_ALL, "Phylogeny Distance Matrix");
1413  awm->close_sub_menu();
1414 
1415  awm->insert_sub_menu("Maximum Parsimony methods", "P");
1416  GDE_load_menu(awm, AWM_ALL, "Phylogeny max. parsimony");
1417  awm->close_sub_menu();
1418 
1419  awm->insert_sub_menu("Maximum Likelihood methods", "L");
1420  GDE_load_menu(awm, AWM_EXP, "Phylogeny max. Likelihood EXP");
1421  GDE_load_menu(awm, AWM_ALL, "Phylogeny max. Likelihood");
1422  awm->close_sub_menu();
1423 
1424  awm->insert_sub_menu("Other methods", "O", AWM_EXP);
1425  GDE_load_menu(awm, AWM_EXP, "Phylogeny (Other)");
1426  awm->close_sub_menu();
1427  }
1428  awm->close_sub_menu();
1429  }
1430 
1431  awm->insert_menu_topic(awm->local_id("consense_tree"), "Build consensus tree", "c", "consense_tree.hlp", AWM_ALL, NT_create_consense_window);
1432 
1433  awm->sep______________();
1434 
1435  awm->insert_sub_menu("Reset zoom", "z");
1436  {
1437  awm->insert_menu_topic(awm->local_id("reset_logical_zoom"), "Logical zoom", "L", "rst_log_zoom.hlp", AWM_ALL, makeWindowCallback(NT_reset_lzoom_cb, ntw));
1438  awm->insert_menu_topic(awm->local_id("reset_physical_zoom"), "Physical zoom", "P", "rst_phys_zoom.hlp", AWM_ALL, makeWindowCallback(NT_reset_pzoom_cb, ntw));
1439  }
1440  awm->close_sub_menu();
1441 
1442  awm->sep______________();
1443 
1444  // taxonomic groups
1445  NT_insert_collapse_submenu(awm, ntw);
1446  if (!clone) {
1447  awm->insert_menu_topic("group_search", "Search groups...", "g", "group_search.hlp", AWM_ALL, makeWindowCallback (popup_group_search_window, GLOBAL.gb_main));
1448  awm->insert_menu_topic("compare_taxonomy", "Compare taxonomy...", "x", "compare_taxonomy.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_compare_taxonomy_window, ntw));
1449  awm->insert_menu_topic("move_groups", "Move groups...", "n", "move_groups.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_moveGroupInfo_window));
1450  }
1451 
1452  awm->sep______________();
1453 
1454  if (!clone) {
1455  awm->insert_menu_topic("compare_topology", "Compare topology...", "p", "compare_topo.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_compareTopologies_window));
1456  }
1457 
1458  awm->insert_sub_menu("Modify branches", "M");
1459  {
1460  awm->insert_menu_topic(awm->local_id("tree_remove_remark"), "Remove bootstraps", "b", "trm_boot.hlp", AWM_ALL, makeWindowCallback(NT_remove_bootstrap, ntw));
1461  awm->sep______________();
1462  awm->insert_menu_topic(awm->local_id("tree_reset_lengths"), "Reset branchlengths", "R", "tbl_reset.hlp", AWM_ALL, makeWindowCallback(NT_reset_branchlengths, ntw));
1463  awm->insert_menu_topic(awm->local_id("justify_branch_lengths"), "Justify branchlengths", "J", "tbl_justify.hlp", AWM_ALL, makeWindowCallback(NT_justify_branch_lenghs, ntw));
1464  awm->insert_menu_topic(awm->local_id("tree_scale_lengths"), "Scale Branchlengths", "S", "tbl_scale.hlp", AWM_ALL, makeWindowCallback(NT_scale_tree, ntw));
1465  awm->sep______________();
1466  awm->insert_menu_topic(awm->local_id("tree_multifurcate"), "Multifurcate...", "M", "multifurcate.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_multifurcate_tree_window, ntw));
1467  awm->sep______________();
1468  awm->insert_menu_topic(awm->local_id("tree_boot2len"), "Bootstraps -> Branchlengths", "l", "tbl_boot2len.hlp", AWM_ALL, makeWindowCallback(NT_move_boot_branch, ntw, 0));
1469  awm->insert_menu_topic(awm->local_id("tree_len2boot"), "Bootstraps <- Branchlengths", "o", "tbl_boot2len.hlp", AWM_ALL, makeWindowCallback(NT_move_boot_branch, ntw, 1));
1470 
1471  }
1472  awm->close_sub_menu();
1473  awm->insert_sub_menu("Beautify tree", "e");
1474  {
1475  awm->insert_menu_topic(awm->local_id("beautifyt_tree"), "#beautifyt.xpm", "", "resorttree.hlp", AWM_ALL, makeWindowCallback(NT_resort_tree_cb, ntw, BIG_BRANCHES_TO_TOP));
1476  awm->insert_menu_topic(awm->local_id("beautifyc_tree"), "#beautifyc.xpm", "", "resorttree.hlp", AWM_ALL, makeWindowCallback(NT_resort_tree_cb, ntw, BIG_BRANCHES_TO_EDGE));
1477  awm->insert_menu_topic(awm->local_id("beautifyb_tree"), "#beautifyb.xpm", "", "resorttree.hlp", AWM_ALL, makeWindowCallback(NT_resort_tree_cb, ntw, BIG_BRANCHES_TO_BOTTOM));
1478  awm->insert_menu_topic(awm->local_id("beautifyr_tree"), "Radial tree (1)", "1", "resorttree.hlp", AWM_ALL, makeWindowCallback(NT_resort_tree_cb, ntw, BIG_BRANCHES_TO_CENTER));
1479  awm->insert_menu_topic(awm->local_id("beautifyr2_tree"), "Radial tree (2)", "2", "resorttree.hlp", AWM_ALL, makeWindowCallback(NT_resort_tree_cb, ntw, BIG_BRANCHES_ALTERNATING));
1480  awm->sep______________();
1481  awm->insert_menu_topic(awm->local_id("sort_by_other"), "By other tree", "o", "resortbyother.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_sort_tree_by_other_tree_window, ntw));
1482  }
1483  awm->close_sub_menu();
1484 
1485  awm->insert_menu_topic(awm->local_id("branch_analysis"), "Branch analysis", "h", "branch_analysis.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_branch_analysis_window, ntw));
1486  awm->insert_menu_topic(awm->local_id("mark_duplicates"), "Mark duplicates", "u", "mark_duplicates.hlp", AWM_ALL, makeWindowCallback(NT_mark_duplicates, ntw));
1487 
1488  awm->sep______________();
1489 
1490  awm->insert_menu_topic(awm->local_id("shade"), "Tree shading...", "s", "tree_shading.hlp", AWM_ALL, makeWindowCallback (NT_configure_treeShader));
1491  awm->insert_menu_topic(awm->local_id("syncscroll"), "Sync tree scrolling..", "o", "syncscroll.hlp", AWM_ALL, makeCreateWindowCallback(NT_create_syncScroll_window, ntw));
1492 
1493  awm->sep______________();
1494 
1495  awm->insert_menu_topic(awm->local_id("tree_select"), "Select Tree", "T", NULp, AWM_ALL, makeCreateWindowCallback(NT_create_select_tree_window, awar_tree));
1496  awm->insert_menu_topic(awm->local_id("tree_select_latest"), "Select Last Tree", "L", NULp, AWM_ALL, makeWindowCallback(NT_select_bottom_tree, awar_tree));
1497 
1498  if (!clone) {
1499  awm->sep______________();
1500  awm->insert_menu_topic("tree_admin", "Tree admin", "i", "treeadm.hlp", AWM_ALL, popup_tree_admin_window);
1501  awm->insert_menu_topic("nds", "NDS (Node display setup)", "N", "props_nds.hlp", AWM_ALL, makeCreateWindowCallback(AWT_create_nds_window, GLOBAL.gb_main));
1502  }
1503 
1504  awm->sep______________();
1505  awm->insert_menu_topic("transversion", "Transversion analysis", "y", "trans_anal.hlp", AWM_EXP, makeHelpCallback("trans_anal.hlp"));
1506 
1507  if (!clone) {
1508  awm->sep______________();
1509  awm->insert_menu_topic("print_tree", "Print tree", "P", "tree2prt.hlp", AWM_ALL, makeWindowCallback(AWT_popup_print_window, static_cast<AWT_canvas*>(ntw)));
1510  awm->insert_menu_topic("tree_2_xfig", "Export tree to XFIG", "F", "tree2file.hlp", AWM_ALL, makeWindowCallback(AWT_popup_tree_export_window, static_cast<AWT_canvas*>(ntw)));
1511  }
1512 
1513  if (is_genome_db) {
1514  awm->sep______________();
1515  awm->insert_sub_menu("Other..", "O", AWM_EXP);
1516  {
1517  awm->insert_menu_topic(awm->local_id("tree_pseudo_species_to_organism"), "Relink tree to organisms", "o", "tree_pseudo.hlp", AWM_EXP, makeWindowCallback(NT_pseudo_species_to_organism, ntw));
1518  }
1519  awm->close_sub_menu();
1520  }
1521  }
1522 
1523  if (!clone) {
1524  // ---------------
1525  // Tools
1526 
1527  awm->create_menu("Tools", "o", AWM_ALL);
1528  {
1529  awm->insert_menu_topic("names_admin", "Name server admin (IDs)", "s", "namesadmin.hlp", AWM_ALL, makeCreateWindowCallback(AW_create_namesadmin_window, GLOBAL.gb_main));
1530  awm->insert_sub_menu("DB admin", "D", AWM_EXP);
1531  {
1532  awm->insert_menu_topic("db_admin", "Re-repair DB", "R", "rerepair.hlp", AWM_EXP, makeWindowCallback(NT_rerepair_DB, GLOBAL.gb_main));
1533  }
1534  awm->close_sub_menu();
1535  awm->insert_sub_menu("Network", "N", AWM_EXP);
1536  {
1537  GDE_load_menu(awm, AWM_EXP, "Network");
1538  }
1539  awm->close_sub_menu();
1540  awm->sep______________();
1541 
1542  awm->insert_sub_menu("GDE specials", "G", AWM_EXP);
1543  {
1544  GDE_load_menu(awm, AWM_EXP, NULp);
1545  }
1546  awm->close_sub_menu();
1547 
1548  awm->sep______________();
1549  awm->insert_menu_topic("xterm", "Start XTERM", "X", "xterm.hlp", AWM_ALL, AWT_console);
1550  awm->insert_menu_topic("viewlog", "View ARB log", "l", "console.hlp", AWM_ALL, makeWindowCallback(AWT_system_in_console_cb, "arb_show_log.pl run", XCMD_ASYNC_WAIT_ON_ERROR)); // ../SH/arb_show_log.pl
1551  awm->insert_menu_topic("viewserv", "View server log", "V", "console.hlp", AWM_ALL, makeWindowCallback(AWT_system_in_console_cb, "arb_show_log.pl server", XCMD_ASYNC_WAIT_ON_ERROR));
1552  awm->sep______________();
1553  GDE_load_menu(awm, AWM_EXP, "User");
1554  }
1555  // --------------------
1556  // Properties
1557 
1558  awm->create_menu("Properties", "r", AWM_ALL);
1559  {
1560  awm->insert_menu_topic("props_menu", "Frame settings ...", "F", "props_frame.hlp", AWM_ALL, AW_preset_window);
1561  awm->insert_menu_topic(awm->local_id("props_tree2"), "Tree options", "o", "nt_tree_settings.hlp", AWM_ALL, TREE_create_settings_window);
1562  awm->insert_menu_topic("props_tree", "Tree colors & fonts", "c", "color_props.hlp", AWM_ALL, makeCreateWindowCallback(AW_create_gc_window, ntw->gc_manager));
1563  awm->insert_menu_topic("props_www", "Search world wide web (WWW)", "b", "props_www.hlp", AWM_ALL, makeCreateWindowCallback(AWT_create_www_window, GLOBAL.gb_main));
1564  awm->sep______________();
1565  awm->insert_menu_topic("!toggle_expert", "Toggle expert mode", "x", NULp, AWM_ALL, NT_toggle_expert_mode);
1566  awm->insert_menu_topic("!toggle_focus", "Toggle focus follows mouse", "m", NULp, AWM_ALL, NT_toggle_focus_policy);
1567  awm->sep______________();
1569  awm->sep______________();
1570  awm->insert_menu_topic("save_props", "Save properties (ntree.arb)", "S", "savedef.hlp", AWM_ALL, AW_save_properties);
1571  }
1572  }
1573 
1574  awm->insert_help_topic("ARB_NT help", "N", "arb_ntree.hlp", AWM_ALL, makeHelpCallback("arb_ntree.hlp"));
1575 
1576  // ----------------------
1577  // mode buttons
1578  //
1579  // keep them synchronized as far as possible with those in ARB_PARSIMONY
1580  // see ../PARSIMONY/PARS_main.cxx@keepModesSynchronized
1581 
1582  awm->create_mode("mode_select.xpm", "mode_select.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_SELECT));
1583  awm->create_mode("mode_mark.xpm", "mode_mark.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_MARK));
1584  awm->create_mode("mode_group.xpm", "mode_group.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_GROUP));
1585  awm->create_mode("mode_zoom.xpm", "mode_pzoom.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_ZOOM));
1586  awm->create_mode("mode_lzoom.xpm", "mode_lzoom.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_LZOOM));
1587 
1588  awm->create_mode("mode_info.xpm", "mode_info.hlp", AWM_ALL, makeWindowCallback(NT_infomode_cb, ntw, AWT_MODE_INFO));
1589  awm->create_mode("mode_www.xpm", "mode_www.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_WWW));
1590 
1591  // topology-modification-modes
1592  awm->create_mode("mode_setroot.xpm", "mode_setroot.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_SETROOT));
1593  awm->create_mode("mode_swap.xpm", "mode_swap.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_SWAP));
1594  awm->create_mode("mode_move.xpm", "mode_move.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_MOVE));
1595  awm->create_mode("mode_length.xpm", "mode_length.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_LENGTH));
1596  awm->create_mode("mode_multifurc.xpm", "mode_length.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_MULTIFURC));
1597 
1598  // layout-modes
1599  awm->create_mode("mode_line.xpm", "mode_width.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_LINE));
1600  awm->create_mode("mode_rotate.xpm", "mode_rotate.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_ROTATE));
1601  awm->create_mode("mode_spread.xpm", "mode_spread.hlp", AWM_ALL, makeWindowCallback(nt_mode_event, ntw, AWT_MODE_SPREAD));
1602 
1603  awm->set_info_area_height(250);
1604  awm->at(5, 2);
1605  awm->auto_space(-2, -2);
1606  awm->shadow_width(1);
1607 
1608  // -------------------------
1609  // create top area
1610 
1611  int first_liney;
1612  int leftx;
1613  awm->get_at_position(&leftx, &first_liney);
1614 
1615  // ---------------------
1616  // quit + help
1617 
1618  awm->button_length(0);
1619 
1620  if (clone) {
1621  awm->callback(AW_POPDOWN);
1622  awm->create_button("CLOSE", "#close.xpm");
1623  }
1624  else {
1625  awm->callback(makeWindowCallback(NT_exit, EXIT_SUCCESS));
1626  awm->help_text("quit.hlp");
1627  awm->create_button("QUIT", "#quit.xpm");
1628  }
1629 
1630  int db_pathx = awm->get_at_xposition();
1631 
1632  // now fetch the yposition for the 2nd button line
1633  awm->at_newline();
1634  int second_liney = awm->get_at_yposition();
1635 
1637  awm->help_text("arb_ntree.hlp");
1638  awm->create_button("?", "#help.xpm");
1639 
1640  // --------------------------
1641  // save + undo/redo
1642 
1643  awm->callback(NT_save_quick_cb);
1644  awm->help_text("save.hlp");
1645  awm->create_button("SAVE", "#save.xpm");
1646 
1647  awm->callback(makeCreateWindowCallback(NT_create_save_as, AWAR_DBBASE));
1648  awm->help_text("save.hlp");
1649  awm->create_button("SAVE_AS", "#saveAs.xpm");
1650 
1651  // undo/redo:
1652  awm->callback(makeWindowCallback(NT_undo_cb, GB_UNDO_UNDO, ntw));
1653  awm->help_text("undo.hlp");
1654  awm->create_button("UNDO", "#undo.xpm");
1655 
1656  awm->callback(makeWindowCallback(NT_undo_cb, GB_UNDO_REDO, ntw));
1657  awm->help_text("undo.hlp");
1658  awm->create_button("REDO", "#redo.xpm");
1659 
1660  int db_pathx2 = awm->get_at_xposition();
1661 
1662  // fetch position for mode help-line:
1663  awm->at_newline();
1664  int third_liney = awm->get_at_yposition();
1665 
1666  awm->at(db_pathx, first_liney);
1667  // size of DB-name button is determined by buttons below:
1668  awm->at_attach_to(false, false, db_pathx2-db_pathx-1, second_liney-first_liney+1);
1669  awm->callback(makeCreateWindowCallback(NT_create_save_quick_as_window, AWAR_DBBASE));
1670  awm->help_text("save.hlp");
1671  awm->create_button("QUICK_SAVE_AS", AWAR_DB_NAME);
1672 
1673  // -----------------------------
1674  // tree + tree display
1675 
1676 #define TREE_BUTTON_OVERSIZE 6
1677 
1678  int db_treex = awm->get_at_xposition();
1679  int second_uppery = second_liney-TREE_BUTTON_OVERSIZE;
1680 
1681  awm->at(db_treex, second_uppery);
1682  awm->button_length(0);
1683 
1684  awm->callback(makeWindowCallback(NT_set_tree_style, ntw, AP_TREE_RADIAL));
1685  awm->help_text("tr_type_radial.hlp");
1686  awm->create_button("RADIAL_TREE_TYPE", "#radial.xpm");
1687 
1688  awm->callback(makeWindowCallback(NT_set_tree_style, ntw, AP_TREE_NORMAL));
1689  awm->help_text("tr_type_list.hlp");
1690  awm->create_button("LIST_TREE_TYPE", "#dendro.xpm");
1691 
1692  awm->callback(makeWindowCallback(NT_set_tree_style, ntw, AP_TREE_IRS));
1693  awm->help_text("tr_type_irs.hlp");
1694  awm->create_button("FOLDED_LIST_TREE_TYPE", "#dendroIrs.xpm");
1695 
1696  awm->callback(makeWindowCallback(NT_set_tree_style, ntw, AP_LIST_NDS));
1697  awm->help_text("tr_type_nds.hlp");
1698  awm->create_button("NO_TREE_TYPE", "#listdisp.xpm");
1699 
1700  int db_treex2 = awm->get_at_xposition();
1701 
1702  awm->at(db_treex, first_liney);
1703  // size of tree-name button is determined by buttons below:
1704  awm->at_attach_to(false, false, db_treex2-db_treex-1, second_uppery-first_liney+1);
1705  awm->callback(makeCreateWindowCallback(NT_create_select_tree_window, awar_tree));
1706  awm->help_text("nt_tree_select.hlp");
1707  awm->create_button("SELECT_A_TREE", awar_tree);
1708 
1709  // ---------------------------------------------------------------
1710  // protection, alignment + editor (and maybe Genome Map)
1711 
1712  int db_alignx = awm->get_at_xposition();
1713 
1714  // editor and genemap buttons have to be 44x24 sized
1715 #define EDIT_XSIZE 50
1716 #define EDIT_YSIZE 30 // same as 'save as' buttons
1717 
1718  // first draw protection:
1719  int protectx = db_alignx + 2*EDIT_XSIZE;
1720 
1721  awm->at(protectx+2, first_liney+1);
1722  awm->button_length(0);
1723  awm->create_button(NULp, "#protect.xpm");
1724 
1725  awm->at(protectx, second_liney+2);
1727  awm->insert_option ("0", NULp, 0);
1728  awm->insert_option ("1", NULp, 1);
1729  awm->insert_option ("2", NULp, 2);
1730  awm->insert_option ("3", NULp, 3);
1731  awm->insert_option ("4", NULp, 4);
1732  awm->insert_option ("5", NULp, 5);
1733  awm->insert_default_option("6", NULp, 6);
1734  awm->update_option_menu();
1735 
1736  int db_searchx = awm->get_at_xposition() - 7;
1737 
1738  // draw ali/editor buttons AFTER protect menu (to get rid of it's label)
1739  awm->at(db_alignx, second_liney);
1740 
1741  awm->at_attach_to(false, false, ((2-is_genome_db)*EDIT_XSIZE), EDIT_YSIZE);
1742  awm->callback(makeWindowCallback(NT_start_editor_on_tree, 0, ntw));
1743  awm->help_text("arb_edit4.hlp");
1744  if (is_genome_db) awm->create_button("EDIT_SEQUENCES", "#editor_small.xpm");
1745  else awm->create_button("EDIT_SEQUENCES", "#editor.xpm");
1746 
1747  if (is_genome_db) {
1748  awm->at_attach_to(false, false, EDIT_XSIZE, EDIT_YSIZE);
1749  awm->callback(makeCreateWindowCallback(GEN_create_first_map, GLOBAL.gb_main)); // initial gene map
1750  awm->help_text("gene_map.hlp");
1751  awm->create_button("OPEN_GENE_MAP", "#gen_map.xpm");
1752  }
1753 
1754  int db_alignx2 = awm->get_at_xposition();
1755 
1756  awm->at(db_alignx, first_liney);
1757  awm->at_attach_to(false, false, db_alignx2-db_alignx-1, second_liney-first_liney+1);
1759  awm->help_text("nt_align_select.hlp");
1760  awm->create_button("SELECT_AN_ALIGNMENT", AWAR_DEFAULT_ALIGNMENT);
1761 
1762  // -------------------------------
1763  // create mode-help line
1764 
1765  awm->at(leftx, third_liney);
1768 
1769  awm->at_newline();
1770  int bottomy = awm->get_at_yposition();
1771 
1772  // ---------------------------------------
1773  // Info / marked / Search / Jump
1774 
1775  awm->button_length(7);
1776 
1777  awm->at(db_searchx, first_liney);
1778  awm->callback(makeCreateWindowCallback(DBUI::create_species_query_window, GLOBAL.gb_main));
1779  awm->help_text("sp_search.hlp");
1780  awm->create_button("SEARCH", "Search");
1781 
1782  awm->at(db_searchx, second_uppery);
1783  awm->callback(makeWindowCallback(NT_jump_cb, ntw, AP_JUMP_BY_BUTTON));
1784  awm->help_text("tr_jump.hlp");
1785  awm->create_button("JUMP", "Jump");
1786 
1787  int db_infox = awm->get_at_xposition();
1788 
1789  awm->at(db_infox, first_liney);
1790  awm->button_length(13);
1791  awm->callback(popupinfo_wcb);
1792  awm->help_text("sp_search.hlp");
1793  awm->create_button("INFO", AWAR_INFO_BUTTON_TEXT);
1794 
1795  awm->at(db_infox, second_uppery);
1796  awm->button_length(13);
1797  awm->help_text("species_configs.hlp");
1798  awm->callback(makeWindowCallback(NT_popup_configuration_admin, ntw));
1799  awm->create_button("selection_admin2", AWAR_MARKED_SPECIES_COUNTER);
1800  {
1802  GB_add_callback(gb_species_data, GB_CB_CHANGED, makeDatabaseCallback(NT_update_marked_counter, static_cast<AW_window*>(awm)));
1804  }
1805 
1806  // set height of top area:
1807  awm->set_info_area_height(bottomy+2);
1808  awm->set_bottom_area_height(0);
1809 
1811 
1812  // ------------------------------------
1813  // Autostarts for development
1814 
1815 #if defined(DEVEL_RALF)
1816  // if (is_genome_db) GEN_map_first(awr)->show();
1817 #endif // DEVEL_RALF
1818 
1820 
1821 #if defined(DEBUG)
1822  AWT_check_action_ids(awr, is_genome_db ? "_genome" : "");
1823 #endif
1824 
1825  return awm;
1826 }
1827 
1830  if (error) aw_message(error);
1831 
1832  nt_create_all_awars(aw_root);
1833 
1834  TREE_canvas *ntw = NULp;
1835  AW_window *aww = popup_new_main_window(aw_root, 0, &ntw);
1837  aww->show();
1838 
1840  if (error) aw_message(error);
1841 
1842  return ntw;
1843 }
GB_ERROR GB_begin_transaction(GBDATA *gbd)
Definition: arbdb.cxx:2516
AW_window * AP_create_max_freq_window(AW_root *aw_root)
void NT_popup_configuration_admin(AW_window *aw_main, TREE_canvas *ntw)
Definition: NT_edconf.cxx:1247
void register_canvas(TREE_canvas *ntw)
Definition: NT_extern.cxx:928
static void group_selected_by_canvas_cb(AWT_graphic_tree *gfx)
Definition: NT_extern.cxx:994
void insert_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
GB_ERROR GBK_system(const char *system_command)
Definition: arb_msg.cxx:519
#define AWT_TREE(ntw)
Definition: TreeDisplay.hxx:77
AW_window * create_species_query_window(AW_root *aw_root, GBDATA *gb_main)
const char * GB_ERROR
Definition: arb_core.h:25
static AW_window * NT_create_database_optimization_window(AW_root *aw_root)
Definition: NT_extern.cxx:485
void get_at_position(int *x, int *y) const
Definition: AW_at.cxx:291
GBDATA * get_group_data() const
Definition: Group.hxx:55
virtual const char * get_self_awar() const =0
#define AWAR_DB_NAME
Definition: aw_awar_defs.hxx:6
void NT_install_treeShader(TREE_canvas *ntw, GBDATA *gb_main)
static void NT_database_optimization(AW_window *aww)
Definition: NT_extern.cxx:452
AP_tree_root * get_tree_root()
GBT_TreeRemoveType
Definition: arbdbt.h:31
void AWT_popup_tree_export_window(AW_window *parent_win, AWT_canvas *scr)
Definition: AWT_canio.cxx:765
static void update_main_window_title(AW_root *awr, AW_window_menu_modes *aww, int clone)
Definition: NT_extern.cxx:896
void GBT_compression_test(struct Unfixed_cb_parameter *, GBDATA *gb_main)
const awt_input_mask_descriptor * AWT_look_input_mask(int id)
AW_window * create_probe_design_window(AW_root *root, GBDATA *gb_main)
void launch_MapViewer_cb(GBDATA *gbd, AD_MAP_VIEWER_TYPE type)
Definition: ad_spec.cxx:237
void button_length(int length)
Definition: AW_at.cxx:283
AW_window * AWTC_create_rename_window(AW_root *root, GBDATA *gb_main)
Definition: AW_rename.cxx:562
GBDATA * GBT_first_marked_species(GBDATA *gb_main)
Definition: aditem.cxx:113
size_t size() const
Definition: arb_strarray.h:85
AWT_COMMAND_MODE
Definition: awt_canvas.hxx:25
AW_window * NT_create_startEditorOnOldConfiguration_window(AW_root *awr)
Definition: NT_edconf.cxx:1265
void NT_remove_leafs(UNFIXED, TREE_canvas *ntw, AWT_RemoveType mode)
int get_at_xposition() const
Definition: AW_at.cxx:296
static void NT_save_quick_as_cb(AW_window *aww)
Definition: NT_extern.cxx:395
AW_window * NT_create_moveGroupInfo_window(AW_root *root)
Definition: ad_trees.cxx:683
void EXP_create_awars(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
Definition: EXP_main.cxx:37
GBDATA * read_pointer() const
Definition: AW_awar.cxx:194
void nt_mode_event(UNFIXED, TREE_canvas *ntw, AWT_COMMAND_MODE mode)
void append_command_output(GBS_strstruct *out, const char *prefix, const char *command)
Definition: NT_extern.cxx:604
GB_ERROR GB_save(GBDATA *gb, const char *path, const char *savetype)
void NT_createConcatenationAwars(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
GBDATA * current(AW_root *root, GBDATA *gb_main) const OVERRIDE
Definition: NT_extern.cxx:699
static void expert_mode_changed_cb(AW_root *aw_root)
Definition: NT_extern.cxx:173
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const WindowCallback &wcb)
Definition: AW_window.cxx:592
void AWTC_create_submission_variables(AW_root *root, AW_default db1)
void load_xfig(const char *file, bool resize=true)
Definition: AW_window.cxx:717
void SQ_create_awars(AW_root *awr, AW_default aw_def)
Definition: SQ_main.cxx:48
void create_dbui_awars(AW_root *aw_root)
Definition: ui_species.cxx:85
#define AWAR_DB_OPTI_TREENAME
Definition: NT_extern.cxx:407
AW_window * create_AWTC_export_window(AW_root *awr, GBDATA *gb_main)
GB_ERROR GB_add_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
Definition: ad_cb.cxx:356
void GEN_create_awars(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
void NT_create_transpro_variables(AW_root *root, AW_default props)
void NT_create_compare_taxonomy_awars(AW_root *aw_root, AW_default props)
void popup_species_info_window(AW_root *aw_root, GBDATA *gb_main)
GB_ERROR write_pointer(GBDATA *aw_pointer)
const char * ARB_keep_string(char *str)
Definition: arb_string.cxx:63
void append_named_value(GBS_strstruct *out, const char *prefix, const char *value)
Definition: NT_extern.cxx:601
void NT_mark_all_cb(UNFIXED, TREE_canvas *ntw, int mark_mode)
void request_refresh()
Definition: awt_canvas.hxx:362
AW_window * awt_create_load_box(AW_root *aw_root, const char *action, const char *what, const char *default_directory, const char *file_extension, char **set_file_name_awar, const WindowCallback &ok_cb, const WindowCallback &close_cb, const char *close_button_text)
AW_window * NT_create_extendeds_window(AW_root *aw_root)
Definition: ad_ext.cxx:318
#define TREE_BUTTON_OVERSIZE
AW_window * AWTC_create_submission_window(AW_root *root, GBDATA *gb_main)
void NT_remove_bootstrap(UNFIXED, TREE_canvas *ntw)
TreeNode * GBT_remove_leafs(TreeNode *tree, GBT_TreeRemoveType mode, const GB_HASH *species_hash, int *removed, int *groups_removed)
Definition: adtree.cxx:33
void NT_create_extendeds_vars(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
Definition: ad_ext.cxx:286
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
Definition: arbdb.cxx:2549
void at(int x, int y)
Definition: AW_at.cxx:93
void NT_move_boot_branch(UNFIXED, TREE_canvas *ntw, int direction)
void allow_title_reuse()
Definition: arb_progress.h:261
void NT_reset_pzoom_cb(UNFIXED, TREE_canvas *ntw)
void dont_save_awars_with_default_value(GBDATA *gb_db)
Definition: AW_root.cxx:605
void AW_create_standard_fileselection(AW_window *aws, const char *awar_prefix)
Definition: aw_file.hxx:30
const char * GBT_name_of_largest_tree(GBDATA *gb_main)
Definition: adtree.cxx:1057
void request_save()
Definition: awt_canvas.hxx:366
GB_ERROR ARB_bind_global_awars(GBDATA *gb_main)
#define ARB_VERSION_DETAILED
Definition: arb_build.h:2
void GBT_get_alignment_names(ConstStrArray &names, GBDATA *gbd)
Definition: adali.cxx:316
void create_primer_design_variables(AW_root *aw_root, AW_default aw_def, AW_default global)
char * ARB_strdup(const char *str)
Definition: arb_string.h:27
#define AWAR_DEFAULT_ALIGNMENT
Definition: aw_awar_defs.hxx:8
AW_window * create_probe_match_with_specificity_window(AW_root *root, TREE_canvas *ntw)
AW_window * STAT_create_chimera_check_window(AW_root *root, GBDATA *gb_main)
Definition: ST_window.cxx:270
static void NT_create_mask_submenu(AW_window_menu_modes *awm)
Definition: NT_extern.cxx:724
TreeNode * GBT_read_tree(GBDATA *gb_main, const char *tree_name, TreeRoot *troot)
Definition: adtree.cxx:791
long read_int() const
Definition: AW_awar.cxx:187
#define AWAR_SAI_COLOR_STR
AW_window * NT_create_multifurcate_tree_window(AW_root *aw_root, TREE_canvas *ntw)
Definition: ad_trees.cxx:1116
AW_window * create_insertDeleteBySAI_window(AW_root *root, GBDATA *gb_main)
Definition: NT_ins_col.cxx:268
void NT_start_editor_on_tree(AW_window *aww, int use_species_aside, TREE_canvas *ntw)
Definition: NT_edconf.cxx:1288
const char * GBS_global_string(const char *templat,...)
Definition: arb_msg.cxx:204
AW_window * NT_create_syncScroll_window(AW_root *awr, TREE_canvas *ntw)
AW_root * awr
Definition: awt_canvas.hxx:338
void AWTI_cleanup_importer()
void AW_advice(const char *message, AW_Advice_Type type, const char *title, const char *corresponding_help)
Show a message box with an advice for the user.
Definition: AW_advice.cxx:160
void make_node_text_init(GBDATA *gb_main)
Definition: nds.cxx:850
static void export_nds_cb(AW_window *aww, bool do_print)
Definition: NT_extern.cxx:90
void AWT_create_mask_submenu(AW_window_menu_modes *awm, awt_item_type wanted_item_type, AWT_OpenMaskWindowCallback open_mask_window_cb, GBDATA *gb_main)
static void NT_toggle_focus_policy(AW_window *aww)
Definition: NT_extern.cxx:178
void GBK_terminatef(const char *templat,...)
Definition: arb_msg.cxx:477
void AW_POPDOWN(AW_window *window)
Definition: AW_window.cxx:52
void TREE_auto_jump_cb(UNFIXED, TREE_canvas *ntw, AP_tree_jump_reason cause)
void AW_insert_common_property_menu_entries(AW_window_menu_modes *awmm)
Definition: AW_preset.cxx:1445
static void canvas_tree_awar_changed_cb(AW_awar *, bool, TREE_canvas *ntw)
Definition: NT_extern.cxx:906
const char * GBT_existing_tree(GBDATA *gb_main, const char *tree_name)
Definition: adtree.cxx:1010
void NT_create_alignment_vars(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main)
Definition: NT_cb.cxx:98
void GBS_free_hash(GB_HASH *hs)
Definition: adhash.cxx:541
void AWT_registerTreeAwarCallback(AW_awar *awar, const TreeAwarCallback &tacb, bool triggerIfTreeDataChanges)
GB_HASH * GBT_create_species_hash(GBDATA *gb_main)
Definition: adhashtools.cxx:36
static void NT_save_as_cb(AW_window *aww)
Definition: NT_extern.cxx:409
#define EXIT_SUCCESS
Definition: arb_a2ps.c:154
TREE_canvas * NT_get_canvas_by_index(int idx)
Definition: NT_extern.cxx:945
static bool track_group_selection_by_canvas
Definition: NT_extern.cxx:992
#define AWAR_FOOTER_MAX_LEN
void set_window_title(const char *title)
Definition: AW_window.cxx:1066
bool is_valid() const
Definition: Group.hxx:48
AW_window * create_multiprobe_window(AW_root *root, TREE_canvas *canvas)
Definition: MP_main.cxx:101
AW_window * create_primer_design_window(AW_root *root, GBDATA *gb_main)
static AW_window * NT_create_save_as(AW_root *aw_root, const char *base_name)
Definition: NT_extern.cxx:514
const char * getKeyPath() const OVERRIDE
Definition: NT_extern.cxx:711
void GBCMS_shutdown(GBDATA *gbd)
Definition: adcomm.cxx:247
GB_ERROR GB_fix_database(GBDATA *gb_main)
Definition: adTest.cxx:236
void insert_field_admin_menuitems(AW_window *aws, GBDATA *gb_main)
Definition: ui_species.cxx:889
#define AWAR_GROUP
Definition: ad_trees.h:19
char buffer[MESSAGE_BUFFERSIZE]
Definition: seq_search.cxx:34
GBDATA * GB_get_father(GBDATA *gbd)
Definition: arbdb.cxx:1720
void update_option_menu()
static void NT_update_marked_counter(GBDATA *, AW_window *aww)
Definition: NT_extern.cxx:731
GB_ERROR GB_push_transaction(GBDATA *gbd)
Definition: arbdb.cxx:2482
GB_ERROR toggle_toggle()
Definition: AW_awar.cxx:575
void NT_delete_mark_all_cb(AW_window *, TREE_canvas *ntw)
Definition: NT_cb.cxx:31
void AWT_insert_DBcompression_selector(AW_window *aww, const char *awar_name)
Definition: AWT_misc.cxx:62
void AW_init_color_group_defaults(const char *for_program)
Definition: AW_preset.cxx:1113
#define EDIT_YSIZE
bool empty() const
Definition: arb_strarray.h:86
AW_window * NT_create_sort_tree_by_other_tree_window(AW_root *aw_root, TREE_canvas *ntw)
Definition: ad_trees.cxx:1078
AW_window * NT_createMergeSimilarSpeciesWindow(AW_root *aw_root)
void SAI_popup_calculator_window(AW_window *awp, GBDATA *gb_main)
Definition: saicalc.cxx:1138
#define AWAR_MARKED_SPECIES_COUNTER
Definition: NT_extern.cxx:72
AW_awar * add_callback(const RootCallback &cb)
Definition: AW_awar.cxx:234
struct Unfixed_cb_parameter * UNFIXED
Definition: cb_base.h:15
void insert(const char *displayed, const AW_scalar &value)
Definition: AW_select.cxx:380
void AW_create_namesadmin_awars(AW_root *awr, GBDATA *gb_main)
static AW_window * create_mark_by_refentries_window(AW_root *awr, GBDATA *gbmain)
Definition: NT_extern.cxx:847
static void NT_mark_duplicates(UNFIXED, TREE_canvas *ntw)
Definition: NT_extern.cxx:618
void set_tree_style(AP_tree_display_style style, AWT_canvas *ntw)
GB_UNDO_TYPE
Definition: arbdb.h:107
GB_ERROR GDE_init(AW_root *aw_root, AW_default aw_def, GBDATA *gb_main, GDE_get_sequences_cb get_sequences, GDE_format_alignment_cb format_ali, gde_window_type window_type)
Definition: GDE.cxx:486
static bool nt_disconnect_from_db(AW_root *aw_root, GBDATA *&gb_main_ref)
Definition: NT_extern.cxx:264
void GB_change_my_security(GBDATA *gbd, int level)
Definition: arbdb.cxx:1625
const char * read_char_pntr() const
Definition: AW_awar.cxx:171
static char * stream2str(streamSource source, const char *commandOrFile)
Definition: NT_extern.cxx:564
static void merge_from_cb(AW_window *aww, AW_CL cl_awarNamePtr)
Definition: NT_extern.cxx:873
GBS_strstruct * GBS_stropen(long init_size)
Definition: arb_strbuf.cxx:39
static void install_group_changed_callback(const GraphicTreeCallback &gccb)
int create_mode(const char *pixmap, const char *help_text_, AW_active mask, const WindowCallback &cb)
Definition: AW_window.cxx:2958
GB_ERROR GB_optimize(GBDATA *gb_main)
AWT_graphic_tree * NT_generate_tree(AW_root *root, GBDATA *gb_main, AD_map_viewer_cb map_viewer_cb)
AW_window * NT_create_resort_window(AW_root *awr)
Definition: NT_sort.cxx:209
AW_window * NT_create_select_alignment_window(AW_root *awr)
Definition: NT_cb.cxx:119
static AW_root * SINGLETON
Definition: aw_root.hxx:102
void show()
Definition: AW_window.cxx:1658
TreeNode * NT_get_tree_root_of_canvas(TREE_canvas *ntw)
Definition: NT_extern.cxx:825
void GDE_load_menu(AW_window *awm, AW_active, const char *menulabel)
Definition: GDE.cxx:433
WindowCallback makeHelpCallback(const char *helpfile)
Definition: aw_window.hxx:106
GB_ERROR ARB_format_alignment(GBDATA *Main, const char *alignment_name)
Definition: insdel.cxx:1439
static void nt_changesecurity(AW_root *aw_root)
Definition: NT_extern.cxx:83
char * GBT_read_string(GBDATA *gb_container, const char *fieldpath)
Definition: adtools.cxx:267
void popup_group_search_window(AW_window *aw_parent, GBDATA *gb_main)
const char * make_node_text_nds(GBDATA *gb_main, GBDATA *gbd, NDS_Type mode, TreeNode *species, const char *tree_name)
Definition: nds.cxx:854
void popup_tree_admin_window(AW_window *awp)
Definition: ad_trees.cxx:787
#define AWAR_FOOTER
void NT_insert_collapse_submenu(AW_window_menu_modes *awm, TREE_canvas *ntw)
void GEN_create_genes_submenu(AW_window_menu_modes *awm, GBDATA *gb_main, bool for_ARB_NTREE)
Definition: GEN_map.cxx:1475
void create_insertDeleteColumn_variables(AW_root *root, AW_default db1)
Definition: NT_ins_col.cxx:135
AW_window * AWT_create_www_window(AW_root *aw_root, GBDATA *gb_main)
Definition: AWT_www.cxx:194
GBDATA * get_gb_tree() const
Definition: ARB_Tree.hxx:82
size_t get_self_awar_content_length() const OVERRIDE
Definition: NT_extern.cxx:696
static nt_item_type_species_selector item_type_species
Definition: NT_extern.cxx:716
AW_window * NT_create_consense_window(AW_root *aw_root)
Definition: ad_trees.cxx:940
#define AWAR_SAI_GLOBAL
std::set< GBDATA * > DBItemSet
Definition: dbitem_set.h:22
void NT_create_sai_from_pfold(AW_window *aww)
Definition: ad_spec.cxx:116
AW_window * create_refentries_window(AW_root *aw_root, ReferringEntriesHandler *reh, const char *window_id, const char *title, const char *help, client_area_builder build_client_area, const char *action, referred_item_handler action_cb)
Definition: refentries.cxx:253
AW_window * NT_create_select_tree_window(AW_root *awr, const char *awar_tree)
Definition: NT_cb.cxx:60
AW_root * get_root() const
AW_window * NT_create_compareTopologies_window(AW_root *root)
Definition: ad_trees.cxx:628
GBDATA * gb_species_data
Definition: adname.cxx:34
#define AWAR_DB_PATH
Definition: aw_awar_defs.hxx:5
void create_probe_design_variables(AW_root *aw_root, AW_default def, AW_default global)
static AW_window * create_nds_export_window(AW_root *root)
Definition: NT_extern.cxx:123
void awt_create_aww_vars(AW_root *aw_root, AW_default aw_def)
Definition: AWT_www.cxx:54
static int group[MAXN+1]
Definition: ClustalV.cxx:65
void AW_save_properties(AW_window *aw)
Definition: AW_preset.cxx:1452
void update()
Definition: AW_awar.cxx:393
#define MAX_NT_WINDOWS
Definition: NT_local.h:32
void NT_restart(AW_root *aw_root, const char *arb_ntree_args)
Definition: NT_extern.cxx:353
AW_window * NT_create_dna_2_pro_window(AW_root *root)
Definition: ad_transpro.cxx:72
static void create_export_nds_awars(AW_root *awr, AW_default def)
Definition: NT_extern.cxx:157
GB_ERROR GBT_write_tree(GBDATA *gb_main, const char *tree_name, TreeNode *tree)
Definition: adtree.cxx:477
long GBS_memoffset(GBS_strstruct *strstr)
Definition: arb_strbuf.cxx:91
AW_window * create_insertDeleteColumn_window(AW_root *root)
Definition: NT_ins_col.cxx:201
void create_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
Definition: AW_window.cxx:469
static ARB_ERROR mark_referred_species(GBDATA *gb_main, const DBItemSet &referred)
Definition: NT_extern.cxx:836
#define AWAR_NTREE_MAIN_WINDOW_COUNT
Definition: NT_local.h:29
AW_window * AW_create_gc_window(AW_root *aw_root, AW_gc_manager *gcman)
Definition: AW_preset.cxx:1373
void help_text(const char *id)
Definition: AW_window.cxx:113
void touch()
Definition: AW_awar.cxx:210
void NT_rerepair_DB(AW_window *, GBDATA *gb_main)
void mark_duplicates()
Definition: AP_Tree.cxx:1530
void NT_jump_cb(UNFIXED, TREE_canvas *ntw, AP_tree_jump_type jumpType)
AW_window * NT_create_alignment_admin_window(AW_root *root, AW_window *aw_popmedown)
Definition: NT_cb.cxx:109
void GBS_strcat(GBS_strstruct *strstr, const char *ptr)
Definition: arb_strbuf.cxx:108
static void error(const char *msg)
Definition: mkptypes.cxx:96
TREE_canvas * get_canvas(int idx) const
Definition: NT_extern.cxx:937
void init(AW_root *root, const char *wid, const char *windowname, int width, int height)
Definition: AW_window.cxx:2374
void AP_create_consensus_var(AW_root *aw_root, AW_default aw_def)
const char * get_name() const
Definition: Group.hxx:56
#define AWAR_TREE_REFRESH
void AW_create_fileselection_awars(AW_root *awr, const char *awar_base, const char *directories, const char *filter, const char *file_name)
Definition: AW_file.cxx:72
NDS_Type
Definition: nds.h:24
AW_window * NT_create_searchManuallyNames_window(AW_root *aw_root)
fputc('\n', stderr)
AW_window * AW_preset_window(AW_root *root)
Definition: AW_preset.cxx:1920
GBDATA * GBT_next_marked_species(GBDATA *gb_species)
Definition: aditem.cxx:116
void relink_tree(GBDATA *gb_main, void(*relinker)(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash), GB_HASH *organism_hash)
Definition: AP_Tree.cxx:1575
#define AWAR_TREE
#define AWAR_DBBASE
Definition: aw_awar_defs.hxx:4
GB_ULONG GB_time_of_day(void)
Definition: adsocket.cxx:357
void insert_help_topic(const char *labeli, const char *mnemonic, const char *helpText, AW_active mask, const WindowCallback &cb)
Definition: AW_window.cxx:566
AW_window * NT_create_realign_dna_window(AW_root *root)
void NT_count_different_chars(AW_window *, GBDATA *gb_main)
Definition: ad_spec.cxx:30
long GB_read_clients(GBDATA *gbd)
Definition: adcomm.cxx:1682
void NT_import_sequences(AW_window *aww, TREE_canvas *ntw)
Definition: NT_import.cxx:48
#define AWAR_SPECIES_NAME
DBItemSet::const_iterator DBItemSetIter
Definition: dbitem_set.h:23
#define AWAR_AWM_MASK
#define AWAR_SAI_NAME
static AW_window * popup_new_main_window(AW_root *awr, int clone, TREE_canvas **result_ntw)
Definition: NT_extern.cxx:1078
#define AWAR_DB_COMPRESSION
Definition: NT_extern.cxx:406
void AWT_destroy_input_masks()
void GBS_str_cut_tail(GBS_strstruct *strstr, size_t byte_count)
Definition: arb_strbuf.cxx:96
#define AWAR_INFO_BUTTON_TEXT
static void nt_create_all_awars(AW_root *awr)
Definition: NT_extern.cxx:180
AP_tree_display_style get_tree_style() const
#define AWAR_SECURITY_LEVEL
char * read_string() const
Definition: AW_awar.cxx:201
static WindowCallback simple(void(*root_cb)(AW_root *, T), T t)
Definition: rootAsWin.h:47
AW_awar * awar(const char *awar)
Definition: AW_root.cxx:554
GB_ERROR GB_pop_transaction(GBDATA *gbd)
Definition: arbdb.cxx:2512
void insert_sub_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
Definition: AW_window.cxx:642
void NT_create_trackAliChanges_Awars(AW_root *root, AW_default properties)
GB_ERROR GB_save_quick_as(GBDATA *gbd, const char *path)
void NT_resort_data_by_phylogeny(AW_window *, TREE_canvas *ntw)
Definition: NT_sort.cxx:167
static void NT_infomode_cb(UNFIXED, TREE_canvas *canvas, AWT_COMMAND_MODE mode)
Definition: NT_extern.cxx:613
void AWT_insert_DBsaveType_selector(AW_window *aww, const char *awar_name)
Definition: AWT_misc.cxx:39
void NT_set_tree_style(UNFIXED, TREE_canvas *ntw, AP_tree_display_style style)
AW_option_menu_struct * create_option_menu(const char *awar_name, bool fallback2default)
void AW_refresh_fileselection(AW_root *awr, const char *awar_prefix)
Definition: AW_file.cxx:944
void create_nds_vars(AW_root *aw_root, AW_default awdef, GBDATA *gb_main, bool force_reinit)
Definition: nds.cxx:205
static AW_window_menu_modes_opengl * awm
void GB_print_debug_information(struct Unfixed_cb_parameter *, GBDATA *gb_main)
Definition: arbdb.cxx:2802
static void selectedSpeciesChanged_cb(AW_root *awr)
Definition: NT_extern.cxx:162
#define AWAR_EXPORT_NDS_SEPARATOR
Definition: NT_extern.cxx:71
long GBT_count_marked_species(GBDATA *gb_main)
Definition: aditem.cxx:353
long GB_last_saved_clock(GBDATA *gb_main)
nt_item_type_species_selector()
Definition: NT_extern.cxx:690
int get_index() const
void NT_insert_mark_submenus(AW_window_menu_modes *awm, TREE_canvas *ntw, int insert_as_submenu)
void unlink_awars_from_DB(GBDATA *gb_main)
Definition: AW_root.cxx:635
void insert_default_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
#define nt_assert(cond)
Definition: NT_local.h:27
void NT_create_multifurcate_tree_awars(AW_root *aw_root, AW_default props)
Definition: ad_trees.cxx:1097
AW_window * SQ_create_seq_quality_window(AW_root *aw_root, GBDATA *gb_main)
Definition: SQ_main.cxx:225
void create_trees_var(AW_root *aw_root, AW_default aw_def)
Definition: ad_trees.cxx:196
static AW_window * NT_create_merge_from_window(AW_root *awr)
Definition: NT_extern.cxx:876
static void merge_into_cb(AW_window *aww, AW_CL cl_awarNamePtr)
Definition: NT_extern.cxx:874
GB_ERROR GB_undo(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT
Definition: adindex.cxx:752
void removeTrailingNewlines(char *str)
Definition: NT_extern.cxx:596
AW_window * NT_create_species_join_window(AW_root *root)
Definition: NT_join.cxx:143
void GBS_chrcat(GBS_strstruct *strstr, char ch)
Definition: arb_strbuf.cxx:119
static void group_awar_changed_cb(AW_root *awr)
Definition: NT_extern.cxx:1014
void NT_suggestValidNames(AW_window *)
int aw_question(const char *unique_id, const char *question, const char *buttons, bool sameSizeButtons, const char *helpfile)
Definition: AW_question.cxx:26
void set_info_area_height(int height)
Definition: AW_window.cxx:793
AWT_graphic * gfx
Definition: awt_canvas.hxx:339
AW_window * AWT_create_nds_window(AW_root *aw_root, GBDATA *gb_main)
Definition: nds.cxx:500
AW_window * NT_create_colstat_2_gnuplot_window(AW_root *root)
AW_DB_selection * awt_create_TREE_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname, bool fallback2default)
fputs(TRACE_PREFIX, stderr)
#define AWAR_AW_FOCUS_FOLLOWS_MOUSE
#define AWAR_TOPAREA_SAIS
Definition: NT_local.h:30
TREE_canvas * NT_create_main_window(AW_root *aw_root)
Definition: NT_extern.cxx:1828
AW_window * create_colorize_items_window(AW_root *aw_root, GBDATA *gb_main, ItemSelector &sel)
Definition: db_query.cxx:1959
#define EDIT_XSIZE
const Group & get_selected_group() const
void set_mode(AWT_COMMAND_MODE mo)
Definition: awt_canvas.hxx:382
void set_bottom_area_height(int height)
Definition: AW_window.cxx:798
static void NT_undo_cb(AW_window *, GB_UNDO_TYPE undo_type, TREE_canvas *ntw)
Definition: NT_extern.cxx:553
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
Definition: AW_root.cxx:580
GB_ULONG GB_last_saved_time(GBDATA *gb_main)
void NT_resort_tree_cb(UNFIXED, TREE_canvas *ntw, TreeOrder order)
void request_save_and_zoom_reset()
Definition: awt_canvas.hxx:368
void auto_space(int xspace, int yspace)
Definition: AW_at.cxx:259
AW_window * AW_create_namesadmin_window(AW_root *root, GBDATA *gb_main)
xml element
void NT_activate_configMarkers_display(TREE_canvas *ntw)
Definition: NT_edconf.cxx:255
GB_ERROR close(GB_ERROR error)
Definition: arbdbpp.cxx:32
void AW_help_entry_pressed(AW_window *aww)
Definition: AW_root.cxx:37
char * GBK_singlequote(const char *arg)
Definition: arb_msg.cxx:547
void GB_write_flag(GBDATA *gbd, long flag)
Definition: arbdb.cxx:2761
static void NT_justify_branch_lenghs(UNFIXED, TREE_canvas *ntw)
Definition: NT_extern.cxx:630
#define AWAR_ERROR_MESSAGES
long AW_CL
Definition: cb.h:21
GBDATA * GEN_find_origin_organism(GBDATA *gb_pseudo, const GB_HASH *organism_hash)
Definition: adGene.cxx:653
const char * get_self_awar() const OVERRIDE
Definition: NT_extern.cxx:693
char * GBS_mempntr(GBS_strstruct *strstr)
Definition: arb_strbuf.cxx:86
static void NT_open_mask_window(AW_window *aww, int id, GBDATA *gb_main)
Definition: NT_extern.cxx:718
void request_structure_update()
Definition: awt_canvas.hxx:365
#define OVERRIDE
Definition: cxxforward.h:93
AW_gc_manager * gc_manager
Definition: awt_canvas.hxx:341
void NT_deleteValidNames(AW_window *)
AW_window * AP_create_con_expert_window(AW_root *aw_root)
AW_window * GEN_create_first_map(AW_root *aw_root, GBDATA *gb_main)
Definition: GEN_map.cxx:1577
AP_tree_display_style
Definition: TreeDisplay.hxx:79
void justify_branch_lenghs(GBDATA *gb_main)
Definition: AP_Tree.cxx:1559
#define AWAR_DB_COMMENT
AP_tree * get_root_node()
void NT_importValidNames(AW_window *)
void subtitle(const char *stitle)
Definition: arb_progress.h:263
#define CHANGE_KEY_PATH
Definition: arbdbt.h:86
void AWT_popup_print_window(AW_window *parent_win, AWT_canvas *scr)
Definition: AWT_canio.cxx:865
GB_ERROR GB_textprint(const char *path) __ATTR__USERESULT
Definition: adsocket.cxx:363
void GBK_dump_backtrace(FILE *out, const char *message)
Definition: arb_msg.cxx:428
static AW_window * NT_create_merge_to_window(AW_root *awr)
Definition: NT_extern.cxx:884
ItemSelector & SPECIES_get_selector()
Definition: species.cxx:139
static void NT_alltree_remove_leafs(AW_window *, GBT_TreeRemoveType mode, GBDATA *gb_main)
Definition: NT_extern.cxx:748
char * GBS_strclose(GBS_strstruct *strstr)
Definition: arb_strbuf.cxx:69
int get_count() const
Definition: NT_extern.cxx:935
void close_sub_menu()
Definition: AW_window.cxx:483
void GBT_get_tree_names(ConstStrArray &names, GBDATA *gb_main, bool sorted)
Definition: adtree.cxx:1136
static void NT_save_quick_cb(AW_window *aww)
Definition: NT_extern.cxx:382
static AW_window * create_colorize_species_window(AW_root *aw_root)
Definition: NT_extern.cxx:727
#define AWAR_EXPORT_NDS
Definition: NT_extern.cxx:70
GB_ERROR GBT_compress_sequence_tree2(GBDATA *gbd, const char *tree_name, const char *ali_name) __ATTR__USERESULT
Definition: adseqcompr.cxx:889
AW_window * TREE_create_settings_window(AW_root *aw_root)
void NT_createValidNamesAwars(AW_root *aw_root, AW_default aw_def)
static __ATTR__NORETURN void really_exit(int exitcode, bool kill_my_clients)
Definition: NT_extern.cxx:337
void aw_message(const char *msg)
Definition: AW_status.cxx:932
void NT_start(const char *arb_ntree_args, bool restart_with_new_ARB_PID)
Definition: NT_extern.cxx:331
void insert_macro_menu_entry(AW_window *awm, bool prepend_separator)
Definition: macro_gui.cxx:171
AW_root * get_root()
Definition: aw_window.hxx:348
long GB_read_clock(GBDATA *gbd)
Definition: arbdb.cxx:1712
AW_window * AP_create_pos_var_pars_window(AW_root *root)
static void nt_start_2nd_arb(AW_window *aww, bool quit)
Definition: NT_extern.cxx:362
void GB_split_full_path(const char *fullpath, char **res_dir, char **res_fullname, char **res_name_only, char **res_suffix)
Definition: adsocket.cxx:1234
AW_window * NT_createConcatenationWindow(AW_root *aw_root)
void shutdown_macro_recording(AW_root *aw_root)
Definition: trackers.cxx:470
#define NULp
Definition: cxxforward.h:97
GBDATA * gb_main
Definition: NT_local.h:37
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
Definition: aditem.cxx:139
GB_HASH * GBT_create_organism_hash(GBDATA *gb_main)
Definition: adhashtools.cxx:48
void AWT_system_in_console_cb(AW_window *, const char *command, XCMD_TYPE exectype)
Definition: AWT_misc.cxx:90
void NT_select_bottom_tree(AW_window *aww, const char *awar_tree)
Definition: NT_cb.cxx:92
streamSource
Definition: NT_extern.cxx:563
#define AWAR_NTREE_TITLE_MODE
Definition: NT_extern.cxx:73
#define __ATTR__NORETURN
Definition: attributes.h:56
void create_refentries_awars(AW_root *aw_root, AW_default aw_def)
Definition: refentries.cxx:223
GB_ERROR write_string(const char *aw_string)
static char * command
Definition: arb_a2ps.c:319
static AW_window * NT_create_save_quick_as_window(AW_root *aw_root, const char *base_name)
Definition: NT_extern.cxx:425
#define offset(field)
Definition: GLwDrawA.c:73
void sep______________()
Definition: AW_window.cxx:750
static TREE_canvas_registry & instance()
Definition: NT_extern.cxx:923
void NT_scale_tree(UNFIXED, TREE_canvas *ntw)
const char * local_id(const char *id) const
Definition: AW_window.cxx:744
void GBT_mark_all(GBDATA *gb_main, int flag)
Definition: aditem.cxx:295
GB_ERROR GB_request_undo_type(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT_TODO
Definition: adindex.cxx:718
void NT_fill_canvas_selection_list(class AW_selection_list *sellst, TREE_canvas *to_skip)
Definition: NT_extern.cxx:966
GB_transaction ta(gb_var)
void callback(const WindowCallback &cb)
Definition: AW_window.cxx:130
void destroy(TreeNode *that)
Definition: TreeNode.h:559
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
Definition: arbdb.cxx:898
#define AWAR_DB_TYPE
Definition: NT_extern.cxx:405
#define AWAR_EXPERT
int get_at_yposition() const
Definition: AW_at.cxx:300
AW_window * NT_create_compare_taxonomy_window(AW_root *aw_root, TREE_canvas *ntw)
GBDATA * gb_main
Definition: adname.cxx:33
static void nt_run(const char *command)
Definition: NT_extern.cxx:321
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
Definition: AW_root.cxx:570
GB_ERROR GBT_check_data(GBDATA *Main, const char *alignment_name)
Definition: adali.cxx:217
void NT_exit(AW_window *aws, int exitcode)
Definition: NT_extern.cxx:344
void hide_or_notify(const char *error)
Definition: AW_window.cxx:1817
AW_window * NT_create_branch_analysis_window(AW_root *aw_root, TREE_canvas *ntw)
void NT_deselect_group(AW_root *awr)
Definition: NT_extern.cxx:988
bool GEN_is_genome_db(GBDATA *gb_main, int default_value)
Definition: adGene.cxx:20
void shadow_width(int shadow_thickness)
Definition: AW_window.cxx:1075
AW_window * create_probe_match_window(AW_root *root, GBDATA *gb_main)
AW_window * NT_create_trackAliChanges_window(AW_root *root)
void AWT_openURL(AW_window *aww, const char *url)
Definition: AWT_www.cxx:268
void AWT_console(AW_window *)
Definition: AWT_misc.cxx:87
bool GEN_is_pseudo_gene_species(GBDATA *gb_species)
Definition: adGene.cxx:568
static void relink_pseudo_species_to_organisms(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash)
Definition: NT_extern.cxx:649
void NT_configure_treeShader(void)
void at_newline()
Definition: AW_at.cxx:119
static void merge_from_to(AW_root *awr, const char *db_awar_name, bool merge_to)
Definition: NT_extern.cxx:858
AW_awar * get_awar_tree() const
void TREE_create_awars(AW_root *aw_root, AW_default db)
~nt_item_type_species_selector() OVERRIDE
Definition: NT_extern.cxx:691
void at_attach_to(bool attach_x, bool attach_y, int xoff, int yoff)
Definition: AW_at.cxx:187
#define AW_ROOT_DEFAULT
Definition: aw_base.hxx:106
void NT_reset_branchlengths(UNFIXED, TREE_canvas *ntw)
GB_ERROR write_int(long aw_int)
static void NT_toggle_expert_mode(AW_window *aww)
Definition: NT_extern.cxx:177
void NT_reset_lzoom_cb(UNFIXED, TREE_canvas *ntw)
GB_ERROR AWT_initialize_input_mask(AW_root *root, GBDATA *gb_main, const awt_item_type_selector *sel, const char *mask_name, bool localMask)
AW_window * create_probe_admin_window(AW_root *root, GBDATA *gb_main)
void create_group_search_awars(AW_root *aw_root, AW_default props)
GBDATA * GB_entry(GBDATA *father, const char *key)
Definition: adquery.cxx:334
void inc_and_check_user_abort(GB_ERROR &error)
Definition: arb_progress.h:274
void TREE_install_update_callbacks(TREE_canvas *ntw)
GB_ERROR GB_save_quick(GBDATA *gbd, const char *refpath)
Definition: Group.hxx:20
void aw_message_if(GB_ERROR error)
Definition: aw_msg.hxx:21
Definition: output.h:28
AW_window * create_tree_window(AW_root *aw_root, AWT_graphic *awd)
char * GBS_global_string_copy(const char *templat,...)
Definition: arb_msg.cxx:195
void GB_close(GBDATA *gbd)
Definition: arbdb.cxx:649
NT_global GLOBAL
Definition: NT_main.cxx:44
GBDATA * gb_main
Definition: awt_canvas.hxx:336
static void NT_pseudo_species_to_organism(AW_window *, TREE_canvas *ntw)
Definition: NT_extern.cxx:666
void create_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, const char *color=NULp)
Definition: AW_button.cxx:446
#define UNCOVERED()
Definition: arb_assert.h:380
void NT_create_resort_awars(AW_root *awr, AW_default aw_def)
Definition: NT_sort.cxx:199
void AWT_system_cb(AW_window *, const char *command)
Definition: AWT_misc.cxx:84
void NT_reload_tree_event(AW_root *, TREE_canvas *ntw, bool unzoom_and_expose)
GBDATA * GBT_get_species_data(GBDATA *gb_main)
Definition: aditem.cxx:105
GB_write_int const char s
Definition: AW_awar.cxx:156