40 if (!
PHDATA::ROOT)
return "Please select alignment and press DONE";
77 switch (display_what) {
83 cell_width = lim.
width;
88 off_dy = cell_height*3;
100 screen_width = squ.
r-squ.
l;
101 screen_height = squ.
b-squ.
t;
104 long horiz_paint_size, vert_paint_size;
105 switch (display_what) {
110 horiz_paint_size = (squ.
r-off_dx)/cell_width;
111 vert_paint_size = (squ.
b-off_dy)/cell_height;
121 horiz_paint_size = (squ.
r-off_dx)/cell_width;
122 vert_paint_size = (squ.
b-off_dy)/cell_height;
123 vert_paint_size -= (3/8)/cell_height + 2;
133 horiz_page_start = 0; horiz_last_view_start = 0;
134 vert_page_start = 0; vert_last_view_start = 0;
151 char buf[50], cbuf[2];
152 long x,
y, xpos, ypos;
156 long startcol, stopcol;
169 long ymax =
std::min(vert_page_start+vert_page_size, total_cells_vert);
170 for (y=vert_page_start; y<ymax; y++) {
179 device->
text(
PH_GC_SEQUENCE, (horiz_page_start >= seq_len) ?
"" : (seq_data+horiz_page_start), 0, ypos*cell_height-cell_offset);
195 for (x = horiz_page_start; x < horiz_page_start + horiz_page_size; x++) {
197 float ml = markerline[x];
199 if (x < startcol || x>stopcol) {
202 if (markerline[x] >= 0.0) {
203 if (ml < minhom || ml > maxhom) {
206 sprintf(buf,
"%3.0f", ml);
213 for (y = 0; y < 3; y++) {
214 strncpy(cbuf, buf + y, 1);
215 device->
text(gc, cbuf, xpos * cell_width + 1, vert_page_size * cell_height + y * lim.
get_height());
225 void PH_display::set_scrollbar_steps(
AW_window *aww,
long width_h,
long width_v,
long page_h,
long page_v) {
242 device->
move_region(0, off_dy, screen_width, vert_page_size*cell_height, 0, off_dy-cell_height);
243 device->
clear_part(0, off_dy-cell_height+(vert_page_size-1)*cell_height+1, screen_width, cell_height, -1);
248 device->
move_region(0, off_dy-cell_height, screen_width, (vert_page_size-1)*cell_height+1, 0, off_dy);
249 device->
clear_part(0, off_dy-cell_height, screen_width, cell_height, -1);
253 else device->
clear(-1);
270 device->
move_region(off_dx+cell_width, 0, horiz_page_size*cell_width, screen_height, off_dx, 0);
271 device->
clear_part(off_dx+(horiz_page_size-1)*cell_width, 0, cell_width, screen_height, -1);
276 device->
move_region(off_dx, 0, (horiz_page_size-1)*cell_width, screen_height, off_dx+cell_width, 0);
277 device->
clear_part(off_dx, 0, cell_width, screen_height, -1);
281 else device->
clear(-1);
295 font_width = lim.
width;
303 max_x = (rect.
r-rect.
l)/font_width;
304 max_y = (rect.
b-rect.
t)/font_height;
323 sprintf(buf,
"%ld", numl);
342 const int LABEL_LEN = 21;
351 phds.set_cursor(0, 0);
352 phds.write(
"FILTER STATUS REPORT:");
355 phds.writePadded(
"Start at column:", LABEL_LEN);
359 phds.writePadded(
"Stop at column:", LABEL_LEN);
363 phds.writePadded(
"Minimal similarity:", LABEL_LEN);
365 phds.set_cursor_x(phds.get_tab());
366 phds.writePadded(
"Maximal similarity:", LABEL_LEN);
371 phds.writePadded(
"'.':", LABEL_LEN);
375 phds.writePadded(
"'-':", LABEL_LEN);
379 phds.writePadded(
"ambiguity codes:", LABEL_LEN);
383 phds.writePadded(
"lowercase chars:", LABEL_LEN);
const char * filter_text[]
#define AWAR_PHYLO_FILTER_STARTCOL
virtual void clear(AW_bitset filteri)
static PH_display * ph_display
AW_device * get_device(AW_area area)
PH_display_status(AW_device *)
const AW_screen_area & get_area_size() const
#define AWAR_PHYLO_FILTER_AMBIG
void set_left_clip_border(int left, bool allow_oversize=false)
AW_window * phylo_main_window
void shift(const AW::Vector &doff)
void writePadded(const char *, size_t len)
virtual void clear_part(const AW::Rectangle &rect, AW_bitset filteri)
void set_top_clip_border(int top, bool allow_oversize=false)
void monitor_horizontal_scroll_cb(AW_window *)
int slider_pos_horizontal
current position of the vertical slider
#define AWAR_PHYLO_FILTER_DOT
const AW_font_limits & get_font_limits(int gc, char c) const
static AW_root * SINGLETON
static int diff(int v1, int v2, int v3, int v4, int st, int en)
void initialize_display(display_type)
long GB_read_count(GBDATA *gbd)
void set_foreground_color(int gc, AW_color_idx color)
#define AWAR_PHYLO_FILTER_STOPCOL
#define AWAR_PHYLO_FILTER_LOWER
void set_bottom_clip_border(int bottom, bool allow_oversize=false)
static PH_used_windows * windowList
void calculate_scrollbars()
float * calculate_column_homology()
void ph_view_species_cb()
#define AWAR_PHYLO_FILTER_MAXHOM
AW_awar * awar(const char *awar)
#define AWAR_PHYLO_FILTER_MINHOM
class AW_awar * window_local_awar(const char *localname, bool tmp=true)
void tell_scrolled_picture_size(AW_screen_area rectangle)
void set_right_clip_border(int right, bool allow_oversize=false)
#define AWAR_PHYLO_FILTER_MINUS
static void horizontal_change_cb(AW_window *aww)
void set_horizontal_scrollbar_position(int position)
static void vertical_change_cb(AW_window *aww)
void aw_message(const char *msg)
#define AWAR_PHYLO_FILTER_AUTOCALC
virtual void move_region(AW_pos src_x, AW_pos src_y, AW_pos width, AW_pos height, AW_pos dest_x, AW_pos dest_y)
void set_vertical_scrollbar_position(int position)
GB_transaction ta(gb_var)
void set_horizontal_change_callback(const WindowCallback &wcb)
void set_vertical_change_callback(const WindowCallback &wcb)
GB_CSTR GB_read_char_pntr(GBDATA *gbd)
GBDATA * get_gb_main(DbSel db)
int slider_pos_vertical
window id
GB_ERROR ph_check_initialized()
GB_ERROR write_int(long aw_int)
bool text(int gc, const SizedCstr &cstr, const AW::Position &pos, AW_pos alignment=0.0, AW_bitset filteri=AW_ALL_DEVICES_UNSCALED)
void monitor_vertical_scroll_cb(AW_window *)