- Timestamp:
- 09/12/11 10:48:37 (6 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 2 modified
-
ED4_base.cxx (modified) (1 diff)
-
ed4_class.hxx (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_base.cxx
r8286 r8288 312 312 const char *ED4_base::resolve_pointer_to_char_pntr(int *) const { return NULL; } 313 313 314 GB_ERROR ED4_base::write_sequence(const char * /* seq */, int /* seq_len */) 315 { 316 e4_assert(0); 317 return 0; 318 } 319 320 321 ED4_returncode ED4_manager::create_group(ED4_group_manager **group_manager, GB_CSTR group_name) // creates group from user menu of AW_Window 322 { 323 ED4_species_manager *species_manager = NULL; 324 ED4_species_name_terminal *species_name_terminal = NULL; 325 ED4_sequence_manager *sequence_manager = NULL; 326 ED4_sequence_info_terminal *sequence_info_terminal = NULL; 327 ED4_sequence_terminal *sequence_terminal = NULL; 328 ED4_spacer_terminal *group_spacer_terminal1 = NULL; 329 ED4_spacer_terminal *group_spacer_terminal2 = NULL; 330 ED4_multi_species_manager *multi_species_manager = NULL; 331 ED4_bracket_terminal *bracket_terminal = NULL; 314 ED4_returncode ED4_manager::create_group(ED4_group_manager **group_manager, GB_CSTR group_name) { 315 // creates group from user menu of AW_Window 316 317 ED4_species_manager *species_manager = NULL; 318 ED4_species_name_terminal *species_name_terminal = NULL; 319 ED4_sequence_manager *sequence_manager = NULL; 320 ED4_sequence_info_terminal *sequence_info_terminal = NULL; 321 ED4_sequence_terminal *sequence_terminal = NULL; 322 ED4_spacer_terminal *group_spacer_terminal1 = NULL; 323 ED4_spacer_terminal *group_spacer_terminal2 = NULL; 324 ED4_multi_species_manager *multi_species_manager = NULL; 325 ED4_bracket_terminal *bracket_terminal = NULL; 332 326 333 327 char buffer[35]; -
branches/e4fix/EDIT4/ed4_class.hxx
r8286 r8288 1037 1037 virtual bool calc_bounding_box() = 0; 1038 1038 1039 virtualED4_returncode clear_background(int color=0);1039 ED4_returncode clear_background(int color=0); 1040 1040 1041 1041 ED4_returncode clear_whole_background(); // clear AW_MIDDLE_AREA … … 1044 1044 1045 1045 // functions concerned with links in the hierarchy 1046 virtualED4_returncode set_links(ED4_base *width_link, ED4_base *height_link);1047 virtualED4_returncode link_changed(ED4_base *link);1046 ED4_returncode set_links(ED4_base *width_link, ED4_base *height_link); 1047 ED4_returncode link_changed(ED4_base *link); 1048 1048 1049 1049 // functions concerned with special initialization 1050 v irtual void set_properties (ED4_properties prop);1050 void set_properties (ED4_properties prop); 1051 1051 1052 1052 // functions concerned with coordinate transformation … … 1090 1090 1091 1091 // general purpose functions 1092 virtual ED4_base *search_ID(const char *id) = 0; 1093 virtual void check_all(); 1094 virtual short in_border(AW_pos abs_x, AW_pos abs_y, ED4_movemode mode); 1095 virtual ED4_returncode set_width(); 1096 1092 virtual ED4_base *search_ID(const char *id) = 0; 1093 1094 void check_all(); 1095 short in_border(AW_pos abs_x, AW_pos abs_y, ED4_movemode mode); 1096 ED4_returncode set_width(); 1097 1097 1098 1098 1099 ED4_AREA_LEVEL get_area_level(ED4_multi_species_manager **multi_species_manager=0) const; // returns area we belong to and the next multi species manager of the area … … 1103 1104 bool is_child_of(ED4_manager *Parent) { return has_parent(Parent); } 1104 1105 1105 ED4_group_manager *is_in_folded_group() const;1106 1106 virtual char *resolve_pointer_to_string_copy(int *str_len = 0) const; 1107 1107 virtual const char *resolve_pointer_to_char_pntr(int *str_len = 0) const; 1108 virtual GB_ERROR write_sequence(const char *seq, int seq_len); 1109 char *get_name_of_species(); // go from terminal to name of species 1108 1109 ED4_group_manager *is_in_folded_group() const; 1110 char *get_name_of_species(); // go from terminal to name of species 1110 1111 1111 1112 // functions which refer to the selected object(s), i.e. across the hierarchy … … 1221 1222 virtual ED4_returncode Resize(); 1222 1223 virtual bool calc_bounding_box(); 1223 virtual ED4_returncode distribute_children(); 1224 1225 ED4_returncode distribute_children(); 1224 1226 1225 1227 // top-down functions, means travelling down the hierarchy 1226 1228 virtual ED4_returncode event_sent_by_parent(AW_event *event, AW_window *aww); 1227 1229 virtual ED4_returncode set_refresh(int clear=1); 1228 ED4_returncode clear_refresh();1229 virtual ED4_returncode resize_requested_by_parent();1230 ED4_returncode clear_refresh(); 1231 virtual ED4_returncode resize_requested_by_parent(); 1230 1232 1231 1233 virtual void delete_requested_children(); … … 1241 1243 virtual ARB_ERROR route_down_hierarchy(ED4_cb0 cb) { return route_down_hierarchy(ED4_cb(cb), 0, 0); } 1242 1244 1243 virtual ED4_base*find_first_that(ED4_level level, bool (*condition)(ED4_base *to_test, AW_CL arg), AW_CL arg);1244 virtual ED4_base*find_first_that(ED4_level level, bool (*condition)(ED4_base *to_test)) {1245 ED4_base* find_first_that(ED4_level level, bool (*condition)(ED4_base *to_test, AW_CL arg), AW_CL arg); 1246 ED4_base* find_first_that(ED4_level level, bool (*condition)(ED4_base *to_test)) { 1245 1247 return find_first_that(level, (bool(*)(ED4_base*, AW_CL))condition, (AW_CL)0); 1246 1248 } … … 1259 1261 1260 1262 void update_consensus(ED4_manager *old_parent, ED4_manager *new_parent, ED4_base *sequence); 1261 virtual ED4_returncode rebuild_consensi(ED4_base *start_species, ED4_update_flag update_flag); 1262 1263 virtual ED4_returncode check_in_bases(ED4_base *added_base); 1264 virtual ED4_returncode check_out_bases(ED4_base *subbed_base); 1265 virtual ED4_returncode update_bases(const ED4_base *old_base, const ED4_base *new_base, PosRange range = PosRange::whole()); 1266 virtual ED4_returncode update_bases(const char *old_seq, int old_len, const char *new_seq, int new_len, PosRange range = PosRange::whole()); 1267 virtual ED4_returncode update_bases(const char *old_seq, int old_len, const ED4_base *new_base, PosRange range = PosRange::whole()); 1268 virtual ED4_returncode update_bases(const ED4_char_table *old_table, const ED4_char_table *new_table, PosRange range = PosRange::whole()); 1269 1270 virtual ED4_returncode update_bases_and_rebuild_consensi(const char *old_seq, int old_len, ED4_base *species, ED4_update_flag update_flag, PosRange range = PosRange::whole()); 1263 ED4_returncode rebuild_consensi(ED4_base *start_species, ED4_update_flag update_flag); 1264 1265 ED4_returncode check_in_bases(ED4_base *added_base); 1266 ED4_returncode check_out_bases(ED4_base *subbed_base); 1267 1268 ED4_returncode update_bases(const ED4_base *old_base, const ED4_base *new_base, PosRange range = PosRange::whole()); 1269 ED4_returncode update_bases(const char *old_seq, int old_len, const char *new_seq, int new_len, PosRange range = PosRange::whole()); 1270 ED4_returncode update_bases(const char *old_seq, int old_len, const ED4_base *new_base, PosRange range = PosRange::whole()); 1271 ED4_returncode update_bases(const ED4_char_table *old_table, const ED4_char_table *new_table, PosRange range = PosRange::whole()); 1272 1273 ED4_returncode update_bases_and_rebuild_consensi(const char *old_seq, int old_len, ED4_base *species, ED4_update_flag update_flag, PosRange range = PosRange::whole()); 1271 1274 1272 1275 // handle moves across the hierarchy 1273 1276 virtual ED4_returncode handle_move(ED4_move_info *moveinfo); 1274 virtual ED4_base *get_competent_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1275 virtual ED4_base *get_competent_clicked_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1276 virtual ED4_base *search_spec_child_rek(ED4_level level); // recursive search for level 1277 1278 virtual ED4_base *get_competent_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1279 virtual ED4_base *get_competent_clicked_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1280 virtual ED4_base *search_spec_child_rek(ED4_level level); // recursive search for level 1277 1281 1278 1282 // general purpose functions … … 1284 1288 1285 1289 // general folding functions 1286 virtualED4_returncode unfold_group(char *bracketID_to_unfold);1287 virtualED4_returncode fold_group(char *bracketID_to_fold);1290 ED4_returncode unfold_group(char *bracketID_to_unfold); 1291 ED4_returncode fold_group(char *bracketID_to_fold); 1288 1292 1289 1293 ED4_returncode hide_children(); … … 1321 1325 virtual ED4_returncode calc_size_requested_by_parent(); 1322 1326 1323 virtual ED4_returncodedraw_drag_box(AW_pos x, AW_pos y, GB_CSTR text = NULL, int cursor_y=-1);1327 ED4_returncode draw_drag_box(AW_pos x, AW_pos y, GB_CSTR text = NULL, int cursor_y=-1); 1324 1328 1325 1329 // functions which concern the object as a child 1326 virtual ED4_returncode set_refresh(int clear=1);1327 virtual ED4_returncode resize_requested_by_child();1328 virtual ED4_returncode resize_requested_by_parent();1330 virtual ED4_returncode set_refresh(int clear=1); 1331 virtual ED4_returncode resize_requested_by_child(); 1332 virtual ED4_returncode resize_requested_by_parent(); 1329 1333 1330 1334 virtual void delete_requested_children(); … … 1333 1337 virtual ED4_returncode move_requested_by_parent(ED4_move_info *mi); 1334 1338 virtual ED4_returncode event_sent_by_parent(AW_event *event, AW_window *aww); 1335 virtual ED4_base *get_competent_child(AW_pos x, AW_pos y, ED4_properties relevant_prop);1336 virtual ED4_base *get_competent_clicked_child(AW_pos x, AW_pos y, ED4_properties relevant_prop);1339 virtual ED4_base *get_competent_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1340 virtual ED4_base *get_competent_clicked_child(AW_pos x, AW_pos y, ED4_properties relevant_prop); 1337 1341 virtual ED4_returncode move_requested_by_child(ED4_move_info *moveinfo); 1338 1342 virtual ED4_returncode handle_move(ED4_move_info *moveinfo); 1339 virtual ED4_returncode kill_object(); 1343 1344 ED4_returncode kill_object(); 1340 1345 1341 1346 // general purpose functions 1342 virtual ED4_base *search_ID(const char *id); 1343 virtual char *resolve_pointer_to_string_copy(int *str_len = 0) const; // concerning terminal and database 1344 virtual const char *resolve_pointer_to_char_pntr(int *str_len = 0) const; // concerning terminal and database 1345 virtual GB_ERROR write_sequence(const char *seq, int seq_len); 1347 virtual ED4_base *search_ID(const char *id); 1348 virtual char *resolve_pointer_to_string_copy(int *str_len = 0) const; 1349 virtual const char *resolve_pointer_to_char_pntr(int *str_len = 0) const; 1346 1350 virtual ED4_returncode remove_callbacks(); 1351 1352 GB_ERROR write_sequence(const char *seq, int seq_len); 1347 1353 1348 1354 void scroll_into_view(AW_window *aww); … … 1370 1376 void init(ED4_sequence_info_terminal *, ED4_sequence_terminal *, ED4_sequence_info_terminal *, ED4_columnStat_terminal *); 1371 1377 1372 ED4_sequence_info_terminal *get_ref_sequence_info() { return ref_sequence_info; }1373 ED4_sequence_terminal *get_ref_sequence(){ return ref_sequence; }1374 ED4_sequence_info_terminal *get_ref_column_stat_info() { return ref_column_stat_info; }1375 ED4_columnStat_terminal *get_ref_column_stat() { return ref_column_stat; }1378 ED4_sequence_info_terminal *get_ref_sequence_info() { return ref_sequence_info; } 1379 ED4_sequence_terminal *get_ref_sequence() { return ref_sequence; } 1380 ED4_sequence_info_terminal *get_ref_column_stat_info() { return ref_column_stat_info; } 1381 ED4_columnStat_terminal *get_ref_column_stat() { return ref_column_stat; } 1376 1382 1377 1383 ED4_reference_terminals() { null(); } … … 1393 1399 ED4_WinContext() : ed4w(0), device(0) {} 1394 1400 static ED4_WinContext current_context; 1395 1401 1396 1402 public: 1397 1403 inline ED4_WinContext(AW_window *aww_);
