Changeset 8239 for branches

Show
Ignore:
Timestamp:
25/11/11 18:30:54 (6 months ago)
Author:
westram
Message:
  • short->bool
Location:
branches/e4fix/EDIT4
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/e4fix/EDIT4/ED4_manager.cxx

    r8237 r8239  
    788788} 
    789789 
    790 short ED4_manager::calc_bounding_box() { 
    791     // calculates the smallest rectangle containing the object and 
    792     // gives information if something has changed 
     790bool ED4_manager::calc_bounding_box() { 
     791    // calculates the smallest rectangle containing the object. 
     792    // returns true if bounding box has changed. 
    793793    AW_pos         sum_width  = 0; 
    794794    AW_pos         sum_height = 0; 
     
    797797    AW_pos         dummy      = 0; 
    798798    ED4_index      i          = 0; 
    799     short          bb_changed = 0; 
     799    bool           bb_changed = false; 
    800800    ED4_list_elem *current_list_elem; 
    801801    ED4_base      *child, *object; 
     
    824824        if (int(extension.size[WIDTH]) != int(max_x)) { // because compares between floats fail sometimes (AW_pos==float) 
    825825            extension.size[WIDTH] = max_x; 
    826             bb_changed = 1; 
     826            bb_changed = true; 
    827827        } 
    828828 
    829829        if (int(extension.size[HEIGHT]) != int(sum_height)) { 
    830830            extension.size[HEIGHT] = sum_height; 
    831             bb_changed = 1; 
     831            bb_changed = true; 
    832832        } 
    833833    } 
     
    836836        if (int(extension.size[WIDTH]) != int(sum_width)) { 
    837837            extension.size[WIDTH] = sum_width; 
    838             bb_changed = 1; 
     838            bb_changed = true; 
    839839        } 
    840840        if (int(extension.size[HEIGHT]) != int(max_y)) { 
    841841            extension.size[HEIGHT] = max_y; 
    842             bb_changed = 1; 
     842            bb_changed = true; 
    843843        } 
    844844    } 
    845845 
    846846    if (bb_changed) { // tell linked objects about our change of bounding box 
    847  
    848847        current_list_elem = linked_objects.first(); 
    849848        while (current_list_elem) { 
     
    856855        } 
    857856    } 
    858     return (bb_changed); 
     857    return bb_changed; 
    859858} 
    860859 
  • branches/e4fix/EDIT4/ED4_terminal.cxx

    r8236 r8239  
    712712} 
    713713 
    714 short ED4_terminal::calc_bounding_box() 
    715 { 
    716     short            bb_changed = 0; 
    717     ED4_list_elem   *current_list_elem; 
    718     ED4_base        *object; 
     714bool 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; 
    719721 
    720722    if (width_link) { 
    721723        if (extension.size[WIDTH] != width_link->extension.size[WIDTH]) {   // all bounding Boxes have the same size !!! 
    722724            extension.size[WIDTH] = width_link->extension.size[WIDTH]; 
    723             bb_changed = 1; 
     725            bb_changed = true; 
    724726        } 
    725727    } 
     
    728730        if (extension.size[HEIGHT] != height_link->extension.size[HEIGHT]) { 
    729731            extension.size[HEIGHT] = height_link->extension.size[HEIGHT]; 
    730             bb_changed = 1; 
     732            bb_changed = true; 
    731733        } 
    732734    } 
     
    749751    } 
    750752 
    751     return (bb_changed); 
     753    return bb_changed; 
    752754} 
    753755 
  • branches/e4fix/EDIT4/ed4_class.hxx

    r8238 r8239  
    10301030    virtual ED4_returncode  Show(int refresh_all=0, int is_cleared=0) = 0; 
    10311031    virtual ED4_returncode  Resize()                                  = 0; 
     1032    virtual bool calc_bounding_box()                                  = 0; 
     1033 
    10321034    virtual ED4_returncode  clear_background(int color=0); 
    1033     virtual short calc_bounding_box()                                 = 0; 
    10341035 
    10351036    ED4_returncode clear_whole_background();       // clear AW_MIDDLE_AREA 
     
    12161217    virtual ED4_returncode  Show(int refresh_all=0, int is_cleared=0); 
    12171218    virtual ED4_returncode  Resize(); 
    1218     virtual short      calc_bounding_box(); 
     1219    virtual bool calc_bounding_box(); 
    12191220    virtual ED4_returncode  distribute_children(); 
    12201221 
     
    13171318    virtual ED4_returncode draw() = 0; 
    13181319 
    1319     virtual int   adjust_clipping_rectangle(); 
    1320     virtual short calc_bounding_box(); 
     1320    virtual int  adjust_clipping_rectangle(); 
     1321    virtual bool calc_bounding_box(); 
    13211322    virtual ED4_returncode  calc_size_requested_by_parent(); 
    13221323