- if ( !curLine )
- {
- // we can't use GetTextExtent - it will return 0 for both width
- // and height and an empty line should count in height
- // calculation
- if ( !heightLineDefault )
- heightLineDefault = heightLine;
- if ( !heightLineDefault )
- GetTextExtent(_T("W"), NULL, &heightLineDefault);
-
- heightTextTotal += heightLineDefault;
-
- heightTextTotal++; // FIXME: why is this necessary?
- }
- else
- {
- GetTextExtent(curLine, &widthLine, &heightLine);
- if ( widthLine > widthTextMax )
- widthTextMax = widthLine;
- heightTextTotal += heightLine;
-
- heightTextTotal++; // FIXME: why is this necessary?
- }
-
- if ( *pc == wxT('\n') ) {
- curLine.Empty();
- }
- else {
- // the end of string
- break;
- }
- }
- else {
- curLine += *pc;