1081{
1083 const WCHAR *strPtr;
1084 WCHAR *retstr, *p_retstr;
1085 size_t size_retstr;
1089 int lmargin = 0, rmargin = 0;
1092 int max_width = 0;
1093 int last_line;
1094 int tabwidth = 0;
1095 int prefix_offset;
1098
1100
1101#ifdef _WIN32K_
1103#else
1106#endif
1107 if (dtp)
TRACE(
"Params: iTabLength=%d, iLeftMargin=%d, iRightMargin=%d\n",
1109
1111
1113
1115 flags &= ~DT_WORDBREAK;
1116#ifdef _WIN32K_
1118#else
1120#endif
1122 lh =
tm.tmHeight +
tm.tmExternalLeading;
1123 else
1125
1127 return lh;
1128
1130 return 0;
1131#ifdef _WIN32K_
1133 {
1134 SIZE window_ext, viewport_ext;
1137 if ((window_ext.
cy > 0) != (viewport_ext.
cy > 0))
1139 }
1140#else
1142 {
1143 SIZE window_ext, viewport_ext;
1146 if ((window_ext.
cy > 0) != (viewport_ext.
cy > 0))
1148 }
1149#endif
1151 {
1152#ifdef _WIN32K_
1154#else
1156#endif
1158 {
1160 {
1164 else
1166 }
1167 return lh;
1168 }
1169 }
1170
1171 if (dtp)
1172 {
1178 }
1179
1181 {
1183 tabwidth =
tm.tmAveCharWidth * tabstop;
1184 }
1185
1187#ifndef _WIN32K_
1189 {
1190 int hasClip;
1193 {
1195
1196 if (hasClip != 1)
1197 {
1200 }
1202 }
1203 }
1204#else
1206 {
1207 int hasClip;
1210 {
1212 if (hasClip != 1)
1213 {
1216 }
1218 }
1219 }
1220#endif
1222 {
1224#ifdef _WIN32K_
1226#else
1228#endif
1229 if (!retstr) return 0;
1231 }
1232 else
1233 {
1234 size_retstr = 0;
1236 }
1237 p_retstr = retstr;
1238
1239 do
1240 {
1242 if (invert_y)
1244 else
1246 strPtr =
TEXT_NextLineW(
hdc, strPtr, &
count,
line, &
len,
width,
flags, &
size, last_line, &p_retstr, tabwidth, &prefix_offset, &ellip);
1247
1248#ifdef __REACTOS__
1250 {
1252 {
1254 }
1255 else
1256 {
1258 }
1259 }
1260#else
1263#endif
1265
1267 {
1268#ifdef __REACTOS__
1273#else
1277#endif
1278 }
1279
1281 {
1285 {
1286 int len_seg;
1289 {
1293 if (len_seg !=
len &&
1294#ifdef _WIN32K_
1296#else
1298#endif
1299 {
1300#ifdef _WIN32K_
1302#else
1304#endif
1305 return 0;
1306 }
1307 }
1308 else
1310#ifdef _WIN32K_
1315#else
1320#endif
1321 {
1322#ifdef _WIN32K_
1324#else
1326#endif
1327 return 0;
1328 }
1329 if (prefix_offset != -1 && prefix_offset < len_seg)
1330 {
1332 }
1336 {
1339 xseg += ((
size.cx/tabwidth)+1)*tabwidth;
1340 if (prefix_offset != -1)
1341 {
1342 if (prefix_offset < len_seg)
1343 {
1344
1345
1346
1347
1348
1349
1350 prefix_offset = -1;
1351 }
1352 else
1353 prefix_offset -= len_seg;
1354 }
1355 }
1356 }
1357 }
1358 else if (
size.cx > max_width)
1359 max_width =
size.cx;
1360
1361 y += invert_y ? -lh : lh;
1362 if (dtp)
1364 }
1365 while (strPtr && !last_line);
1366
1367#ifndef _WIN32K_
1369 {
1373 {
1375 }
1376 }
1377#else
1379 {
1382 {
1384 }
1385 }
1386#endif
1387
1389 {
1392 if (dtp)
1394 }
1395 if (retstr)
1396 {
1398#ifdef _WIN32K_
1400#else
1402#endif
1403 }
1405}
static const char * wine_dbgstr_rect(const RECT *prc)
int FASTCALL GreGetGraphicsMode(HDC)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
#define ExAllocatePoolWithTag(hernya, size, tag)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei width
#define memcpy(s1, s2, n)
#define ExFreePoolWithTag(_P, _T)
BOOL WINAPI GreGetViewportExtEx(_In_ HDC hdc, _Out_ LPSIZE lpSize)
BOOL WINAPI GreGetWindowExtEx(_In_ HDC hdc, _Out_ LPSIZE lpSize)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateRectRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI INT APIENTRY NtGdiExtSelectClipRgn(_In_ HDC hdc, _In_opt_ HRGN hrgn, _In_ INT iMode)
__kernel_entry W32KAPI INT APIENTRY NtGdiIntersectClipRect(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI INT APIENTRY NtGdiGetRandomRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ INT iRgn)
BOOL UserExtTextOutW(HDC hdc, INT x, INT y, UINT flags, PRECTL lprc, LPCWSTR lpString, UINT count)
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
BOOL WINAPI GreGetTextMetricsW(_In_ HDC hdc, _Out_ LPTEXTMETRICW lptm)
BOOL FASTCALL GreGetTextExtentW(_In_ HDC hDC, _In_reads_(cwc) PCWCH lpwsz, _In_ INT cwc, _Out_ PSIZE psize, _In_ UINT flOpts)
static void TEXT_DrawUnderscore(HDC hdc, int x, int y, const WCHAR *str, int offset, const RECT *rect)
static const WCHAR * TEXT_NextLineW(HDC hdc, const WCHAR *str, int *count, WCHAR *dest, int *len, int width, DWORD format, SIZE *retsize, int last_line, WCHAR **p_retstr, int tabwidth, int *pprefix_offset, ellipsis_data *pellip)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI GetGraphicsMode(_In_ HDC)
int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI GetTextExtentPointW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)
BOOL WINAPI GdiFlush(void)
int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN)
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
BOOL WINAPI GetWindowExtEx(_In_ HDC, _Out_ LPSIZE)
BOOL WINAPI GetViewportExtEx(_In_ HDC, _Out_ LPSIZE)
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)