- Timestamp:
- 25/11/11 18:30:54 (6 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 3 modified
-
ED4_manager.cxx (modified) (5 diffs)
-
ED4_terminal.cxx (modified) (3 diffs)
-
ed4_class.hxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_manager.cxx
r8237 r8239 788 788 } 789 789 790 shortED4_manager::calc_bounding_box() {791 // calculates the smallest rectangle containing the object and792 // gives information if something has changed790 bool ED4_manager::calc_bounding_box() { 791 // calculates the smallest rectangle containing the object. 792 // returns true if bounding box has changed. 793 793 AW_pos sum_width = 0; 794 794 AW_pos sum_height = 0; … … 797 797 AW_pos dummy = 0; 798 798 ED4_index i = 0; 799 short bb_changed = 0;799 bool bb_changed = false; 800 800 ED4_list_elem *current_list_elem; 801 801 ED4_base *child, *object; … … 824 824 if (int(extension.size[WIDTH]) != int(max_x)) { // because compares between floats fail sometimes (AW_pos==float) 825 825 extension.size[WIDTH] = max_x; 826 bb_changed = 1;826 bb_changed = true; 827 827 } 828 828 829 829 if (int(extension.size[HEIGHT]) != int(sum_height)) { 830 830 extension.size[HEIGHT] = sum_height; 831 bb_changed = 1;831 bb_changed = true; 832 832 } 833 833 } … … 836 836 if (int(extension.size[WIDTH]) != int(sum_width)) { 837 837 extension.size[WIDTH] = sum_width; 838 bb_changed = 1;838 bb_changed = true; 839 839 } 840 840 if (int(extension.size[HEIGHT]) != int(max_y)) { 841 841 extension.size[HEIGHT] = max_y; 842 bb_changed = 1;842 bb_changed = true; 843 843 } 844 844 } 845 845 846 846 if (bb_changed) { // tell linked objects about our change of bounding box 847 848 847 current_list_elem = linked_objects.first(); 849 848 while (current_list_elem) { … … 856 855 } 857 856 } 858 return (bb_changed);857 return bb_changed; 859 858 } 860 859 -
branches/e4fix/EDIT4/ED4_terminal.cxx
r8236 r8239 712 712 } 713 713 714 short ED4_terminal::calc_bounding_box() 715 { 716 short bb_changed = 0; 717 ED4_list_elem *current_list_elem; 718 ED4_base *object; 714 bool ED4_terminal::calc_bounding_box() { 715 // calculates the smallest rectangle containing the object. 716 // requests refresh and returns true if bounding box has changed. 717 718 bool bb_changed = false; 719 ED4_list_elem *current_list_elem; 720 ED4_base *object; 719 721 720 722 if (width_link) { 721 723 if (extension.size[WIDTH] != width_link->extension.size[WIDTH]) { // all bounding Boxes have the same size !!! 722 724 extension.size[WIDTH] = width_link->extension.size[WIDTH]; 723 bb_changed = 1;725 bb_changed = true; 724 726 } 725 727 } … … 728 730 if (extension.size[HEIGHT] != height_link->extension.size[HEIGHT]) { 729 731 extension.size[HEIGHT] = height_link->extension.size[HEIGHT]; 730 bb_changed = 1;732 bb_changed = true; 731 733 } 732 734 } … … 749 751 } 750 752 751 return (bb_changed);753 return bb_changed; 752 754 } 753 755 -
branches/e4fix/EDIT4/ed4_class.hxx
r8238 r8239 1030 1030 virtual ED4_returncode Show(int refresh_all=0, int is_cleared=0) = 0; 1031 1031 virtual ED4_returncode Resize() = 0; 1032 virtual bool calc_bounding_box() = 0; 1033 1032 1034 virtual ED4_returncode clear_background(int color=0); 1033 virtual short calc_bounding_box() = 0;1034 1035 1035 1036 ED4_returncode clear_whole_background(); // clear AW_MIDDLE_AREA … … 1216 1217 virtual ED4_returncode Show(int refresh_all=0, int is_cleared=0); 1217 1218 virtual ED4_returncode Resize(); 1218 virtual shortcalc_bounding_box();1219 virtual bool calc_bounding_box(); 1219 1220 virtual ED4_returncode distribute_children(); 1220 1221 … … 1317 1318 virtual ED4_returncode draw() = 0; 1318 1319 1319 virtual int adjust_clipping_rectangle();1320 virtual shortcalc_bounding_box();1320 virtual int adjust_clipping_rectangle(); 1321 virtual bool calc_bounding_box(); 1321 1322 virtual ED4_returncode calc_size_requested_by_parent(); 1322 1323
