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