Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4042 leency 1
//Leency 2013
2
 
3
void OpenWith()
4
{
5
	?define OPEN_LIST_W 300
6
	?define OPEN_LIST_H 300
7
	mouse mm;
8
	word key, slot, index, start_y;
9
	llist app_list;
10
	proc_info MenuForm;
11
	int texty, newi;
12
 
13
	app_list.ClearList();
14
	app_list.SetSizes(files.w-OPEN_LIST_W/2+files.x+Form.left+4,files.h-OPEN_LIST_H/2+files.y+Form.top+GetSkinHeight(),OPEN_LIST_W,OPEN_LIST_H,150,18);
15
	SetEventMask(100111b);
16
	goto _APP_LIST_DRAW;
17
 
18
	loop() switch(WaitEvent())
19
	{
20
		case evMouse:
21
				slot = GetProcessSlot(MenuForm.ID);
22
				if (slot != GetActiveProcess()) ExitProcess();
23
				mm.get();
24
				if (m.lkm) ExitProcess();
25
				break;
26
 
27
		case evKey:
28
				key = GetKey();
29
				if (key==27) ExitProcess();
30
				break;
31
 
32
		case evReDraw: _APP_LIST_DRAW:
33
				DefineAndDrawWindow(app_list.x, app_list.y,app_list.w+3,app_list.h+6,0x01, 0, 0, 0x01fffFFF);
34
				GetProcessInfo(#MenuForm, SelfInfo);
35
				DrawPopup(0,0,app_list.w,app_list.h,0, col_work,col_border);
36
				WriteText(10,10, 0x80, 0, "Select application to open file"w);
37
				WriteText(10,23, 0x80, 0, #file_name);
38
				WriteTextB(app_list.w/2-25,app_list.h/2, 0x90, 0, "S O O N");
39
 
40
				_APP_LIST_ITEMS_DRAW:
41
				break;
42
	}
43
}