47 if (!is_size_device) {
51 draw_separator =
false;
69 double cursorCorrection = -IRS.
group_closed * correctionPerGroup;
70 return cursorCorrection;
76 static int recursion_depth = 0;
84 if (IRS.
y + height_of_subtree < IRS.
min_y) {
85 IRS.
y += height_of_subtree;
91 if (node->
is_leaf() || limit_recursion_depth) {
97 if (node->
hasName(species_name)) {
106 const char *specinfo;
107 if (limit_recursion_depth) {
114 set_line_attributes_for(node);
117 specinfo = labeler.speciesLabel(
gb_main, node->
gb_node, node, tree_static->get_tree_name());
121 disp_device->text(gc, specinfo, textpos);
130 bool is_selected = is_group && selected_group.at_node(node);
147 AW_pos frame_y2 = frame_y1 + frame_height;
149 if (frame_y2 >= IRS.
min_y) {
150 if (frame_y1 < IRS.
min_y) {
151 frame_y1 = IRS.
min_y;
155 AW_pos visible_frame_height = frame_y2-frame_y1;
163 disp_device->set_line_attributes(gc, 1,
AW_SOLID);
164 disp_device->line(gc, frame.upper_edge());
165 disp_device->line(gc, frame.left_edge());
166 disp_device->line(gc, frame.lower_edge());
169 const int gc = node->
gr.
gc;
170 set_line_attributes_for(node);
171 filled_box(group_gc, frame.upper_left_corner(),
TIP_BOX_SIZE);
174 Rectangle gbox(frame.upper_left_corner()+frame2box,
Vector(frame.width()*.5, frame.height()-2*IRS.
gap));
176 disp_device->set_grey_level(gc, group_greylevel);
179 Position box_rcenter = gbox.right_edge().centroid();
186 Position box_lcenter = gbox.left_edge().centroid();
192 IRS.
y += frame_height + 2*IRS.
gap;
193 y_center = box_rcenter.
ypos();
196 IRS.
y += frame_height + 2*IRS.
gap;
197 y_center = IRS.
min_y;
210 if (group_y1 >= IRS.
min_y) {
215 group_y1 = IRS.
min_y;
222 disp_device->set_line_attributes(gc, 1,
AW_DOTTED);
223 disp_device->line(gc, x_offset-IRS.
onePixel, group_y1, x_offset+frame_width, group_y1);
228 disp_device->text(group_gc,
238 AW_pos left_y = paint_irs_sub_tree(node->get_leftson(), left_x, labeler);
241 AW_pos right_y = paint_irs_sub_tree(node->get_rightson(), right_x, labeler);
248 if (left_y > IRS.
min_y) {
249 if (left_y < IRS.
max_y) {
250 AP_tree *son = node->get_leftson();
254 set_line_attributes_for(son);
255 draw_branch_line(son->
gr.
gc,
Position(x_offset, left_y), left, line_filter);
257 if (bconf.shall_show_remark_for(son)) {
268 AW_pos y_center = (left_y + right_y)*0.5;
270 if (right_y > IRS.
min_y && right_y < IRS.
max_y) {
271 AP_tree *son = node->get_rightson();
275 set_line_attributes_for(son);
276 draw_branch_line(son->
gr.
gc,
Position(x_offset, right_y), right, line_filter);
278 if (bconf.shall_show_remark_for(son)) {
290 set_line_attributes_for(node->get_leftson());
291 disp_device->line(node->get_leftson()->
gr.
gc, x_offset, y_center, x_offset, left_y);
293 set_line_attributes_for(node->get_rightson());
294 disp_device->line(node->get_rightson()->
gr.
gc, x_offset, y_center, x_offset, right_y);
301 disp_device->set_line_attributes(gc, 1,
AW_DOTTED);
302 disp_device->line(gc, x_offset-IRS.
onePixel, IRS.
y, x_offset+frame_width, IRS.
y);
303 disp_device->line(gc, x_offset-IRS.
onePixel, group_y1, x_offset-IRS.
onePixel, IRS.
y);
306 const int gc = group_gc;
307 set_line_attributes_for(node);
313 void AWT_graphic_tree::show_irs_tree(
AP_tree *at,
double height,
const NDS_Labeler& labeler) {
324 IRS.
onePixel = disp_device->rtransform_size(1.0);
334 Rectangle rclip = disp_device->get_rtransformed_cliprect();
342 list_tree_ruler_y = paint_irs_sub_tree(at, 0, labeler);
343 irs_tree_ruler_scale_factor = IRS.
x_scale;
345 disp_device->invisible(corner);
#define MAX_TREEDISP_RECURSION_DEPTH
#define TREEDISP_TRUNCATION_MESSAGE
const AW_bitset AW_PRINTER_CLIP
const AW_bitset AW_SCREEN
void set_line_attributes(int gc, short width, AW_linestyle style)
bool is_folded_group() const
bool hasName(const char *Name) const
void draw_top_separator_once(AW_device *device)
bool is_son_of_root() const
const double & ypos() const
bool line(int gc, const AW::LineVector &Line, AW_bitset filteri=AW_ALL_DEVICES_SCALED)
int GB_read_flag(GBDATA *gbd)
AW_pos Y_correction_for_IRS()
static int info[maxsites+1]
bool is_normal_group() const