| 1122 | } |
| 1123 | |
| 1124 | static void InputWidget_CalculateLineSizes(struct InputWidget* w) { |
| 1125 | cc_string line; char lineBuffer[STRING_SIZE]; |
| 1126 | struct DrawTextArgs args; |
| 1127 | int y; |
| 1128 | |
| 1129 | for (y = 0; y < INPUTWIDGET_MAX_LINES; y++) { |
| 1130 | w->lineWidths[y] = 0; |
| 1131 | } |
| 1132 | w->lineWidths[0] = w->prefixWidth; |
| 1133 | DrawTextArgs_MakeEmpty(&args, w->font, true); |
| 1134 | |
| 1135 | String_InitArray(line, lineBuffer); |
| 1136 | for (y = 0; y < w->GetMaxLines(); y++) { |
| 1137 | line.length = 0; |
| 1138 | InputWidget_FormatLine(w, y, &line); |
| 1139 | |
| 1140 | args.text = line; |
| 1141 | w->lineWidths[y] += Drawer2D_TextWidth(&args); |
| 1142 | } |
| 1143 | } |
| 1144 | |
| 1145 | static char InputWidget_GetLastCol(struct InputWidget* w, int x, int y) { |
| 1146 | cc_string line; char lineBuffer[STRING_SIZE]; |
no test coverage detected