Listtree.mcc: implement MUIM_Listtree_Insert and MUIM_Listtree_GetEntry
[AROS.git] / test / graphics / textbug.c
blob225aae6b68b1a47672678d7591dcddf9391b2e1c
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <proto/exec.h>
7 #include <proto/intuition.h>
8 #include <proto/keymap.h>
9 #include <proto/graphics.h>
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <exec/execbase.h>
15 static void dotest(void)
17 struct Window *win;
18 struct IntuiMessage *msg;
19 BOOL quitme = FALSE;
21 win = OpenWindowTags(NULL, WA_Left, 20,
22 WA_Top, 20,
23 WA_Width, 300,
24 WA_Height, 100,
25 WA_Activate, TRUE,
26 WA_CloseGadget, TRUE,
27 WA_DepthGadget, TRUE,
28 WA_Title, (IPTR)"TextBug",
29 WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_RAWKEY,
30 TAG_DONE);
31 if (!win)
33 return;
36 SetSoftStyle(win->RPort, FSF_BOLD, AskSoftStyle(win->RPort));
37 SetAPen(win->RPort, 2);
38 SetBPen(win->RPort, 1);
39 #if 1
40 SetDrMd(win->RPort, JAM2);
41 Move(win->RPort, -20, 40);
42 Text(win->RPort, "1234567890", 10);
43 Move(win->RPort, 120, 40);
44 Text(win->RPort, "1234567890", 10);
46 SetDrMd(win->RPort, JAM1);
47 Move(win->RPort, -20, 60);
48 Text(win->RPort, "1234567890", 10);
49 Move(win->RPort, 120, 60);
50 Text(win->RPort, "1234567890", 10);
52 #endif
53 RefreshWindowFrame(win);
55 while(!quitme)
57 WaitPort(win->UserPort);
58 while((msg = (struct IntuiMessage *)GetMsg(win->UserPort)))
60 switch(msg->Class)
62 case IDCMP_CLOSEWINDOW:
63 quitme = TRUE;
64 break;
67 ReplyMsg((struct Message *)msg);
71 CloseWindow(win);
74 int main(int argc, char **argv)
76 dotest();
77 return 0;