25 if (existing_colstat) {
34 sprintf(namebuffer,
"Sequence_Manager.%ld.%d",
ED4_counter, count++);
47 ref_colStat->extension.size[
HEIGHT] = columnStatHeight;
48 ref_colStat->extension.size[
WIDTH] = pixel_length;
50 ED4_sequence_info_terminal *new_colStat_info_term =
new ED4_sequence_info_terminal(
"CStat",
SEQUENCE_INFO_WIDTH, columnStatHeight, new_seq_man);
52 new_colStat_info_term->set_links(ref_colStat_info, ref_colStat);
55 sprintf(namebuffer,
"Column_Statistic_Terminal.%ld.%d",
ED4_counter, count++);
56 ED4_columnStat_terminal *new_colStat_term =
new ED4_columnStat_terminal(namebuffer, 0, columnStatHeight, new_seq_man);
57 new_colStat_term->set_both_links(ref_colStat);
91 bool do_config = forceConfig;
96 if (do_config) aw_config->
activate();
119 double ED4_columnStat_terminal::threshold = -1;
120 int ED4_columnStat_terminal::threshold_is_set() {
121 return threshold>=0 && threshold<=100;
123 void ED4_columnStat_terminal::set_threshold(
double aThreshold) {
124 threshold = aThreshold;
129 double default_threshold = 90.0;
130 if (ED4_columnStat_terminal::threshold_is_set()) {
131 default_threshold = ED4_columnStat_terminal::get_threshold();
133 char default_input[40];
134 sprintf(default_input,
"%6.2f", default_threshold);
136 char *input =
aw_input(
"Please insert threshold value for marking:", default_input);
138 double input_threshold = atof(input);
140 if (input_threshold<0 || input_threshold>100) {
141 aw_message(
"Illegal threshold value (allowed: 0..100)");
144 ED4_columnStat_terminal::set_threshold(input_threshold);
152 while (!ED4_columnStat_terminal::threshold_is_set()) {
161 error =
"First you have to place your cursor";
164 error =
"Display of column-statistic-details is only possible for species!";
170 error =
"Cannot display column statistics for this species (internal error?)";
bool column_stat_activated
ED4_sequence_info_terminal * column_stat_info()
void resize_requested_by_child()
AW_window * STAT_create_main_window(AW_root *root, ST_ML *st_ml)
#define COLUMN_STAT_ROW_HEIGHT(font_height)
void ED4_activate_col_stat(AW_window *aww)
void(* WindowCallbackSimple)(AW_window *)
void STAT_set_postcalc_callback(ST_ML *st_ml, WindowCallbackSimple postcalc_cb, AW_window *cb_win)
bool in_species_seq_terminal() const
static void show_detailed_column_stats_activated(AW_window *aww)
static void toggle_detailed_column_stat(ED4_sequence_terminal *seq_term, bool force_off)
int get_height(int gc) const
bool column_stat_initialized
static void col_stat_activated(AW_window *)
ED4_terminal * owner_of_cursor
void ED4_disable_col_stat(AW_window *)
ED4_reference_terminals ref_terminals
void request_refresh_for_specific_terminals(ED4_level lev)
#define SEQUENCE_INFO_WIDTH
void ED4_toggle_detailed_column_stats(AW_window *aww)
void append_member(ED4_base *new_member)
static void error(const char *msg)
ED4_columnStat_terminal * column_stat()
ED4_main_manager * main_manager
static void configureColumnStat(bool forceConfig, WindowCallbackSimple post_config_cb, AW_window *cb_win)
void Delete() FINAL_OVERRIDE
ED4_base * search_spec_child_rek(ED4_level level)
ED4_cursor & current_cursor()
void set_property(ED4_properties prop)
void set_col_stat_activated_and_refresh(bool activated)
void aw_message(const char *msg)
long max_seq_terminal_length
void request_refresh_for_sequence_terminals()
int is_sequence_terminal() const
AP_tree * STAT_find_node_by_name(ST_ML *st_ml, const char *species_name)
static ARB_ERROR forget_cached_column_stat(ED4_base *base)
char * aw_input(const char *title, const char *prompt, const char *default_input)
ED4_manager * get_parent(ED4_level lev) const
void ED4_set_col_stat_threshold()