1 /* -------------- text.c -------------- */
3 #include "dflat32/dflat.h"
5 int TextProc(DFWINDOW wnd
, DFMESSAGE msg
, PARAM p1
, PARAM p2
)
8 CTLWINDOW
*ct
= GetControl(wnd
);
9 char *cp
, *cp2
= ct
->itext
;
25 len
= min(ct
->dwnd
.h
, MsgHeight(cp2
));
27 ptr
= DFmalloc (strlen (cp2
) + 1);
30 for (i
= 0; i
< len
; i
++)
35 char *np
= strchr(cp
, '\n');
39 while ((cp1
=strchr(cp1
,SHORTCUTCHAR
)) != NULL
)
47 txt
= DFmalloc(mlen
+1);
48 CopyCommand(txt
, cp
, FALSE
, WndBackground(wnd
));
50 DfSendMessage(wnd
, ADDTEXT
, (PARAM
)txt
, 0);
51 if ((cp
= strchr(cp
, '\n')) != NULL
)
62 return BaseWndProc(TEXT
, wnd
, msg
, p1
, p2
);