Subversion Repositories Kolibri OS

Rev

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

Rev 8872 Rev 8901
Line -... Line 1...
-
 
1
//===================================================//
-
 
2
//                                                   //
-
 
3
//                      PATH                         //
-
 
4
//                                                   //
-
 
5
//===================================================//
-
 
6
 
-
 
7
char work_area_pointer[1024];
1
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
8
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x000000, 0xFFFFCC, #path, #work_area_pointer, 0};
2
void DrawPathBar()
9
void DrawPathBar()
3
{
10
{
4
	if (efm) {
11
	if (efm) {
-
 
12
		DrawPathBarKfm();
5
		return;
13
		return;
6
		PathShow.start_x = 10;
-
 
7
		PathShow.start_y = Form.cheight - status_bar_h;
-
 
8
	} else {
14
	}
9
		PathShow.start_x = 250;
-
 
10
		PathShow.start_y = 17;
-
 
-
 
15
 
11
		if (show_breadcrumb.checked) {
16
	if (show_breadcrumb.checked) {
12
			DrawBreadCrumbs(); 
17
		DrawBreadCrumbs(); 
13
			return;
18
		return;
14
		}
19
	}
15
	}
-
 
Line -... Line 20...
-
 
20
 
-
 
21
	PathShow.start_x = 250;
16
 
22
	PathShow.start_y = 17;
17
	PathShow.area_size_x = Form.cwidth-300;
23
	PathShow.area_size_x = Form.cwidth-300;
18
	DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
24
	DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
19
	DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
25
	DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
20
	DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
26
	DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
Line 21... Line 27...
21
	DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
27
	DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
Line 22... Line -...
22
 
-
 
23
	DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26");
28
 
24
 
29
	DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26");
25
	PathShow.background_color = col.odd_line;
30
 
26
	PathShow.font_color = col.list_gb_text;
31
	PathShow.font_color = col.list_gb_text;
Line -... Line 32...
-
 
32
	PathShow_prepare stdcall(#PathShow);
-
 
33
	PathShow_draw stdcall(#PathShow);
-
 
34
}
-
 
35
 
-
 
36
void DrawPathBarKfm()
-
 
37
{
-
 
38
	dword bgc;
-
 
39
	int i=0;
-
 
40
	if (!Form.cwidth) return;
-
 
41
 
-
 
42
	if (skin_is_dark()) {
-
 
43
		bgc = col.odd_line;
-
 
44
		PathShow.font_color = col.list_gb_text;
-
 
45
	} else {
-
 
46
		bgc = 0xFFFFCC; 
-
 
47
		PathShow.font_color = 0x222222;
-
 
48
	}
-
 
49
	if (active_panel==1) PathShow.text_pointer = #path; else PathShow.text_pointer = #inactive_path;
-
 
50
	PathShow.start_x = 4;
-
 
51
	PathShow.area_size_x = Form.cwidth/2-8;
-
 
52
	PathShow.start_y = Form.cheight - status_bar_h+2;
-
 
53
 
-
 
54
	_DRAW_BAR:
-
 
55
	DrawBar(PathShow.start_x-2,PathShow.start_y-3,PathShow.area_size_x+5,14,bgc);
-
 
56
	DrawRectangle(PathShow.start_x-3,PathShow.start_y-4,PathShow.area_size_x+6,15,sc.work_graph);
-
 
57
	PathShow_prepare stdcall(#PathShow);
-
 
58
	PathShow_draw stdcall(#PathShow);
-
 
59
	i++;
-
 
60
	if (i<2) {
-
 
61
		if (active_panel==1) PathShow.text_pointer = #inactive_path; else PathShow.text_pointer = #path;
-
 
62
		PathShow.start_x = Form.cwidth/2 + 2;
-
 
63
		PathShow.area_size_x = Form.cwidth - PathShow.start_x - 5;
-
 
64
		goto _DRAW_BAR;
-
 
65
	}
-
 
66
 
-
 
67
	DrawBar(0,PathShow.start_y-2,1,15,sc.work);
-
 
68
	DrawBar(Form.cwidth-1,PathShow.start_y-2,1,15,sc.work);
-
 
69
	DrawBar(1,PathShow.start_y+12,Form.cwidth-2,1,sc.work_light);
-
 
70
}
-
 
71
 
-
 
72
void DrawPathBarKfm_Line()
-
 
73
{
-
 
74
 
-
 
75
}
-
 
76
 
-
 
77
 
-
 
78
//===================================================//
-
 
79
//                                                   //
27
	PathShow_prepare stdcall(#PathShow);
80
//                   BREADCRUMBS                     //
28
	PathShow_draw stdcall(#PathShow);
81
//                                                   //
29
}
82
//===================================================//
30
 
83
 
31
void DrawBreadCrumbs()
84
void DrawBreadCrumbs()
32
 collection_int breadCrumb=0;
85
 collection_int breadCrumb=0;
33
 char PathShow_path[4096];
86
 char PathShow_path[4096];
34
 block btn;
87
 block btn;
35
 int i;
88
 int i;
36
 unsigned text_line;
89
 unsigned text_line;
37
 {
90
 {
38
	strcat(#PathShow_path, #path);
91
	strcat(#PathShow_path, #path);
39
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
92
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
40
	breadCrumb.drop();
93
	breadCrumb.drop();
41
	for (i=0; PathShow_path[i]; i++) 
94
	for (i=0; (PathShow_path[i]) && (i
42
	{
95
	{