Subversion Repositories Kolibri OS

Rev

Rev 5709 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5709 Rev 5718
Line 1... Line 1...
1
//Leency - 2012-2013
1
//Leency - 2012-2013
Line 2... Line 2...
2
 
2
 
3
char *ITEMS_LIST[]={
-
 
4
"WIN                Ctrl+E",05,
-
 
5
"DOS                Ctrl+D",04,
-
 
6
"KOI                Ctrl+K",11,
-
 
7
"UTF                Ctrl+U",21,
3
char *ITEMS_LIST[]={
8
#ifdef LANG_RUS
4
#ifdef LANG_RUS
9
"Zoom 2x                 Z",122,
5
"Zoom 2x",
10
"®á¬®âà¥âì ¨á室­¨ª    F3",52,
6
"®á¬®âà¥âì ¨á室­¨ª",
-
 
7
"¥¤ ªâ¨à®¢ âì ¨á室­¨ª",
11
"¥¤ ªâ¨à®¢ âì ¨á室­¨ª F4",53,
8
"ˆáâ®à¨ï",
12
"Žç¨áâ¨âì ªíè ª à⨭®ª"    ,02,
-
 
13
"ˆáâ®à¨ï"                  ,03,
9
"Žç¨áâ¨âì ªíè ª à⨭®ª",
14
"Œ¥­¥¤¦¥à § £à㧮ª"        ,06,
10
"Œ¥­¥¤¦¥à § £à㧮ª",
15
#else
11
#else
16
"Zoom 2x                 Z",122,
12
"Zoom 2x",
17
"View source            F3",52,
13
"View source",
-
 
14
"Edit source",
18
"Edit source            F4",53,
15
"History",
19
"Free image cache"         ,09,
-
 
20
"History"                  ,03,
16
"Free image cache",
21
"Download Manager"         ,06,
17
"Download Manager",
22
#endif
18
#endif
Line 23... Line 19...
23
0}; 
19
0};
Line 24... Line 20...
24
 
20
 
25
llist menu;
21
llist menu;
26
 
22
 
27
void menu_rmb()
23
void menu_rmb()
Line 28... Line 24...
28
{
24
{
29
	proc_info MenuForm;
25
	proc_info MenuForm;
30
	int key;
26
	int key;
31
 
27
 
Line 32... Line 28...
32
	menu.first = menu.current = 0;
28
	menu.ClearList();
33
	while (ITEMS_LIST[menu.count*2]) menu.count++;
29
	while (ITEMS_LIST[menu.count]) menu.count++;
Line 41... Line 37...
41
				GetProcessInfo(#MenuForm, SelfInfo);
37
				GetProcessInfo(#MenuForm, SelfInfo);
42
				if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
38
				if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
Line 43... Line 39...
43
 
39
 
44
				mouse.get();
40
				mouse.get();
45
				if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
41
				if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
46
				if (mouse.lkm)&&(mouse.up) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); }
42
				if (mouse.lkm)&&(mouse.up) ItemClick();
Line 47... Line 43...
47
				break;
43
				break;
48
				
44
				
49
		case evKey:
45
		case evKey:
-
 
46
				key = GetKey();
50
				key = GetKey();
47
				if (key==27) ExitProcess();
51
				if (key==27) ExitProcess();
-
 
52
				if (menu.ProcessKey(key)) DrawMenuList();
-
 
53
				if (key==13)
-
 
54
				{
-
 
55
					action_buf = ITEMS_LIST[menu.current*2+1];
-
 
56
					ExitProcess();
48
				if (key==13) ItemClick();
Line 57... Line 49...
57
				}
49
				if (menu.ProcessKey(key)) DrawMenuList();
58
				break;
50
				break;
59
				
51
				
Line 74... Line 66...
74
		if (N==menu.current) 
66
		if (N==menu.current) 
75
			DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, 0x94AECE);
67
			DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, 0x94AECE);
76
		else
68
		else
77
		{
69
		{
78
			DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, col_bg);
70
			DrawBar(menu.x, N*menu.line_h+menu.y, menu.w-3, menu.line_h, col_bg);
79
			WriteText(19,N*menu.line_h+9,0x80,0xf2f2f2,ITEMS_LIST[N*2]);
71
			WriteText(19,N*menu.line_h+9,0x80,0xf2f2f2,ITEMS_LIST[N]);
80
		}
72
		}
81
		WriteText(18,N*menu.line_h+8,0x80,0x000000,ITEMS_LIST[N*2]);
73
		WriteText(18,N*menu.line_h+8,0x80,0x000000,ITEMS_LIST[N]);
-
 
74
	}
-
 
75
	if (WB1.DrawBuf.zoom == 2) DrawBar(6, 8, 6, 6, 0x777777);
82
	}
76
}
83
	if (cur_encoding!=CH_NULL)
-
 
84
		WriteText(5, cur_encoding*menu.line_h+7, 0x80, 0x777777, "\x10"); //show current encoding
-
 
85
	else 
-
 
86
		WriteText(5, CH_CP866*menu.line_h+7, 0x80, 0x777777, "\x10"); //show current encoding
-
 
Line -... Line 77...
-
 
77
 
-
 
78
void ItemClick()
87
 
79
{
-
 
80
	action_buf = ZOOM2x + menu.current;
88
	if (WB1.DrawBuf.zoom == 2) DrawBar(6, 4*menu.line_h+8, 6, 6, 0x777777);
81
	ExitProcess();