[Plib-cvs] plib/src/pui puLargeInput.cxx,1.35,1.36
Brought to you by:
sjbaker
From: James J. <pu...@us...> - 2002-08-24 23:18:41
|
Update of /cvsroot/plib/plib/src/pui In directory usw-pr-cvs1:/tmp/cvs-serv4862 Modified Files: puLargeInput.cxx Log Message: Fixed warnings -- note, need to change PU_KEY_PAGE_UP and DOWN to change pages rather than go to top and bottom Index: puLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puLargeInput.cxx,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- puLargeInput.cxx 21 Aug 2002 18:36:15 -0000 1.35 +++ puLargeInput.cxx 24 Aug 2002 23:18:37 -0000 1.36 @@ -395,8 +395,6 @@ float bottom_value = bottom_slider ? bottom_slider->getFloatValue () : 0.0 ; - float right_value = right_slider->getFloatValue () ; - int beg_pos // Position in window of start of line, in pixels = int(( box_width - max_width ) * bottom_value ) ; //// int end_pos // Position in window of end of line, in pixels @@ -541,9 +539,8 @@ int start_pos = beg_pos ; int end_pos // Position in window of end of line, in pixels - = start_pos + legendFont.getFloatStringWidth ( val ) ; + = start_pos + (int)legendFont.getFloatStringWidth ( val ) ; - int nch = strlen ( val ) ; if ( end_pos > start_pos ) // If we actually have text in the line { char * lastonleft = val ; @@ -631,7 +628,7 @@ char temp_char = val[ cursor_position ] ; val [ cursor_position ] = '\0' ; - xx = legendFont.getFloatStringWidth ( " " ) ; + xx = (int)legendFont.getFloatStringWidth ( " " ) ; yy = (int)( abox.max[1] - abox.min[1] - legendFont.getStringHeight () * 1.5 + top_line_in_window * line_size ) ; // Offset y-coord for unprinted lines @@ -731,8 +728,6 @@ float bottom_value = bottom_slider ? bottom_slider->getFloatValue () : 0.0 ; - float right_value = right_slider->getFloatValue () ; - int beg_pos // Position in window of start of line, in pixels = int( ( box_width - max_width ) * bottom_value ) ; // int end_pos // Position in window of end of line, in pixels @@ -921,14 +916,14 @@ switch ( key ) { case PU_KEY_PAGE_UP : - while ( old_text [ cursor_position ] != NULL ) /* Move the cursor to the top of the data */ + while ( old_text [ cursor_position ] != '\0' ) /* Move the cursor to the top of the data */ cursor_position-- ; select_start_position = select_end_position = cursor_position ; setTopLineInWindow ( ((top_line_in_window - lines_in_window + 2)<0) ? 0 : (top_line_in_window - lines_in_window + 2) ); right_slider->setValue (1.0f - float(top_line_in_window) / num_lines ) ; break; case PU_KEY_PAGE_DOWN : - while ( old_text [ cursor_position ] != NULL ) /* Move the cursor to the end of the data */ + while ( old_text [ cursor_position ] != '\0' ) /* Move the cursor to the end of the data */ cursor_position++ ; select_start_position = select_end_position = cursor_position ; setTopLineInWindow ( ((top_line_in_window + lines_in_window - 2)>num_lines) ? (num_lines + 2) : (top_line_in_window + lines_in_window - 2) ); /* Plus two for consistancy - JCJ 20 Jun 2002 */ |