Function puts longest line size to a global variable Size is in characters, but the Tab can be represented with more that one
| 1124 | // Function puts longest line size to a global variable |
| 1125 | // Size is in characters, but the Tab can be represented with more that one |
| 1126 | void TextareaData::FindLongestLine() |
| 1127 | { |
| 1128 | AreaLine *curr = firstLine; |
| 1129 | longestLine = 0; |
| 1130 | while(curr) |
| 1131 | { |
| 1132 | int length = 0; |
| 1133 | for(unsigned int i = 0; i < curr->length; i++, length++) |
| 1134 | if(curr->data[i].ch == '\t') |
| 1135 | length += 3; |
| 1136 | longestLine = longestLine < length ? length : longestLine; |
| 1137 | curr = curr->next; |
| 1138 | } |
| 1139 | } |
| 1140 | |
| 1141 | void TextareaData::OnPaint() |
| 1142 | { |
nothing calls this directly
no outgoing calls
no test coverage detected