46#define WIN32_LEAN_AND_MEAN
50#define ImmGetCompositionStringW IMM_FN(ImmGetCompositionStringW)
51#define ImmGetCompositionWindow IMM_FN(ImmGetCompositionWindow)
52#define ImmGetContext IMM_FN(ImmGetContext)
53#define ImmIsIME IMM_FN(ImmIsIME)
54#define ImmLockIMC IMM_FN(ImmLockIMC)
55#define ImmNotifyIME IMM_FN(ImmNotifyIME)
56#define ImmReleaseContext IMM_FN(ImmReleaseContext)
57#define ImmSetCompositionFontW IMM_FN(ImmSetCompositionFontW)
58#define ImmSetCompositionWindow IMM_FN(ImmSetCompositionWindow)
59#define ImmUnlockIMC IMM_FN(ImmUnlockIMC)
66#define BUFLIMIT_INITIAL 30000
68#define ROUND_TO_GROW(size) (((size) + (GROWLENGTH - 1)) & ~(GROWLENGTH - 1))
69#define HSCROLL_FRACTION 3
74#define EF_MODIFIED 0x0001
75#define EF_FOCUSED 0x0002
76#define EF_UPDATE 0x0004
77#define EF_VSCROLL_TRACK 0x0008
78#define EF_HSCROLL_TRACK 0x0010
79#define EF_AFTER_WRAP 0x0080
81#define EF_USE_SOFTBRK 0x0100
82#define EF_DIALOGMODE 0x0200
120 INT undo_insert_count;
123 UINT undo_buffer_size;
134 void *word_break_proc;
144 INT wheelDeltaRemainder;
160 UINT composition_len;
161 int composition_start;
171#define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0)
172#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
178 TRACE(
"notification %d sent to %p.\n",
code,
es->hwndParent);
192 return (
es->undo_insert_count ||
strlenW(
es->undo_text));
203 es->undo_insert_count = 0;
204 *
es->undo_text =
'\0';
229 DWORD dwEmulatedVersion;
238 version = dwProcVersion < dwEmulatedVersion ? dwProcVersion : dwEmulatedVersion;
268 if(
es->text_length == (
UINT)-1)
270 return es->text_length;
324 ERR(
"unknown action code, please report !\n");
348 if (
es->word_break_proc)
354 TRACE_(relay)(
"(UNICODE wordbrk=%p,str=%s,idx=%d,cnt=%d,act=%d)\n",
371 TRACE_(relay)(
"(ANSI wordbrk=%p,str=%s,idx=%d,cnt=%d,act=%d)\n",
398 line_def = line_def->
next;
441 WARN(
"ScriptStringAnalyse failed (%x)\n",
hr);
451 return line_def->
ssa;
474 ScriptStringAnalyse(udc, &
es->password_char,
length, (3*
length/2+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS|
SSA_PASSWORD, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
476 ScriptStringAnalyse(udc, &
es->password_char,
length, (1.5*
length+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS|
SSA_PASSWORD, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
481 ScriptStringAnalyse(udc,
es->text,
length, (3*
length/2+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
483 ScriptStringAnalyse(udc,
es->text,
length, (1.5*
length+16), -1,
SSA_LINK|
SSA_FALLBACK|
SSA_GLYPHS, -1,
NULL,
NULL,
NULL,
NULL,
NULL, &
es->ssa);
495 line_def =
es->first_line_def;
496 while (line_def &&
line)
498 line_def = line_def->
next;
508 INT vlc = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
528 INT line_index = 0, nstart_line, nstart_index;
529 INT line_count =
es->line_count;
534 if (istart == iend && delta == 0)
537 previous_line =
NULL;
538 current_line =
es->first_line_def;
543 if (istart < current_line->
index + current_line->
length ||
547 previous_line = current_line;
548 current_line = current_line->
next;
550 }
while (current_line);
554 FIXME(
" modification occurred outside buffer\n");
559 nstart_line = line_index;
560 nstart_index = current_line->
index;
567 current_line = previous_line;
569 start_line = current_line;
571 fw =
es->format_rect.right -
es->format_rect.left;
572 current_position =
es->text + current_line->
index;
575 if (current_line != start_line)
577 if (!current_line || current_line->
index + delta > current_position -
es->text)
584 if (new_line ==
NULL)
587 new_line->
next = previous_line->
next;
588 previous_line->
next = new_line;
589 current_line = new_line;
592 else if (current_line->
index + delta < current_position - es->
text)
595 previous_line->
next = current_line->
next;
597 current_line = previous_line->
next;
603 if (current_position -
es->text > iend)
609 current_line->
index = current_position -
es->text;
613 cp = current_position;
615 if (*
cp ==
'\n')
break;
616 if ((*
cp ==
'\r') && (*(
cp + 1) ==
'\n'))
625 }
else if ((
cp > current_position) && (*(
cp - 1) ==
'\r')) {
628 }
else if (*
cp ==
'\n') {
641 if (current_line->
ssa)
649 else current_line->
width = 0;
656 if (current_line->
width > fw && fw >
es->char_width) {
666 if (
d > 1.2f)
d -= 0.2f;
675 if (current_line->
ssa)
683 }
while (prev && current_line->
width > fw);
693 if (current_line->
ssa)
701 current_line->
width -= piDx[prev];
703 }
while ( prev > 0 && current_line->
width > fw);
709 prev = (fw /
es->char_width);
714 if (current_line->
index == nstart_index && istart > current_line->
index + prev)
715 istart = current_line->
index + prev;
718 else if (current_line == start_line &&
719 current_line->
index != nstart_index && orig_net_length < prev)
723 nstart_line = line_index;
724 nstart_index = current_line->
index;
725 istart = current_line->
index + orig_net_length;
734 if (current_line->
ssa)
740 current_line->
width = 0;
742 else current_line->
width = 0;
744 else if (current_line == start_line &&
745 current_line->
index != nstart_index &&
750 nstart_line = line_index;
751 nstart_index = current_line->
index;
752 istart = current_line->
index + orig_net_length;
758 switch (current_line->
ending) {
773 es->text_width =
max(
es->text_width, current_line->
width);
774 current_position += current_line->
length;
775 previous_line = current_line;
778 if ((line_index < es->y_offset) || (line_index >
es->y_offset + vlc))
781 current_line = current_line->
next;
793 pnext = current_line->
next;
796 current_line = pnext;
804 current_line->
index += delta;
805 current_line = current_line->
next;
818 rc.
top =
es->format_rect.top + nstart_line *
es->line_height -
819 (
es->y_offset *
es->line_height);
822 rc.
left =
es->format_rect.left;
829 rc.
right =
es->format_rect.right;
833 rc.
left =
es->format_rect.left;
834 rc.
right =
es->format_rect.right;
839 if (line_count < es->line_count)
841 else if (line_count >
es->line_count)
842 rc.
bottom = line_count *
es->line_height;
844 rc.
bottom = line_index *
es->line_height;
846 rc.
bottom -= (
es->y_offset *
es->line_height);
865 es->text_width =
size->cx;
887 INT line = (
y -
es->format_rect.top) /
es->line_height +
es->y_offset;
891 while ((
line > 0) && line_def->next) {
892 line_index += line_def->length;
893 line_def = line_def->next;
897 x +=
es->x_offset -
es->format_rect.left;
899 x -= (
es->format_rect.right -
es->format_rect.left) - line_def->width;
901 x -= ((
es->format_rect.right -
es->format_rect.left) - line_def->width) / 2;
902 if (
x >= line_def->width) {
904 *after_wrap = (line_def->ending ==
END_WRAP);
905 return line_index + line_def->net_length;
907 if (x <= 0 || !line_def->
ssa) {
914 if (trailing)
index++;
917 *after_wrap = ((
index == line_index + line_def->net_length) &&
924 x -=
es->format_rect.left;
930 INT indent = (
es->format_rect.right -
es->format_rect.left) -
es->text_width;
955 if (
x + xoff > 0 || !
es->ssa)
958 if (trailing)
index++;
972 else if (
x >
size->cx)
977 if (trailing)
index++;
1000 *
x =
min(
max(*
x,
es->format_rect.left),
es->format_rect.right - 1);
1001 *
y =
min(
max(*
y,
es->format_rect.top),
es->format_rect.bottom - 1);
1018 return es->line_count - 1;
1023 line_def =
es->first_line_def;
1025 while ((
index >= 0) && line_def->
next) {
1027 line_def = line_def->
next;
1046 if (
line >=
es->line_count)
1050 line_def =
es->first_line_def;
1053 while ((
index >= 0) && line_def->
next) {
1054 line_index += line_def->
length;
1055 line_def = line_def->
next;
1060 line_index += line_def->
length;
1061 line_def = line_def->
next;
1095 line_def =
es->first_line_def;
1097 while ((
index >= 0) && line_def->
next) {
1098 line_def = line_def->
next;
1126 y = (
l -
es->y_offset) *
es->line_height;
1128 if (after_wrap && (
li ==
index) &&
l) {
1130 line_def =
es->first_line_def;
1132 line_def = line_def->
next;
1137 y -=
es->line_height;
1142 line_def =
es->first_line_def;
1144 line_def = line_def->
next;
1146 lw = line_def->
width;
1147 w =
es->format_rect.right -
es->format_rect.left;
1155 x = (lw > 0 ?
es->x_offset :
x -
es->x_offset);
1183 xoff +=
es->char_width * leftover;
1214 w =
es->format_rect.right -
es->format_rect.left;
1215 if (
w >
es->text_width)
1218 x +=
w -
es->text_width;
1220 x += (
w -
es->text_width) / 2;
1226 x +=
es->format_rect.left;
1227 y +=
es->format_rect.top;
1249 rc->
top =
es->format_rect.top + (
line -
es->y_offset) *
es->line_height;
1253 line_def =
es->first_line_def;
1256 while ((
index >= 0) && line_def->
next) {
1257 line_index += line_def->
length;
1258 line_def = line_def->
next;
1263 line_index += line_def->
length;
1264 line_def = line_def->
next;
1273 rc->
top =
es->format_rect.top;
1283 pt3+=
es->format_rect.left;
1293 es->text_length = (
UINT)-1;
1317 TRACE(
"Synchronizing with 32-bit ANSI buffer\n");
1323 ERR(
"no buffer ... please report\n");
1330 if(!
es->hloc32W)
return;
1338 if(countW_new >
es->buffer_size + 1)
1341 TRACE(
"Resizing 32-bit UNICODE buffer from %d+1 to %d WCHARs\n",
es->buffer_size, countW_new);
1345 es->hloc32W = hloc32W_new;
1347 TRACE(
"Real new size %d+1 WCHARs\n",
es->buffer_size);
1350 WARN(
"FAILED! Will synchronize partially\n");
1372 WARN(
"edit hwnd %p already destroyed\n",
es->hwndSelf);
1376 if (!
es->lock_count) {
1377 ERR(
"lock_count == 0 ... please report\n");
1381 ERR(
"es->text == 0 ... please report\n");
1385 if (force || (
es->lock_count == 1)) {
1393 TRACE(
"Synchronizing with 32-bit ANSI buffer\n");
1394 TRACE(
"%d WCHARs translated to %d bytes\n", countW, countA_new);
1396 if(countA_new > countA)
1400 TRACE(
"Resizing 32-bit ANSI buffer from %d to %d bytes\n", countA, alloc_size);
1404 es->hloc32A = hloc32A_new;
1406 TRACE(
"Real new size %d bytes\n", countA);
1409 WARN(
"FAILED! Will synchronize partially\n");
1420 ERR(
"no buffer ... please report\n");
1441 TRACE(
"trying to ReAlloc to %d+1 characters\n",
size);
1449 TRACE(
"Old 32 bit handle %p, new handle %p\n",
es->hloc32W, hNew32W);
1450 es->hloc32W = hNew32W;
1457 if (
es->buffer_size <
size) {
1458 WARN(
"FAILED ! We now have %d+1\n",
es->buffer_size);
1462 TRACE(
"We now have %d+1\n",
es->buffer_size);
1479 if (size <= es->undo_buffer_size)
1482 TRACE(
"trying to ReAlloc to %d+1\n",
size);
1486 es->undo_buffer_size = alloc_size/
sizeof(
WCHAR) - 1;
1491 WARN(
"FAILED ! We now have %d+1\n",
es->undo_buffer_size);
1505 es->flags &= ~EF_UPDATE;
1520 es->flags &= ~EF_UPDATE;
1565 if ((el < es->y_offset) || (sl >
es->y_offset + vlc))
1570 if (sl < es->y_offset) {
1574 if (el >
es->y_offset + vlc) {
1575 el =
es->y_offset + vlc;
1591 for (
l = sl + 1 ;
l < el ;
l++) {
1649 UINT old_start =
es->selection_start;
1650 UINT old_end =
es->selection_end;
1655 end =
es->selection_end;
1661 es->selection_end =
end;
1665 es->flags &= ~EF_AFTER_WRAP;
1683 if (
end != old_start)
1693 if (old_start >
end )
1721 si.
nMax =
es->line_count - 1;
1722 si.
nPage = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1724 TRACE(
"SB_VERT, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1735 si.
nMax =
es->text_width - 1;
1736 si.
nPage =
es->format_rect.right -
es->format_rect.left;
1738 TRACE(
"SB_HORZ, nMin=%d, nMax=%d, nPage=%d, nPos=%d\n",
1757 INT x_offset_in_pixels;
1758 INT lines_per_page = (
es->format_rect.bottom -
es->format_rect.top) /
1763 x_offset_in_pixels =
es->x_offset;
1771 if (-
dx > x_offset_in_pixels)
1772 dx = -x_offset_in_pixels;
1773 if (
dx >
es->text_width - x_offset_in_pixels)
1774 dx =
es->text_width - x_offset_in_pixels;
1775 nyoff =
max(0,
es->y_offset +
dy);
1776 if (nyoff >=
es->line_count - lines_per_page)
1777 nyoff =
max(0,
es->line_count - lines_per_page);
1778 dy = (
es->y_offset - nyoff) *
es->line_height;
1783 es->y_offset = nyoff;
1787 es->x_offset +=
dx /
es->char_width;
1815 dx *=
es->char_width;
1840 if (
es->y_offset <
es->line_count - 1)
1845 dy = -(
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1848 if (
es->y_offset <
es->line_count - 1)
1849 dy = (
es->format_rect.bottom -
es->format_rect.top) /
es->line_height;
1857 if(
es->y_offset +
dy >
es->line_count - vlc)
1858 dy =
max(
es->line_count - vlc, 0) -
es->y_offset;
1915 EDIT_ImmSetCompositionWindow(
es,
pt);
1934 INT cw =
es->char_width;
1942 if (
l >=
es->y_offset + vlc)
1943 dy =
l - vlc + 1 -
es->y_offset;
1944 if (l < es->y_offset)
1945 dy =
l -
es->y_offset;
1946 ww =
es->format_rect.right -
es->format_rect.left;
1947 if (x < es->format_rect.left)
1949 if (
x >
es->format_rect.right)
1951 if (
dy ||
dx || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1954 if(
es->x_offset +
dx + ww >
es->text_width)
1955 dx =
es->text_width - ww -
es->x_offset;
1956 if(
dx ||
dy || (
es->y_offset && (
es->line_count -
es->y_offset < vlc)))
1965 format_width =
es->format_rect.right -
es->format_rect.left;
1966 if (x < es->format_rect.left) {
1971 }
while ((
x < goal) &&
es->x_offset);
1974 }
else if (
x >
es->format_rect.right) {
1982 }
while ((
x > goal) && (x_last >
es->format_rect.right));
2000 INT e =
es->selection_end;
2005 (
es->text[
e - 1] ==
'\r') && (
es->text[
e] ==
'\n')) {
2007 if (
e && (
es->text[
e - 1] ==
'\r'))
2027 INT s =
es->selection_start;
2028 INT e =
es->selection_end;
2070 INT e =
es->selection_end;
2075 if (
es->text[
e] ==
'\n')
2077 else if ((
es->text[
e] ==
'\r') && (
es->text[
e + 1] ==
'\n'))
2119 INT s =
es->selection_start;
2120 INT e =
es->selection_end;
2127 y + (
es->format_rect.bottom -
es->format_rect.top),
2147 INT s =
es->selection_start;
2148 INT e =
es->selection_end;
2155 y - (
es->format_rect.bottom -
es->format_rect.top),
2175 INT s =
es->selection_start;
2176 INT e =
es->selection_end;
2197 INT s =
es->selection_start;
2198 INT e =
es->selection_end;
2228 INT s =
es->selection_start;
2229 INT e =
es->selection_end;
2261 HFONT hUnderline = 0;
2277 if (
es->composition_len == 0)
2296 es->tabs_count,
es->tabs,
es->format_rect.left -
es->x_offset));
2306 if (
es->composition_len == 0)
2344 if ((line < es->y_offset) || (
line >
es->y_offset + vlc) || (
line >=
es->line_count))
2358 int line_idx =
line;
2365 while (line_def && line_idx)
2367 line_def = line_def->
next;
2370 w =
es->format_rect.right -
es->format_rect.left;
2371 lw = line_def->
width;
2378 x +=
es->format_rect.left;
2385 s =
min(
es->selection_start,
es->selection_end);
2386 e =
max(
es->selection_start,
es->selection_end);
2393 else if (
rev && (
s !=
e) &&
2415 es->format_rect.right =
max(
es->format_rect.right,
es->format_rect.left +
es->char_width);
2418 INT fw, vlc, max_x_offset, max_y_offset;
2421 es->format_rect.bottom =
es->format_rect.top + vlc *
es->line_height;
2424 fw =
es->format_rect.right -
es->format_rect.left;
2425 max_x_offset =
es->text_width - fw;
2426 if(max_x_offset < 0) max_x_offset = 0;
2427 if(
es->x_offset > max_x_offset)
2428 es->x_offset = max_x_offset;
2431 max_y_offset =
es->line_count - vlc;
2432 if(max_y_offset < 0) max_y_offset = 0;
2433 if(
es->y_offset > max_y_offset)
2434 es->y_offset = max_y_offset;
2441 es->format_rect.bottom =
es->format_rect.top +
es->line_height;
2445 es->format_rect.bottom =
min(
es->format_rect.bottom, ClientRect.
bottom);
2471 es->format_rect.left++;
2472 es->format_rect.right--;
2474 if (
es->format_rect.bottom -
es->format_rect.top
2475 >=
es->line_height + 2)
2477 es->format_rect.top++;
2478 es->format_rect.bottom--;
2484 es->format_rect.left +=
bw;
2485 es->format_rect.right -=
bw;
2486 if (
es->format_rect.bottom -
es->format_rect.top
2487 >=
es->line_height + 2 * bh)
2489 es->format_rect.top += bh;
2490 es->format_rect.bottom -= bh;
2494 es->format_rect.left +=
es->left_margin;
2495 es->format_rect.right -=
es->right_margin;
2541 es->flags &= ~EF_USE_SOFTBRK;
2544 FIXME(
"soft break enabled, not implemented\n");
2569 hLocal =
es->hloc32W;
2575 UINT countA, alloc_size;
2576 TRACE(
"Allocating 32-bit ANSI alias buffer\n");
2581 ERR(
"Could not allocate %d bytes for 32-bit ANSI alias buffer\n", alloc_size);
2588 hLocal =
es->hloc32A;
2594 es->hlocapp = hLocal;
2596 TRACE(
"Returning %p, LocalSize() = %ld\n", hLocal,
LocalSize(hLocal));
2609 INT line_len, dst_len;
2613 if (
line >=
es->line_count)
2623 if(dst_len <= line_len)
2638 if(!
ret && line_len)
2687 TRACE(
"%s, can_undo %d, send_update %d\n",
2688 debugstr_w(lpsz_replace), can_undo, send_update);
2690 s =
es->selection_start;
2691 e =
es->selection_end;
2694 if ((
s ==
e) && !strl)
2699 size = tl - (
e -
s) + strl;
2705 if ((honor_limit) && (
size >
es->buffer_limit))
2709 if (
es->buffer_limit < (tl - (
e-
s)))
2712 strl =
min(strl,
es->buffer_limit - (tl - (
e-
s)));
2720 TRACE(
"deleting stuff.\n");
2734 for (
p =
es->text + tl ;
p >=
es->text +
s ;
p--)
2736 for (
i = 0 ,
p =
es->text +
s ;
i < strl ;
i++)
2737 p[
i] = lpsz_replace[
i];
2746 INT st =
min(
es->selection_start,
es->selection_end);
2751 strl -
abs(
es->selection_end -
es->selection_start),
hrgn);
2757 for (
i = 0 ,
p =
es->text ;
i <
e -
s ;
i++)
2761 abs(
es->selection_end -
es->selection_start) - strl,
hrgn);
2769 INT fw =
es->format_rect.right -
es->format_rect.left;
2774 while ((
es->text_width > fw) &&
s + strl >=
s) {
2777 es->text_length = -1;
2789 if (!
es->undo_insert_count && (*
es->undo_text && (
s ==
es->undo_position))) {
2793 (
es->undo_text + utl)[
e -
s] = 0;
2794 }
else if (!
es->undo_insert_count && (*
es->undo_text && (
e ==
es->undo_position))) {
2797 for (
p =
es->undo_text + utl ;
p >=
es->undo_text ;
p--)
2799 for (
i = 0 ,
p =
es->undo_text ;
i <
e -
s ;
i++)
2801 es->undo_position =
s;
2806 es->undo_text[
e -
s] = 0;
2807 es->undo_position =
s;
2810 es->undo_insert_count = 0;
2816 if ((
s ==
es->undo_position) ||
2817 ((
es->undo_insert_count) &&
2818 (
s ==
es->undo_position +
es->undo_insert_count)))
2823 es->undo_insert_count += strl;
2826 es->undo_position =
s;
2827 es->undo_insert_count = strl;
2829 *
es->undo_text =
'\0';
2842 INT delta = strl -
abs(
es->selection_end -
es->selection_start);
2844 if (delta < 0 && es->x_offset)
2846 if (
abs(delta) >
es->x_offset)
2849 es->x_offset += delta;
2872 es->flags &= ~EF_UPDATE;
2892 WARN(
"called with NULL handle\n");
2919 ERR(
"Could not allocate new unicode buffer\n");
2930 es->hloc32W = hloc32W_new;
2942 es->x_offset =
es->y_offset = 0;
2943 es->selection_start =
es->selection_end = 0;
2945 es->flags &= ~EF_MODIFIED;
2946 es->flags &= ~EF_UPDATE;
3002 INT default_left_margin = 0;
3003 INT default_right_margin = 0;
3015 default_left_margin =
width / 2;
3016 default_right_margin =
width / 2;
3021 default_left_margin =
es->left_margin;
3022 default_right_margin =
es->right_margin;
3026 default_left_margin =
width / 2;
3027 default_right_margin =
width / 2;
3035 es->format_rect.left -=
es->left_margin;
3039 es->left_margin = default_left_margin;
3040 es->format_rect.left +=
es->left_margin;
3044 es->format_rect.right +=
es->right_margin;
3048 es->right_margin = default_right_margin;
3049 es->format_rect.right -=
es->right_margin;
3057 TRACE(
"left=%d, right=%d\n",
es->left_margin,
es->right_margin);
3073 if (
es->password_char ==
c)
3077 es->password_char =
c;
3083 es->style &= ~ES_PASSWORD;
3127 if (
es->word_break_proc == wbp)
3130 es->word_break_proc = wbp;
3165 TRACE(
"before UNDO:insertion length = %d, deletion buffer = %s\n",
3177 TRACE(
"after UNDO:insertion length = %d, deletion buffer = %s\n",
3231 INT s =
min(
es->selection_start,
es->selection_end);
3232 INT e =
max(
es->selection_start,
es->selection_end);
3306 static const WCHAR cr_lfW[] = {
'\r',
'\n',0};
3314 static const WCHAR tabW[] = {
'\t',0};
3322 if (
es->selection_start !=
es->selection_end)
3393 ERR(
"unknown menu item, please report\n");
3438 if (
x == -1 &&
y == -1)
3447 WIN_GetRectangles(
es->hwndSelf, COORDS_SCREEN,
NULL, &rc );
3473 if(!
count)
return 0;
3496 HWND hLBox =
es->hwndListBox;
3508 TRACE_(combo)(
"[%p]: handling msg %x (%x)\n",
es->hwndSelf,
msg,
key);
3615 if (
es->selection_start !=
es->selection_end) {
3626 }
else if (control) {
3680 FIXME(
"Ctrl+Backspace\n");
3700 es->flags &= ~EF_FOCUSED;
3706 es->wheelDeltaRemainder = 0;
3708 if (
es->hwndListBox ==
NULL) {
3718 es->flags &= ~EF_FOCUSED;
3724 es->wheelDeltaRemainder = 0;
3740 INT e =
es->selection_end;
3745 es->bCaptureState =
TRUE;
3755 es->region_posx =
es->region_posy = 0;
3771 es->bCaptureState =
TRUE;
3777 es->region_posx =
es->region_posy = 0;
3794 if (
es->bCaptureState) {
3838 es->region_posx = (prex <
x) ? -1 : ((prex >
x) ? 1 : 0);
3839 es->region_posy = (prey <
y) ? -1 : ((prey >
y) ? 1 : 0);