Rev 6746 | Rev 7760 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6746 | Rev 6887 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #define MEMSIZE 4096*10 |
1 | #define MEMSIZE 4096*10 |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | #include "../lib/io.h" |
3 | #include "../lib/io.h" |
Line -... | Line 4... | ||
- | 4 | #include "../lib/window.h" |
|
4 | #include "../lib/gui.h" |
5 | |
5 | 6 | window win1=0; |
|
6 | void main() |
- | |
7 | { |
- | |
8 | word id; |
7 | void main() |
9 | dword file; |
- | |
10 | io.dir.load(0,DIR_ONLYREAL); |
- | |
11 | loop() switch(WaitEvent()) |
- | |
12 | { |
- | |
13 | case evButton: |
8 | { |
14 | id=GetButtonID(); |
- | |
15 | if (id==1) ExitProcess(); |
- | |
16 | break; |
- | |
17 | 9 | io.dir.load(0,DIR_ONLYREAL); |
|
18 | case evKey: |
- | |
19 | GetKeys(); |
- | |
20 | if (key_scancode == SCAN_CODE_ESC ) ExitProcess(); |
- | |
21 | break; |
- | |
22 | 10 | win1.background = 0xFFFFFF; |
|
23 | case evReDraw: |
11 | win1.left = 200; |
24 | draw_window(); |
- | |
25 | break; |
12 | win1.ondraw = #draw_window; |
26 | } |
13 | win1.create(); |
27 | } |
14 | } |
28 | void draw_window() |
- | |
29 | { |
15 | void draw_window() |
30 | proc_info Form; |
- | |
31 | int i; |
- | |
32 | DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header",0); |
- | |
33 | GetProcessInfo(#Form, SelfInfo); |
- | |
34 | for (i=0; i |
16 | { |
35 | { |
- | |
36 | WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i)); |
17 | int i; |
37 | } |
18 | for (i=0; i |
38 | DrawCaptButton(100, 10, 100, 22, 22, 0xCCCccc, 0x000000, "Button"); |
19 | DrawCaptButton(100, 10, 100, 22, 22, 0xCCCccc, 0x000000, "Button"); |
39 | WriteText(100,50,0x80,0,"Textline small"); |
20 | WriteText(100,50,0x80,0,"Textline small"); |
40 | WriteText(100,70,0x90,0,"Textline big"); |
21 | WriteText(100,70,0x90,0,"Textline big"); |
41 | DrawBar(100, 110, 100, 100, 0x66AF86); |
22 | DrawBar(100, 110, 100, 100, 0x66AF86); |