Subversion Repositories Kolibri OS

Rev

Rev 7806 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7806 Rev 7972
1
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
1
PathShow_data PathShow = {0, 17,250, 6, 250, 0, 0, 0x0, 0xFFFfff, #path, #temp, 0};
2
void DrawPathBar()
2
void DrawPathBar()
3
{
3
{
4
	PathShow.area_size_x = Form.cwidth-300;
4
	PathShow.area_size_x = Form.cwidth-300;
5
	DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
5
	DrawBar(PathShow.start_x-3, PathShow.start_y-6, PathShow.area_size_x+3, 19, col.odd_line);
6
	DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
6
	DrawRectangle(PathShow.start_x-4,PathShow.start_y-7,PathShow.area_size_x+4,20,sc.work_graph);
7
	DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
7
	DefineHiddenButton(PathShow.start_x-4+1,PathShow.start_y-7+1,PathShow.area_size_x+4-2,20-2,PATH_BTN);
8
	DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
8
	DrawBar(PathShow.start_x-4, PathShow.start_y+14, PathShow.area_size_x+5+18, 1, sc.work_light);
9
 
9
 
10
	DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26");
10
	DrawFlatButtonSmall(PathShow.start_x+PathShow.area_size_x,PathShow.start_y-7,18,20, 61, "\26");
11
 
11
 
12
	PathShow.background_color = col.odd_line;
12
	PathShow.background_color = col.odd_line;
13
	PathShow.font_color = col.list_gb_text;
13
	PathShow.font_color = col.list_gb_text;
14
	PathShow_prepare stdcall(#PathShow);
14
	PathShow_prepare stdcall(#PathShow);
15
	PathShow_draw stdcall(#PathShow);
15
	PathShow_draw stdcall(#PathShow);
16
}
16
}
17
 
17
 
18
void DrawBreadCrumbs()
18
void DrawBreadCrumbs()
19
 collection_int breadCrumb;
19
 collection_int breadCrumb=0;
20
 char PathShow_path[4096];
20
 char PathShow_path[4096];
21
 block btn;
21
 block btn;
22
 int i;
22
 int i;
23
 unsigned text_line, area_w;
23
 unsigned text_line, area_w;
24
 {
24
 {
25
	strcat(#PathShow_path, #path);
25
	strcat(#PathShow_path, #path);
26
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
26
	for (i=0; i<50; i++) DeleteButton(i+BREADCRUMB_ID);
27
	breadCrumb.drop();
27
	breadCrumb.drop();
28
	for (i=0; PathShow_path[i]; i++) 
28
	for (i=0; PathShow_path[i]; i++) 
29
	{
29
	{
30
		if (PathShow_path[i]=='/') {
30
		if (PathShow_path[i]=='/') {
31
			PathShow_path[i] = NULL;
31
			PathShow_path[i] = NULL;
32
			breadCrumb.add(i+1);
32
			breadCrumb.add(i+1);
33
		}
33
		}
34
	}
34
	}
35
	breadCrumb.add(i+1);
35
	breadCrumb.add(i+1);
36
	btn.set_size(246,10,NULL,20);
36
	btn.set_size(246,10,NULL,20);
37
	area_w = Form.cwidth - btn.x - 20;
37
	area_w = Form.cwidth - btn.x - 20;
38
	for (i=0; i
38
	for (i=0; i
39
	{
39
	{
40
		text_line = breadCrumb.get(i) + #PathShow_path;
40
		text_line = breadCrumb.get(i) + #PathShow_path;
41
		btn.w = strlen(text_line)*8+10;
41
		btn.w = strlen(text_line)*8+10;
42
		DrawBreadcrumbButton(btn.x, btn.y, btn.w, btn.h, i+BREADCRUMB_ID, text_line);
42
		DrawBreadcrumbButton(btn.x, btn.y, btn.w, btn.h, i+BREADCRUMB_ID, text_line);
43
		btn.x += btn.w;
43
		btn.x += btn.w;
44
	}
44
	}
45
	//DrawFavButton(btn.x);
45
	//DrawFavButton(btn.x);
46
	//btn.x+=20;
46
	//btn.x+=20;
47
	btn.x++;
47
	btn.x++;
48
	DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,sc.work);
48
	DrawBar(btn.x,btn.y-1,Form.cwidth-btn.x-25,btn.h+3,sc.work);
49
}
49
}
50
 
50
 
51
 
51
 
52
void ClickOnBreadCrumb(unsigned clickid)
52
void ClickOnBreadCrumb(unsigned clickid)
53
{
53
{
54
	int i, slashpos = #path;
54
	int i, slashpos = #path;
55
	for (i=0; i!=clickid+2; i++) {
55
	for (i=0; i!=clickid+2; i++) {
56
		slashpos=strchr(slashpos,'/')+1;
56
		slashpos=strchr(slashpos,'/')+1;
57
	}
57
	}
58
	ESBYTE[slashpos-1] = NULL;
58
	ESBYTE[slashpos-1] = NULL;
59
	Open_Dir(#path,WITH_REDRAW);
59
	Open_Dir(#path,WITH_REDRAW);
60
}
60
}
61
 
61
 
62
 
62
 
63
void DrawBreadcrumbButton(dword x,y,w,h,id,text)
63
void DrawBreadcrumbButton(dword x,y,w,h,id,text)
64
{
64
{
65
	int i;
65
	int i;
66
	DrawRectangle(x,y,w,h,sc.work_graph);
66
	DrawRectangle(x,y,w,h,sc.work_graph);
67
	for (i=0; (i
67
	for (i=0; (i
68
	DrawRectangle3D(x+1,y+1,w-2,h-2,sc.work_light, sc.work_dark);
68
	DrawRectangle3D(x+1,y+1,w-2,h-2,sc.work_light, sc.work_dark);
69
	DefineHiddenButton(x+1,y+1,w-2,h-2,id);
69
	DefineHiddenButton(x+1,y+1,w-2,h-2,id);
70
	WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text);
70
	WriteText(-strlen(text)*8+w/2+x,h/2+y-7,0x90,sc.work_text,text);
71
	DrawBar(x, y+h+1, w+1, 1, sc.work_light);
71
	DrawBar(x, y+h+1, w+1, 1, sc.work_light);
72
}
72
}