45 #include "../WINDOW/aw_status.hxx"
71 void ED4_WinContext::warn_missing_context()
const {
74 aw_message(
"Missing context - please send information from console to devel@arb-home.de");
113 void ED4_root::refresh_window_simple(
bool redraw) {
115 bool refresh_all =
false;
117 #if defined(TRACE_REFRESH)
118 fprintf(stderr,
"- clear display (refresh_window_simple(redraw=true) called)\n");
fflush(stderr);
125 if (redraw)
main_manager->update_info.set_clear_at_refresh(0);
128 void ED4_root::handle_update_requests(
bool& redraw) {
130 #if defined(TRACE_REFRESH)
131 fprintf(stderr,
"- handling requested deletes\n");
fflush(stderr);
138 #if defined(TRACE_REFRESH)
139 fprintf(stderr,
"- handling requested updates\n");
fflush(stderr);
146 #if defined(TRACE_REFRESH)
147 fprintf(stderr,
"- handling requested resizes\n");
fflush(stderr);
164 if (handle_updates) handle_update_requests(redraw);
165 refresh_window_simple(redraw);
173 handle_update_requests(redraw);
178 refresh_window_simple(redraw);
179 window = window->
next;
204 AW_pos xwrld_calc = xwin_org;
205 AW_pos ywrld_calc = ywin_org;
211 AW_pos xwin_back = xwrld_calc;
212 AW_pos ywin_back = ywrld_calc;
218 return all().of(precondition, win_2_world_conversion, world_back2_win_conversion);
227 AW_pos xwin_calc = xwrld_org;
228 AW_pos ywin_calc = ywrld_org;
234 return all().of(precondition, world_2_win_conversion);
237 #define TEST_EXPECT_WIN_UNFOLDED(xwi,ywi) TEST_EXPECTATION(correct_win2world_calculation(foldable, xwi, ywi, xwi, ywi))
238 #define TEST_EXPECT_WIN_WORLD_FOLDING(xwi,ywi,fx,fy) TEST_EXPECTATION(correct_win2world_calculation(foldable, xwi, ywi, (xwi)+(fx), (ywi)+(fy)))
239 #define TEST_EXPECT_WORLD_WIN_FOLDING(xwo,ywo,xwi,ywi) TEST_EXPECTATION(correct_world2win_calculation(foldable, xwo, ywo, xwi, ywi))
241 #define TEST_EXPECT_WIN_WORLD_FOLDING__BROKEN(xwi,ywi,fx,fy) TEST_EXPECTATION__BROKEN(correct_win2world_calculation(foldable, xwi, ywi, (xwi)+(fx), (ywi)+(fy)))
242 #define TEST_EXPECT_WIN_WORLD_FOLDING__BROKENIF(when,xwi,ywi,fx,fy) TEST_EXPECTATION__BROKENIF(when, correct_win2world_calculation(foldable, xwi, ywi, (xwi)+(fx), (ywi)+(fy)))
244 void TEST_win_2_world() {
259 const int x01 = X1/2;
260 const int x12 = (X1+X2)/2;
261 const int x23 = X2+x01;
263 const int y01 = Y1/2;
264 const int y12 = (Y1+Y2)/2;
265 const int y23 = Y2+y01;
267 TEST_EXPECT_WIN_UNFOLDED(x01, y01);
268 TEST_EXPECT_WIN_UNFOLDED(x12, y01);
269 TEST_EXPECT_WIN_UNFOLDED(x23, y01);
271 TEST_EXPECT_WIN_UNFOLDED(x01, y12);
272 TEST_EXPECT_WIN_UNFOLDED(x12, y12);
273 TEST_EXPECT_WIN_UNFOLDED(x23, y12);
275 TEST_EXPECT_WIN_UNFOLDED(x01, y23);
276 TEST_EXPECT_WIN_UNFOLDED(x12, y23);
277 TEST_EXPECT_WIN_UNFOLDED(x23, y23);
279 for (
int FACTOR = 1; FACTOR <= 100; FACTOR += 7) {
291 TEST_EXPECT_WIN_UNFOLDED (x01, y01);
292 TEST_EXPECT_WIN_WORLD_FOLDING(x12, y01, V1, 0);
293 TEST_EXPECT_WIN_WORLD_FOLDING(x23, y01, V1+V2, 0);
295 TEST_EXPECT_WIN_WORLD_FOLDING(x01, y12, 0, H1);
296 TEST_EXPECT_WIN_WORLD_FOLDING(x12, y12, V1, H1);
297 TEST_EXPECT_WIN_WORLD_FOLDING(x23, y12, V1+V2, H1);
299 TEST_EXPECT_WIN_WORLD_FOLDING(x01, y23, 0, H1+H2);
300 TEST_EXPECT_WIN_WORLD_FOLDING(x12, y23, V1, H1+H2);
301 TEST_EXPECT_WIN_WORLD_FOLDING(x23, y23, V1+V2, H1+H2);
305 TEST_EXPECT_WORLD_WIN_FOLDING(X1-1, Y1-1, X1-1, Y1-1);
306 TEST_EXPECT_WORLD_WIN_FOLDING(X1, Y1, X1-V1, Y1-H1);
307 TEST_EXPECT_WORLD_WIN_FOLDING(X1+5, Y1+5, X1+5-V1, Y1+5-H1);
308 TEST_EXPECT_WORLD_WIN_FOLDING(X1+V1, Y1+H1, X1, Y1);
309 TEST_EXPECT_WORLD_WIN_FOLDING(X1+V1+1, Y1+H1+1, X1+1, Y1+1);
334 delete name_term->highlight_info;
335 name_term->highlight_info =
NULp;
336 name_term->containing_species_manager()->set_highlighted(
false);
337 name_term->dragged =
false;
340 GBDATA *gbd = name_term->get_species_pointer();
347 ED4_species_manager *spec_man = name_term->get_parent(
LEV_SPECIES)->to_species_manager();
349 if (spec_man->is_consensus_manager()) {
350 printf(
"removed consensus '%s'\n", name_term->id);
353 printf(
"removed unknown term '%s'\n", name_term->id ? name_term->id :
"NULp");
358 name_term->request_refresh();
375 if (
win->aww == aww) {
376 most_recently_used_window =
win;
388 name_term->highlight_info = hl_info;
391 ED4_level mlevel = name_term->spec.handled_level;
394 while (tmp_object && !(tmp_object->
spec.
level & mlevel)) {
395 tmp_object = tmp_object->
parent;
403 hl_info->
object = name_term;
405 name_term->containing_species_manager()->set_highlighted(
true);
408 GBDATA *gbd = name_term->get_species_pointer();
414 ED4_species_manager *spec_man = name_term->get_parent(
LEV_SPECIES)->to_species_manager();
415 if (spec_man->is_consensus_manager()) {
416 printf(
"added consensus '%s'\n", name_term->id);
419 printf(
"added unknown term '%s'\n", name_term->id ? name_term->id :
"NULp");
424 name_term->request_refresh();
460 #if defined(DEBUG) && 1
467 MAXSEQUENCECHARACTERLENGTH = new_length;
507 int alignment_length =
GB_read_int(gb_alignment_len);
523 for (
unsigned i = 0; i<
ARRAY_ELEMS(font_GC); ++i) {
531 base->to_multi_species_manager()->update_requested_by_child();
539 long total_no_of_groups = 0;
540 long total_no_of_species = 0;
545 const char *area_string[2] = { area_string_top, area_string_middle };
546 for (
int a = 0; a<2; ++a) {
552 total_no_of_groups += group_count;
553 total_no_of_species += species_count;
575 int col_stat_term_height = 50;
580 new ED4_sequence_info_terminal(
"Reference_ColumnStatistics_Info_Terminal",
MAXINFO_WIDTH, col_stat_term_height,
NULp),
581 new ED4_columnStat_terminal (
"Reference_ColumnStatistics_Terminal", 300, col_stat_term_height,
NULp)
586 arb_progress species_progress(
"Loading species", total_no_of_species);
591 ED4_spacer_terminal *top_spacer_terminal;
592 ED4_spacer_terminal *top_mid_spacer_terminal;
593 ED4_spacer_terminal *top_multi_spacer_terminal_beg;
600 top_spacer_terminal =
new ED4_spacer_terminal(
"Top_Spacer",
false, 100, 10, top_area_manager);
606 top_multi_spacer_terminal_beg =
new ED4_spacer_terminal(
"Top_Left_Spacer",
false, 0, 3, top_multi_species_manager);
607 top_multi_species_manager->
append_member(top_multi_spacer_terminal_beg);
615 const int TOP_MID_LINE_HEIGHT = 3;
618 top_mid_line_terminal =
new ED4_line_terminal(
"Top_Mid_Line_Terminal", 0, TOP_MID_LINE_HEIGHT, device_manager);
621 top_mid_spacer_terminal =
new ED4_spacer_terminal(
"Top_Middle_Spacer",
true, 880, TOP_MID_SPACER_HEIGHT, device_manager);
625 main_manager->set_top_middle_spacer_terminal(top_mid_spacer_terminal);
626 main_manager->set_top_middle_line_terminal(top_mid_line_terminal);
632 ED4_tree_terminal *tree_terminal;
634 ED4_spacer_terminal *mid_multi_spacer_terminal_beg;
636 ED4_spacer_terminal *total_bottom_spacer;
638 middle_area_manager =
new ED4_area_manager(
"Middle_Area_Manager", 0, 0, device_manager);
642 tree_terminal =
new ED4_tree_terminal(
"Tree", 2, 0, middle_area_manager);
646 middle_area_manager->
append_member(mid_multi_species_manager);
648 mid_multi_spacer_terminal_beg =
new ED4_spacer_terminal(
"Mid_Multi_Spacer_Terminal_Beg",
false, 0, 3, mid_multi_species_manager);
649 mid_multi_species_manager->
append_member(mid_multi_spacer_terminal_beg);
660 ED4_spacer_terminal *mid_bot_spacer_terminal =
new ED4_spacer_terminal(
"Middle_Bot_Spacer_Terminal",
false, 880, 10, device_manager);
664 mid_bot_line_terminal =
new ED4_line_terminal(
"Mid_Bot_Line_Terminal", 0, 3, device_manager);
667 total_bottom_spacer =
new ED4_spacer_terminal(
"Total_Bottom_Spacer_terminal",
false, 0, 10000, device_manager);
677 top_multi_spacer_terminal_beg->extension.size[
WIDTH] = spacer_width;
678 mid_multi_spacer_terminal_beg->extension.size[
WIDTH] = spacer_width;
679 total_bottom_spacer->extension.size[
WIDTH] = spacer_width;
686 tree_terminal->set_links(
NULp, mid_multi_species_manager);
687 top_spacer_terminal->set_links(tree_terminal, top_multi_species_manager);
688 top_mid_spacer_terminal->set_links(middle_area_manager,
NULp);
689 total_bottom_spacer->set_links(mid_bot_line_terminal,
NULp);
691 species_progress.
done();
700 startup_progress->
done();
710 arb_progress consensi_progress(
"Initializing consensi", total_no_of_species+total_no_of_groups+1);
714 consensi_progress.
done();
744 #if defined(DEBUG) && 0
746 puts(
"---------------------------------------- [main_manager dump start]");
748 puts(
"---------------------------------------- [main_manager dump end]");
762 x2 =
int(flv->get_pos());
774 y2 =
int(flh->get_pos());
783 if (x1<=x && x<=x2 && y1<=y && y<=y2) {
828 ED4_species_manager *species_manager = base->to_species_manager();
829 ED4_species_name_terminal *species_name_terminal = species_manager->search_spec_child_rek(
LEV_SPECIES_NAME)->to_species_name_terminal();
831 if (species_name_terminal->get_species_pointer()) {
832 char *species_name =
GB_read_as_string(species_name_terminal->get_species_pointer());
854 ED4_species_name_terminal *name_term = base->to_species_name_terminal();
855 GBDATA *gbd = name_term->get_species_pointer();
860 return strcmp(name, wanted_name) == 0;
875 return base ? base->to_species_name_terminal() :
NULp;
879 return base ? base->to_species_name_terminal() :
NULp;
883 return base ? base->to_species_name_terminal() :
NULp;
888 char *consensus =
NULp;
912 if (!curr_aligner_elem)
return NULp;
914 ED4_species_manager *specMan = curr_aligner_elem->
elem()->object->containing_species_manager();
915 curr_aligner_elem = curr_aligner_elem->
next();
916 return specMan->get_species_pointer();
922 if (total_no_of_selected_species) {
923 *total_no_of_selected_species = selected;
930 curr_aligner_elem =
NULp;
955 GBDATA *gb_sai_data = sai_info_term->data();
1003 AW_window_simple *aws =
new AW_window_simple;
1005 aws->init(root,
"ZOOM_ERR_MSG",
"Errors and warnings");
1010 aws->create_button(
"HIDE",
"HIDE");
1014 aws->create_button(
"CLEAR",
"CLEAR");
1016 aws->at(
"errortext");
1023 static char *
cat(
char *toBuf,
const char *s1,
const char *s2) {
1026 while ((*buf++=*s1++)!=0) ;
1028 while ((*buf++=*s2++)!=0) ;
1034 const char *label_prefix,
const char *macro_prefix,
1035 const char *pattern_awar_name,
const char *show_awar_name,
1041 awmm->
at(
cat(buf, label_prefix,
"search"));
1045 awmm->
at(
cat(buf, label_prefix,
"n"));
1048 awmm->
create_button(
cat(buf, macro_prefix,
"_SEARCH_NEXT"),
"#edit/next.xpm");
1050 awmm->
at(
cat(buf, label_prefix,
"l"));
1053 awmm->
create_button(
cat(buf, macro_prefix,
"_SEARCH_LAST"),
"#edit/last.xpm");
1055 awmm->
at(
cat(buf, label_prefix,
"d"));
1058 awmm->
create_button(
cat(buf, macro_prefix,
"_SEARCH_DETAIL"),
"#edit/detail.xpm");
1060 awmm->
at(
cat(buf, label_prefix,
"s"));
1072 GBDATA *gbd = seq_info_term->data();
1078 error = ta.
close(error);
1081 error =
"No species selected";
1186 win->aww->select_mode(smode);
1202 char *helix_string =
NULp;
1211 return helix_string;
1217 if (aliDataAccess.
isNull()) {
1228 return aliDataAccess.
content();
1235 e4_assert(!last_data_access || (last_data_access == data_access));
1236 last_data_access = data_access;
1255 result =
"edit4.arb";
1258 static char *ali_name =
NULp;
1259 static char *ali_type =
NULp;
1260 static char *result_copy =
NULp;
1271 result_copy =
new char[21+strlen(ali_name)];
1274 sprintf(result_copy,
"edit4_%s.arb", mode == 0 ? ali_name : ali_type);
1275 result = result_copy;
1286 typedef std::map<AW_gc_manager*, AW_window*> gcwin;
1289 gcwin::iterator found = win.find(gcman);
1292 if (found == win.end()) {
1385 "#SEQUENCES (0)$#505050",
1387 "+-HELIX (1)$#8E0000",
"+-COLOR 2$#0000dd",
"-COLOR 3$#00AA55",
1388 "+-COLOR 4$#80f",
"+-COLOR 5$#c0a020",
"-COLOR 6$grey",
1389 "+-COLOR 7$#ff0000",
"+-COLOR 8$#44aaff",
"-COLOR 9$#ffaa00",
1391 "+-CURSOR$#FF0080",
"+-MARKED$#f4f8e0",
"-SELECTED$#FFFF80",
1393 "+-RANGE 0$#FFFFFF",
"+-RANGE 1$#F0F0F0",
"-RANGE 2$#E0E0E0",
1394 "+-RANGE 3$#D8D8D8",
"+-RANGE 4$#D0D0D0",
"-RANGE 5$#C8C8C8",
1395 "+-RANGE 6$#C0C0C0",
"+-RANGE 7$#B8B8B8",
"-RANGE 8$#B0B0B0",
1400 "+-User1$#B8E2F8",
"+-User2$#B8E2F8",
"-Probe$#B8E2F8",
1401 "+-Primer(l)$#A9FE54",
"+-Primer(r)$#A9FE54",
"-Primer(g)$#A9FE54",
1402 "+-Sig(l)$#DBB0FF",
"+-Sig(r)$#DBB0FF",
"-Sig(g)$#DBB0FF",
1404 "+-MISMATCHES$#FF9AFF",
"+-Flag$#7c7ce3",
"-FlagFill$#aacef1",
1413 if (!first_gc_manager) first_gc_manager =
gc_manager;
1419 AWT_create_debug_menu(awmm);
1474 char macro[] =
"to_0",
1475 topic[] =
".. to 0",
1478 for (
char i=
'0'; i<=
'6'; i++) {
1479 macro[3] = topic[6] = hotkey[0] = i;
1503 #if defined(ARB_OPENGL)
1505 #endif // ARB_OPENGL
1518 const char *hotkeys =
"12Poiclrg";
1519 char hotkey[] =
"_";
1526 int len = strlen(
id);
1528 char *menu_entry_name = macro_name+(len+8);
1531 memset(macro_name, 0, 2*(len+8));
1533 sprintf(macro_name,
"%s_SEARCH",
id);
1540 sprintf(menu_entry_name,
"%s Search",
id);
1542 hotkey[0] = hotkeys[
s];
1634 static const char *
const tag[] = {
"save_alispecific_props",
"save_alitype_props",
"save_props" };
1635 static const char *
const entry_type[] = {
"alignment specific ",
"ali-type specific ",
"" };
1638 int default_mode = -1;
1639 for (
int mode = 0; mode <= 2; ++mode) {
1641 default_mode = mode;
1645 if (default_mode == -1) default_mode = 2;
1651 for (
int mode = 2; mode >= 0; --mode) {
1652 char hotkey[] =
"x";
1653 hotkey[0] =
"Pta"[mode];
1670 int db_pathx, db_pathy;
1674 awmm->
load_xfig(
"edit4/editmenu.fig",
false);
1730 awmm->
at(
"helixnr");
1766 awmm->
at(
"aligner");
1781 awmm->
at(
"protect");
1816 awmm->
at(
"secedit");
1821 #if defined(ARB_OPENGL)
1826 #endif // ARB_OPENGL
1829 awmm->
at(
"secedit");
1833 xoffset = xsecedit-xzoom;
1849 awmm->
at(
"errortext");
1866 awmm->
create_toggle(
"key_mapping/enable",
"#edit/nokeymap.xpm",
"#edit/keymap.xpm");
1871 #define INSERT_SEARCH_FIELDS(Short, label_prefix, prefix) \
1872 insert_search_fields(awmm, \
1875 ED4_AWAR_##prefix##_SEARCH_PATTERN, \
1876 ED4_AWAR_##prefix##_SEARCH_SHOW, \
1878 ED4_##prefix##_PATTERN, \
1892 #undef INSERT_SEARCH_FIELDS
1914 AWT_check_action_ids(awmm->
get_root(),
"");
1938 return new_window->
aww;
1949 if (scr_pos>max_scrpos) scr_pos = max_scrpos;
1955 char *propname =
NULp;
1958 for (
int mode = 0; !propname && mode <= 1; ++mode) {
1961 freedup(propname, fullprop);
1973 : most_recently_used_window(
NULp),
1982 middle_area_man(
NULp),
1984 root_group_man(
NULp),
1986 folding_action(
false),
1991 sequence_colors(
NULp),
1996 helix_add_spacing(0),
1997 terminal_add_spacing(0),
2001 column_stat_activated(
false),
2002 column_stat_initialized(
false),
2003 visualizeSAI(
false),
2004 visualizeSAI_allSpecies(
false),
2024 free(alignment_name);
GB_ERROR GB_begin_transaction(GBDATA *gbd)
static void ED4_popup_helix_or_pfold_window(AW_window *aw_parent, GB_alignment_type aliType)
bool inside_SAI_manager() const
void insert_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
static ARB_ERROR change_char_table_length(ED4_base *base, int new_length)
static bool have_context()
void ED4_set_iupac(AW_window *aww, const char *awar_name)
void get_at_position(int *x, int *y) const
void FastAligner_create_variables(AW_root *root, AW_default db1)
static ARB_ERROR force_group_update(ED4_base *base)
static void reload_ecoli_cb()
ED4_returncode generate_window(AW_device **device, ED4_window **new_window)
void ED4_get_marked_from_menu(AW_window *)
void group_species_cb(AW_window *aww, bool use_fields)
void calc_no_of_all(const char *string_to_scan, long *group, long *species)
AW_device * current_device()
GB_ERROR GB_commit_transaction(GBDATA *gbd)
static void reload_helix_cb()
void ED4_jump_to_cursor_position(AW_window *aww, const char *awar_name, PositionType posType)
void button_length(int length)
GB_CSTR GB_path_in_arbprop(const char *relative_path)
void special_window_refresh(bool handle_updates)
int get_at_xposition() const
#define AWAR_EDIT_SECURITY_LEVEL
AW_device * get_device(AW_area area)
long GB_read_int(GBDATA *gbd)
#define AWAR_EDIT_TITLE_MODE
const AW_screen_area & get_area_size() const
static ARB_ERROR ED4_delete_temp_entries(GBDATA *species, GB_CSTR alignment_name)
AW_window * ED4_pfold_create_props_window(AW_root *awr, const WindowCallback *refreshCallback)
Creates the "Protein Match Settings" window.
ED4_area_manager * top_area_man
void ED4_activate_col_stat(AW_window *aww)
void insert_menu_topic(const char *id, const char *name, const char *mnemonic, const char *help_text_, AW_active mask, const WindowCallback &wcb)
AW_window * create_key_map_window(AW_root *root)
void set_dimension(AW_pos dim)
GB_ERROR GB_append_exportedError(GB_ERROR error)
AW_window * ED4_create_modsai_window(AW_root *root)
void load_xfig(const char *file, bool resize=true)
void aw_set_local_message()
GB_ERROR GB_add_callback(GBDATA *gbd, GB_CB_TYPE type, const DatabaseCallback &dbcb)
void request_refresh_for_all_terminals()
void deselect_all_species_and_SAI()
void update_window_coords()
long GBT_mark_all(GBDATA *gb_main, int flag)
virtual ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb)
static bool is_named(ED4_base *base, const char *wanted_name)
ED4_area_manager * middle_area_man
GBDATA * GBT_get_alignment(GBDATA *gb_main, const char *aliname)
void ED4_setBlocktype(ED4_blocktype bt)
BaseFrequencies & table()
void ED4_request_relayout()
void ED4_search_cb(UNFIXED, int searchDescriptor, ED4_window *ed4w)
#define INTEGRATED_ALIGNERS_TITLE
ED4_returncode get_area_rectangle(AW_screen_area *rect, AW_pos x, AW_pos y)
ED4_returncode deselect_all()
char * ARB_strdup(const char *str)
void create_toggle(const char *awar_name)
void warn_illegal_dimension()
static const char * propertyName(GBDATA *gb_main, int mode)
void change_table_length(int new_length)
void set_secstruct_display(bool show)
void GB_end_transaction_show_error(GBDATA *gbd, GB_ERROR error, void(*error_handler)(GB_ERROR))
char * GB_read_as_string(GBDATA *gbd)
static bool is_SAI_named(ED4_base *base, const char *sai_name)
void win_to_world_coords(AW_pos *xPtr, AW_pos *yPtr) const
static GBDATA * get_next_selected_species()
int slider_pos_horizontal
void add_callback(const RootCallback &cb) const
ED4_reference * reference
static bool get_selected_range(PosRange &range)
const char * GBS_global_string(const char *templat,...)
void PV_CallBackFunction(AW_root *root)
void marked_species_select(bool select)
int is_species_manager() const
void ED4_trigger_instant_refresh()
ED4_highlighted_list * highlighted_objects
static char * alignment_name
void GBK_terminatef(const char *templat,...)
void AW_POPDOWN(AW_window *window)
void AW_insert_common_property_menu_entries(AW_window_menu_modes *awmm)
ED4_window * get_matching_ed4w(AW_window *aww)
void update_scrolled_rectangle()
size_t get_max_screen_pos() const
void ED4_clear_stored_curpos()
AW_window * ED4_configure_species_flags(AW_root *root, GBDATA *gb_main)
bool isNull() const
test if SmartPtr is NULp
#define TREE_TERMINAL_WIDTH
ED4_terminal * owner_of_cursor
void create_consensus(ED4_abstract_group_manager *upper_group_manager, arb_progress *progress)
ED4_species_name_terminal * object
void ED4_change_cursor(AW_window *aww)
static ED4_window * insert_window(AW_window_menu_modes *new_aww)
void ED4_disable_col_stat(AW_window *)
ED4_folding_line * insert_folding_line(AW_pos pos, AW_pos dimension, ED4_properties prop)
int get_width(int gc) const
AW_gc_manager * gc_manager
AW_gc_manager * AW_manage_GC(AW_window *aww, const char *gc_base_name, AW_device *device, int base_drag, AW_GCM_AREA area, const GcChangedCallback &changecb, const char *default_background_color,...)
bool in_SAI_terminal() const
void ED4_request_full_instant_refresh()
const ED4_folding_line * get_horizontal_folding()
void ED4_request_full_refresh()
ED4_reference_terminals ref_terminals
#define ARRAY_ELEMS(array)
AW_window * ED4_create_viewDifferences_window(AW_root *awr)
GBDATA * GB_get_grandfather(GBDATA *gbd)
char * GBT_get_alignment_type_string(GBDATA *gb_main, const char *aliname)
void setNull()
set SmartPtr to NULp
void update_option_menu()
#define ED4_AWAR_CONSENSUS_SHOW
GB_ERROR GB_push_transaction(GBDATA *gbd)
static ED4_highlighted_elem * curr_aligner_elem
void AW_init_color_group_defaults(const char *for_program)
ED4_base * find_first_that(ED4_level level, const ED4_basePredicate &fulfills_predicate)
char * GBT_get_startup_alignment(GBDATA *gb_main)
AW_window * ED4_create_new_seq_window(AW_root *root, SpeciesCreationMode creation_mode)
#define AWAR_EDIT_RIGHTWARD
static void gc_change_cb(GcChange whatChanged)
void ED4_quit_editor(AW_window *aww)
int is_multi_species_manager() const
AW_awar * add_callback(const RootCallback &cb)
void init(ED4_sequence_info_terminal *, ED4_sequence_terminal *, ED4_sequence_info_terminal *, ED4_columnStat_terminal *)
static ARB_ERROR do_sth_with_species(ED4_base *base, const ED4_Species_Callback *cb)
char * detectProperties(GBDATA *gb_main)
void world_to_win_coords(AW_pos *xPtr, AW_pos *yPtr) const
void request_refresh_for_specific_terminals(ED4_level lev)
bool is_consensus_manager() const
void ED4_jump_to_current_species(AW_window *)
void ED4_new_editor_window(AW_window *aww)
GBDATA * GBT_find_SAI(GBDATA *gb_main, const char *name)
static void insert_search_fields(AW_window_menu_modes *awmm, const char *label_prefix, const char *macro_prefix, const char *pattern_awar_name, const char *show_awar_name, int short_form, ED4_SearchPositionType type, ED4_window *ed4w)
void ED4_popup_search_window(AW_window *aww, ED4_SearchPositionType type)
char * build_consensus_string(PosRange range) const
#define SEQUENCE_INFO_WIDTH
ED4_species_name_terminal * ED4_find_species_name_terminal(const char *species_name)
int create_mode(const char *pixmap, const char *help_text_, AW_active mask, const WindowCallback &cb)
GB_ERROR GB_await_error()
#define ED4_AWAR_NDS_ECOLI_NAME
void ED4_toggle_detailed_column_stats(AW_window *aww)
void GDE_load_menu(AW_window *awm, AW_active, const char *menulabel)
void aw_clear_message_cb(AW_window *aww)
WindowCallback makeHelpCallback(const char *helpfile)
void invalidate_species_counters()
ED4_species_name_terminal * ED4_find_species_or_SAI_name_terminal(const char *species_name)
static ARB_ERROR request_terminal_refresh(ED4_base *base, ED4_level lev)
void append_member(ED4_base *new_member)
static char * get_group_consensus(const char *species_name, PosRange range)
AW_window * ED4_create_saveConfigurationAs_window(AW_root *awr)
void FastAligner_set_reference_species(AW_root *root)
bool inside_species_seq_manager() const
int is_abstract_group_manager() const
AW_window * ED4_CreateProteinViewer_window(AW_root *aw_root)
GB_ERROR ED4_pfold_set_SAI(char **protstruct, GBDATA *gb_main, const char *alignment_name, long *protstruct_len)
Sets the reference protein secondary structure SAI.
void show_sina_window(UNFIXED, const AlignDataAccess *alignData)
AW_window * ED4_create_loadConfiguration_window(AW_root *awr)
void aw_popup_ok(const char *msg)
GBDATA * get_gb_main() const
static void ED4_undo_redo(AW_window *aww, GB_UNDO_TYPE undo_type)
LoadableSaiState loadable_SAIs
void ED4_toggle_block_type()
virtual void request_refresh(int clear=1)=0
GB_BUFFER GB_give_buffer(size_t size)
void remove_from_highlighted(ED4_species_name_terminal *object)
ED4_returncode add_to_highlighted(ED4_species_name_terminal *object)
void create_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
ED4_window * first_window
AW_window * AW_create_gc_window(AW_root *aw_root, AW_gc_manager *gcman)
void help_text(const char *id)
static char const * macro_name
static ARB_ERROR ED4_with_all_loaded_species(const ED4_Species_Callback &cb)
static void error(const char *msg)
void STAT_destroy_ST_ML(ST_ML *&st_ml)
void scan_string(ED4_multi_species_manager *parent, ED4_reference_terminals &refterms, const char *str, int *index, arb_progress &progress)
AW_window * AW_preset_window(AW_root *root)
void mark_compile_needed_force()
AW_window * ED4_create_seq_colors_window(AW_root *awr, ED4_seq_colors *sc)
GBDATA * GB_searchOrCreate_int(GBDATA *gb_container, const char *fieldpath, long default_value)
#define ED4_AWAR_DIGITS_AS_REPEAT
void insert_help_topic(const char *labeli, const char *mnemonic, const char *helpText, AW_active mask, const WindowCallback &cb)
void ED4_no_dangerous_modes()
ED4_root_group_manager * root_group_man
void announce_useraction_in(AW_window *aww)
GB_alignment_type GBT_get_alignment_type(GBDATA *gb_main, const char *aliname)
ARB_ERROR route_down_hierarchy(const ED4_route_cb &cb) FINAL_OVERRIDE
void init(const char *seq, int size)
ED4_main_manager * main_manager
ED4_species_name_terminal * ED4_find_SAI_name_terminal(const char *sai_name)
const T * content() const
convert SmartPtr to plain old pointer (also works if isNull())
void invert_selection_of_all_species()
static void ED4_menu_perform_block_operation(AW_window *, ED4_blockoperation_type type)
UserActionTracker * need_macro_ability()
GB_ERROR GB_write_security_write(GBDATA *gbd, unsigned long level)
static WindowCallback simple(void(*root_cb)(AW_root *, T), T t)
static void modes_cb(AW_window *, ED4_species_mode smode)
AW_awar * awar(const char *awar)
GB_ERROR GB_pop_transaction(GBDATA *gbd)
void ED4_get_and_jump_to_current(AW_window *)
void insert_sub_menu(const char *name, const char *mnemonic, AW_active mask=AWM_ALL)
void ED4_exit() __ATTR__NORETURN
#define INSERT_SEARCH_FIELDS(Short, label_prefix, prefix)
void ED4_popup_detect_bad_alignment_window(AW_window *editor_window, const WindowCallback *helixSettings_cb)
ED4_scroll_links scroll_links
GBDATA * GBT_find_sequence(GBDATA *gb_species, const char *aliname)
ED4_list_elem * next() const
AW_window * ED4_create_loadSAI_window(AW_root *awr)
GB_alignment_type alignment_type
static char * cat(char *toBuf, const char *s1, const char *s2)
static AW_window * ED4_zoom_message_window(AW_root *root)
GB_ERROR GB_write_int(GBDATA *gbd, long i)
AW_window * ED4_create_nds_window(AW_root *root)
void selected_species_mark(bool mark)
ED4_blocktype ED4_getBlocktype()
void insert_default_option(AW_label choice_label, const char *mnemonic, const char *var_value, const char *name_of_color=NULp)
GB_ERROR GB_undo(GBDATA *gb_main, GB_UNDO_TYPE type) __ATTR__USERESULT
void ED4_calc_terminal_extentions()
ED4_multi_species_manager * get_multi_species_manager() const
AW_root * AWT_create_root(const char *properties, const char *program, UserActionTracker *user_tracker)
void copy_window_struct(ED4_window *source, ED4_window *destination)
void set_info_area_height(int height)
void create_input_field(const char *awar_name, int columns=0)
void ED4_popup_dot_missing_bases_window(AW_window *editor_window)
ED4_base * search_spec_child_rek(ED4_level level)
void resize_all_requesting_childs()
void AWT_trigger_remote_action(UNFIXED, GBDATA *gb_main, const char *remote_action_spec)
void set_bottom_area_height(int height)
ED4_cursor & current_cursor()
AW_awar * awar_int(const char *var_name, long default_value=0, AW_default default_file=AW_ROOT_DEFAULT)
void auto_space(int xspace, int yspace)
#define IF_ASSERTION_USED(x)
int MAXSEQUENCECHARACTERLENGTH
void ED4_init_notFoundMessage()
GB_ERROR close(GB_ERROR error)
void AW_help_entry_pressed(AW_window *aww)
static ARB_ERROR request_sequence_refresh(ED4_base *base, bool consensi)
ED4_root(GBDATA *gb_main_)
void ED4_restore_curpos(AW_window *aww)
#define AWAR_ERROR_MESSAGES
static void title_mode_changed(AW_root *aw_root, AW_window *aww)
void ED4_store_curpos(AW_window *aww)
bool has_elem(const T *elem) const
AW_window * FastAligner_create_window(AW_root *root, const AlignDataAccess *data_access)
void GB_touch(GBDATA *gbd)
const ED4_folding_line * get_next() const
void ED4_popup_gc_window(AW_window *awp, AW_gc_manager *gcman)
int ED4_encodeSearchDescriptor(int direction, ED4_SearchPositionType pattern)
ARB_ERROR FastAligner_delete_temp_entries(GBDATA *gb_species, const char *alignment)
AW_window * create_naligner_window(AW_root *root, GBDATA *gb_main)
static char * get_helix_string(GBDATA *gb_main, const char *alignment_name)
const char * get_alignment_name() const
char * GB_read_string(GBDATA *gbd)
AW_window * create_helix_props_window(AW_root *awr)
void GBK_dump_backtrace(FILE *out, const char *message)
ED4_window * current_ed4w()
ED4_seq_colors * sequence_colors
void registerFont(AW_device *device_, int gc, const char *chars=NULp)
DECLARE_CBTYPE_FVV_AND_BUILDERS(ED4_Species_Callback, ARB_ERROR, GBDATA *)
void ED4_resize_all_extensions()
static bool is_species_named(ED4_base *base, const char *species_name)
ED4_list_elem< T > * head() const
static void ED4_set_protection(AW_window *aww, int wanted_protection)
void ED4_reloadConfiguration(AW_window *aww)
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)
void select_all(bool only_species)
void ED4_set_helixnr(AW_window *aww, const char *awar_name)
AW_option_menu_struct * create_option_menu(const char *awar_name)
ED4_index pixel2pos(AW_pos click_x)
void AW_save_specific_properties(AW_window *aw, const char *filename)
void insert_macro_menu_entry(AW_window *awm, bool prepend_separator)
AW_window * ED4_createVisualizeSAI_window(AW_root *aw_root)
static void ED4_remove_faligner_entries()
char * GBT_get_default_helix(GBDATA *)
ED4_returncode refresh_all_windows(bool redraw)
long max_seq_terminal_length
bool ED4_get_highlighted_range(ED4_terminal *term, PosRange &range)
AW_window * create_first_window()
bool GB_is_regularfile(const char *path)
static void ED4_save_properties(AW_window *aw, int mode)
void create_text_toggle(const char *var_name, const char *noText, const char *yesText, int buttonWidth=0)
GBDATA * GBT_find_species(GBDATA *gb_main, const char *name)
static void ED4_menu_highlight(AW_window *aww, MenuHighlightType hilight)
const ED4_remap * remap() const
static GBDATA * get_first_selected_species(int *total_no_of_selected_species)
void request_refresh_for_sequence_terminals()
static AW_window * ED4_create_faligner_window(AW_root *awr, const AlignDataAccess *data_access)
void ED4_saveConfiguration(AW_window *aww, bool hide_aww)
ED4_species_mode species_mode
const char * local_id(const char *id) const
void remove_elem(const T *elem)
void ED4_correctBlocktypeAfterModification()
void ED4_start_plugin(AW_window *aw, GBDATA *gb_main, const char *pluginname)
#define is_more_or_equal(val)
AW_window_menu_modes * aww
GB_transaction ta(gb_var)
void callback(const WindowCallback &cb)
ED4_returncode create_hierarchy(const char *area_string_middle, const char *area_string_top)
const AlignDataAccess * ED4_get_aligner_data_access()
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
void prepend_elem(T *elem)
void request_refresh_for_consensus_terminals()
GBDATA * GBT_get_SAI_data(GBDATA *gb_main)
GBDATA * GB_search(GBDATA *gbd, const char *fieldpath, GB_TYPES create)
ARB_ERROR init_alignment()
void shadow_width(int shadow_thickness)
int get_max_height() const
AW_window * ED4_create_consensus_definition_window(AW_root *root)
ED4_manager * get_parent(ED4_level lev) const
void ED4_helix_jump_opposite(AW_window *aww)
GB_ERROR init(GBDATA *gb_main)
static void toggle_helix_for_SAI(AW_window *aww)
AW_window * ED4_create_replace_window(AW_root *root)
AW_window * ED4_create_editor_options_window(AW_root *root)
static ED4_WinContext current_context
void ED4_alignment_length_changed(GBDATA *gb_alignment_len, GB_CB_TYPE gbtype)
void ED4_set_col_stat_threshold()
const char * ED4_SearchPositionTypeId[SEARCH_PATTERNS+1]
void ED4_perform_block_operation(ED4_blockoperation_type operationType)
void create_text_field(const char *awar_name, int columns=20, int rows=4)
void aw_message_if(GB_ERROR error)
char * GBS_global_string_copy(const char *templat,...)
AW_active sina_mask(AW_root *awr)
Adds support for protein structure prediction, comparison of two protein secondary structures and of ...
void create_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, const char *color=NULp)
void ED4_finish_and_show_notFoundMessage()
GB_write_int const char s