- Timestamp:
- 21/11/11 14:20:09 (6 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 4 modified
-
ED4_manager.cxx (modified) (2 diffs)
-
ED4_root.cxx (modified) (8 diffs)
-
ED4_window.cxx (modified) (2 diffs)
-
ed4_class.hxx (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_manager.cxx
r8227 r8232 1007 1007 1008 1008 if (flv) { 1009 e4_assert(flv->length==INFINITE);1010 1009 x2 = int(flv->window_pos[X_POS]); 1011 1010 if (!flv->next && x2==area_rect.r) { … … 1026 1025 1027 1026 if (flh) { 1028 e4_assert(flh->length==INFINITE);1029 1027 y2 = int(flh->window_pos[Y_POS]); 1030 1028 if (!flh->next && y2==area_rect.b) { -
branches/e4fix/EDIT4/ED4_root.cxx
r8231 r8232 114 114 ED4_folding_line *current_fl = vertical_fl; // calculate x-offset due to vertical folding lines 115 115 while ((current_fl != NULL) && (x >= current_fl->window_pos[X_POS])) { 116 if ((current_fl->length == INFINITE) || 117 ((y >= current_fl->window_pos[Y_POS]) && (y <= (current_fl->window_pos[Y_POS] + current_fl->length)))) 118 { 119 temp_x += current_fl->dimension; 120 } 116 temp_x += current_fl->dimension; 121 117 current_fl = current_fl->next; 122 118 } … … 124 120 current_fl = horizontal_fl; // calculate y-offset due to horizontal folding lines 125 121 while ((current_fl != NULL) && (y >= current_fl->window_pos[Y_POS])) { 126 if ((current_fl->length == INFINITE) || 127 ((x >= current_fl->window_pos[X_POS]) && (x <= (current_fl->window_pos[X_POS] + current_fl->length)))) 128 { 129 temp_y += current_fl->dimension; 130 } 122 temp_y += current_fl->dimension; 131 123 current_fl = current_fl->next; 132 124 } … … 146 138 ED4_folding_line *current_fl = vertical_fl; // calculate x-offset due to vertical folding lines 147 139 while (current_fl && (x>=current_fl->world_pos[X_POS])) { 148 if ((current_fl->length == INFINITE) || 149 ((y >= current_fl->world_pos[Y_POS]) && (y <= current_fl->world_pos[Y_POS] + current_fl->length))) 150 { 151 temp_x -= current_fl->dimension; 152 } 140 temp_x -= current_fl->dimension; 153 141 current_fl = current_fl->next; 154 142 } … … 156 144 current_fl = horizontal_fl; // calculate y-offset due to horizontal folding lines 157 145 while (current_fl && (y >= current_fl->world_pos[Y_POS])) { 158 if ((current_fl->length == INFINITE) || 159 ((x >= current_fl->world_pos[X_POS]) && (x <= (current_fl->world_pos[X_POS] + current_fl->length)))) 160 { 161 temp_y -= current_fl->dimension; 162 } 146 temp_y -= current_fl->dimension; 163 147 current_fl = current_fl->next; 164 148 } … … 206 190 ED4_foldable foldable; 207 191 208 ED4_folding_line *hor100 = foldable.insert_folding_line(AW::Position(0, 100), INFINITE,0, ED4_P_HORIZONTAL);209 ED4_folding_line *ver200 = foldable.insert_folding_line(AW::Position(200, 0), INFINITE,0, ED4_P_VERTICAL);210 ED4_folding_line *hor200 = foldable.insert_folding_line(AW::Position(0, 200), INFINITE,0, ED4_P_HORIZONTAL);211 ED4_folding_line *ver300 = foldable.insert_folding_line(AW::Position(300, 100), INFINITE,0, ED4_P_VERTICAL);192 ED4_folding_line *hor100 = foldable.insert_folding_line(AW::Position(0, 100), 0, ED4_P_HORIZONTAL); 193 ED4_folding_line *ver200 = foldable.insert_folding_line(AW::Position(200, 0), 0, ED4_P_VERTICAL); 194 ED4_folding_line *hor200 = foldable.insert_folding_line(AW::Position(0, 200), 0, ED4_P_HORIZONTAL); 195 ED4_folding_line *ver300 = foldable.insert_folding_line(AW::Position(300, 100), 0, ED4_P_VERTICAL); 212 196 213 197 // nothing folded yet … … 225 209 TEST_ASSERT_WIN_UNFOLDED(400, 250); 226 210 227 for (int FACTOR = 1; FACTOR <= 100; FACTOR ++) { 211 // for (int FACTOR = 1; FACTOR <= 100; FACTOR ++) { 212 for (int FACTOR = 1; FACTOR <= 100; FACTOR += 7) { 228 213 TEST_ANNOTATE_ASSERT(GBS_global_string("FACTOR=%i", FACTOR)); 229 214 int H1 = FACTOR* 10; … … 773 758 for (const ED4_folding_line *flv=curr_ed4w()->get_vertical_folding(); ; flv = flv->next) { 774 759 if (flv) { 775 e4_assert(flv->length==INFINITE);776 760 x2 = int(flv->window_pos[X_POS]); 777 761 } … … 786 770 for (const ED4_folding_line *flh=curr_ed4w()->get_horizontal_folding(); ; flh = flh->next) { 787 771 if (flh) { 788 e4_assert(flh->length==INFINITE);789 772 y2 = int(flh->window_pos[Y_POS]); 790 773 } -
branches/e4fix/EDIT4/ED4_window.cxx
r8230 r8232 95 95 96 96 97 ED4_folding_line* ED4_foldable::insert_folding_line(AW::Position world_pos, AW_pos length, AW_posdimension, ED4_properties prop) {97 ED4_folding_line* ED4_foldable::insert_folding_line(AW::Position world_pos, AW_pos dimension, ED4_properties prop) { 98 98 ED4_folding_line *fl = NULL; 99 99 … … 102 102 fl->link = NULL; 103 103 fl->set_world_pos(world_pos); 104 fl->length = length;105 104 fl->dimension = dimension; 106 105 -
branches/e4fix/EDIT4/ed4_class.hxx
r8230 r8232 285 285 }; 286 286 287 class ED4_folding_line : virtual Noncopyable { 287 class ED4_folding_line : virtual Noncopyable { // @@@ make members private 288 288 // properties of an object, i.e. concerning rectangles on screen showing sequences 289 289 ED4_folding_line(const ED4_folding_line&); // copy-constructor not allowed 290 public: 291 // @@@ make members of ED4_folding_line private 292 AW_pos world_pos[2]; 293 AW_pos window_pos[2]; 294 AW_pos length; 295 AW_pos dimension; // amount of pixel folded away 296 ED4_base *link; 290 291 292 public: 293 AW_pos world_pos[2]; // @@@ what should world_pos be ? it could have a world-range, but no single position 294 AW_pos window_pos[2]; 295 AW_pos dimension; // amount of pixel folded away 296 297 ED4_base *link; 298 297 299 ED4_folding_line *next; 298 300 … … 334 336 void win_to_world_coords(AW_pos *x, AW_pos *y); 335 337 336 ED4_folding_line *insert_folding_line(AW::Position pos, AW_pos length, AW_posdimension, ED4_properties prop);338 ED4_folding_line *insert_folding_line(AW::Position pos, AW_pos dimension, ED4_properties prop); 337 339 ED4_returncode delete_folding_line(ED4_folding_line *fl, ED4_properties prop); 338 340 }; … … 379 381 void update_folding_line_positions() { 380 382 scroll_top->set_pos(world.upper_left_corner()); 381 if (scroll_top->length != INFINITE) scroll_top->length = world.width();382 383 383 scroll_bottom->set_world_pos(world.lower_left_corner()); 384 if (scroll_bottom->length != INFINITE) scroll_bottom->length = world.width();385 386 384 scroll_left->set_pos(world.upper_left_corner()); 387 if (scroll_left->length != INFINITE) scroll_left->length = world.height();388 389 385 scroll_right->set_world_pos(world.upper_right_corner()); 390 if (scroll_right->length != INFINITE) scroll_right->length = world.height();391 386 } 392 387 … … 487 482 488 483 void create_folding_lines(ED4_foldable& owner, const AW::Rectangle& rect, int area_width, int area_height) { 489 scroll_top = owner.insert_folding_line(rect.upper_left_corner(), INFINITE,0, ED4_P_HORIZONTAL);490 scroll_left = owner.insert_folding_line(rect.upper_left_corner(), INFINITE,0, ED4_P_VERTICAL);484 scroll_top = owner.insert_folding_line(rect.upper_left_corner(), 0, ED4_P_HORIZONTAL); 485 scroll_left = owner.insert_folding_line(rect.upper_left_corner(), 0, ED4_P_VERTICAL); 491 486 492 487 AW_pos dim = 0; 493 488 if (rect.bottom() > area_height) dim = rect.bottom() - area_height; 494 scroll_bottom = owner.insert_folding_line(rect.lower_left_corner(), INFINITE,dim, ED4_P_HORIZONTAL);489 scroll_bottom = owner.insert_folding_line(rect.lower_left_corner(), dim, ED4_P_HORIZONTAL); 495 490 496 491 dim = 0; 497 492 if (rect.right() > area_width) dim = rect.right() - area_width; 498 scroll_right = owner.insert_folding_line(rect.upper_right_corner(), INFINITE,dim, ED4_P_VERTICAL);493 scroll_right = owner.insert_folding_line(rect.upper_right_corner(), dim, ED4_P_VERTICAL); 499 494 } 500 495
