ARB
ED4_base.cxx
Go to the documentation of this file.
1 #include <arbdbt.h>
2 #include <ad_cb.h>
3 
4 #include <aw_preset.hxx>
5 #include <aw_awar.hxx>
6 #include <aw_msg.hxx>
7 #include <aw_root.hxx>
8 #include <aw_question.hxx>
9 
10 #include <arb_progress.h>
11 #include <arb_strbuf.h>
12 
13 #include <ed4_extern.hxx>
14 
15 #include "ed4_class.hxx"
16 #include "ed4_awars.hxx"
17 #include "ed4_edit_string.hxx"
18 #include "ed4_list.hxx"
19 
21  if (!parent) return NULp;
23  if (!group) return NULp;
24  if (group->has_property(PROP_IS_FOLDED)) return group->to_group_manager();
25  return group->is_in_folded_group();
26 }
27 
29  e4_assert(0);
30  // this happens if you add a new species_pointer to a ED4_base-derived type
31  // without defining changed_by_database for this type
32 }
33 
35 
37  if (GB_read_clock(GLOBAL_gb_main) > curr_timestamp) { // only if timer_cb occurred after last change by EDIT4
38 
39  // test if alignment length has changed:
40  {
42  e4_assert(gb_alignment);
43  GBDATA *gb_alignment_len = GB_search(gb_alignment, "alignment_len", GB_FIND);
44  int alignment_length = GB_read_int(gb_alignment_len);
45 
46  if (MAXSEQUENCECHARACTERLENGTH!=alignment_length) {
48  }
49  }
50 
51  GBDATA *gb_seq = get_species_pointer();
52  int type = GB_read_type(gb_seq);
53 
54  if (type==GB_STRING) {
55  char *data = (char*)GB_read_old_value();
56  if (data) {
57  int data_len = GB_read_old_size();
58  e4_assert(data_len >= 0);
59  char *dup_data = new char[data_len+1];
60 
61  memcpy(dup_data, data, data_len);
62  dup_data[data_len] = 0;
63 
64 #if defined(DEBUG) && 0
65  char *n = GB_read_string(gb_seq);
66  e4_assert(strcmp(n, dup_data)!=0); // not really changed
67  delete n;
68 #endif
69 
70  ED4_species_manager *spman = get_parent(LEV_SPECIES)->to_species_manager();
71  spman->do_callbacks();
72 
74  ED4_multi_species_manager *multiman = get_parent(LEV_MULTI_SPECIES)->to_multi_species_manager();
75  multiman->update_bases_and_rebuild_consensi(dup_data, data_len, spman, ED4_U_UP);
77  }
78 
79  delete [] dup_data;
80  }
81  else { // sth else changed (e.g. protection)
83  }
84  }
85  }
86 }
87 
89  my_species_pointer.notify_deleted();
90 }
91 
94 }
95 
98  parent->Delete();
99 }
100 
102 #if defined(DEBUG)
103  printf("ED4_sequence_terminal::deleted_from_database (%p)\n", this);
104 #endif // DEBUG
105 
107 
108  bool was_consensus_relevant = has_property(PROP_CONSENSUS_RELEVANT);
109 
111 
112  if (was_consensus_relevant) {
113  const char *data = (const char*)GB_read_old_value();
114  int data_len = GB_read_old_size();
115 
116  ED4_multi_species_manager *multi_species_man = get_parent(LEV_MULTI_SPECIES)->to_multi_species_manager();
117 
118  multi_species_man->update_bases(data, data_len, NULp);
119  multi_species_man->rebuild_consensi(get_parent(LEV_SPECIES)->to_species_manager(), ED4_U_UP);
120  }
121 
122  parent->Delete();
123 }
124 
126  if (is_species_manager()) {
127  ED4_species_manager *species_man = to_species_manager();
128  ED4_multi_species_manager *multi_man = species_man->parent->to_multi_species_manager();
129 
130  multi_man->remove_member(species_man);
132  multi_man->update_consensus(multi_man, NULp, species_man);
133  multi_man->rebuild_consensi(species_man, ED4_U_UP);
135 
136  request_resize();
137  // parent = 0;
138  // delete this; // @@@ crashes when removing callback deleted_from_database()
139  }
140  else {
141  e4_assert(0);
142  }
143 }
144 
145 static void sequence_changed_cb(GBDATA *gb_seq, ED4_base *base, GB_CB_TYPE gbtype) {
146  if (base->get_species_pointer()!=gb_seq) {
147  e4_assert(0);
148  aw_message("Illegal callback (ED4_sequence_changed_cb())");
149  }
150 
151  if (gbtype&GB_CB_DELETE) {
152  e4_assert(gbtype==GB_CB_DELETE);
153  base->deleted_from_database();
154  }
155 
156  if (gbtype&GB_CB_CHANGED) {
157  base->changed_by_database();
158  }
159 
160  if (gbtype&GB_CB_SON_CREATED) {
161  // @@@ New son for database-member was created ... what may we do now?
162  }
163 }
164 
166  species_pointer = NULp;
167 }
169  e4_assert(!species_pointer); // has to be destroyed before
170 }
171 
172 void ED4_species_pointer::addCallback(ED4_base *base) {
174  GB_add_callback(species_pointer, GB_CB_CHANGED_OR_DELETED, makeDatabaseCallback(sequence_changed_cb, base));
175 }
176 void ED4_species_pointer::removeCallback(ED4_base *base) {
178  GB_remove_callback(species_pointer, GB_CB_CHANGED_OR_DELETED, makeDatabaseCallback(sequence_changed_cb, base));
179 }
180 
182  if (species_pointer) removeCallback(base);
183  species_pointer = gbd;
184  if (species_pointer) addCallback(base);
185 }
186 
187 // -----------------
188 // ED4_base
189 
190 inline bool ranges_overlap(int p1, int p2, int r1, int r2) {
191  // return true if ranges p1..p2 and r1..r2 overlap
192  e4_assert(p1 <= p2);
193  e4_assert(r1 <= r2);
194 
195  return !((r2 <= p1) || (p2 <= r1)); // "exactly adjacent" means "not overlapping"
196 }
197 
198 inline bool range_contained_in(int p1, int p2, int r1, int r2) {
199  // return true if range p1..p2 is contained in range r1..r2
200  e4_assert(p1 <= p2);
201  e4_assert(r1 <= r2);
202 
203  return p1 >= r1 && p2 <= r2;
204 }
205 
206 bool ED4_window::partly_shows(int x1, int y1, int x2, int y2) const {
207  // return true if rectangle x1/y1/x2/y2 overlaps with clipped screen
208  e4_assert(x1 <= x2);
209  e4_assert(y1 <= y2);
210 
213 
214  return visible;
215 }
216 
217 bool ED4_window::completely_shows(int x1, int y1, int x2, int y2) const {
218  // return true if rectangle x1/y1/x2/y2 is contained in clipped screen
219  e4_assert(x1 <= x2);
220  e4_assert(y1 <= y2);
221 
224 
225  return visible;
226 }
227 
228 char *ED4_base::resolve_pointer_to_string_copy(int *) const { return NULp; }
229 const char *ED4_base::resolve_pointer_to_char_pntr(int *) const { return NULp; }
230 
232  GB_CSTR group_name,
233  int group_depth,
234  bool is_folded,
235  ED4_reference_terminals& refterms,
236  ED4_multi_species_manager*& multi_species_manager)
237 {
238  char namebuffer[NAME_BUFFERSIZE];
239 
240  sprintf(namebuffer, "Group_Manager.%ld", ED4_counter); // create new group manager
241  ED4_group_manager *group_manager = new ED4_group_manager(namebuffer, 0, 0, group_parent);
242  group_parent->append_member(group_manager);
243 
244  sprintf(namebuffer, "Bracket_Terminal.%ld", ED4_counter);
245  ED4_bracket_terminal *bracket_terminal = new ED4_bracket_terminal(namebuffer, BRACKET_WIDTH, 0, group_manager);
246  group_manager->append_member(bracket_terminal);
247 
248  sprintf(namebuffer, "MultiSpecies_Manager.%ld", ED4_counter); // create new multi_species_manager
249  multi_species_manager = new ED4_multi_species_manager(namebuffer, 0, 0, group_manager);
250  group_manager->append_member(multi_species_manager);
251 
252  if (is_folded) group_manager->set_property(PROP_IS_FOLDED);
253  group_manager->set_property(PROP_MOVABLE);
254 
255  multi_species_manager->set_property(PROP_IS_HANDLE);
256  bracket_terminal ->set_property(PROP_IS_HANDLE);
257 
258  {
259  sprintf(namebuffer, "Group_Spacer_Terminal_Beg.%ld", ED4_counter); // spacer at beginning of group
260  ED4_spacer_terminal *group_spacer_terminal = new ED4_spacer_terminal(namebuffer, false, 10, SPACER_HEIGHT, multi_species_manager);
261  multi_species_manager->append_member(group_spacer_terminal);
262  }
263 
264  {
265  sprintf(namebuffer, "Consensus_Manager.%ld", ED4_counter);
266  ED4_species_manager *species_manager = new ED4_species_manager(ED4_SP_CONSENSUS, namebuffer, 0, 0, multi_species_manager);
267  species_manager->set_property(PROP_MOVABLE);
268  multi_species_manager->append_member(species_manager);
269 
270  {
271  ED4_species_name_terminal *species_name_terminal = new ED4_species_name_terminal(group_name, MAXNAME_WIDTH - group_depth*BRACKET_WIDTH, TERMINAL_HEIGHT, species_manager);
272  species_name_terminal->set_property((ED4_properties) (PROP_SELECTABLE | PROP_DRAGABLE | PROP_IS_HANDLE));
273  species_name_terminal->set_links(NULp, refterms.sequence());
274  species_manager->append_member(species_name_terminal);
275  }
276 
277 
278  {
279  // add flag header terminal
280  sprintf(namebuffer, "Flag_Header_Terminal.%ld", ED4_counter);
281  ED4_flag_header_terminal *flag_header_terminal = new ED4_flag_header_terminal(namebuffer, 100, TERMINAL_HEIGHT, species_manager);
282  flag_header_terminal->set_links(NULp, refterms.sequence());
283  species_manager->append_member(flag_header_terminal);
284  }
285 
286  {
287  sprintf(namebuffer, "Consensus_Seq_Manager.%ld", ED4_counter);
288  ED4_sequence_manager *sequence_manager = new ED4_sequence_manager(namebuffer, 0, 0, species_manager);
289  sequence_manager->set_property(PROP_MOVABLE);
290  species_manager->append_member(sequence_manager);
291 
292  {
293  ED4_sequence_info_terminal *seq_info_term = new ED4_sequence_info_terminal("CONS", SEQUENCE_INFO_WIDTH, TERMINAL_HEIGHT, sequence_manager); // group info
294  seq_info_term->set_both_links(refterms.sequence_info());
295  seq_info_term->set_property((ED4_properties) (PROP_SELECTABLE | PROP_DRAGABLE | PROP_IS_HANDLE));
296  sequence_manager->append_member(seq_info_term);
297  }
298 
299  {
300  sprintf(namebuffer, "Consensus_Seq_Terminal.%ld", ED4_counter);
301  ED4_sequence_terminal *sequence_terminal = new ED4_consensus_sequence_terminal(namebuffer, 0, TERMINAL_HEIGHT, sequence_manager);
302  sequence_terminal->set_property(PROP_CURSOR_ALLOWED);
303  sequence_terminal->set_both_links(refterms.sequence());
304  sequence_manager->append_member(sequence_terminal);
305  }
306  }
307  }
308 
309  bracket_terminal->set_links(NULp, multi_species_manager);
310 
311  return group_manager;
312 }
313 
315  char namebuffer[NAME_BUFFERSIZE];
316 
317  sprintf(namebuffer, "Group_Spacer_Terminal_End.%ld", ED4_counter); // spacer at end of group
318  ED4_spacer_terminal *group_spacer_terminal = new ED4_spacer_terminal(namebuffer, false, 10, SPACER_HEIGHT, multi_species_manager);
319  multi_species_manager->append_member(group_spacer_terminal);
320 }
321 
323  const char SEPARATOR = '\1';
324  if (is_manager()) {
325  ED4_container *container = to_manager();
326  if (is_group_manager()) {
327  buffer.put(SEPARATOR);
328  buffer.put(has_property(PROP_IS_FOLDED) ? 'F' : 'G');
329 
330  for (int writeConsensus = 1; writeConsensus>=0; --writeConsensus) {
331  for (int i=0; i<container->members(); ++i) {
332  ED4_base *child = container->member(i);
333  bool isConsensus = child->is_consensus_manager();
334 
335  if (bool(writeConsensus) == isConsensus) {
336  child->generate_configuration_string(buffer);
337  }
338  }
339  }
340 
341  buffer.put(SEPARATOR);
342  buffer.put('E');
343  }
344  else {
345  for (int i=0; i<container->members(); i++) {
346  container->member(i)->generate_configuration_string(buffer);
347  }
348  }
349  }
350  else {
351  if (is_species_name_terminal() && !((ED4_terminal*)this)->tflag.deleted) {
352  ED4_species_type species_type = get_species_type();
353  switch (species_type) {
354  case ED4_SP_CONSENSUS: {
355  // write group name (control info already written inside manager-branch above)
356  const char *paren = strchr(id, '(');
357  if (paren) {
358  int namelen = std::max(int(paren-id)-1, 0); // skip starting at " (" behind consensus name
359 
360  if (namelen>0) buffer.ncat(id, namelen);
361  else buffer.cat("<unnamed>");
362  }
363  else buffer.cat(id);
364  break;
365  }
366  case ED4_SP_SAI:
367  buffer.put(SEPARATOR);
368  buffer.put('S');
370  break;
371  case ED4_SP_SPECIES:
372  buffer.put(SEPARATOR);
373  buffer.put('L');
375  break;
376  case ED4_SP_NONE:
377  e4_assert(0);
378  break;
379  }
380  }
381  }
382 }
383 
384 
386  // executes 'cb' for every element in hierarchy
387  return cb(this);
388 }
389 
391  ARB_ERROR error = cb(this);
392  if (!error) {
393  for (int i=0; i<members() && !error; i++) {
394  error = member(i)->route_down_hierarchy(cb);
395  }
396  }
397  return error;
398 }
399 
400 ED4_base *ED4_manager::find_first_that(ED4_level level, const ED4_basePredicate& fulfills_predicate) {
401  if ((spec.level&level) && fulfills_predicate(this)) {
402  return this;
403  }
404 
405  for (int i=0; i<members(); i++) {
406  ED4_base *child = member(i);
407 
408  if (child->is_manager()) {
409  ED4_base *found = child->to_manager()->find_first_that(level, fulfills_predicate);
410  if (found) {
411  return found;
412  }
413  }
414  else if ((child->spec.level&level) && fulfills_predicate(child)) {
415  return child;
416  }
417  }
418 
419  return NULp;
420 }
421 
423  int cntr = 0;
424  ED4_base *temp_parent = parent;
425  while (temp_parent->parent && !(temp_parent->is_area_manager())) {
426  if (temp_parent->is_group_manager()) cntr++;
427  temp_parent = temp_parent->parent;
428  }
429  return cntr; // don't count our own group
430 }
431 
433  // if (spec.level & level) return this; // old behavior (unwanted)
434  e4_assert(!(spec.level & level)); // if this fails, the old behavior was used => behavior of this call did change!
435 
436  for (int i=0; i<members(); i++) { // first check children
437  if (member(i)->spec.level & level) {
438  return member(i);
439  }
440  }
441 
442  for (int i=0; i<members(); i++) {
443  if (member(i)->is_manager()) {
444  ED4_base *result = member(i)->to_manager()->search_spec_child_rek(level);
445  if (result) return result;
446  }
447  }
448 
449  return NULp;
450 }
451 
453  ED4_terminal *terminal = NULp;
454 
455  if (parent) {
456  terminal = parent->get_first_terminal(index+1);
457  if (!terminal) {
458  terminal = parent->get_next_terminal();
459  }
460  }
461 
462  return terminal;
463 }
464 
466  ED4_terminal *terminal = NULp;
467 
468  if (parent) {
469  if (index) {
470  terminal = parent->get_last_terminal(index-1);
471  }
472  if (!terminal) {
473  terminal = parent->get_prev_terminal();
474  }
475  }
476 
477  return terminal;
478 }
479 
480 
482  // return true if 'parent' is a parent of this
483 
484  if (is_manager()) {
485  if (this == static_cast<ED4_base*>(Parent)) {
486  return true;
487  }
488  }
489 
490  if (!parent) return false;
491  return parent->has_parent(Parent);
492 }
493 
494 
496  ED4_base *area_base = get_parent(LEV_AREA);
498 
499  if (area_base) {
500  ED4_area_manager *area_man = area_base->to_area_manager();
501 
502  if (area_man == ED4_ROOT->top_area_man) result = ED4_A_TOP_AREA;
503  else if (area_man == ED4_ROOT->middle_area_man) result = ED4_A_MIDDLE_AREA;
504 
505  if (result != ED4_A_ERROR && multi_species_manager) {
506  *multi_species_manager = area_man->get_multi_species_manager();
507  }
508  }
509  return result;
510 }
511 
512 
514  ED4_species_name_terminal *consensus_name_terminal = get_consensus_name_terminal();
515  if (consensus_name_terminal) { // top managers dont show consensus
517 
518  const char *cntid = consensus_name_terminal->id;
519  char *name = ARB_calloc<char>(strlen(cntid)+10);
520 
521  int i;
522  for (i=0; cntid[i] && cntid[i] != '('; i++) {
523  name[i] = cntid[i];
524  }
525  if (i>0 && cntid[i-1] == ' ') --i; // skip terminal space
526  sprintf(name+i, " (%d)", species);
527 
528  freeset(consensus_name_terminal->id, name);
529 
530  consensus_name_terminal->request_refresh();
531  }
532 }
533 
534 PosRange ED4_abstract_sequence_terminal::pixel2index(PosRange pixel_range) {
535  int length_of_char = ED4_ROOT->font_group.get_width(ED4_G_SEQUENCES);
536 
537  int left_index = int((pixel_range.start()-CHARACTEROFFSET)/length_of_char);
538  int right_index = int((pixel_range.end() -CHARACTEROFFSET)/length_of_char) + 1;
539 
540  return PosRange(left_index, std::min(right_index, MAXSEQUENCECHARACTERLENGTH-1));
541 }
542 
544  AW_pos x, y;
545  calc_world_coords(&x, &y);
547 
548  int rel_left_x = int(rect->l-x);
549  int rel_right_x = int(rect->r-x);
550 
551  return pixel2index(PosRange(rel_left_x, rel_right_x)); // changed behavior: clip at MAXSEQUENCECHARACTERLENGTH-1 (was MAXSEQUENCECHARACTERLENGTH)
552 }
553 
555  AW_pos x, y;
556  calc_world_coords(&x, &y);
557 
558  const AW_screen_area& clip_rect = current_device()->get_cliprect();
559 
560  int scroll_shift = current_ed4w()->coords.window_left_clip_point-x; // Verschiebung der Sequenz (durch Scrollen) == slider Position
561  int rel_left_x = int(clip_rect.l - x + scroll_shift); // Abstand vom linken Terminalrand zum Anfang des Clipping rectangles + scroll_shift
562  int rel_right_x = int(clip_rect.r - x + scroll_shift);
563 
564  return pixel2index(PosRange(rel_left_x, rel_right_x));
565 }
566 
568  // creates consensus
569  // is called by group manager
570 
571  ED4_abstract_group_manager *group_manager_for_child = upper_group_manager;
572 
574  ED4_abstract_group_manager *group_manager = to_abstract_group_manager();
575 
576  group_manager->table().init(MAXSEQUENCECHARACTERLENGTH);
577  group_manager_for_child = group_manager;
578 
579  if (progress) progress->inc();
580  }
581 
582  for (int i=0; i<members(); i++) {
583  ED4_base *child = member(i);
584 
585  if (child->is_species_manager()) {
586  ED4_species_manager *species_manager = child->to_species_manager();
587  const ED4_terminal *sequence_data_terminal = species_manager->get_consensus_relevant_terminal();
588 
589  if (sequence_data_terminal) {
590  int db_pointer_len;
591  char *db_pointer = sequence_data_terminal->resolve_pointer_to_string_copy(&db_pointer_len);
592  group_manager_for_child->table().add(db_pointer, db_pointer_len);
593  e4_assert(!group_manager_for_child->table().empty());
594  free(db_pointer);
595 
596  if (progress) progress->inc();
597  }
598  }
599  else if (child->is_group_manager()) {
600  ED4_group_manager *sub_group = child->to_group_manager();
601 
602  sub_group->create_consensus(sub_group, progress);
603  e4_assert(sub_group!=upper_group_manager);
604  upper_group_manager->table().add(sub_group->table());
605 #if defined(TEST_CHAR_TABLE_INTEGRITY)
606  if (!sub_group->table().empty() && !sub_group->table().is_ignored()) {
607  e4_assert(!upper_group_manager->table().empty());
608  }
609 #endif
610  }
611  else if (child->is_manager()) {
612  child->to_manager()->create_consensus(group_manager_for_child, progress);
613  }
614  }
615 }
616 
618  int i;
619 
620  if (is_terminal()) {
622  return this->to_terminal();
623  }
624  return NULp;
625  }
626 
627  const ED4_manager *manager = this->to_manager();
628  const ED4_terminal *relevant_terminal = NULp;
629 
630  int members = manager->members();
631 
632  for (i=0; !relevant_terminal && i<members; ++i) {
633  ED4_base *child = manager->member(i);
634  relevant_terminal = child->get_consensus_relevant_terminal();
635  }
636 
637 #if defined(DEBUG)
638  if (relevant_terminal) {
639  for (; i<members; ++i) {
640  ED4_base *child = manager->member(i);
641  e4_assert(!child->get_consensus_relevant_terminal()); // there shall be only 1 consensus relevant terminal, since much code assumes that
642  }
643  }
644 #endif // DEBUG
645 
646  return relevant_terminal;
647 }
648 
649 int ED4_multi_species_manager::count_visible_children() { // is called by a multi_species_manager
650  int counter = 0;
651 
652  for (int i=0; i<members(); i++) {
653  ED4_base *child = member(i);
654  if (child->is_species_manager()) {
655  counter ++;
656  }
657  else if (child->is_group_manager()) {
658  ED4_group_manager *group_manager = child->to_group_manager();
659  if (group_manager->has_property(PROP_IS_FOLDED)) {
660  counter ++;
661  }
662  else {
663  ED4_multi_species_manager *multi_species_manager = group_manager->get_multi_species_manager();
664  counter += multi_species_manager->count_visible_children();
665  }
666  }
667  }
668  return counter;
669 }
670 
671 
672 
674  e4_assert(parent);
675  parent->remove_member(this);
676 }
677 
679  char *name = NULp;
680  ED4_species_manager *species_man = get_parent(LEV_SPECIES)->to_species_manager();
681  if (species_man) {
682  ED4_species_name_terminal *species_name = species_man->search_spec_child_rek(LEV_SPECIES_NAME)->to_species_name_terminal();
683  if (species_name) {
684  GBDATA *gb_name = species_name->get_species_pointer();
685  if (gb_name) {
686  GB_transaction ta(gb_name);
687  name = GB_read_as_string(gb_name);
688  }
689  }
690  }
691  return name;
692 }
693 
695  for (int i=0; i<members(); i++) { // first test direct children ..
696  if (member(i)->spec.level & lev) {
697  return member(i);
698  }
699  }
700 
701  for (int i=0; i<members(); i++) { // .. then all containers
702  ED4_base *child = member(i);
703 
704  if (child->is_multi_species_manager()) {
705  return child->to_multi_species_manager()->get_defined_level(lev);
706  }
707  else if (child->is_group_manager()) {
708  return child->to_group_manager()->member(1)->to_multi_species_manager()->get_defined_level(lev);
709  }
710  else {
711  e4_assert(!child->is_manager());
712  }
713  }
714  return NULp;
715 }
716 
718  // sets object length of terminals to Consensus_Name_terminal if existing
719  // else to MAXNAME_WIDTH
720 
721  if (is_species_manager()) {
722  ED4_species_manager *species_manager = to_species_manager();
723 
724  if (!species_manager->is_consensus_manager()) {
725  ED4_multi_name_manager *multi_name_manager = species_manager->get_defined_level(LEV_MULTI_NAME)->to_multi_name_manager(); // case I'm a species
726  ED4_species_name_terminal *consensus_terminal = parent->to_multi_species_manager()->get_consensus_name_terminal();
727 
728  for (int i=0; i<multi_name_manager->members(); i++) {
729  ED4_name_manager *name_manager = multi_name_manager->member(i)->to_name_manager();
730  ED4_base *nameTerm = name_manager->member(0);
731  int width = consensus_terminal ? consensus_terminal->extension.size[WIDTH] : MAXNAME_WIDTH;
732 
733  nameTerm->extension.size[WIDTH] = width;
734  nameTerm->request_resize();
735  }
736 
737  for (int i=0; i<species_manager->members(); i++) { // adjust all managers as far as possible
738  ED4_base *smember = species_manager->member(i);
739  if (consensus_terminal) {
740  ED4_base *kmember = consensus_terminal->parent->member(i);
741  if (kmember) {
742  smember->extension.position[X_POS] = kmember->extension.position[X_POS];
744  }
745  }
746  else { // got no consensus
747  ED4_species_manager *a_species = parent->get_defined_level(LEV_SPECIES)->to_species_manager();
748  if (a_species) {
749  smember->extension.position[X_POS] = a_species->member(i)->extension.position[X_POS];
751  }
752  }
753  smember->request_resize();
754  }
755  }
756  }
757  else if (is_group_manager()) {
758  ED4_group_manager *group_manager = to_group_manager();
759  ED4_multi_species_manager *multi_species_manager = group_manager->get_multi_species_manager();
760  ED4_species_name_terminal *mark_consensus_terminal = multi_species_manager->get_consensus_name_terminal();
761  ED4_species_name_terminal *consensus_terminal = parent->to_multi_species_manager()->get_consensus_name_terminal();
762 
763  if (consensus_terminal) { // we're a group in another group
764  mark_consensus_terminal->extension.size[WIDTH] = consensus_terminal->extension.size[WIDTH] - BRACKET_WIDTH;
765  }
766  else { // we're at the top (no consensus terminal)
767  mark_consensus_terminal->extension.size[WIDTH] = MAXNAME_WIDTH - BRACKET_WIDTH;
768  }
769 
770  mark_consensus_terminal->request_resize();
771 
772  for (int i=0; i<multi_species_manager->members(); i++) {
773  multi_species_manager->member(i)->set_width();
774  }
775 
776  for (int i=0; i < group_manager->members(); i++) { // for all groups below from us
777  if (group_manager->member(i)->is_group_manager()) {
778  group_manager->member(i)->set_width();
779  }
780  }
781  }
782 
783  return ED4_R_OK;
784 }
785 
786 
788  // determines if given world coords x and y are within borders of current object according to move mode
789  AW_pos world_x, world_y;
790  calc_world_coords(&world_x, &world_y); // calculate absolute extension of current object
791 
792  switch (mode) { // which direction?
793  case ED4_M_HORIZONTAL:
794  if ((x >= world_x) && (x < (world_x + extension.size[WIDTH]))) return 1; // target location is within the borders of parent
795  break;
796  case ED4_M_VERTICAL:
797  if ((y >= world_y) && (y < (world_y + extension.size[HEIGHT]))) return 1; // target location is within the borders of parent
798  break;
799  case ED4_M_FREE:
800  return in_border(x, y, ED4_M_HORIZONTAL) && in_border(x, y, ED4_M_VERTICAL);
801  case ED4_M_NO_MOVE:
802  break;
803  }
804  return 0;
805 }
806 
807 
808 void ED4_base::calc_rel_coords(AW_pos *x, AW_pos *y) { // calculates coordinates relative to current object from given world coords
809  AW_pos world_x, world_y;
810 
811  calc_world_coords(&world_x, &world_y); // calculate world coordinates of current object
812 
813  *x -= world_x; // calculate relative coordinates by subtracting world
814  *y -= world_y; // coords of current object
815 }
816 
818  for (int i=0; i<members(); i++) {
819  ED4_base *child = member(i);
820  if (!child->is_spacer_terminal() && !child->is_consensus_manager()) { // don't hide spacer and Consensus
821  child->flag.hidden = 1;
822  }
823  }
824  request_resize();
825 }
826 
827 
829  for (int i=0; i<members(); i++) {
830  member(i)->flag.hidden = 0; // make child visible
831  }
832  request_resize();
833 }
834 
836  for (int i=0; i<members(); i++) {
837  ED4_base *child = member(i);
838 
839  if (child->is_multi_species_manager()) {
840  ED4_multi_species_manager *multi_species_manager = child->to_multi_species_manager();
841  multi_species_manager->unhide_children();
842  }
843  }
844 
847 }
848 
850  ED4_multi_species_manager *multi_species_manager = get_defined_level(LEV_MULTI_SPECIES)->to_multi_species_manager();
851 
852  bool consensus_shown = false;
853  if (!(multi_species_manager->member(1)->is_consensus_manager())) { // if consensus is not at top => move to top
854  ED4_manager *consensus_manager = NULp;
855  int i;
856  for (i=0; i<multi_species_manager->members(); i++) { // search for consensus
857  if (multi_species_manager->member(i)->is_consensus_manager()) {
858  consensus_manager = multi_species_manager->member(i)->to_manager();
859  break;
860  }
861  }
862 
863  if (consensus_manager) {
864  multi_species_manager->move_member(i, 1); // move Consensus to top of list
865  consensus_manager->extension.position[Y_POS] = SPACER_HEIGHT;
867  consensus_shown = true;
868  }
869  }
870  else {
871  consensus_shown = true;
872  }
873 
874  if (consensus_shown && ED4_ROOT->aw_root->awar(ED4_AWAR_CONSENSUS_SHOW)->read_int()==0) {
875  consensus_shown = false;
876  }
877 
878  multi_species_manager->hide_children();
880 
882 }
883 
886  else fold();
887 }
889  parent->to_group_manager()->toggle_folding();
890 }
891 
893  AW_pos x, y;
894 
895  calc_world_coords(&x, &y);
896 
897  printf("Typ des Aufrufers :\t\t\t%s\n", is_manager() ? "Manager" : "Terminal");
898  printf("Name des Aufrufers von Check_All : \t%.30s\n", (id) ? id : "Keine ID");
899  printf("Linke obere Ecke x, y : \t\t%f, %f\n", extension.position[0], extension.position[1]);
900  printf("Breite und Hoehe x, y : \t\t%f, %f\n", extension.size[0], extension.size[1]);
901  printf("World Coords x, y : \t\t%f, %f\n\n", x, y);
902  printf("***********************************************\n\n");
903 }
904 
906  // return 0 if clipping rectangle disappeared (nothing left to draw)
907  AW::Rectangle base_area = get_win_area(current_ed4w());
908  return current_device()->reduceClipBorders(base_area.top(), base_area.bottom(), base_area.left(), base_area.right());
909 }
910 
911 void ED4_base::set_links(ED4_base *width_ref, ED4_base *height_ref) {
912  // links 'this' to (one or two) reference terminal(s)
913  // => 'this' will resize when size of reference changes (maybe more effects?)
914  // (Note: passing NULp means "do not change")
915 
916  if (width_ref) {
917  if (width_link) width_link->linked_objects->remove_elem(this);
918  width_link = width_ref;
919  if (!width_ref->linked_objects) width_ref->linked_objects = new ED4_base_list;
920  width_ref->linked_objects->append_elem(this);
921  }
922 
923  if (height_ref) {
924  if (height_link) height_link->linked_objects->remove_elem(this);
925  height_link = height_ref;
926  if (!height_ref->linked_objects) height_ref->linked_objects = new ED4_base_list;
927  height_ref->linked_objects->append_elem(this);
928  }
929 }
930 
931 int ED4_base::currTimestamp = 1;
932 
933 #if defined(DEBUG)
934 // #define VISIBLE_AREA_REFRESH
935 #endif
936 
938  if (current_device()) { // @@@ should clear be done for all windows?
939  AW_pos x, y;
940  calc_world_coords(&x, &y);
942 
945  if (!color) {
946 #if defined(VISIBLE_AREA_REFRESH)
947  // for debugging draw each clear in different color:
948  static int gc_area = ED4_G_FIRST_COLOR_GROUP;
949 
950  current_device()->box(gc_area, true, x, y, extension.size[WIDTH], extension.size[HEIGHT]);
951  gc_area = (gc_area == ED4_G_LAST_COLOR_GROUP) ? ED4_G_FIRST_COLOR_GROUP : gc_area+1;
952 #else // !defined(VISIBLE_AREA_REFRESH)
954 #endif
955  }
956  else {
957  // fill range with color for debugging
959  }
960  }
962  }
963  return ED4_R_OK;
964 }
965 
966 void ED4_main_manager::clear_whole_background() {
967  // clear AW_MIDDLE_AREA
968  for (ED4_window *window = ED4_ROOT->first_window; window; window=window->next) {
969  AW_device *device = window->get_device();
970  if (device) {
971  device->push_clip_scale();
972  device->clear(AW_ALL_DEVICES);
973  device->pop_clip_scale();
974  }
975  }
976 }
977 
978 void ED4_base::draw_bb(int color) {
979  if (current_device()) {
982  AW_pos x1, y1;
983  calc_world_coords(&x1, &y1);
984  current_ed4w()->world_to_win_coords(&x1, &y1);
986  }
988  }
989 }
990 
991 ED4_base::ED4_base(const ED4_objspec& spec_, GB_CSTR temp_id, AW_pos width, AW_pos height, ED4_manager *temp_parent)
992  : spec(spec_)
993 {
994  index = 0;
996  timestamp = 0; // invalid - almost always..
997 
998  e4_assert(temp_id);
999  if (temp_id) {
1000  id = ARB_alloc<char>(strlen(temp_id)+1);
1001  strcpy(id, temp_id);
1002  }
1003 
1004  linked_objects = NULp;
1005 
1006  extension.position[X_POS] = -1; // position set here has no effect (will be overwritten by next resize)
1007  extension.position[Y_POS] = -1;
1008 
1009  ED4_base::touch_world_cache(); // invalidate position
1010 
1011  extension.size[WIDTH] = width;
1012  extension.size[HEIGHT] = height;
1013 
1014  extension.y_folded = 0;
1015  parent = temp_parent;
1016  width_link = NULp;
1017  height_link = NULp;
1018 
1019  memset((char*)&update_info, 0, sizeof(update_info));
1020  memset((char*)&flag, 0, sizeof(flag));
1021 }
1022 
1023 
1025  // before calling this function the first time, parent has to be set NULp
1026  e4_assert(!parent); // unlink from parent first!
1027 
1028  if (linked_objects) {
1029  ED4_base_list_elem *list_elem = linked_objects->head();
1030  while (list_elem) {
1031  ED4_base *object = list_elem->elem();
1032  if (object->width_link == this) {
1033  object->width_link->linked_objects->remove_elem(this); // delete link and
1034  object->width_link = NULp;
1035  }
1036 
1037  if (object->height_link == this) {
1038  object->height_link->linked_objects->remove_elem(this); // delete link and
1039  object->height_link = NULp;
1040  }
1041 
1042  ED4_base_list_elem *old_elem = list_elem;
1043  list_elem = list_elem->next();
1044  linked_objects->remove_elem(old_elem->elem());
1045  }
1046  delete linked_objects;
1047  }
1048 
1050  if (ED4_ROOT->main_manager) {
1051  ED4_base *sequence_terminal = ED4_ROOT->main_manager->search_spec_child_rek(LEV_SEQUENCE_STRING);
1052 
1053  if (sequence_terminal) sequence_terminal->update_info.linked_to_scrolled_rectangle = 1;
1054 
1056  ED4_ROOT->scroll_links.link_for_hor_slider = sequence_terminal;
1057 
1058  ED4_window *ed4w = ED4_ROOT->first_window;
1059  while (ed4w) {
1060  ed4w->scrolled_rect.replace_x_width_link_to(this, sequence_terminal);
1061  ed4w = ed4w->next;
1062  }
1063  }
1064  }
1065 
1066  if (width_link) {
1067  width_link->linked_objects->remove_elem(this);
1068  width_link = NULp;
1069  }
1070 
1071  if (height_link) {
1072  height_link->linked_objects->remove_elem(this);
1073  height_link = NULp;
1074  }
1075 
1076  set_species_pointer(NULp); // clear pointer to database and remove callbacks
1077  free(id);
1078 }
1079 
void calc_rel_coords(AW_pos *x, AW_pos *y)
Definition: ED4_base.cxx:808
void clr_property(ED4_properties prop)
Definition: ed4_class.hxx:981
void set_both_links(ED4_base *ref)
Definition: ed4_class.hxx:977
virtual void clear(AW_bitset filteri)
Definition: AW_device.cxx:313
void unhide_children()
Definition: ED4_base.cxx:828
void deleted_from_database() OVERRIDE
Definition: ED4_base.cxx:101
string result
GB_TYPES type
AW_device * current_device()
Definition: ed4_class.hxx:1402
ED4_returncode set_width()
Definition: ED4_base.cxx:717
AW_font_group font_group
Definition: ed4_class.hxx:1467
AW_pos size[2]
Definition: ed4_defs.hxx:262
long GB_read_int(GBDATA *gbd)
Definition: arbdb.cxx:699
void deleted_from_database() OVERRIDE
Definition: ED4_base.cxx:96
static char * y[maxsp+1]
ED4_area_manager * top_area_man
Definition: ed4_class.hxx:1430
virtual char * resolve_pointer_to_string_copy(int *str_len=NULp) const
Definition: ED4_base.cxx:228
int reduceClipBorders(int top, int bottom, int left, int right)
int MAXNAME_WIDTH
Definition: ED4_main.cxx:57
ED4_terminal * get_first_terminal(int start_index=0) const
ED4_base * member(ED4_index i) const
Definition: ed4_class.hxx:800
GB_ERROR GB_add_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
Definition: ad_cb.cxx:356
ED4_scrolled_rectangle scrolled_rect
Definition: ed4_class.hxx:714
ED4_group_manager * is_in_folded_group() const
Definition: ED4_base.cxx:20
GBDATA * get_species_pointer() const
Definition: ed4_class.hxx:953
virtual ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb)
Definition: ED4_base.cxx:385
bool empty() const
Definition: chartable.cxx:1138
const AW_screen_area & get_cliprect() const
Definition: aw_device.hxx:237
virtual void clear_part(const AW::Rectangle &rect, AW_bitset filteri)
Definition: AW_device.cxx:317
ED4_properties static_prop
Definition: ed4_class.hxx:229
int start() const
Definition: pos_range.h:57
#define SEPARATOR
Definition: mpdefs.h:16
ED4_base * get_defined_level(ED4_level lev) const
Definition: ED4_base.cxx:694
ED4_area_manager * middle_area_man
Definition: ed4_class.hxx:1429
GBDATA * GBT_get_alignment(GBDATA *gb_main, const char *aliname)
Definition: adali.cxx:684
NOT4PERL const void * GB_read_old_value()
Definition: ad_cb.cxx:166
BaseFrequencies & table()
Definition: ed4_class.hxx:1648
void request_resize()
Definition: ed4_class.hxx:2189
void ED4_request_relayout()
double right() const
virtual ~ED4_base()
Definition: ED4_base.cxx:1024
char * GB_read_as_string(GBDATA *gbd)
Definition: arbdb.cxx:1030
#define BRACKET_WIDTH
Definition: ed4_defs.hxx:79
long read_int() const
Definition: AW_awar.cxx:187
void set_species_pointer(GBDATA *gbd)
Definition: ed4_class.hxx:954
ED4_level level
Definition: ed4_class.hxx:230
#define Y_POS
Definition: ed4_defs.hxx:74
ED4_multi_species_manager * get_multi_species_manager() const
Definition: ed4_class.hxx:1651
static void touch_world_cache()
Definition: ed4_class.hxx:1013
ED4_root * ED4_ROOT
Definition: ED4_main.cxx:48
int is_species_manager() const
Definition: ed4_class.hxx:1114
ED4_update_info update_info
Definition: ed4_class.hxx:930
long curr_timestamp
Definition: ed4_class.hxx:1297
ED4_list< ED4_base > ED4_base_list
Definition: ed4_class.hxx:168
void cat(const char *from)
Definition: arb_strbuf.h:156
double top() const
ED4_species_type get_species_type() const
Definition: ed4_class.hxx:1841
const AW_bitset AW_ALL_DEVICES
Definition: aw_device.hxx:44
#define SPACER_HEIGHT
Definition: ed4_defs.hxx:80
ED4_group_manager * ED4_build_group_manager_start(ED4_manager *group_parent, GB_CSTR group_name, int group_depth, bool is_folded, ED4_reference_terminals &refterms, ED4_multi_species_manager *&multi_species_manager)
Definition: ED4_base.cxx:231
ED4_AREA_LEVEL
Definition: ed4_defs.hxx:169
void create_consensus(ED4_abstract_group_manager *upper_group_manager, arb_progress *progress)
Definition: ED4_base.cxx:567
ED4_movemode
Definition: ed4_defs.hxx:154
int get_width(int gc) const
ED4_returncode clear_background(int color=0)
Definition: ED4_base.cxx:937
ED4_manager * parent
Definition: ed4_class.hxx:921
virtual void deleted_from_database()
Definition: ED4_base.cxx:88
char buffer[MESSAGE_BUFFERSIZE]
Definition: seq_search.cxx:34
#define ED4_AWAR_CONSENSUS_SHOW
Definition: ed4_awars.hxx:51
GB_ERROR GB_push_transaction(GBDATA *gbd)
Definition: arbdb.cxx:2458
ED4_base * find_first_that(ED4_level level, const ED4_basePredicate &fulfills_predicate)
Definition: ED4_base.cxx:400
void unlink_from_parent()
Definition: ED4_base.cxx:673
#define cb(action)
ED4_coords coords
Definition: ed4_class.hxx:716
long ED4_counter
Definition: ED4_main.cxx:61
#define e4_assert(bed)
Definition: ed4_class.hxx:11
const int WIDTH
GBDATA * GLOBAL_gb_main
Definition: DI_main.cxx:27
int is_multi_species_manager() const
Definition: ed4_class.hxx:1106
const ED4_objspec & spec
Definition: ed4_class.hxx:919
bool has_property(ED4_properties prop) const
Definition: ed4_class.hxx:982
void world_to_win_coords(AW_pos *xPtr, AW_pos *yPtr) const
Definition: ed4_class.hxx:359
const AW::Position & calc_world_coords() const
Definition: ed4_class.hxx:993
void check_all()
Definition: ED4_base.cxx:892
bool is_consensus_manager() const
Definition: ed4_class.hxx:1837
ED4_level
Definition: ed4_defs.hxx:120
#define SEQUENCE_INFO_WIDTH
Definition: ed4_defs.hxx:82
double AW_pos
Definition: aw_base.hxx:29
char * get_name_of_species()
Definition: ED4_base.cxx:678
void toggle_folding()
Definition: ED4_base.cxx:884
void append_member(ED4_base *new_member)
GB_TYPES GB_read_type(GBDATA *gbd)
Definition: arbdb.cxx:1617
ED4_index index
Definition: ed4_class.hxx:926
int is_manager() const
Definition: ed4_class.hxx:1101
void init(int maxseqlength)
Definition: chartable.cxx:729
void ED4_build_group_manager_end(ED4_multi_species_manager *multi_species_manager)
Definition: ED4_base.cxx:314
ED4_index members() const
Definition: ed4_class.hxx:802
int is_abstract_group_manager() const
Definition: ed4_class.hxx:1112
ED4_window * next
Definition: ed4_class.hxx:711
ED4_returncode
Definition: ed4_defs.hxx:161
void push_clip_scale()
Definition: AW_device.cxx:91
ED4_returncode move_member(ED4_index old_pos, ED4_index new_pos)
T * elem() const
Definition: ed4_list.hxx:25
long window_upper_clip_point
Definition: ed4_defs.hxx:350
ED4_index y_folded
Definition: ed4_defs.hxx:263
void hide_children()
Definition: ED4_base.cxx:817
long window_lower_clip_point
Definition: ed4_defs.hxx:350
ED4_terminal * get_last_terminal(int start_index=-1) const
#define X_POS
Definition: ed4_defs.hxx:73
void ED4_alignment_length_changed(GBDATA *gb_alignment_len, GB_CB_TYPE gbtype)
Definition: ED4_root.cxx:468
char * alignment_name
Definition: ed4_class.hxx:1440
static int group[MAXN+1]
Definition: ClustalV.cxx:65
ED4_returncode rebuild_consensi(ED4_base *start_species, ED4_update_flag update_flag)
void GB_clear_error()
Definition: arb_msg.cxx:365
virtual const char * resolve_pointer_to_char_pntr(int *str_len=NULp) const
Definition: ED4_base.cxx:229
ED4_species_type
Definition: ed4_class.hxx:891
void pop_clip_scale()
Definition: AW_device.cxx:62
void Set(GBDATA *gbd, ED4_base *base)
Definition: ED4_base.cxx:181
ED4_window * first_window
Definition: ed4_class.hxx:1427
ED4_terminal * get_next_terminal()
Definition: ED4_base.cxx:452
bool range_contained_in(int p1, int p2, int r1, int r2)
Definition: ED4_base.cxx:198
static void error(const char *msg)
Definition: mkptypes.cxx:96
void set_links(ED4_base *width_ref, ED4_base *height_ref)
Definition: ED4_base.cxx:911
virtual void changed_by_database()
Definition: ED4_base.cxx:28
PosRange calc_interval_displayed_in_rectangle(AW_screen_area *area_rect)
Definition: ED4_base.cxx:543
#define CHARACTEROFFSET
Definition: ed4_defs.hxx:111
ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb) FINAL_OVERRIDE
Definition: ED4_base.cxx:390
ED4_main_manager * main_manager
Definition: ed4_class.hxx:1428
void deleted_from_database() OVERRIDE
Definition: ED4_base.cxx:125
AW_awar * awar(const char *awar)
Definition: AW_root.cxx:554
GB_ERROR GB_pop_transaction(GBDATA *gbd)
Definition: arbdb.cxx:2488
Definition: arbdb.h:86
ED4_scroll_links scroll_links
Definition: ed4_class.hxx:1434
ED4_list_elem * next() const
Definition: ed4_list.hxx:24
ED4_base(const ED4_objspec &spec_, GB_CSTR id, AW_pos width, AW_pos height, ED4_manager *parent)
Definition: ED4_base.cxx:991
ED4_extension extension
Definition: ed4_class.hxx:929
int calc_group_depth()
Definition: ED4_base.cxx:422
int TERMINAL_HEIGHT
Definition: ED4_main.cxx:51
double bottom() const
int adjust_clipping_rectangle()
Definition: ED4_base.cxx:905
#define NAME_BUFFERSIZE
Definition: ed4_defs.hxx:113
long int flag
Definition: f2c.h:39
ED4_species_name_terminal * get_consensus_name_terminal() const
Definition: ed4_class.hxx:2235
ED4_multi_species_manager * get_multi_species_manager() const
Definition: ed4_class.hxx:1589
ED4_sequence_info_terminal * sequence_info()
Definition: ed4_class.hxx:1364
void Delete() FINAL_OVERRIDE
double left() const
ED4_returncode update_bases_and_rebuild_consensi(const char *old_seq, int old_len, ED4_base *species, ED4_update_flag update_flag, PosRange range=PosRange::whole())
ED4_base * search_spec_child_rek(ED4_level level)
Definition: ED4_base.cxx:432
void append_elem(T *elem)
Definition: ed4_list.hxx:49
void ncat(const char *from, size_t count)
Definition: arb_strbuf.h:149
void changed_by_database() OVERRIDE
Definition: ED4_base.cxx:36
ED4_base * width_link
Definition: ed4_class.hxx:927
AW_pos position[2]
Definition: ed4_defs.hxx:259
void generate_configuration_string(GBS_strstruct &buffer)
Definition: ED4_base.cxx:322
int MAXSEQUENCECHARACTERLENGTH
Definition: ED4_main.cxx:56
ED4_returncode remove_member(ED4_base *member)
void set_property(ED4_properties prop)
Definition: ed4_class.hxx:980
bool ranges_overlap(int p1, int p2, int r1, int r2)
Definition: ED4_base.cxx:190
void replace_x_width_link_to(ED4_base *old_link, ED4_base *new_link)
Definition: ed4_class.hxx:469
ED4_AREA_LEVEL get_area_level(ED4_multi_species_manager **multi_species_manager=NULp) const
Definition: ED4_base.cxx:495
static void sequence_changed_cb(GBDATA *gb_seq, ED4_base *base, GB_CB_TYPE gbtype)
Definition: ED4_base.cxx:145
ED4_returncode update_bases(const ED4_base *old_base, const ED4_base *new_base, PosRange range=PosRange::whole())
char * GB_read_string(GBDATA *gbd)
Definition: arbdb.cxx:879
void deleted_from_database() OVERRIDE
Definition: ED4_base.cxx:92
ED4_window * current_ed4w()
Definition: ed4_class.hxx:1403
void GB_remove_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
Definition: ad_cb.cxx:360
AW_root * aw_root
Definition: ed4_class.hxx:1424
ED4_list_elem< T > * head() const
Definition: ed4_list.hxx:45
ED4_sequence_terminal * sequence()
Definition: ed4_class.hxx:1363
ED4_properties
Definition: ed4_defs.hxx:176
unsigned int hidden
Definition: ed4_class.hxx:932
long window_right_clip_point
Definition: ed4_defs.hxx:350
void request_refresh(int clear=1) FINAL_OVERRIDE
void aw_message(const char *msg)
Definition: AW_status.cxx:932
bool completely_shows(int x1, int y1, int x2, int y2) const
Definition: ED4_base.cxx:217
long GB_read_clock(GBDATA *gbd)
Definition: arbdb.cxx:1688
#define NULp
Definition: cxxforward.h:97
int is_area_manager() const
Definition: ed4_class.hxx:1115
int end() const
Definition: pos_range.h:61
AW::Rectangle get_win_area(ED4_window *ed4w) const
Definition: ed4_class.hxx:1017
void remove_elem(const T *elem)
Definition: ed4_list.hxx:75
char * resolve_pointer_to_string_copy(int *str_len=NULp) const FINAL_OVERRIDE
void changed_by_database() OVERRIDE
Definition: ED4_base.cxx:34
int is_ignored() const
Definition: chartable.h:239
void draw_bb(int color)
Definition: ED4_base.cxx:978
GB_transaction ta(gb_var)
bool box(int gc, AW::FillStyle filled, const AW::Rectangle &rect, AW_bitset filteri=AW_ALL_DEVICES_SCALED)
Definition: aw_device.hxx:471
bool partly_shows(int x1, int y1, int x2, int y2) const
Definition: ED4_base.cxx:206
int has_valid_counters() const
Definition: ed4_class.hxx:1626
long window_left_clip_point
Definition: ed4_defs.hxx:350
int is_terminal() const
Definition: ed4_class.hxx:1081
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
Definition: adquery.cxx:531
ED4_terminal * get_prev_terminal()
Definition: ED4_base.cxx:465
int is_spacer_terminal() const
Definition: ed4_class.hxx:1095
ED4_base * height_link
Definition: ed4_class.hxx:928
GB_CB_TYPE
Definition: arbdb_base.h:46
ED4_manager * get_parent(ED4_level lev) const
Definition: ed4_class.hxx:1823
void update_consensus(ED4_manager *old_parent, ED4_manager *new_parent, ED4_base *sequence)
#define min(a, b)
Definition: f2c.h:153
struct ED4_base::@7 flag
#define HEIGHT
Definition: ed4_defs.hxx:76
bool has_parent(ED4_manager *Parent)
Definition: ED4_base.cxx:481
const char * GB_CSTR
Definition: arbdb_base.h:25
const ED4_terminal * get_consensus_relevant_terminal() const
Definition: ED4_base.cxx:617
int is_group_manager() const
Definition: ed4_class.hxx:1110
ED4_properties dynamic_prop
Definition: ed4_class.hxx:924
int is_species_name_terminal() const
Definition: ed4_class.hxx:1085
void request_refresh(int clear=1) FINAL_OVERRIDE
unsigned int linked_to_scrolled_rectangle
Definition: ed4_defs.hxx:328
void put(char c)
Definition: arb_strbuf.h:138
short in_border(AW_pos abs_x, AW_pos abs_y, ED4_movemode mode)
Definition: ED4_base.cxx:787
long GB_read_old_size()
Definition: ad_cb.cxx:183
#define max(a, b)
Definition: f2c.h:154