97 int info_char_width = info_font_limits.
width;
109 seq_term_descent = seq_font_limits.
descent;
116 TERMINAL_HEIGHT = (wanted_seq_term_height>wanted_seq_info_height) ? wanted_seq_term_height : wanted_seq_info_height;
126 fprintf(stderr,
"maxbrackets=%i\n", maxbrackets);
130 (maxchars+1+1)*info_char_width +
157 #if defined(DEBUG) && 0
158 printf(
"seq_term_descent = %i\n", seq_term_descent);
168 bool ED4_flag_header_terminal::set_dynamic_size() {
171 bool ED4_flag_terminal::set_dynamic_size() {
174 bool ED4_species_name_terminal::set_dynamic_size() {
177 bool ED4_sequence_info_terminal::set_dynamic_size() {
180 bool ED4_line_terminal::set_dynamic_size() {
189 return extension.set_size_does_change(
WIDTH, overall_width);
191 bool ED4_spacer_terminal::set_dynamic_size() {
196 if (parent->is_device_manager()) {
221 return extension.set_size_does_change(
HEIGHT, new_height);
247 if (new_screenwidth == screenwidth) {
250 screenwidth = new_screenwidth;
265 if ((object->
dynamic_prop & expected_prop) == expected_prop) {
274 new_work_info.
mode = work_info->
mode;
281 new_work_info.
gb_data =
object->get_species_pointer();
286 new_work_info.
string =
object->id;
294 error = editString.
edit(&new_work_info);
300 object->request_refresh();
310 track_cursor =
false;
328 if (max_xpos<0) max_xpos = 0;
329 return int(max_xpos+0.5);
342 if (max_ypos<0) max_ypos = 0;
343 return int(max_ypos+0.5);
347 if (use_scroll_speed) {
356 if (new_xpos<0) new_xpos = 0;
360 if (max_xpos<0) max_xpos = 0;
361 if (new_xpos>max_xpos) new_xpos = max_xpos;
365 if (new_ypos<0) new_ypos = 0;
369 if (max_ypos<0) max_ypos = 0;
370 if (new_ypos>max_ypos) new_ypos = max_ypos;
388 double fdist = horizontal ? scrolledArea.
width() : scrolledArea.
height();
389 int dist =
int(fdist/2 + 0.5);
391 if (backwards) dist = -dist;
393 ed4_scroll(e4w->
aww, horizontal ? dist : 0, horizontal ? 0 : dist,
false);
411 while (repeatCount--) {
421 work_info.
event = *event;
466 work_info.
string = cterm->temp_cons_seq;
481 error = editString.
edit(&work_info);
491 tracked_cursorpos = -1;
496 if (tracked_cursorpos>=0) {
499 track_cursor =
false;
508 error = editString.
edit(&work_info);
542 static int repeatCount;
549 #if defined(DEBUG) && 0
553 switch (event.
type) {
555 if (repeatCount==0) {
573 #if defined(DARWIN) || 1
603 int direction =
event.button ==
AW_WHEEL_UP ? -1 : 1;
626 #if defined(DEBUG) && 0
628 printf(
"[ED4_input_cb] type=%i x=%i y=%i ", (
int)event.
type, (
int)event.
x, (
int)event.
y);
635 event.x = (
int) win_x;
636 event.y = (
int) win_y;
638 #if defined(DEBUG) && 0
640 printf(
"-> x=%i y=%i\n", (
int)event.
type, (
int)event.
x, (
int)event.
y);
767 #if defined(DEBUG) && 0
769 printf(
"[ED4_motion_cb] type=%i x=%i y=%i ", (
int)event.
type, (
int)event.
x, (
int)event.
y);
776 event.x = (
int) win_x;
777 event.y = (
int) win_y;
779 #if defined(DEBUG) && 0
781 printf(
"-> x=%i y=%i\n", (
int)event.
type, (
int)event.
x, (
int)event.
y);
848 else error =
"No ecoli reference";
865 if (pos > max) pos =
max;
866 else if (pos<0) pos = 0;
909 aw_message(
"You cannot change the consensus");
922 seq[seq_pos] = new_char;
955 AWT_browser_forget_db(gb_main);
979 #if defined(TRACE_REFRESH)
980 fprintf(stderr,
"ED4_timer\n");
fflush(stderr);
991 if (timer_calls == timer_calls_triggered) {
992 timer_calls_triggered++;
999 #if defined(TRACE_REFRESH)
1000 fprintf(stderr,
"ED4_trigger_instant_refresh\n");
fflush(stderr);
1002 timer_calls_triggered++;
1019 #define SIGNIFICANT_FIELD_CHARS 30 // length used to compare field contents (in createGroupFromSelected)
1036 bool lookingForNoContent = !field_content || field_content[0]==0;
1043 bool move_object =
true;
1046 if (field_name) move_object =
false;
1051 GBDATA *gb_species =
object->get_species_pointer();
1054 move_object = lookingForNoContent;
1057 if (found_content) {
1059 free(found_content);
1072 object->parent->remove_member(
object);
1075 object->parent = group_content_manager;
1079 list_elem = list_elem->
next();
1085 new_group_manager->
fold();
1098 char *group_name =
aw_input(
"Enter name for new group:");
1114 bool tryAgain =
true;
1115 bool foundField =
false;
1116 bool foundSpecies =
false;
1119 error =
"Please select a field to use for grouping.";
1122 while (tryAgain && !error) {
1125 while (list_elem && !error) {
1129 GBDATA *gb_species =
object->get_species_pointer();
1133 foundSpecies =
true;
1141 if (field_content) {
1142 size_t field_content_len = strlen(field_content);
1151 sprintf(with_semi,
";%s;", field_content);
1153 if (!strstr(doneContents, with_semi)) {
1157 int newlen = doneLen + field_content_len + 1;
1158 char *newDone = ARB_alloc<char>(newlen+1);
1161 freeset(doneContents, newDone);
1164 free(field_content);
1167 error =
"Incompatible field type";
1171 list_elem = list_elem->
next();
1176 if (!foundSpecies) error =
"Please select some species in order to insert them into new groups";
1189 window_to_hide->
hide();
1193 AW_window_simple *aws =
new AW_window_simple;
1195 aws->init(aw_root,
"CREATE_GROUP_USING_FIELD_CONTENT",
"Create groups using field");
1198 aws->button_length(10);
1202 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1205 aws->create_button(
"HELP",
"HELP",
"H");
1208 aws->label(
"Use content of field");
1213 aws->create_autosize_button(
"USE_FIELD",
"Group selected species by content",
"");
1253 window->cursor.init();
1254 window->aww->set_horizontal_scrollbar_position (0);
1255 window->aww->set_vertical_scrollbar_position (0);
1281 const char *awar_name =
NULp;
1304 ED4_species_manager *spec_man =
object->to_species_manager();
1305 spec_man->do_callbacks();
1356 : cursor(&win->cursor),
1357 screen_rel(cursor->get_screen_relative_pos()),
1358 seq(cursor->get_sequence_pos())
1369 vector<cursorpos> pos;
1378 for (vector<cursorpos>::iterator i = pos.begin(); i != pos.end(); ++i) {
1400 if (hide!=0 && gaps!=2) {
1407 if (gaps!=2 && hide!=0) {
1449 AW_window_simple *aws =
new AW_window_simple;
1451 aws->init(root,
"EDIT4_PROPS",
"EDIT4 Options");
1454 aws->auto_space(5, 5);
1456 const int SCALEDCOLUMNS = 4;
1457 const int SCALERLEN = 200;
1461 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1465 aws->create_button(
"HELP",
"HELP",
"H");
1472 aws->insert_default_toggle(
"Show all gaps",
"A", 0);
1473 aws->insert_toggle(
"Show some gaps",
"S", 1);
1474 aws->insert_toggle(
"Hide all gaps",
"H", 2);
1475 aws->update_toggle_field();
1479 aws->insert_default_toggle(
"Hide no Nucleotides",
"0", 0);
1480 aws->insert_toggle(
"Hide columns with less than...",
"1", 1);
1481 aws->update_toggle_field();
1495 aws->at(
"scroll_x");
1498 aws->at(
"scroll_y");
1507 aws->at(
"gapchars");
1516 aws->at(
"checksum");
1537 {
"*create_species_from_consensus",
"Consensus settings to create a new species \nfrom group consensus using\n\"Create/Create new species from consensus\"",
"considbound='30';countgaps='0';gapbound='60';group='0';lower='0';upper='0'" },
1544 static AW_window_simple *aws =
NULp;
1547 aws =
new AW_window_simple;
1549 aws->init(root,
"EDIT4_CONSENSUS_DEFm",
"EDIT4 Consensus Definition");
1550 aws->load_xfig(
"edit4/consensus.fig");
1552 aws->auto_space(5, 5);
1554 const int SCALEDCOLUMNS = 3;
1555 const int SCALERSIZE = 150;
1558 aws->button_length(9);
1562 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1566 aws->create_button(
"HELP",
"HELP",
"H");
1569 aws->at(
"countgaps");
1571 aws->insert_toggle(
"on",
"1", 1);
1572 aws->insert_default_toggle(
"off",
"0", 0);
1573 aws->update_toggle_field();
1575 aws->at(
"gapbound");
1580 aws->insert_toggle(
"on",
"1", 1);
1581 aws->insert_default_toggle(
"off",
"0", 0);
1582 aws->update_toggle_field();
1584 aws->at(
"considbound");
1587 aws->at(
"showgroups");
1589 aws->create_autosize_button(
"SHOW_IUPAC",
"Show IUPAC groups",
"S");
1599 aws->label(
"Display consensus?");
1613 int lower = awar_lower->
read_int();
1614 int upper = awar_upper->
read_int();
1617 if (upper_changed) awar_lower->
write_int(upper);
1644 static AW_window_simple *aws =
NULp;
1646 aws =
new AW_window_simple;
1647 aws->init(awr,
"LOAD_CONFIGURATION",
"Load existing configuration");
1648 aws->load_xfig(
"edit4/load_config.fig");
1652 aws->create_button(
"CLOSE",
"CLOSE",
"C");
1656 aws->create_button(
"HELP",
"HELP");
1663 aws->create_button(
"LOAD",
"LOAD");
1671 if (hide_aww) aww->
hide();
1679 static AW_window_simple *aws =
NULp;
1681 aws =
new AW_window_simple;
1682 aws->init(awr,
"SAVE_CONFIGURATION",
"Save current configuration as");
1683 aws->load_xfig(
"edit4/save_config.fig");
1687 aws->create_button(
"CLOSE",
"CLOSE");
1691 aws->create_button(
"HELP",
"HELP");
1701 aws->create_button(
"SAVE",
"SAVE");
1721 static AW_window_simple *aws =
NULp;
1723 aws =
new AW_window_simple;
1724 aws->init(awr,
"LOAD_SAI",
"Load additional SAI");
1725 aws->load_xfig(
"edit4/load_sai.fig");
1729 aws->create_button(
"CLOSE",
"CLOSE");
1733 aws->create_button(
"HELP",
"HELP");
1741 aws->create_button(
"LOAD",
"LOAD");
1756 for (
int p=0; p<len; p++) {
1757 switch (consensus[p]) {
1758 case '=': consensus[p] = equal_to[0];
break;
1759 case '.': consensus[p] = point_to[0];
break;
1762 consensus[p] = toupper(consensus[p]);
1770 for (
int p=0; p<len; p++) {
1774 for (
int p=len-1; p>=0; p--) {
1806 ED4_species_name_terminal *name_term = base->to_species_name_terminal();
1808 if (!name_term->inside_consensus_manager()) {
1842 freeset(sml, sml->
next);
1857 e4_assert(creation_mode>=0 && creation_mode<=2);
1859 if (!new_species_full_name || new_species_full_name[0]==0) {
1860 error =
"Please enter a full_name for the new species";
1869 char *new_species_name =
NULp;
1874 enum {
NOWHERE, ON_SPECIES, ON_CONSENSUS } where_we_are =
NOWHERE;
1888 if (where_we_are==ON_SPECIES) {
1889 ED4_species_name_terminal *spec_name = cursor_terminal->to_sequence_terminal()->corresponding_species_name_terminal();
1893 if (!gb_source) error =
GBS_global_string(
"No such species: '%s'", source_name);
1904 error =
"Please place cursor on a species";
1912 if (creation_mode==0) {
1913 error =
"It's no good idea to create the short-name for a new species using the nameserver! (has no acc yet)";
1918 if (!
nameIsUnique(new_species_name, gb_species_data)) {
1934 if (!new_species_name) {
1935 error =
GBS_global_string(
"Failed to create a new name for '%s'", new_species_full_name);
1939 if (existingNames)
delete existingNames;
1946 if (!gb_created_species) {
1947 error =
GBS_global_string(
"Failed to create new species '%s'", new_species_name);
1956 if (!error) error =
GBT_write_string(gb_created_species,
"full_name", new_species_full_name);
1961 error =
"Please place cursor on any sequence/consensus of group";
1968 if (!error && !sml) {
1969 error =
"Please choose a none empty group!";
1978 if (!error) error =
GBT_write_string(gb_new_species,
"name", new_species_name);
1979 if (!error) error =
GBT_write_string(gb_new_species,
"full_name", new_species_full_name);
1983 char *doneFields =
ARB_strdup(
";name;full_name;");
1984 int doneLen = strlen(doneFields);
1987 int *fieldStat =
new int[sl_length];
1989 arb_progress progress(
"Merging fields",
long(sl_length));
1991 while (sl && !error) {
1993 char *fieldStart = newFields;
1995 while (fieldStart[1] && !error) {
1996 char *fieldEnd = strchr(fieldStart+1,
';');
1999 char behind = fieldEnd[1];
2002 if (!strstr(doneFields, fieldStart)) {
2003 char *fieldName = fieldStart+1;
2004 int fieldLen =
int(fieldEnd-fieldName);
2015 int doneSpecies = 0;
2018 for (i=0; i<sl_length; i++) {
2022 while (doneSpecies<sl_length) {
2027 if (fieldStat[i]==0) {
2033 fieldStat[i] = nextStat;
2037 if (fieldStat[j]==0) {
2042 if (strcmp(content, content2)==0) {
2043 fieldStat[j] = nextStat;
2073 char *new_content =
NULp;
2074 int new_content_len = 0;
2083 new_content_len = strlen(new_content);
2091 for (currStat=1; currStat<nextStat; currStat++) {
2095 char *content =
NULp;
2098 if (fieldStat[i]==currStat) {
2111 int add_len = names_len+1+strlen(content);
2112 char *whole = ARB_alloc<char>(new_content_len+1+add_len+1);
2114 char *
add = new_content ? whole+sprintf(whole,
"%s ", new_content) : whole;
2119 if (fieldStat[i]==currStat) {
2120 add += sprintf(add,
"%c%s", first ?
'{' :
';', sl2->
species_name);
2126 add += sprintf(add,
"} %s", content);
2130 freeset(new_content, whole);
2131 new_content_len = strlen(new_content);
2143 char *new_doneFields = ARB_alloc<char>(doneLen+fieldLen+1+1);
2144 sprintf(new_doneFields,
"%s%s;", doneFields, fieldName);
2145 doneLen += fieldLen+1;
2146 freeset(doneFields, new_doneFields);
2151 fieldEnd[1] = behind;
2152 fieldStart = fieldEnd;
2159 delete [] fieldStat;
2167 ED4_species_name_terminal *spec_name = cursor_terminal->to_sequence_terminal()->corresponding_species_name_terminal();
2174 if (!error) error =
GBT_write_string(gb_new_species,
"name", new_species_name);
2175 if (!error) error =
GBT_write_string(gb_new_species,
"full_name", new_species_full_name);
2196 free(new_species_name);
2200 free(new_species_full_name);
2206 AW_window_simple *aws =
new AW_window_simple;
2207 switch (creation_mode) {
2209 case CREATE_FROM_CONSENSUS: aws->init(root,
"create_species_from_consensus",
"Create species from consensus");
break;
2210 case COPY_SPECIES: aws->init(root,
"copy_species",
"Copy current species");
break;
2214 aws->load_xfig(
"edit4/create_seq_fc.fig");
2217 aws->load_xfig(
"edit4/create_seq.fig");
2222 aws->create_button(
"CLOSE",
"CLOSE",
"C");
2225 aws->create_autosize_button(
NULp,
"Please enter the FULL_NAME\nof the new species");
2232 aws->create_button(
"GO",
"GO",
"g");
2235 aws->at(
"replace_equal");
2236 aws->label(
"Replace '=' by ");
2239 aws->at(
"replace_point");
2240 aws->label(
"Replace '.' by ");
2243 aws->at(
"replace_start_end");
2244 aws->label(
"Create ... at ends of sequence?");
2248 aws->label(
"Convert all chars to upper?");
2252 aws->label(
"Other fields");
2254 aws->insert_default_option(
"Merge from all in group",
"", 0);
2255 aws->insert_option(
"Copy from current species",
"", 1);
2256 aws->update_option_menu();
GB_ERROR GB_begin_transaction(GBDATA *gbd)
static AWT_config_mapping_def editor_options_config_mapping[]
ED4_species_name_terminal * ED4_find_SAI_name_terminal(const char *sai_name)
GB_ERROR GB_copy_dropProtectMarksAndTempstate(GBDATA *dest, GBDATA *source)
#define ED4_AWAR_SCROLL_SPEED_Y
void ED4_jump_to_cursor_position(AW_window *aww, const char *awar_name, PositionType posType)
int is_pure_text_terminal() const
static AWT_predefined_config predefined_consensus_config[]
ED4_returncode generate_window(AW_device **device, ED4_window **new_window)
AW_device * get_device() const
bool is_species_seq_terminal() const
AW_device * current_device()
GB_ERROR GB_commit_transaction(GBDATA *gbd)
const char * resolve_pointer_to_char_pntr(int *str_len=NULp) const FINAL_OVERRIDE
AW_DB_selection * awt_create_SAI_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname, const SaiSelectionlistFilterCallback &fcb)
int screen_to_sequence(int screen_pos) const
void resize_requested_by_child()
void ED4_request_full_instant_refresh()
#define ED4_AWAR_ANNOUNCE_CHECKSUM_CHANGES
ED4_returncode set_width()
ED4_returncode move_cursor(AW_event *event)
ED4_terminal * working_terminal
virtual bool is_hidden() const =0
int rel_2_abs(int rel) const
#define AWAR_EDIT_SECURITY_LEVEL
#define ED4_AWAR_CONSENSUS_GROUP
const AW_screen_area & get_area_size() const
#define ED4_AWAR_COMPRESS_SEQUENCE_GAPS
ED4_window * window() const
int is_text_terminal() const
char * AWTC_generate_random_name(UniqueNameDetector &existingNames)
#define ED4_AWAR_CREATE_FROM_CONS_REPL_EQUAL
ED4_area_manager * top_area_man
GB_ERROR GB_append_exportedError(GB_ERROR error)
virtual char * resolve_pointer_to_string_copy(int *str_len=NULp) const
void load_xfig(const char *file, bool resize=true)
GB_ERROR GB_tell_server_dont_wait(GBDATA *gbd)
void ED4_saveConfiguration(AW_window *aww, bool hide_aww)
ED4_scrolled_rectangle scrolled_rect
GBDATA * get_species_pointer() const
const char * GBS_global_string_to_buffer(char *buffer, size_t bufsize, const char *templat,...)
void update_window_coords()
static const int MIDDLE_AREA
void ED4_remote_set_cursor_cb(AW_root *awr)
void ED4_set_iupac(AW_window *aww, const char *awar_name)
#define ED4_AWAR_FAST_CURSOR_JUMP
ED4_SearchResults & results() const
#define CONSENSUS_CONFIG_COUNTGAPS
int is_columnStat_terminal() const
GB_ERROR GB_end_transaction(GBDATA *gbd, GB_ERROR error)
static ARB_ERROR call_edit(ED4_base *object, const ED4_work_info *work_info)
ED4_area_manager * middle_area_man
void ED4_reloadConfiguration(AW_window *aww)
void ED4_compression_toggle_changed_cb(AW_root *root, bool hideChanged)
#define ED4_AWAR_CONSENSUS_COUNTGAPS
void ED4_set_helixnr(AW_window *aww, const char *awar_name)
GB_ERROR GB_write_pntr(GBDATA *gbd, const char *s, size_t bytes_size, size_t stored_size)
GB_ERROR AWTC_generate_one_name(GBDATA *gb_main, const char *full_name, const char *acc, const char *addid, char *&new_name)
#define ED4_AWAR_SCROLL_SPEED_X
ED4_returncode deselect_all()
char * ARB_strdup(const char *str)
void AWT_insert_config_manager(AW_window *aww, AW_default default_file_, const char *id, const StoreConfigCallback &store_cb, const RestoreConfigCallback &load_or_reset_cb, const char *macro_id, const AWT_predefined_config *predef)
char * GB_read_as_string(GBDATA *gbd)
void GB_end_transaction_show_error(GBDATA *gbd, GB_ERROR error, void(*error_handler)(GB_ERROR))
#define AWAR_EDIT_SECURITY_LEVEL_ALIGN
void win_to_world_coords(AW_pos *xPtr, AW_pos *yPtr) const
int slider_pos_horizontal
AW_awar * set_minmax(float min, float max)
#define ED4_AWAR_COMPRESS_SEQUENCE_TYPE
int base2sequence_position(int base_pos) const
static const int TOP_AREA
long first_position(const char *helixNr) const
const char * GBS_global_string(const char *templat,...)
static void calculate_group_folding(group_folding &folding)
static void touch_world_cache()
#define AWAR_EDIT_SECURITY_LEVEL_CHANGE
int is_species_manager() const
ED4_highlighted_list * highlighted_objects
GB_ERROR edit(ED4_work_info *info) __ATTR__USERESULT
void AW_POPDOWN(AW_window *window)
static ARB_ERROR update_extension_size(ED4_base *base)
void ed4_change_edit_mode(AW_root *root)
void ED4_scrollbar_change_cb(AW_window *aww)
void update_scrolled_rectangle()
size_t get_max_screen_pos() const
void ED4_quit_editor(AW_window *aww)
void add_timed_callback(int ms, const TimedCallback &tcb)
#define CONSENSUS_CONFIG_GROUP
#define SIGNIFICANT_FIELD_CHARS
#define TREE_TERMINAL_WIDTH
#define ED4_AWAR_CONSENSUS_GAPBOUND
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)
ED4_terminal * owner_of_cursor
int slider_pos_horizontal
current position of the vertical slider
void create_consensus(ED4_abstract_group_manager *upper_group_manager, arb_progress *progress)
AW_window * ED4_create_consensus_definition_window(AW_root *root)
static void group_species_by_field_content(AW_window *, AW_window *use_as_main_window, AW_window *window_to_hide)
int get_width(int gc) const
static void ed4_scroll(AW_window *aww, int xdiff, int ydiff, bool use_scroll_speed)
static SpeciesFlags & mutable_instance()
ED4_reference_terminals ref_terminals
#define ED4_AWAR_CONSENSUS_SHOW
static void create_new_species(AW_window *, SpeciesCreationMode creation_mode)
GB_ERROR GB_push_transaction(GBDATA *gbd)
int get_screen_pos() const
int get_header_length() const
#define NO_FIELD_SELECTED
char * AWTC_makeUniqueShortName(const char *prefix, UniqueNameDetector &existingNames)
int sequence2base_position(int seq_pos) const
int is_multi_species_manager() const
GB_ERROR GB_incur_error_if(bool error_may_occur)
AW_awar * add_callback(const RootCallback &cb)
void create_itemfield_selection_button(AW_window *aws, const FieldSelDef &selDef, const char *at)
bool has_property(ED4_properties prop) const
static void createGroupFromSelected(GB_CSTR group_name, GB_CSTR field_name, GB_CSTR field_content)
const char * AW_get_nameserver_addid(GBDATA *gb_main)
void save_current_config(char *confname)
const AW_font_limits & get_font_limits(int gc, char c) const
#define CONSENSUS_CONFIG_GAPBOUND
void GB_change_my_security(GBDATA *gbd, int level)
bool is_consensus_manager() const
ED4_scroll_picture scroll_picture
#define ED4_AWAR_CREATE_FROM_CONS_ALL_UPPER
char * build_consensus_string(PosRange range) const
#define CONSENSUS_CONFIG_ID
AW_window * ED4_create_loadSAI_window(AW_root *awr)
GB_ERROR GB_await_error()
static AW_root * SINGLETON
GBDATA * GB_create_container(GBDATA *father, const char *key)
const AW_font_limits & get_limits(int gc) const
WindowCallback makeHelpCallback(const char *helpfile)
void invalidate_species_counters()
static unsigned ED4_timer(AW_root *)
#define ED4_AWAR_CREATE_FROM_CONS_DATA_SOURCE
int abs_2_rel(int abs) const
void append_member(ED4_base *new_member)
GB_TYPES GB_read_type(GBDATA *gbd)
int SEQ_TERM_TEXT_YOFFSET
void ED4_build_group_manager_end(ED4_multi_species_manager *multi_species_manager)
#define ED4_AWAR_SPECIES_TO_CREATE
void ED4_request_relayout()
#define CONSENSUS_CONFIG_CONSIDBOUND
long window_upper_clip_point
AW_window * AWT_create_IUPAC_info_window(AW_root *aw_root)
void get_event(AW_event *eventi) const
void ED4_new_editor_window(AW_window *aww)
long window_lower_clip_point
GBDATA * get_gb_main() const
#define ED4_AWAR_NDS_INFO_WIDTH
#define ED4_AWAR_CONSENSUS_LOWER
LoadableSaiState loadable_SAIs
void ED4_calc_terminal_extentions()
virtual void request_refresh(int clear=1)=0
AW_DB_selection * awt_create_CONFIG_selection_list(GBDATA *gb_main, AW_window *aws, const char *varname)
ED4_returncode rebuild_consensi(ED4_base *start_species, ED4_update_flag update_flag)
static AW_window * create_group_species_by_field_window(AW_root *aw_root, AW_window *use_as_main_window)
static int get_max_slider_xpos()
#define AWAR_FIELD_CHOSEN
#define AWAR_EDIT_HELIX_SPACING
void ED4_motion_cb(AW_window *aww)
bool in_consensus_terminal() const
char * GB_get_subfields(GBDATA *gbd)
#define ED4_AWAR_CONSENSUS_CONSIDBOUND
ED4_window * first_window
static long tracked_cursorpos
static void error(const char *msg)
GB_ERROR GB_abort_transaction(GBDATA *gbd)
#define CONSENSUS_CONFIG_UPPER
int get_max_width() const
void reset_all_for_new_config()
AW_window * current_aww()
static ARB_ERROR add_species_to_merge_list(ED4_base *base, SpeciesMergeList **smlp, GBDATA *gb_species_data)
#define ED4_AWAR_DIGITS_AS_REPEAT
void ED4_remote_event(AW_event *faked_event)
#define ED4_AWAR_COMPRESS_SEQUENCE_PERCENT
ED4_root_group_manager * root_group_man
int shown_sequence_to_screen(int sequence_pos) const
#define ED4_AWAR_CONSENSUS_UPPER
void set_screen_relative_pos(int scroll_to_relpos)
static void consensus_upper_lower_changed_cb(AW_root *awr, bool upper_changed)
ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb) FINAL_OVERRIDE
void ED4_consensus_definition_changed(AW_root *)
#define AWAR_SET_CURSOR_POSITION
ED4_main_manager * main_manager
void group_species_cb(AW_window *aww, bool use_fields)
void calc_world_coords(AW_pos *x, AW_pos *y) const
GBDATA * GBT_find_species_rel_species_data(GBDATA *gb_species_data, const char *name)
char * read_string() const
static int timer_calls_triggered
void set_mode(ED4_remap_mode Mode, int above_percent)
CONSTEXPR_INLINE bool valid(SpeciesCreationMode m)
AW_awar * awar(const char *awar)
void ED4_consensus_display_changed(AW_root *root)
void delete_window(ED4_window *window)
ED4_scroll_links scroll_links
ED4_list_elem * next() const
GB_alignment_type alignment_type
bool nameIsUnique(const char *short_name, GBDATA *gb_species_data)
void ED4_compression_changed_cb(AW_root *awr)
void unlink_awars_from_DB(GBDATA *gb_main)
static int SpeciesMergeListLength(SpeciesMergeList *sml)
static void ED4_start_editor_on_configuration(AW_window *aww)
static ARB_ERROR update_group_folding(ED4_base *base, group_folding *folding)
ED4_multi_species_manager * get_multi_species_manager() const
ED4_sequence_info_terminal * sequence_info()
bool is_consensus_terminal() const
void ED4_trigger_instant_refresh()
ASSERTING_CONSTEXPR_INLINE int bio2info(int biopos)
GB_ERROR GB_export_errorf(const char *templat,...)
void resize_all_requesting_childs()
AW_window * ED4_create_saveConfigurationAs_window(AW_root *awr)
ED4_cursor & current_cursor()
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
#define ED4_AWAR_CREATE_FROM_CONS_CREATE_POINTS
void auto_space(int xspace, int yspace)
#define ED4_AWAR_CREATE_FROM_CONS_REPL_POINT
static GB_ERROR ED4_load_new_config(char *name)
int MAXSEQUENCECHARACTERLENGTH
void remove_all_callbacks()
void ED4_init_notFoundMessage()
#define GB_GROUP_NAME_MAX
static void freeSpeciesMergeList(SpeciesMergeList *sml)
long terminal_add_spacing
void ED4_create_consensus_awars(AW_root *aw_root)
void ED4_vertical_change_cb(AW_window *aww)
GB_ERROR GBT_write_string(GBDATA *gb_container, const char *fieldpath, const char *content)
#define ED4_AWAR_SCROLL_MARGIN
#define ED4_AWAR_COMPRESS_SEQUENCE_HIDE
static void scrollHalfPage(bool backwards, bool horizontal)
ED4_CursorJumpType cursor_jump
AW_awar * map(const char *awarn)
static ED4_EDITMODE ED4_get_edit_mode(AW_root *root)
void jump_sequence_pos(int sequence_pos, ED4_CursorJumpType jump_type)
const char * get_alignment_name() const
char * GB_read_string(GBDATA *gbd)
GB_ERROR write_sequence(const char *seq, int seq_len)
void calculate_header_dimensions(AW_device *device, int gc)
ED4_window * current_ed4w()
AW_window * ED4_create_editor_options_window(AW_root *root)
void set_horizontal_scrollbar_position(int position)
void ED4_horizontal_change_cb(AW_window *aww)
ItemSelector & SPECIES_get_selector()
void ED4_get_and_jump_to_species(GB_CSTR species_name)
ED4_list_elem< T > * head() const
ED4_sequence_terminal * sequence()
#define AWAR_EDIT_TERMINAL_SPACING
static void executeKeystroke(AW_event *event, int repeatCount)
void update_requested_by_child()
long window_right_clip_point
bool ED4_is_gap_character(char chr)
ED4_returncode set_scrolled_rectangle(ED4_base *x_link, ED4_base *y_link, ED4_base *width_link, ED4_base *height_link)
void request_refresh(int clear=1) FINAL_OVERRIDE
void aw_message(const char *msg)
ED4_returncode scroll_rectangle(int dx, int dy)
char encode(const char bases[], GB_alignment_type aliType)
#define SPACER_NOCONS_HEIGHT
void ED4_resize_all_extensions()
ED4_returncode refresh_all_windows(bool redraw)
long max_seq_terminal_length
GBDATA * GBT_find_or_create_species(GBDATA *gb_main, const char *name, bool markCreated)
void shutdown_macro_recording(AW_root *aw_root)
const ED4_remap * remap() const
static void group_species(bool use_field, AW_window *use_as_main_window)
void ED4_request_full_refresh()
#define ED4_AWAR_GAP_CHARS
int is_sequence_terminal() const
const char * GBT_get_name(GBDATA *gb_item)
void set_vertical_scrollbar_position(int position)
char * resolve_pointer_to_string_copy(int *str_len=NULp) const FINAL_OVERRIDE
AW_ProcessEventType peek_key_event(AW_window *)
int get_sequence_pos() const
AW_window_menu_modes * aww
GB_transaction ta(gb_var)
ED4_returncode create_hierarchy(const char *area_string_middle, const char *area_string_top)
int INFO_TERM_TEXT_YOFFSET
RefPtr< ED4_cursor > cursor
long window_left_clip_point
cursorpos(ED4_window *win)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
AW_window * ED4_create_new_seq_window(AW_root *root, SpeciesCreationMode creation_mode)
char * aw_input(const char *title, const char *prompt, const char *default_input)
int get_pixel_width() const
int get_max_height() const
ED4_manager * get_parent(ED4_level lev) const
int slider_pos_vertical
window id
ED4_EDITMODE awar_edit_mode
ARB_ERROR rebuild_consensus(ED4_base *object)
void ED4_input_cb(AW_window *aww)
#define CONSENSUS_CONFIG_LOWER
static char * filter_loadable_SAIs(GBDATA *gb_sai)
#define AWAR_EDIT_CONFIGURATION
int is_group_manager() const
ED4_properties dynamic_prop
AW_window * ED4_create_loadConfiguration_window(AW_root *awr)
GB_ERROR write_int(long aw_int)
void ED4_get_and_jump_to_selected_SAI(AW_window *aww)
void ed4_changesecurity(AW_root *root)
void inc_and_check_user_abort(GB_ERROR &error)
int is_species_name_terminal() const
void aw_message_if(GB_ERROR error)
CONSTEXPR long FIELD_FILTER_STRING_READABLE
void GB_close(GBDATA *gbd)
static GB_ERROR createDataFromConsensus(GBDATA *gb_species, ED4_group_manager *group_man)
static int get_max_slider_ypos()
static AWT_config_mapping_def consensus_config_mapping[]
GBDATA * GBT_get_species_data(GBDATA *gb_main)