Update of /cvsroot/plib/plib/src/puAux
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7581
Modified Files:
puAux.h puAuxLargeInput.cxx
Log Message:
Moving the "wrapped_text" field into "puInputBase" and changing its name to "displayed_text" in preparation for adding it to "puInput" as well
Index: puAux.h
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- puAux.h 10 Nov 2005 20:07:08 -0000 1.8
+++ puAux.h 20 Mar 2006 15:15:30 -0000 1.9
@@ -151,8 +151,6 @@
puSlider *bottom_slider ; // Horizontal slider at bottom of window
puaScrollBar *right_slider ; // Vertical slider at right of window
- char *wrapped_text ; // Pointer to word-wrapped text in the box
-
int arrow_count ; // Number of up/down arrows above and below the right slider
void normalizeCursors ( void ) ;
@@ -164,8 +162,6 @@
puaLargeInput ( int x, int y, int w, int h, int arrows, int sl_width, int wrap_text = FALSE ) ;
~puaLargeInput ()
{
- delete [] wrapped_text ;
-
if ( puActiveWidget() == this )
puDeactivateWidget () ;
}
@@ -194,14 +190,16 @@
void setValue ( const char *s ) ;
void setText ( const char *l ) { setValue ( l ) ; } /* DEPRECATED */
char *getText ( void ) { return getStringValue () ; } /* DEPRECATED */
- char *getWrappedText ( void )
- {
- return ( wrapped_text == NULL ? getStringValue () : wrapped_text ) ;
- }
void addNewLine ( const char *l ) ;
void addText ( const char *l ) ;
void appendText ( const char *l ) ;
void removeText ( int start, int end ) ;
+ char *getDisplayedText ( void )
+ {
+ return ( displayed_text == NULL ? getStringValue () : displayed_text ) ;
+ }
+ char *getWrappedText ( void ) // THIS FUNCTION IS DEPRECATED 3/21/06
+ { return getDisplayedText () ; }
} ;
Index: puAuxLargeInput.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/puAux/puAuxLargeInput.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- puAuxLargeInput.cxx 5 Jan 2006 21:00:26 -0000 1.8
+++ puAuxLargeInput.cxx 20 Mar 2006 15:15:30 -0000 1.9
@@ -107,7 +107,6 @@
right_slider->setUserData ( this ) ;
right_slider->setCallback ( puaLargeInputHandleRightSlider ) ;
- wrapped_text = NULL ;
setValue ( "\n" ) ;
close () ;
@@ -145,7 +144,7 @@
{
select_start_position = s ;
select_end_position = e ;
[...117 lines suppressed...]
{
- wrapped_text_wp += strlen (wrapped_text_wp) ;
+ displayed_text_wp += strlen (displayed_text_wp) ;
if ( space_ptr != NULL )
/* Advance past the NULL since there's more string left */
- wrapped_text_wp += 1 ;
+ displayed_text_wp += 1 ;
}
else
{
@@ -1267,7 +1266,7 @@
*space_ptr = ' ' ;
*old_space_ptr = '\n' ;
- wrapped_text_wp = old_space_ptr + 1 ;
+ displayed_text_wp = old_space_ptr + 1 ;
}
}
}
|