Changeset 8306
- Timestamp:
- 14/12/11 11:33:42 (5 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 6 modified
-
ED4_base.cxx (modified) (5 diffs)
-
ED4_manager.cxx (modified) (1 diff)
-
ED4_no_class.cxx (modified) (5 diffs)
-
ED4_terminal.cxx (modified) (1 diff)
-
ED4_window.cxx (modified) (1 diff)
-
ed4_class.hxx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_base.cxx
r8304 r8306 1271 1271 } 1272 1272 1273 ED4_returncode ED4_base::clear_whole_background() {1273 void ED4_main_manager::clear_whole_background() { 1274 1274 // clear AW_MIDDLE_AREA 1275 if (current_device()) { // @@@ should clear be done for all windows? 1276 current_device()->push_clip_scale(); 1277 current_device()->clear(AW_ALL_DEVICES); 1278 current_device()->pop_clip_scale(); 1279 } 1280 1281 return (ED4_R_OK); 1275 for (ED4_window *window = ED4_ROOT->first_window; window; window=window->next) { 1276 AW_device *device = window->get_device(); 1277 if (device) { 1278 device->push_clip_scale(); 1279 device->clear(AW_ALL_DEVICES); 1280 device->pop_clip_scale(); 1281 } 1282 } 1282 1283 } 1283 1284 … … 1325 1326 1326 1327 1327 ED4_base::~ED4_base() // before calling this function the first time, parent has to be set NULL 1328 { 1329 ED4_base *object; 1330 ED4_base *sequence_terminal = NULL; 1331 ED4_list_elem *list_elem, *old_elem; 1332 ED4_window *ed4w; 1333 1328 ED4_base::~ED4_base() { 1329 // before calling this function the first time, parent has to be set NULL 1334 1330 e4_assert(!parent); // unlink from parent first! 1335 1331 1336 list_elem = linked_objects.first();1332 ED4_list_elem *list_elem = linked_objects.first(); 1337 1333 while (list_elem) { 1338 object = (ED4_base *) list_elem->elem();1334 ED4_base *object = (ED4_base *) list_elem->elem(); 1339 1335 if (object->width_link == this) { 1340 1336 object->width_link->linked_objects.delete_elem((void *) this); // delete link and … … 1347 1343 } 1348 1344 1349 old_elem = list_elem;1345 ED4_list_elem *old_elem = list_elem; 1350 1346 list_elem = list_elem->next(); 1351 1347 linked_objects.delete_elem(old_elem->elem()); … … 1356 1352 if (ED4_ROOT->main_manager) 1357 1353 { 1358 sequence_terminal = ED4_ROOT->main_manager->search_spec_child_rek(ED4_L_SEQUENCE_STRING);1354 ED4_base *sequence_terminal = ED4_ROOT->main_manager->search_spec_child_rek(ED4_L_SEQUENCE_STRING); 1359 1355 1360 1356 if (sequence_terminal) … … 1364 1360 ED4_ROOT->scroll_links.link_for_hor_slider = sequence_terminal; 1365 1361 1366 ed4w = current_ed4w();1362 ED4_window *ed4w = ED4_ROOT->first_window; 1367 1363 while (ed4w != NULL) { 1368 1364 ed4w->scrolled_rect.replace_x_width_link_to(this, sequence_terminal); -
branches/e4fix/EDIT4/ED4_manager.cxx
r8286 r8306 1833 1833 } 1834 1834 1835 static ARB_ERROR removeAllCallbacks(ED4_base *base) { 1836 if (base->is_species_manager()) { 1837 base->to_species_manager()->remove_all_callbacks(); 1838 } 1839 return NULL; 1840 } 1841 1842 void ED4_root::remove_all_callbacks() { 1843 root_group_man->route_down_hierarchy(removeAllCallbacks).expect_no_error(); 1844 } 1835 1845 1836 1846 // ------------------------ -
branches/e4fix/EDIT4/ED4_no_class.cxx
r8305 r8306 831 831 832 832 void ED4_quit_editor(AW_window *aww, AW_CL /* cd1 */, AW_CL /* cd2 */) { 833 ED4_LocalWinContext uses(aww); 833 ED4_LocalWinContext uses(aww); // @@@ dont use context here 834 834 835 835 if (ED4_ROOT->first_window == current_ed4w()) { // quit button has been pressed in first window … … 1279 1279 } 1280 1280 1281 void ED4_load_new_config(char *string) 1282 { 1283 char *config_data_top = NULL; 1284 char *config_data_middle = NULL; 1285 1286 ED4_window *window; 1287 GB_transaction dummy(GLOBAL_gb_main); 1288 1281 void ED4_load_new_config(char *string) { 1282 GB_transaction ta(GLOBAL_gb_main); 1289 1283 1290 1284 ED4_ROOT->main_manager->clear_whole_background(); … … 1295 1289 ED4_init_notFoundMessage(); 1296 1290 1297 1298 1291 if (ED4_ROOT->selected_objects.no_of_entries() > 0) { 1299 1292 ED4_ROOT->deselect_all(); 1300 1293 } 1294 1295 ED4_ROOT->remove_all_callbacks(); 1301 1296 1302 1297 ED4_ROOT->scroll_picture.scroll = 0; … … 1306 1301 ED4_ROOT->ref_terminals.clear(); 1307 1302 1308 for ( window=ED4_ROOT->first_window; window; window=window->next) {1303 for (ED4_window *window = ED4_ROOT->first_window; window; window=window->next) { 1309 1304 window->cursor.init(); 1310 1305 window->aww->set_horizontal_scrollbar_position (0); … … 1312 1307 } 1313 1308 1314 ED4_ROOT->scroll_links.link_for_hor_slider = NULL; 1315 ED4_ROOT->scroll_links.link_for_ver_slider = NULL; 1316 ED4_ROOT->middle_area_man = NULL; 1317 ED4_ROOT->top_area_man = NULL; 1309 ED4_ROOT->scroll_links.link_for_hor_slider = NULL; 1310 ED4_ROOT->scroll_links.link_for_ver_slider = NULL; 1311 ED4_ROOT->middle_area_man = NULL; 1312 ED4_ROOT->top_area_man = NULL; 1313 1314 1318 1315 1319 1316 delete ED4_ROOT->main_manager; 1320 ED4_ROOT->main_manager = NULL;1317 ED4_ROOT->main_manager = NULL; 1321 1318 delete ED4_ROOT->ecoli_ref; 1319 1320 char *config_data_top = NULL; 1321 char *config_data_middle = NULL; 1322 1322 { 1323 1323 GB_push_transaction(GLOBAL_gb_main); -
branches/e4fix/EDIT4/ED4_terminal.cxx
r8293 r8306 764 764 ED4_terminal::~ED4_terminal() { 765 765 delete selection_info; 766 ED4_cursor& cursor = current_cursor(); 767 if (this == cursor.owner_of_cursor) { 768 cursor.init(); 766 for (ED4_window *window = ED4_ROOT->first_window; window; window=window->next) { 767 ED4_cursor& cursor = window->cursor; 768 if (this == cursor.owner_of_cursor) { 769 cursor.init(); 770 } 769 771 } 770 772 } -
branches/e4fix/EDIT4/ED4_window.cxx
r8296 r8306 119 119 120 120 121 ED4_returncode ED4_foldable::delete_folding_line(ED4_folding_line */*fl*/, ED4_properties /*prop*/) { 122 e4_assert(0); // not implement - cause it's unused 123 return ED4_R_OK; 121 void ED4_foldable::delete_folding_line(ED4_folding_line *fl, ED4_properties prop) { 122 if (prop == ED4_P_HORIZONTAL) { 123 horizontal_fl = horizontal_fl->delete_member(fl); 124 } 125 else { 126 e4_assert(prop == ED4_P_VERTICAL); 127 vertical_fl = vertical_fl->delete_member(fl); 128 } 124 129 } 125 130 -
branches/e4fix/EDIT4/ed4_class.hxx
r8304 r8306 306 306 } 307 307 308 ED4_folding_line *delete_member(ED4_folding_line *fl) { 309 ED4_folding_line *result = this; 310 if (this == fl) { 311 result = next; 312 next = NULL; 313 delete this; 314 } 315 return result; 316 } 317 308 318 AW_pos get_dimension() const { return dimension; } 309 319 const ED4_folding_line *get_next() const { return next; } … … 357 367 358 368 ED4_folding_line *insert_folding_line(AW_pos pos, AW_pos dimension, ED4_properties prop); 359 ED4_returncodedelete_folding_line(ED4_folding_line *fl, ED4_properties prop);369 void delete_folding_line(ED4_folding_line *fl, ED4_properties prop); 360 370 }; 361 371 … … 1050 1060 ED4_returncode clear_background(int color=0); 1051 1061 1052 ED4_returncode clear_whole_background(); // clear AW_MIDDLE_AREA1053 1062 bool is_visible(ED4_window *in_ed4w, AW_pos x, AW_pos y, ED4_direction direction); 1054 1063 bool is_visible(ED4_window *in_ed4w, AW_pos x1, AW_pos y1, AW_pos x2, AW_pos y2, ED4_direction direction); … … 1509 1518 ED4_index pixel2pos(AW_pos click_x); 1510 1519 1520 void remove_all_callbacks(); 1521 1511 1522 ED4_root(); 1512 1523 ~ED4_root(); … … 1570 1581 virtual ED4_returncode Show(int refresh_all=0, int is_cleared=0); 1571 1582 virtual ED4_returncode resize_requested_by_parent(); 1583 1584 void clear_whole_background(); 1572 1585 }; 1573 1586
