- Timestamp:
- 10/12/11 13:58:51 (6 months ago)
- Location:
- branches/e4fix
- Files:
-
- 5 modified
-
EDIT4/ED4_cursor.cxx (modified) (2 diffs)
-
EDIT4/ED4_no_class.cxx (modified) (5 diffs)
-
EDIT4/ED4_window.cxx (modified) (1 diff)
-
EDIT4/ed4_class.hxx (modified) (1 diff)
-
WINDOW/aw_device.hxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_cursor.cxx
r8293 r8295 279 279 !awar_edit_direction); 280 280 281 cursor_shape->draw( current_device(), int(x), int(y));281 cursor_shape->draw(window()->get_device(), int(x), int(y)); 282 282 283 283 #if defined(DEBUG) && 0 … … 927 927 } 928 928 929 int ED4_cursor::get_screen_relative_pos() {930 ED4_coords *coords = ¤t_ed4w()->coords;931 return cursor_abs_x - coords ->window_left_clip_point;929 int ED4_cursor::get_screen_relative_pos() const { 930 const ED4_coords& coords = window()->coords; 931 return cursor_abs_x - coords.window_left_clip_point; 932 932 } 933 933 void ED4_cursor::set_screen_relative_pos(int scroll_to_relpos) { -
branches/e4fix/EDIT4/ED4_no_class.cxx
r8293 r8295 35 35 #include <limits.h> 36 36 37 #include <vector> 38 39 using namespace std; 37 40 38 41 void ED4_calc_terminal_extentions() { 39 AW_device *device = current_device();42 AW_device *device = ED4_ROOT->first_window->get_device(); // any device 40 43 41 44 const AW_font_limits& seq_font_limits = device->get_font_limits(ED4_G_SEQUENCES, 0); … … 121 124 screenwidth = new_screenwidth; 122 125 } 123 124 current_ed4w()->update_scrolled_rectangle(); // @@@ do for all windows ?125 126 } 126 127 … … 137 138 else { 138 139 ED4_expose_recalculations(); // this case is needed every time, except the first 140 current_ed4w()->update_scrolled_rectangle(); 139 141 } 140 142 … … 1421 1423 } 1422 1424 1425 struct cursorpos { 1426 ED4_cursor& cursor; 1427 int screen_rel; 1428 int seq; 1429 1430 cursorpos(ED4_window *win) 1431 : cursor(win->cursor), 1432 screen_rel(cursor.get_screen_relative_pos()), 1433 seq(cursor.get_sequence_pos()) 1434 {} 1435 cursorpos(const cursorpos& other) 1436 : cursor(other.cursor), 1437 screen_rel(other.screen_rel), 1438 seq(other.seq) 1439 {} 1440 DECLARE_ASSIGNMENT_OPERATOR(cursorpos); 1441 }; 1442 1443 1423 1444 void ED4_compression_changed_cb(AW_root *awr) { 1424 1445 ED4_remap_mode mode = (ED4_remap_mode)awr->awar(ED4_AWAR_COMPRESS_SEQUENCE_TYPE)->read_int(); … … 1427 1448 1428 1449 if (ED4_ROOT->root_group_man) { 1429 ED4_cursor& cursor = current_cursor(); // @@@ should be done for all windows (all cursors) 1430 int rel_pos = cursor.get_screen_relative_pos(); 1431 int seq_pos = cursor.get_sequence_pos(); 1432 1433 AW_window *aww = current_aww(); 1434 AW_device *device = current_device(); 1435 1436 ED4_remap *remap = ED4_ROOT->root_group_man->remap(); 1437 remap->set_mode(mode, percent); 1438 1439 device->push_clip_scale(); 1440 device->set_clipall(); // draw nothing 1441 1442 ED4_expose_recalculations(); // @@@ do not perform for all windows 1443 1444 cursor.jump_sequence_pos(seq_pos, ED4_JUMP_KEEP_POSITION); 1445 cursor.set_screen_relative_pos(rel_pos); 1446 1447 ED4_expose_cb(aww, 0, 0); // does pop_clip_scale + refresh 1450 vector<cursorpos> pos; 1451 1452 for (ED4_window *win = ED4_ROOT->first_window; win; win = win->next) { 1453 pos.push_back(cursorpos(win)); 1454 1455 AW_device *device = win->get_device(); 1456 device->push_clip_scale(); 1457 device->set_clipall(); // draw nothing 1458 } 1459 1460 ED4_ROOT->root_group_man->remap()->set_mode(mode, percent); 1461 ED4_expose_recalculations(); 1462 1463 for (vector<cursorpos>::const_iterator i = pos.begin(); i != pos.end(); ++i) { 1464 ED4_cursor& cursor = const_cast<ED4_cursor&>(i->cursor); 1465 ED4_window *win = cursor.window(); 1466 1467 win->update_scrolled_rectangle(); 1468 1469 cursor.jump_sequence_pos(i->seq, ED4_JUMP_KEEP_POSITION); 1470 cursor.set_screen_relative_pos(i->screen_rel); 1471 1472 ED4_expose_cb(win->aww, 0, 0); // does pop_clip_scale + refresh 1473 } 1448 1474 } 1449 1475 } -
branches/e4fix/EDIT4/ED4_window.cxx
r8293 r8295 158 158 } 159 159 160 const AW_screen_area& area_size = current_device()->get_area_size();160 const AW_screen_area& area_size = get_device()->get_area_size(); 161 161 scrolled_rect.calc_bottomRight_folding_dimensions(area_size.r, area_size.b); 162 162 -
branches/e4fix/EDIT4/ed4_class.hxx
r8293 r8295 654 654 void jump_base_pos(int base_pos, ED4_CursorJumpType jump_type); 655 655 656 int get_screen_relative_pos() ;656 int get_screen_relative_pos() const; 657 657 void set_screen_relative_pos(int scroll_to_relpos); 658 658 -
branches/e4fix/WINDOW/aw_device.hxx
r7931 r8295 440 440 AW_bitset get_filter() const { return filter; } 441 441 442 void reset(); 442 void reset(); // pops all clip_scales 443 443 444 444 const AW_screen_area& get_area_size() const;
